diff options
author | miozune <miozune@gmail.com> | 2023-10-17 13:37:11 +0900 |
---|---|---|
committer | miozune <miozune@gmail.com> | 2023-10-17 17:39:55 +0900 |
commit | 325a5f154e8d8d7dac6c03deb632a0041b3d69ca (patch) | |
tree | 323c840a7478f6550ce6fac4606589a24f440f89 /src/main/java/gtPlusPlus/core/slots | |
parent | 6f27cb977e0ff601a540e9dbfd3d7565d0b05273 (diff) | |
download | GT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.tar.gz GT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.tar.bz2 GT5-Unofficial-325a5f154e8d8d7dac6c03deb632a0041b3d69ca.zip |
Remove unused classes
Diffstat (limited to 'src/main/java/gtPlusPlus/core/slots')
6 files changed, 0 insertions, 286 deletions
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotBlockedInv.java b/src/main/java/gtPlusPlus/core/slots/SlotBlockedInv.java deleted file mode 100644 index 3132baf159..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotBlockedInv.java +++ /dev/null @@ -1,39 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class SlotBlockedInv extends Slot { - - public SlotBlockedInv(IInventory inv, int index, int xPos, int yPos) { - super(inv, index, xPos, yPos); - } - - @Override - public boolean isItemValid(ItemStack stack) { - return false; - } - - @Override - public boolean canTakeStack(EntityPlayer player) { - return false; - } - - @Override - public void putStack(ItemStack itemStack) {} - - @Override - public void onPickupFromSlot(EntityPlayer player, ItemStack itemStack) {} - - @Override - public boolean getHasStack() { - return false; - } - - @Override - public ItemStack decrStackSize(int i) { - return null; - } -} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java b/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java deleted file mode 100644 index 0dd050b5aa..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotFuelRod.java +++ /dev/null @@ -1,52 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.enums.ItemList; -import ic2.core.Ic2Items; - -public class SlotFuelRod extends Slot { - - public SlotFuelRod(final IInventory inventory, final int index, final int x, final int y) { - super(inventory, index, x, y); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - boolean returnValue = false; - // Uranium Rods - if (itemstack.getItem() == Ic2Items.reactorUraniumSimple.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorUraniumDual.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorUraniumQuad.getItem()) { - returnValue = true; - } - - // Mox Rods - if (itemstack.getItem() == Ic2Items.reactorMOXSimple.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorMOXDual.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == Ic2Items.reactorMOXQuad.getItem()) { - returnValue = true; - } - - // Thorium Rods - if (itemstack.getItem() == ItemList.ThoriumCell_1.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == ItemList.ThoriumCell_2.getItem()) { - returnValue = true; - } else if (itemstack.getItem() == ItemList.ThoriumCell_4.getItem()) { - returnValue = true; - } - return returnValue; - } - - @Override - public int getSlotStackLimit() { - return 1; - } -} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java b/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java deleted file mode 100644 index 4047c4e62c..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotGtTool.java +++ /dev/null @@ -1,30 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -import gregtech.api.items.GT_MetaGenerated_Tool; -import gtPlusPlus.api.objects.Logger; - -public class SlotGtTool extends Slot { - - public SlotGtTool(final IInventory inventory, final int x, final int y, final int z) { - super(inventory, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); - return false; - } - - @Override - public int getSlotStackLimit() { - return 1; - } -} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java b/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java deleted file mode 100644 index ffd9f6dcae..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotLunchBox.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.FoodUtils; - -public class SlotLunchBox extends SlotGtTool { - - public SlotLunchBox(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); - return false; - } -} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java b/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java deleted file mode 100644 index 7c13dd1c7a..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotMagicToolBag.java +++ /dev/null @@ -1,29 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemFood; -import net.minecraft.item.ItemStack; - -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.util.minecraft.FoodUtils; - -public class SlotMagicToolBag extends SlotGtTool { - - public SlotMagicToolBag(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof ItemFood) || (FoodUtils.isFood(itemstack))) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid food."); - return true; - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid food."); - return false; - } -} diff --git a/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java b/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java deleted file mode 100644 index 29ad60fa18..0000000000 --- a/src/main/java/gtPlusPlus/core/slots/SlotToolBox.java +++ /dev/null @@ -1,107 +0,0 @@ -package gtPlusPlus.core.slots; - -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTool; - -import gregtech.api.items.GT_MetaGenerated_Tool; -import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.core.util.reflect.ReflectionUtils; - -public class SlotToolBox extends SlotGtTool { - - private static final AutoMap<Class> mSupportedCustomTools = new AutoMap<Class>(); - - static { - // Look for Supported custom tool types - Class temp; - - // IC2 Electrics - temp = ReflectionUtils.getClass("ic2.api.item.IElectricItem"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - // IC2 Boxables - temp = ReflectionUtils.getClass(" ic2.api.item.IBoxable"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - // Tinkers Tools - temp = ReflectionUtils.getClass("tconstruct.library.tools.Weapon"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - // BattleGear Weapons - temp = ReflectionUtils.getClass("mods.battlegear2.api.weapons.IBattlegearWeapon"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - // OpenMods - String[] OpenModsContent = new String[] { "openblocks.common.item.ItemDevNull", - "openblocks.common.item.ItemHangGlider", "openblocks.common.item.ItemWrench", - "openblocks.common.item.ItemSleepingBag" }; - for (String t : OpenModsContent) { - temp = ReflectionUtils.getClass(t); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - // GC Wrench - temp = ReflectionUtils.getClass("micdoodle8.mods.galacticraft.core.items.ItemUniversalWrench"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - - // EIO - String[] EioContent = new String[] { "crazypants.enderio.api.tool.ITool", "crazypants.enderio.item.ItemMagnet", - "crazypants.enderio.item.ItemConduitProbe" }; - for (String t : EioContent) { - temp = ReflectionUtils.getClass(t); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - // Forestry - temp = ReflectionUtils.getClass("forestry.core.items.ItemForestryTool"); - if (temp != null) { - mSupportedCustomTools.put(temp); - temp = null; - } - } - - public SlotToolBox(final IInventory base, final int x, final int y, final int z) { - super(base, x, y, z); - } - - @Override - public boolean isItemValid(final ItemStack itemstack) { - return isItemValid_STATIC(itemstack); - } - - public static boolean isItemValid_STATIC(final ItemStack itemstack) { - if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof ItemTool)) { - Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool."); - return true; - } - for (Class C : mSupportedCustomTools) { - if (C.isInstance(itemstack.getItem())) { - return true; - } - } - Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool."); - return false; - } -} |