diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 481c14fd2..a0fe1e44d 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -3694,6 +3694,7 @@ c9ac7e3e5ec18554e7184168d65e9b8e44ef5610 data/create/tags/blocks/sails.json 50936b211d94167a35ec78c89954082a336b6269 data/create/tags/blocks/valve_handles.json eac71740fb12bdb38b5dfaa2268613d7ba82b809 data/create/tags/blocks/windmill_sails.json 74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/create/tags/blocks/windowable.json +893a01e6004d6d8272bd1658e98da88bb572ee57 data/create/tags/blocks/wrench_pickup.json 081f5aa35602fc27af2ca01ea9f2fd5e7eb284dc data/create/tags/items/create_ingots.json 94c62bf22678ef55b2b8a5398a7960e5b00682dc data/create/tags/items/crushed_ores.json 6cdeeac1689f7b5bfd9bc40b462143d8eaf3ad0b data/create/tags/items/seats.json diff --git a/src/generated/resources/data/create/tags/blocks/wrench_pickup.json b/src/generated/resources/data/create/tags/blocks/wrench_pickup.json new file mode 100644 index 000000000..c3da555b0 --- /dev/null +++ b/src/generated/resources/data/create/tags/blocks/wrench_pickup.json @@ -0,0 +1,21 @@ +{ + "replace": false, + "values": [ + "#minecraft:rails", + "#minecraft:buttons", + "#minecraft:pressure_plates", + "minecraft:redstone_wire", + "minecraft:redstone_torch", + "minecraft:repeater", + "minecraft:lever", + "minecraft:comparator", + "minecraft:observer", + "minecraft:redstone_wall_torch", + "minecraft:piston", + "minecraft:sticky_piston", + "minecraft:tripwire", + "minecraft:tripwire_hook", + "minecraft:daylight_detector", + "minecraft:target" + ] +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index cce3028ad..fc6f202f2 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -153,7 +153,8 @@ public class AllTags { VALVE_HANDLES, FAN_TRANSPARENT, SAFE_NBT, - SLIMY_LOGS(TIC) + SLIMY_LOGS(TIC), + WRENCH_PICKUP, ; @@ -220,6 +221,13 @@ public class AllTags { Blocks.SOUL_CAMPFIRE); AllBlockTags.SAFE_NBT.includeAll(BlockTags.SIGNS); + AllBlockTags.WRENCH_PICKUP.includeAll(BlockTags.RAILS); + AllBlockTags.WRENCH_PICKUP.includeAll(BlockTags.BUTTONS); + AllBlockTags.WRENCH_PICKUP.includeAll(BlockTags.PRESSURE_PLATES); + AllBlockTags.WRENCH_PICKUP.add(Blocks.REDSTONE_WIRE, Blocks.REDSTONE_TORCH, Blocks.REPEATER, Blocks.LEVER, + Blocks.COMPARATOR, Blocks.OBSERVER, Blocks.REDSTONE_WALL_TORCH, Blocks.PISTON, Blocks.STICKY_PISTON, + Blocks.TRIPWIRE, Blocks.TRIPWIRE_HOOK, Blocks.DAYLIGHT_DETECTOR, Blocks.TARGET); + AllFluidTags.loadClass(); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java index 84e52fab5..190156a87 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java @@ -4,9 +4,9 @@ import javax.annotation.Nonnull; import com.simibubi.create.AllItems; import com.simibubi.create.AllSoundEvents; +import com.simibubi.create.AllTags; import com.simibubi.create.Create; -import net.minecraft.block.AbstractRailBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; @@ -52,7 +52,7 @@ public class WrenchItem extends Item { } private boolean canWrenchPickup(BlockState state) { - return state.getBlock() instanceof AbstractRailBlock; + return AllTags.AllBlockTags.WRENCH_PICKUP.matches(state); } private ActionResultType onItemUseOnOther(ItemUseContext context) {