mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
the man
This commit is contained in:
parent
26bcbcf7e0
commit
0535d3c49f
@ -35,6 +35,8 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntityCrateTungsten) { return new ContainerCrateTungsten(player.inventory, (TileEntityCrateTungsten) entity); }
|
||||
if(entity instanceof TileEntityMassStorage) { return new ContainerMassStorage(player.inventory, (TileEntityMassStorage) entity); }
|
||||
|
||||
if(entity instanceof TileEntityMachineAutocrafter) { return new ContainerAutocrafter(player.inventory, (TileEntityMachineAutocrafter) entity); }
|
||||
|
||||
if(entity instanceof TileEntityMachineLiquefactor) { return new ContainerLiquefactor(player.inventory, (TileEntityMachineLiquefactor) entity); }
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new ContainerSolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new ContainerRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
@ -859,6 +861,8 @@ public class GUIHandler implements IGuiHandler {
|
||||
if(entity instanceof TileEntitySafe) { return new GUISafe(player.inventory, (TileEntitySafe) entity); }
|
||||
if(entity instanceof TileEntityMassStorage) { return new GUIMassStorage(player.inventory, (TileEntityMassStorage) entity); }
|
||||
|
||||
if(entity instanceof TileEntityMachineAutocrafter) { return new GUIAutocrafter(player.inventory, (TileEntityMachineAutocrafter) entity); }
|
||||
|
||||
if(entity instanceof TileEntityMachineLiquefactor) { return new GUILiquefactor(player.inventory, (TileEntityMachineLiquefactor) entity); }
|
||||
if(entity instanceof TileEntityMachineSolidifier) { return new GUISolidifier(player.inventory, (TileEntityMachineSolidifier) entity); }
|
||||
if(entity instanceof TileEntityMachineRadiolysis) { return new GUIRadiolysis(player.inventory, (TileEntityMachineRadiolysis) entity); }
|
||||
|
||||
@ -10,6 +10,7 @@ import static com.hbm.items.ModItems.*;
|
||||
import static com.hbm.blocks.ModBlocks.*;
|
||||
import static com.hbm.inventory.OreDictManager.DictFrame.*;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.hazard.HazardData;
|
||||
@ -427,7 +428,8 @@ public class OreDictManager {
|
||||
ANY_SMOKELESS .dust(ballistite, cordite);
|
||||
ANY_PLASTICEXPLOSIVE .ingot(ingot_semtex, ingot_c4);
|
||||
ANY_HIGHEXPLOSIVE .ingot(ball_tnt);
|
||||
ANY_CONCRETE .any(concrete, concrete_smooth, concrete_colored, concrete_asbestos, ducrete, ducrete_smooth);
|
||||
ANY_CONCRETE .any(concrete, concrete_smooth, concrete_asbestos, ducrete, ducrete_smooth);
|
||||
for(int i = 0; i < 16; i++) { ANY_CONCRETE.any(new ItemStack(ModBlocks.concrete_colored, 1, i)); }
|
||||
ANY_COKE .gem(fromAll(coke, EnumCokeType.class));
|
||||
ANY_BISMOID .ingot(ingot_bismuth, ingot_arsenic).nugget(nugget_bismuth, nugget_arsenic).block(block_bismuth);
|
||||
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
|
||||
public class SlotPattern extends Slot {
|
||||
|
||||
protected boolean canHover = true;
|
||||
|
||||
public SlotPattern(IInventory inv, int index, int x, int y) {
|
||||
super(inv, index, x, y);
|
||||
}
|
||||
@ -19,4 +23,15 @@ public class SlotPattern extends Slot {
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public SlotPattern disableHover() {
|
||||
this.canHover = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean func_111238_b() {
|
||||
return canHover;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotPattern;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerAutocrafter extends Container {
|
||||
|
||||
private TileEntityMachineAutocrafter autocrafter;
|
||||
|
||||
public ContainerAutocrafter(InventoryPlayer invPlayer, TileEntityMachineAutocrafter tedf) {
|
||||
autocrafter = tedf;
|
||||
|
||||
/* TEMPLATE */
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 3; j++) {
|
||||
this.addSlotToContainer(new SlotPattern(tedf, j + i * 3, 44 + j * 18, 22 + i * 18).disableHover());
|
||||
}
|
||||
}
|
||||
this.addSlotToContainer(new SlotPattern(tedf, 9, 116, 40));
|
||||
|
||||
/* RECIPE */
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 3; j++) {
|
||||
this.addSlotToContainer(new Slot(tedf, j + i * 3 + 10, 44 + j * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
this.addSlotToContainer(new Slot(tedf, 19, 116, 104));
|
||||
|
||||
//Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 20, 17, 99));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 158 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 216));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||
|
||||
//L/R: 0
|
||||
//M3: 3
|
||||
//SHIFT: 1
|
||||
//DRAG: 5
|
||||
|
||||
if(index < 0 || index > 9) {
|
||||
return super.slotClick(index, button, mode, player);
|
||||
}
|
||||
|
||||
Slot slot = this.getSlot(index);
|
||||
|
||||
ItemStack ret = null;
|
||||
ItemStack held = player.inventory.getItemStack();
|
||||
|
||||
if(slot.getHasStack())
|
||||
ret = slot.getStack().copy();
|
||||
|
||||
//Don't allow any interaction for the template's output
|
||||
if(index == 9)
|
||||
return ret;
|
||||
|
||||
if(button == 1 && mode == 0 && slot.getHasStack()) {
|
||||
autocrafter.nextMode(index);
|
||||
return ret;
|
||||
|
||||
} else {
|
||||
|
||||
slot.putStack(held != null ? held.copy() : null);
|
||||
|
||||
if(slot.getHasStack()) {
|
||||
slot.getStack().stackSize = 1;
|
||||
}
|
||||
|
||||
slot.onSlotChanged();
|
||||
autocrafter.initPattern(slot.getStack(), index);
|
||||
autocrafter.updateTemplateGrid();
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return autocrafter.isUseableByPlayer(player);
|
||||
}
|
||||
}
|
||||
@ -68,8 +68,6 @@ public class ContainerMassStorage extends Container {
|
||||
//M3: 3
|
||||
//SHIFT: 1
|
||||
//DRAG: 5
|
||||
//System.out.println("Mode " + mode);
|
||||
//System.out.println("Slot " + index);
|
||||
|
||||
if(index != 1) {
|
||||
return super.slotClick(index, button, mode, player);
|
||||
|
||||
80
src/main/java/com/hbm/inventory/gui/GUIAutocrafter.java
Normal file
80
src/main/java/com/hbm/inventory/gui/GUIAutocrafter.java
Normal file
@ -0,0 +1,80 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerAutocrafter;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIAutocrafter extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_autocrafter.png");
|
||||
private TileEntityMachineAutocrafter diFurnace;
|
||||
|
||||
public GUIAutocrafter(InventoryPlayer invPlayer, TileEntityMachineAutocrafter tedf) {
|
||||
super(new ContainerAutocrafter(invPlayer, tedf));
|
||||
diFurnace = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 240;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float interp) {
|
||||
super.drawScreen(x, y, interp);
|
||||
|
||||
if(this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||
for(int i = 0; i < 9; ++i) {
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get(i);
|
||||
|
||||
if(this.isMouseOverSlot(slot, x, y) && diFurnace.modes[i] != null) {
|
||||
|
||||
String label = EnumChatFormatting.YELLOW + "";
|
||||
|
||||
switch(diFurnace.modes[i]) {
|
||||
case "exact": label += "Item and meta match"; break;
|
||||
case "wildcard": label += "Item matches"; break;
|
||||
default: label += "Ore dict key matches: " + diFurnace.modes[i]; break;
|
||||
}
|
||||
|
||||
this.func_146283_a(Arrays.asList(new String[] { EnumChatFormatting.RED + "Right click to change", label }), x, y - 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.diFurnace.hasCustomInventoryName() ? this.diFurnace.getInventoryName() : I18n.format(this.diFurnace.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
|
||||
/**
|
||||
* I love the "private" key word so fucking much I'll spend the next 3 weeks ramming my cock into it
|
||||
* @param slot
|
||||
* @param x
|
||||
* @param y
|
||||
* @return
|
||||
*/
|
||||
protected boolean isMouseOverSlot(Slot slot, int x, int y) {
|
||||
return this.func_146978_c(slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, x, y);
|
||||
}
|
||||
}
|
||||
@ -269,6 +269,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crate_desh, 1), new Object[] { " D ", "DSD", " D ", 'D', ModItems.plate_desh, 'S', ModBlocks.crate_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.crate_tungsten, 1), new Object[] { "BPB", "PCP", "BPB", 'B', W.block(), 'P', ModItems.board_copper, 'C', ModBlocks.crate_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.safe, 1), new Object[] { "LAL", "ACA", "LAL", 'L', PB.plate(), 'A', ALLOY.plate(), 'C', ModBlocks.crate_steel });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_autocrafter, 1), new Object[] { "SCS", "MWM", "SCS", 'S', STEEL.plate(), 'C', ModItems.circuit_copper, 'M', ModItems.motor, 'W', Blocks.crafting_table });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_waste_drum, 1), new Object[] { "LRL", "BRB", "LRL", 'L', PB.ingot(), 'B', Blocks.iron_bars, 'R', ModItems.rod_quad_empty });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_press, 1), new Object[] { "IRI", "IPI", "IBI", 'I', IRON.ingot(), 'R', Blocks.furnace, 'B', IRON.block(), 'P', Blocks.piston });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_siren, 1), new Object[] { "SIS", "ICI", "SRS", 'S', STEEL.plate(), 'I', ModItems.plate_polymer, 'C', ModItems.circuit_copper, 'R', REDSTONE.dust() });
|
||||
|
||||
@ -53,6 +53,7 @@ import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
import com.hbm.util.LoggingUtil;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
@ -546,12 +547,12 @@ public class ModEventHandlerClient {
|
||||
HazardSystem.addFullTooltip(stack, event.entityPlayer, list);
|
||||
|
||||
if(event.showAdvancedItemTooltips) {
|
||||
int ids[] = OreDictionary.getOreIDs(stack);
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
if(ids.length > 0) {
|
||||
if(names.size() > 0) {
|
||||
list.add(EnumChatFormatting.BLUE + "Ore Dict:");
|
||||
for(int i : ids) {
|
||||
list.add(EnumChatFormatting.AQUA + " -" + OreDictionary.getOreName(i));
|
||||
for(String s : names) {
|
||||
list.add(EnumChatFormatting.AQUA + " -" + s);
|
||||
}
|
||||
} else {
|
||||
list.add(EnumChatFormatting.RED + "No Ore Dict data!");
|
||||
|
||||
@ -1,20 +1,156 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.ItemStackUtil;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
||||
public class TileEntityMachineAutocrafter extends TileEntityMachineBase {
|
||||
|
||||
public static final String MODE_EXACT = "exact";
|
||||
public static final String MODE_WILDCARD = "wildcard";
|
||||
public String[] modes = new String[9];
|
||||
|
||||
public TileEntityMachineAutocrafter() {
|
||||
super(21);
|
||||
}
|
||||
|
||||
public void initPattern(ItemStack stack, int i) {
|
||||
|
||||
if(stack == null) {
|
||||
modes[i] = null;
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
if(iterateAndCheck(names, i ,"ingot")) return;
|
||||
if(iterateAndCheck(names, i ,"block")) return;
|
||||
if(iterateAndCheck(names, i ,"dust")) return;
|
||||
if(iterateAndCheck(names, i ,"nugget")) return;
|
||||
if(iterateAndCheck(names, i ,"plate")) return;
|
||||
|
||||
if(stack.getHasSubtypes()) {
|
||||
modes[i] = MODE_EXACT;
|
||||
} else {
|
||||
modes[i] = MODE_WILDCARD;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean iterateAndCheck(List<String> names, int i, String prefix) {
|
||||
|
||||
for(String s : names) {
|
||||
if(s.startsWith(prefix)) {
|
||||
modes[i] = s;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void nextMode(int i) {
|
||||
ItemStack stack = slots[i];
|
||||
|
||||
if(stack == null) {
|
||||
modes[i] = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if(modes[i] == null) {
|
||||
modes[i] = MODE_EXACT;
|
||||
} else if(MODE_EXACT.equals(modes[i])) {
|
||||
modes[i] = MODE_WILDCARD;
|
||||
} else if(MODE_WILDCARD.equals(modes[i])) {
|
||||
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
if(names.isEmpty()) {
|
||||
modes[i] = MODE_EXACT;
|
||||
} else {
|
||||
modes[i] = names.get(0);
|
||||
}
|
||||
} else {
|
||||
|
||||
List<String> names = ItemStackUtil.getOreDictNames(stack);
|
||||
|
||||
if(names.size() < 2 || modes[i].equals(names.get(names.size() - 1))) {
|
||||
modes[i] = MODE_EXACT;
|
||||
} else {
|
||||
|
||||
for(int j = 0; j < names.size() - 1; j++) {
|
||||
|
||||
if(modes[i].equals(names.get(j))) {
|
||||
modes[i] = names.get(j + 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.autocrafter";
|
||||
}
|
||||
|
||||
protected InventoryCraftingAuto craftingInventory = new InventoryCraftingAuto(3, 3);
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.craftingInventory.loadIventory(slots, 10);
|
||||
ItemStack stack = CraftingManager.getInstance().findMatchingRecipe(this.craftingInventory, this.worldObj);
|
||||
|
||||
if(stack != null) {
|
||||
slots[19] = stack.copy();
|
||||
|
||||
for(int i = 10; i < 19; i++) {
|
||||
this.decrStackSize(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateTemplateGrid() {
|
||||
|
||||
this.craftingInventory.loadIventory(slots, 0);
|
||||
ItemStack temp = CraftingManager.getInstance().findMatchingRecipe(this.craftingInventory, this.worldObj);
|
||||
|
||||
if(temp != null) {
|
||||
slots[9] = temp.copy();
|
||||
} else {
|
||||
slots[9] = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static class InventoryCraftingAuto extends InventoryCrafting {
|
||||
|
||||
public InventoryCraftingAuto(int width, int height) {
|
||||
super(new ContainerBlank() /* "can't be null boo hoo" */, width, height);
|
||||
}
|
||||
|
||||
public void loadIventory(ItemStack[] slots, int start) {
|
||||
|
||||
for(int i = 0; i < this.getSizeInventory(); i++) {
|
||||
this.setInventorySlotContents(i, slots[start + i]);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ContainerBlank extends Container {
|
||||
@Override
|
||||
public void onCraftMatrixChanged(IInventory inventory) { }
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.hbm.tileentity.INBTPacketReceiver;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class TileEntityMassStorage extends TileEntityCrateBase implements INBTPacketReceiver, IControlReceiver {
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ItemStackUtil {
|
||||
|
||||
@ -134,4 +141,31 @@ public class ItemStackUtil {
|
||||
|
||||
return stacks;
|
||||
}
|
||||
|
||||
//private static HashMap<ComparableStack, List<String>> buffered = new HashMap();
|
||||
|
||||
/**
|
||||
* Returns a List<String> of all ore dict names for this stack. Stack cannot be null, list is empty when there are no ore dict entries.
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
public static List<String> getOreDictNames(ItemStack stack) {
|
||||
|
||||
/*ÜComparableStack comp = new ComparableStack(stack).makeSingular();
|
||||
|
||||
List<String> buff = buffered.get(comp);
|
||||
|
||||
if(buff != null)
|
||||
return buff;*/
|
||||
|
||||
List<String> list = new ArrayList();
|
||||
|
||||
int ids[] = OreDictionary.getOreIDs(stack);
|
||||
for(int i : ids) {
|
||||
list.add(OreDictionary.getOreName(i));
|
||||
}
|
||||
|
||||
//buffered.put(comp, new ArrayList(list));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user