diff --git a/src/main/java/techreborn/api/ScrapboxList.java b/src/main/java/techreborn/api/ScrapboxList.java deleted file mode 100644 index 6467f9126..000000000 --- a/src/main/java/techreborn/api/ScrapboxList.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of TechReborn, licensed under the MIT License (MIT). - * - * Copyright (c) 2018 TechReborn - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package techreborn.api; - -import net.minecraft.item.ItemStack; - -import java.util.ArrayList; -import java.util.List; - -/** - * Use this to add items to the scrap box and to check if an item is present - * there - */ -@Deprecated -public class ScrapboxList { - - /** - * This full list of items that is registered with this api - */ - public static List stacks = new ArrayList<>(); - - /** - * Use this to add an item stack to the list - * - * @param stack the itemstack you want to add - */ - public static void addItemStackToList(ItemStack stack) { - if (!hasItems(stack)) { - stacks.add(stack); - } - } - - /** - * @param stack the itemstack you want to test - * @return if the scrapbox can output this this item - */ - private static boolean hasItems(ItemStack stack) { - for (ItemStack s : stacks) { - // TODO why do this!!!!!!!!! - if (stack.getDisplayName().equals(s.getDisplayName())) - return true; - } - return false; - } -} diff --git a/src/main/java/techreborn/client/container/ContainerDestructoPack.java b/src/main/java/techreborn/client/container/ContainerDestructoPack.java index f85d01a00..89af189f8 100644 --- a/src/main/java/techreborn/client/container/ContainerDestructoPack.java +++ b/src/main/java/techreborn/client/container/ContainerDestructoPack.java @@ -38,6 +38,7 @@ public class ContainerDestructoPack extends RebornContainer { private Inventory inv; public ContainerDestructoPack(EntityPlayer player) { + super(null); this.player = player; inv = new Inventory(1, "destructopack", 64, null); buildContainer(); diff --git a/src/main/java/techreborn/client/container/ContainerPda.java b/src/main/java/techreborn/client/container/ContainerPda.java deleted file mode 100644 index 99e6981ef..000000000 --- a/src/main/java/techreborn/client/container/ContainerPda.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of TechReborn, licensed under the MIT License (MIT). - * - * Copyright (c) 2018 TechReborn - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package techreborn.client.container; - -import net.minecraft.entity.player.EntityPlayer; -import reborncore.common.container.RebornContainer; - -public class ContainerPda extends RebornContainer { - - EntityPlayer player; - - public ContainerPda(EntityPlayer player) { - - } - - @Override - public boolean canInteractWith(EntityPlayer player) { - return true; - } - -} diff --git a/src/main/java/techreborn/client/container/builder/ContainerBuilder.java b/src/main/java/techreborn/client/container/builder/ContainerBuilder.java index 89774f32e..8de49a3d5 100644 --- a/src/main/java/techreborn/client/container/builder/ContainerBuilder.java +++ b/src/main/java/techreborn/client/container/builder/ContainerBuilder.java @@ -89,28 +89,6 @@ public class ContainerBuilder { this.tileInventoryRanges.add(range); } - @Deprecated - /** - * The container have to know if the tile is still available (the block was not destroyed) - * and if the player is not to far from him to close the GUI if necessary - */ - public BuiltContainer create() { - final BuiltContainer built = new BuiltContainer(this.name, this.canInteract, - this.playerInventoryRanges, - this.tileInventoryRanges, null); - if (!this.shortValues.isEmpty()) - built.addShortSync(this.shortValues); - if (!this.integerValues.isEmpty()) - built.addIntegerSync(this.integerValues); - if (!this.craftEvents.isEmpty()) - built.addCraftEvents(this.craftEvents); - - this.slots.forEach(built::addSlot); - - this.slots.clear(); - return built; - } - public BuiltContainer create(final TileLegacyMachineBase tile) { final BuiltContainer built = new BuiltContainer(this.name, this.canInteract, this.playerInventoryRanges, diff --git a/src/main/java/techreborn/client/container/builder/ContainerTileInventoryBuilder.java b/src/main/java/techreborn/client/container/builder/ContainerTileInventoryBuilder.java index 403e31c07..76ab5eb18 100644 --- a/src/main/java/techreborn/client/container/builder/ContainerTileInventoryBuilder.java +++ b/src/main/java/techreborn/client/container/builder/ContainerTileInventoryBuilder.java @@ -102,13 +102,6 @@ public class ContainerTileInventoryBuilder { return this; } - @Deprecated - public ContainerTileInventoryBuilder upgradeSlot(final int index, final int x, final int y) { - this.parent.slots.add(new FilteredSlot(this.tile, index, x, y) - .setFilter(stack -> stack.getItem() instanceof IUpgrade)); - return this; - } - private ContainerTileInventoryBuilder upgradeSlots(IUpgradeable upgradeable) { if (upgradeable.canBeUpgraded()) { for (int i = 0; i < upgradeable.getUpgradeSlotCount(); i++) { diff --git a/src/main/java/techreborn/items/ItemUpgrades.java b/src/main/java/techreborn/items/ItemUpgrades.java index 1bf0e88bc..7ec5156fd 100644 --- a/src/main/java/techreborn/items/ItemUpgrades.java +++ b/src/main/java/techreborn/items/ItemUpgrades.java @@ -159,12 +159,6 @@ public class ItemUpgrades extends ItemTR implements IUpgrade { } - @SuppressWarnings("deprecation") - @SideOnly(Side.CLIENT) - public BuiltContainer getContainer(EntityPlayer player) { - return new ContainerBuilder("sides").create(); - } - public EnumFacing getFacing(ItemStack stack) { return EnumFacing.VALUES[ItemNBTHelper.getInt(stack, "side", 0)]; } diff --git a/src/main/java/techreborn/tiles/TileTechStorageBase.java b/src/main/java/techreborn/tiles/TileTechStorageBase.java index 6f9d45028..abab50b3b 100644 --- a/src/main/java/techreborn/tiles/TileTechStorageBase.java +++ b/src/main/java/techreborn/tiles/TileTechStorageBase.java @@ -33,7 +33,6 @@ import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.wrapper.InvWrapper; -import powercrystals.minefactoryreloaded.api.IDeepStorageUnit; import reborncore.api.IListInfoProvider; import reborncore.api.IToolDrop; import reborncore.api.tile.IInventoryProvider; @@ -47,7 +46,7 @@ import java.util.List; import javax.annotation.Nullable; public class TileTechStorageBase extends TileLegacyMachineBase - implements IInventoryProvider, IToolDrop, IListInfoProvider, IDeepStorageUnit { + implements IInventoryProvider, IToolDrop, IListInfoProvider { public final int maxCapacity; public final Inventory inventory; @@ -265,26 +264,22 @@ public class TileTechStorageBase extends TileLegacyMachineBase } } - // IDeepStorageUnit - @Override public ItemStack getStoredItemType() { return storedItem.isEmpty() ? getStackInSlot(1) : storedItem; } - @Override + public void setStoredItemCount(int amount) { storedItem.grow(amount); markDirty(); } - @Override public void setStoredItemType(ItemStack type, int amount) { storedItem = type; storedItem.setCount(amount); markDirty(); } - @Override public int getMaxStoredCount() { return maxCapacity; }