From 51ca5e620caa07d5a63e98af183552843596ecc1 Mon Sep 17 00:00:00 2001 From: Merith-TK Date: Mon, 22 Feb 2021 10:22:01 -0800 Subject: [PATCH] Don't propagate adjacent redstone signals for computers (#549) [PatchWork] Also updated patchwork format information --- patchwork.md | 20 ++++++++++++++++++- .../shared/ComputerCraftRegistry.java | 10 ++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/patchwork.md b/patchwork.md index 54031812c..3a2038b67 100644 --- a/patchwork.md +++ b/patchwork.md @@ -9,7 +9,9 @@ SubScript // Desc of commit ``` If a edit that is present in CC:T is not needed, I will skip over it. -Any and all references to an issue number, are to be found on CC:T's repo. not this oen +Any and all references to an issue number, are to be found on CC:T's repo. + +Lines that are found above a commit in this log like this one, (excluding this one) are comments about how i had to implement things that are not a simple 1:1 (excluding fabric/forge differences) conversion ```md 5155e18de279a193c558aa029963486fd1294769 @@ -104,3 +106,19 @@ Fix io.open documentation Well, that was silly. ``` + +I set the default properties for computers as `Block.GLASS` and then set their strength to `2F` and their soundgroup to stone +``` +8472112fc1eaad18ed6ed2c6c62b040fe421e81a +Don't propagate adjacent redstone signals for computers (#549) + +Minecraft propagates "strong" redstone signals (such as those directly +from comparators or repeaters) through solid blocks. This includes +computers, which is a little annoying as it means one cannot feed +redstone wire from one side and a repeater from another. + +This changes computers to not propagate strong redstone signals, in the +same way transparent blocks like glass do. + +Closes #548. +``` diff --git a/src/main/java/dan200/computercraft/shared/ComputerCraftRegistry.java b/src/main/java/dan200/computercraft/shared/ComputerCraftRegistry.java index 8dc8357b9..e2aa3763e 100644 --- a/src/main/java/dan200/computercraft/shared/ComputerCraftRegistry.java +++ b/src/main/java/dan200/computercraft/shared/ComputerCraftRegistry.java @@ -55,6 +55,7 @@ import dan200.computercraft.shared.turtle.items.ItemTurtle; import dan200.computercraft.shared.turtle.upgrades.*; import dan200.computercraft.shared.util.FixedPointTileEntityType; +import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.block.Material; @@ -68,6 +69,7 @@ import net.minecraft.item.ItemGroup; import net.minecraft.item.Items; import net.minecraft.screen.ScreenHandler; import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.sound.BlockSoundGroup; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; @@ -121,8 +123,12 @@ public final class ComputerCraftRegistry { public static final BlockCable CABLE = register("cable", new BlockCable(emProperties())); private static Block.Settings properties() { - return FabricBlockSettings.copyOf(Blocks.STONE) - .strength(2); + //return FabricBlockSettings.copyOf(Blocks.GLASS) + // .strength(2); + return AbstractBlock.Settings.of(Material.GLASS) + .strength(2F) + .sounds(BlockSoundGroup.STONE) + .nonOpaque(); } private static Block.Settings turtleProperties() {