Changed block placer to not auto pull items, shift+wrench to change enable
This commit is contained in:
parent
552f4395b9
commit
911a8bbcf3
1 changed files with 25 additions and 1 deletions
|
@ -64,11 +64,25 @@ public class TilePlacer extends TileInventory implements IRotatable, IPacketRece
|
|||
work();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initiate()
|
||||
{
|
||||
super.initiate();
|
||||
updateDirection();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
if (doWork)
|
||||
if (autoPullItems && this.ticks % 5 == 0)
|
||||
{
|
||||
if (getStackInSlot(0) == null)
|
||||
{
|
||||
this.setInventorySlotContents(0, this.getInvHandler().tryGrabFromPosition(this.getDirection().getOpposite(), 1));
|
||||
}
|
||||
}
|
||||
if (doWork)
|
||||
{//TODO implement block break speed, and a minor delay
|
||||
doWork();
|
||||
doWork = false;
|
||||
}
|
||||
|
@ -99,6 +113,16 @@ public class TilePlacer extends TileInventory implements IRotatable, IPacketRece
|
|||
return true;
|
||||
}
|
||||
|
||||
protected boolean configure(EntityPlayer player, int side, Vector3 hit)
|
||||
{
|
||||
if (player.isSneaking())
|
||||
{
|
||||
this.autoPullItems = !this.autoPullItems;
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText("AutoExtract: " + this.autoPullItems));
|
||||
}
|
||||
return super.configure(player, side, hit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue