This commit is contained in:
PrototypeTrousers
2022-07-20 22:24:55 -03:00
parent 346f5aeaac
commit 9fdf0345b3
3 changed files with 19 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ aebuild=7
aegroup=appeng aegroup=appeng
aebasename=appliedenergistics2 aebasename=appliedenergistics2
extended=extended_life extended=extended_life
extendedversion=v0.52.9 extendedversion=v0.52.10
######################################################### #########################################################
# Versions # # Versions #
######################################################### #########################################################
@@ -20,6 +20,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@@ -50,7 +51,7 @@ public class ContainerNetworkTool extends AEBaseContainer
for( int x = 0; x < 3; x++ ) for( int x = 0; x < 3; x++ )
{ {
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, te
.getInventory(), y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, this.getInventoryPlayer() ) ) ); .getInventory(), y * 3 + x, 80 - 18 + x * 18, 37 - 18 + y * 18, this.getInventoryPlayer() ) ) );
} }
} }
@@ -97,6 +98,13 @@ public class ContainerNetworkTool extends AEBaseContainer
super.detectAndSendChanges(); super.detectAndSendChanges();
} }
@Override
public void onSlotChange( Slot s )
{
super.detectAndSendChanges();
}
public boolean isFacadeMode() public boolean isFacadeMode()
{ {
return this.facadeMode; return this.facadeMode;
@@ -138,6 +138,15 @@ public class AppEngSlot extends Slot
public void onSlotChanged() public void onSlotChanged()
{ {
this.setIsValid( hasCalculatedValidness.NotAvailable ); this.setIsValid( hasCalculatedValidness.NotAvailable );
if( this.isSlotEnabled() )
{
ItemHandlerUtil.setStackInSlot( this.itemHandler, this.index, this.getStack().copy() );
if( this.getContainer() != null )
{
this.getContainer().onSlotChange( this );
}
}
} }
@Override @Override