mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Wrench-stone
- Wrenches can pick up redstone components - This behavior is controlled by the block tag #create:wrench_pickup
This commit is contained in:
parent
8fd4664ed8
commit
de339819d5
4 changed files with 33 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue