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:
Raven Szewczyk authored and GitHub committed 2022-09-22 20:51:23 +02:00
1 parent 18bfeaff32
commit 39be06c23b
571 files changed
+25959 -28223

No files matched your search

@@ -5,41 +5,31 @@ import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public class TProxyCommon implements IGuiHandler
{
public void initialize ()
{
}
public class TProxyCommon implements IGuiHandler {
public void initialize() {}
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
IGuiHandler handler = serverGuiHandlers.get(ID);
if (handler != null)
return handler.getServerGuiElement(ID, player, world, x, y, z);
if (handler != null) return handler.getServerGuiElement(ID, player, world, x, y, z);
return null;
}
@Override
public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
IGuiHandler handler = clientGuiHandlers.get(ID);
if (handler != null)
return handler.getClientGuiElement(ID, player, world, x, y, z);
if (handler != null) return handler.getClientGuiElement(ID, player, world, x, y, z);
return null;
}
private static HashMap<Integer, IGuiHandler> serverGuiHandlers = new HashMap<Integer, IGuiHandler>();
private static HashMap<Integer, IGuiHandler> clientGuiHandlers = new HashMap<Integer, IGuiHandler>();
public static void registerServerGuiHandler (int gui, IGuiHandler handler)
{
public static void registerServerGuiHandler(int gui, IGuiHandler handler) {
serverGuiHandlers.put(gui, handler);
}
public static void registerClientGuiHandler (int gui, IGuiHandler handler)
{
public static void registerClientGuiHandler(int gui, IGuiHandler handler) {
clientGuiHandlers.put(gui, handler);
}
}
@@ -3,18 +3,15 @@ package tconstruct.common.itemblocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
public class MetadataItemBlock extends ItemBlock
{
public MetadataItemBlock(Block b)
{
public class MetadataItemBlock extends ItemBlock {
public MetadataItemBlock(Block b) {
super(b);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata (int meta)
{
public int getMetadata(int meta) {
return meta;
}
}