mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fix Laser Relay interaction >_<
This commit is contained in:
parent
e8d89f6df4
commit
9b21323c4f
1 changed files with 7 additions and 2 deletions
|
@ -164,7 +164,10 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
|
|||
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile;
|
||||
|
||||
if(StackUtil.isValid(stack)){
|
||||
if(stack.getItem() instanceof ItemCompass){
|
||||
if(stack.getItem() instanceof ItemLaserWrench){
|
||||
return false;
|
||||
}
|
||||
else if(stack.getItem() instanceof ItemCompass){
|
||||
if(!world.isRemote){
|
||||
relay.onCompassAction(player);
|
||||
|
||||
|
@ -183,7 +186,9 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay{
|
|||
ItemStack inRelay = relay.slots.getStackInSlot(0);
|
||||
if(!StackUtil.isValid(inRelay)){
|
||||
if(!world.isRemote){
|
||||
player.setHeldItem(hand, StackUtil.addStackSize(stack, -1));
|
||||
if(!player.isCreative()){
|
||||
player.setHeldItem(hand, StackUtil.addStackSize(stack, -1));
|
||||
}
|
||||
|
||||
ItemStack set = StackUtil.validateCopy(stack);
|
||||
relay.slots.setStackInSlot(0, StackUtil.setStackSize(set, 1));
|
||||
|
|
Loading…
Reference in a new issue