add the ability to disable the placer with redstone

This commit is contained in:
Ellpeck 2018-11-28 13:18:21 +01:00
parent 9059577f75
commit e14de0b723
2 changed files with 4 additions and 2 deletions

View file

@ -32,6 +32,8 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable {
@Override @Override
public void update() { public void update() {
if (!this.world.isRemote && this.world.getTotalWorldTime() % 15 == 0) { if (!this.world.isRemote && this.world.getTotalWorldTime() % 15 == 0) {
if (this.redstonePower > 0)
return;
TileEntity tileUp = this.world.getTileEntity(this.pos.up()); TileEntity tileUp = this.world.getTileEntity(this.pos.up());
if (tileUp == null || !tileUp.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN)) if (tileUp == null || !tileUp.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.DOWN))
return; return;

View file

@ -6,11 +6,11 @@
"pages": [ "pages": [
{ {
"type": "text", "type": "text",
"text": "A lot of activities require a person to be around, most of them for $(thing)placing$() blocks into the world. This, really, is a waste of personell in a time where $(aura) can work in its place. The $(item)Imperceptible Builder$() will place any blocks you supply it with for a small amount of $(aura) in return.$(p)The builder gathers the blocks for placement from a $(item)Chest$() placed on top of it." "text": "A lot of activities require a person to be around, most of them for $(thing)placing$() blocks into the world. This, really, is a waste of personell in a time where $(aura) can work in its place. The $(item)Imperceptible Builder$() will place any blocks you supply it with for a small amount of $(aura) in return.$(br)The builder gathers the blocks for placement from any $(thing)item container$() placed on top of it."
}, },
{ {
"type": "text", "type": "text",
"text": "To specify which blocks it should then place them on, one needs to hang up an $(item)Item Frame$() on the builder and put the desired block inside of it. It will then place the blocks from the chest in an area of about $(thing)five blocks$().$(p)As an example, placing a piece of cobblestone into the frame and a stack of wooden planks into the chest will cause the planks to be placed on top of any cobblestone close by." "text": "To specify which blocks it should then place them on, one needs to hang up an $(item)Item Frame$() on the builder and put the desired block inside of it. It will then place the blocks from the chest in an area of about $(thing)five blocks$().$(br)As an example, placing a piece of cobblestone into the frame and a stack of planks into the chest will cause the planks to be placed on top of any cobblestone close by.$(p)Supplying a redstone signal will disable the placing."
}, },
{ {
"type": "crafting", "type": "crafting",