Remove deprecated empty cell
This commit is contained in:
parent
de5ebf5ae3
commit
c271422e11
6 changed files with 16 additions and 96 deletions
|
@ -2,7 +2,6 @@ package techreborn.init;
|
|||
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
@ -22,6 +21,7 @@ import techreborn.items.tools.*;
|
|||
|
||||
public class ModItems {
|
||||
|
||||
public static final String META_PLACEHOLDER = "PLACEHOLDER_ITEM";
|
||||
public static Item gems;
|
||||
public static Item ingots;
|
||||
public static Item nuggets;
|
||||
|
@ -38,84 +38,65 @@ public class ModItems {
|
|||
public static Item uuMatter;
|
||||
public static Item plate;
|
||||
public static Item cloakingDevice;
|
||||
|
||||
public static Item reBattery;
|
||||
public static Item treeTap;
|
||||
public static Item electricTreetap;
|
||||
|
||||
public static Item ironDrill;
|
||||
public static Item diamondDrill;
|
||||
public static Item advancedDrill;
|
||||
|
||||
public static Item ironChainsaw;
|
||||
public static Item diamondChainsaw;
|
||||
public static Item advancedChainsaw;
|
||||
|
||||
public static Item steelJackhammer;
|
||||
public static Item diamondJackhammer;
|
||||
public static Item advancedJackhammer;
|
||||
|
||||
public static Item nanosaber;
|
||||
public static Item wrench;
|
||||
public static Item lapotronCrystal;
|
||||
public static Item energyCrystal;
|
||||
public static Item scrapBox;
|
||||
public static Item frequencyTransmitter;
|
||||
|
||||
public static Item bronzeSword;
|
||||
public static Item bronzePickaxe;
|
||||
public static Item bronzeSpade;
|
||||
public static Item bronzeAxe;
|
||||
public static Item bronzeHoe;
|
||||
|
||||
public static Item bronzeHelmet;
|
||||
public static Item bronzeChestplate;
|
||||
public static Item bronzeLeggings;
|
||||
public static Item bronzeBoots;
|
||||
|
||||
public static Item rubySword;
|
||||
public static Item rubyPickaxe;
|
||||
public static Item rubySpade;
|
||||
public static Item rubyAxe;
|
||||
public static Item rubyHoe;
|
||||
|
||||
public static Item rubyHelmet;
|
||||
public static Item rubyChestplate;
|
||||
public static Item rubyLeggings;
|
||||
public static Item rubyBoots;
|
||||
|
||||
public static Item sapphireSword;
|
||||
public static Item sapphirePickaxe;
|
||||
public static Item sapphireSpade;
|
||||
public static Item sapphireAxe;
|
||||
public static Item sapphireHoe;
|
||||
|
||||
public static Item sapphireHelmet;
|
||||
public static Item sapphireChestplate;
|
||||
public static Item sapphireLeggings;
|
||||
public static Item sapphireBoots;
|
||||
|
||||
public static Item peridotSword;
|
||||
public static Item peridotPickaxe;
|
||||
public static Item peridotSpade;
|
||||
public static Item peridotAxe;
|
||||
public static Item peridotHoe;
|
||||
|
||||
public static Item peridotHelmet;
|
||||
public static Item peridotChestplate;
|
||||
public static Item peridotLeggings;
|
||||
public static Item peridotBoots;
|
||||
|
||||
public static Item upgrades;
|
||||
|
||||
public static Item missingRecipe;
|
||||
public static Item debug;
|
||||
|
||||
public static Item emptyCell;
|
||||
public static DynamicCell dynamicCell;
|
||||
|
||||
public static final String META_PLACEHOLDER = "PLACEHOLDER_ITEM";
|
||||
|
||||
public static void init() throws InstantiationException, IllegalAccessException {
|
||||
gems = new ItemGems();
|
||||
registerItem(gems, "gem");
|
||||
|
@ -293,11 +274,6 @@ public class ModItems {
|
|||
dynamicCell = new DynamicCell();
|
||||
registerItem(dynamicCell, "dynamicCell");
|
||||
|
||||
emptyCell = dynamicCell;
|
||||
Item cell = new EmptyCell();
|
||||
registerItem(cell, "emptyCell");
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(dynamicCell), cell);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);
|
||||
|
||||
Core.logHelper.info("TechReborns Items Loaded");
|
||||
|
|
|
@ -485,7 +485,7 @@ public class ModRecipes {
|
|||
"ingot" + name.substring(0, 1).toUpperCase() + name.substring(1));
|
||||
}
|
||||
CraftingHelper
|
||||
.addShapedOreRecipe(ItemCells.getCellByName("empty", 16, false), " T ", "T T", " T ", 'T', "ingotTin");
|
||||
.addShapedOreRecipe(DynamicCell.getEmptyCell(16), " T ", "T T", " T ", 'T', "ingotTin");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(new ItemStack(ModBlocks.ironFence, 6), " ", "RRR", "RRR", 'R',
|
||||
ItemIngots.getIngotByName("refined_iron"));
|
||||
|
@ -831,7 +831,7 @@ public class ModRecipes {
|
|||
"ingotSteel", 'C', "ingotChrome", 'A', "ingotAluminum");
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("heliumCoolantSimple"), " T ", "TCT", " T ", 'T',
|
||||
"ingotTin", 'C', ItemCells.getCellByName("helium", 1, false));
|
||||
"ingotTin", 'C', ItemCells.getCellByName("helium", 1));
|
||||
|
||||
CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("HeliumCoolantTriple"), "TTT", "CCC", "TTT", 'T',
|
||||
"ingotTin", 'C', ItemParts.getPartByName("heliumCoolantSimple"));
|
||||
|
@ -1526,7 +1526,7 @@ public class ModRecipes {
|
|||
|
||||
RecipeHandler.addRecipe(
|
||||
new CentrifugeRecipe(new ItemStack(Items.GLOWSTONE_DUST, 16), RecipeUtils.getEmptyCell(1),
|
||||
ItemCells.getCellByName("helium", 1, false), ItemDusts.getDustByName("gold", 8),
|
||||
ItemCells.getCellByName("helium", 1), ItemDusts.getDustByName("gold", 8),
|
||||
new ItemStack(Items.REDSTONE), null, 25000, 20));
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ public class SubItemRetriever implements ISubItemRetriever {
|
|||
|
||||
@Override
|
||||
public ItemStack getCellByName(String name, int count, boolean lookForIC2) {
|
||||
return ItemCells.getCellByName(name, count, lookForIC2);
|
||||
return ItemCells.getCellByName(name, count);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 17/05/2016.
|
||||
*/
|
||||
@Deprecated
|
||||
public class EmptyCell extends ItemTextureBase {
|
||||
|
||||
public EmptyCell() {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.cell");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
tooltip.add("§cDeprecated");
|
||||
tooltip.add("§7Place to workbench to get new item");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return ModInfo.MOD_ID + ":items/cell_base";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
|
@ -5,25 +5,11 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
public class ItemCells {
|
||||
|
||||
@Deprecated
|
||||
public static final String[] types = new String[] { "Berylium", "biomass", "calciumCarbonate", "calcium", "carbon",
|
||||
"chlorine", "deuterium", "diesel", "ethanol", "glyceryl", "helium3", "helium", "heliumPlasma", "hydrogen",
|
||||
"ice", "lithium", "mercury", "methane", "nitrocarbon", "nitroCoalfuel", "nitroDiesel", "nitrogen",
|
||||
"nitrogenDioxide", "oil", "potassium", "seedOil", "silicon", "sodium", "sodiumPersulfate", "sodiumSulfide",
|
||||
"sulfur", "sulfuricAcid", "tritium", "wolframium", "empty", "lava", "water" };
|
||||
|
||||
@Deprecated
|
||||
public static ItemStack getCellByName(String name, int count, boolean lookForIC2) {
|
||||
return getCellByName(name, count);
|
||||
}
|
||||
|
||||
public static ItemStack getCellByName(String name, int count) {
|
||||
if (name.equalsIgnoreCase("empty") || name.equalsIgnoreCase("cell")) {
|
||||
return new ItemStack(ModItems.emptyCell, count);
|
||||
return DynamicCell.getEmptyCell(16).copy();
|
||||
}
|
||||
Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase());
|
||||
if (fluid == null) {
|
||||
|
|
|
@ -8,19 +8,16 @@ import reborncore.api.IListInfoProvider;
|
|||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||
import reborncore.api.tile.IContainerProvider;
|
||||
import reborncore.api.tile.IInventoryProvider;
|
||||
import reborncore.common.IWrenchable;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import reborncore.common.powerSystem.PoweredItem;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.Reference;
|
||||
import techreborn.client.container.ContainerCentrifuge;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.utils.upgrade.UpgradeHandler;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -33,7 +30,6 @@ public class TileCentrifuge extends TilePowerAcceptor
|
|||
public UpgradeHandler upgradeHandler;
|
||||
public RecipeCrafter crafter;
|
||||
|
||||
|
||||
public int euTick = ConfigTechReborn.CentrifugeInputTick;
|
||||
|
||||
public TileCentrifuge() {
|
||||
|
@ -119,10 +115,9 @@ public class TileCentrifuge extends TilePowerAcceptor
|
|||
return side == EnumFacing.DOWN ? new int[] { 0, 1, 2, 3, 4, 5 } : new int[] { 0, 1, 2, 3, 4, 5 };
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) {
|
||||
return itemStackIn.getItem() == ModItems.emptyCell ? index == 1 : index == 0;
|
||||
return itemStackIn.isItemEqual(DynamicCell.getEmptyCell(1).copy()) ? index == 1 : index == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -130,7 +125,6 @@ public class TileCentrifuge extends TilePowerAcceptor
|
|||
return slotIndex >= 2 && slotIndex <= 5;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInfo(List<String> info, boolean isRealTile) {
|
||||
super.addInfo(info, isRealTile);
|
||||
|
|
Loading…
Reference in a new issue