Remove some old stuff

This commit is contained in:
modmuss50 2018-07-20 21:55:29 +01:00
parent 7b630f576f
commit f78abb1a21
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
7 changed files with 3 additions and 152 deletions

View file

@ -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<ItemStack> 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;
}
}

View file

@ -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();

View file

@ -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;
}
}

View file

@ -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,

View file

@ -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++) {

View file

@ -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)];
}

View file

@ -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;
}