mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
Fix JABBA-related issues with crafting station slots (#54)
* Fix shift-merging tools voiding items fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/11392> * Change 0-sized ItemStacks into null stacks in crafting station attached slots Fixes <https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/10425> * Update buildscript * spotlessApply
This commit is contained in:
1 parent
18bfeaff32
commit
39be06c23b
571 files changed
+25959
-28223
No files matched your search
@@ -12,57 +12,45 @@ import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
* 2-9: Food
|
||||
*/
|
||||
|
||||
public abstract class EquipLogic extends InventoryLogic
|
||||
{
|
||||
public abstract class EquipLogic extends InventoryLogic {
|
||||
|
||||
public EquipLogic(int invSize)
|
||||
{
|
||||
public EquipLogic(int invSize) {
|
||||
super(invSize);
|
||||
}
|
||||
|
||||
public void setEquipmentItem (ItemStack stack)
|
||||
{
|
||||
public void setEquipmentItem(ItemStack stack) {
|
||||
inventory[0] = stack.copy();
|
||||
}
|
||||
|
||||
public boolean hasEquipmentItem ()
|
||||
{
|
||||
public boolean hasEquipmentItem() {
|
||||
return inventory[0] != null;
|
||||
}
|
||||
|
||||
public ItemStack getEquipmentItem ()
|
||||
{
|
||||
public ItemStack getEquipmentItem() {
|
||||
return inventory[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents (int slot, ItemStack stack)
|
||||
{
|
||||
if (slot == 0)
|
||||
{
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
if (slot == 0) {
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
super.setInventorySlotContents(slot, stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot (int slot)
|
||||
{
|
||||
public ItemStack getStackInSlot(int slot) {
|
||||
return slot != 0 ? inventory[slot] : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackInSlot (int slot)
|
||||
{
|
||||
public boolean isStackInSlot(int slot) {
|
||||
return slot != 0 ? inventory[slot] != null : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public S35PacketUpdateTileEntity getDescriptionPacket ()
|
||||
{
|
||||
public S35PacketUpdateTileEntity getDescriptionPacket() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.writeToNBT(compound);
|
||||
|
||||
@@ -71,8 +59,7 @@ public abstract class EquipLogic extends InventoryLogic
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity pkt)
|
||||
{
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
this.readFromNBT(pkt.func_148857_g());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user