Villfuk02 Posted November 29, 2016 Posted November 29, 2016 I'm having problem with my TileEntity. When the progress > power_needed it is supposed to remove one item from each input slot and put items in output, also incrementing essence_stored and setting its type. It works fine, but when i update one of the item slots, it resets and if i reload the world, the progress, essence, and everything else also resets. What am i supposed to do to fix this? Please help, i'm trying to fix this 5 days and still no idea how to do this. Tile Entity code: package com.villfuk02.essence.tileentities; import org.xml.sax.InputSource; import com.villfuk02.essence.Essence; import com.villfuk02.essence.gui.ContainerManualMill; import com.villfuk02.essence.init.ModItems; import jline.internal.Log; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.Packet; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ITickable; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityManualMill extends TileEntity implements IInventory, ITickable { public static final int fuel_slots = 0; public static final int input_slots = 4; public static final int output_slots = 1; public static final int total_slots = input_slots + output_slots + fuel_slots; public static final int first_fuel_slot = 0; public static final int first_input_slot = first_fuel_slot + fuel_slots; public static final int first_output_slot = first_input_slot + input_slots; private static int recipe_count = 3; public boolean powered = false; private ItemStack[] itemStacks = new ItemStack[total_slots]; private String customName; private static ItemStack[] inputs = {new ItemStack(Items.FEATHER),new ItemStack(Items.STRING),new ItemStack(Items.GLOWSTONE_DUST),new ItemStack(Items.PAPER),new ItemStack(Blocks.LEAVES),new ItemStack(Blocks.TALLGRASS),new ItemStack(Items.WHEAT),new ItemStack(Items.MELON),new ItemStack(Blocks.LEAVES2),new ItemStack(Blocks.TALLGRASS),new ItemStack(Items.WHEAT),new ItemStack(Items.MELON)}; private static ItemStack[] outputs = {new ItemStack(ModItems.essence_dust, 1, 0),new ItemStack(ModItems.essence_dust, 1, 1),new ItemStack(ModItems.essence_dust, 1, 1)}; private static Essence[] essence_outputs ={new Essence(40, 0),new Essence(40, 1),new Essence(40, 1)}; private int speed; private int average_speed = 0; private int cache_speed = -1; private int speed_decrement = 3; private int power_needed = 8000; private int progress; private int rotation; private int rotation_stage; private int max_essence = 1000; private int essence_stored = 0; private int essence_type = -1; public int getAvgSpeed(){ return average_speed; } public int getSpeed(){ return speed; } public boolean getPowered(){ return powered; } public int getEssence(){ return essence_stored; } public int getEssenceType(){ return essence_type; } public double fractionEssence(){ double fraction = 39.0 *((double)essence_stored / (double)max_essence); if (fraction > 0.0) fraction++; return MathHelper.clamp_double(fraction, 0.0, 40.0); } public double fractionProgress(){ double fraction = ((double)progress / (double)power_needed); return MathHelper.clamp_double(fraction, 0.0, 1.0); } public double fractionSpeed(){ double fraction = ((double)average_speed / (double)(30 * speed_decrement)); return MathHelper.clamp_double(fraction, 0.0, 1.0); } public int getRotationStage() { return rotation_stage; } @Override public void update(){ if (essence_stored == 0){ essence_type = -1; } if(powered){ speed += 80; }else if(speed > 0){ speed -= 1 + (int)((double)speed / (double)speed_decrement); } if (speed < 0) speed = 0; if (progress >= power_needed){ finishRecipe(); progress = 0; } average_speed = (average_speed * 39 + speed) / 40; if(validRecipe()){ if(average_speed > 0){ rotation += average_speed; progress += average_speed; } if (progress <0) progress = 0; rotation_stage = ((int)((double)rotation / 37.5)) % 4; if (rotation > 149) rotation -= 150; }else { progress = 0; } if (essence_stored == 0){ essence_type = -1; } powered = false; this.markDirty(); } private boolean validRecipe(){ ItemStack result = null; boolean validi = false; boolean valide = false; result = getOutput(this.itemStacks[0],this.itemStacks[1],this.itemStacks[2],this.itemStacks[3]); if (result != null) { ItemStack outputStack = this.itemStacks[4]; if (outputStack == null){ validi = true; }else if (outputStack.getItem() == result.getItem() && outputStack.getMetadata() == result.getMetadata() && ItemStack.areItemStackTagsEqual(outputStack, result)){ int combinedSize = outputStack.stackSize + result.stackSize; if (combinedSize <= 64 && combinedSize <= outputStack.getMaxStackSize()){ validi = true; } } } if (validi){ Essence essence = getEssenceOutput(this.itemStacks[0],this.itemStacks[1],this.itemStacks[2],this.itemStacks[3]); if (essence != null){ if(essence_type == -1){ valide = true; }else if(essence.getType() == essence_type){ int combined_amount = essence.getAmount() + essence_stored; if (combined_amount <= max_essence){ valide = true; } } } } if (!valide){ validi = false; } this.markDirty(); return validi; } public void finishRecipe(){ ItemStack out = getOutput(this.itemStacks[0],this.itemStacks[1],this.itemStacks[2],this.itemStacks[3]); if (this.getStackInSlot(4) == null){ this.setInventorySlotContents(4, out); }else{ this.setInventorySlotContents(4, new ItemStack(this.itemStacks[4].getItem(), this.itemStacks[4].stackSize + out.stackSize, this.itemStacks[4].getMetadata())); } for(int i = 0; i < 4; i++){ ItemStack stack = this.itemStacks[i]; stack.stackSize--; if (stack.stackSize <= 0){ stack = null; } this.setInventorySlotContents(i, stack); } essence_stored += getEssenceOutput(this.itemStacks[0],this.itemStacks[1],this.itemStacks[2],this.itemStacks[3]).getAmount(); essence_type = getEssenceOutput(this.itemStacks[0],this.itemStacks[1],this.itemStacks[2],this.itemStacks[3]).getType(); this.markDirty(); } public static ItemStack getOutput(ItemStack in1, ItemStack in2, ItemStack in3, ItemStack in4){ ItemStack result = null; ItemStack[] in = {in1, in2, in3, in4}; if (in1 == null || in2 == null || in3 == null || in4 == null){ return null; }else{ for(int x = 0; x < recipe_count; x++){ for (int a = 0; a < 4; a++){ if (in[a].getItem() == inputs[4*x].getItem()){ for (int b = 0; b < 4; b++){ if (in[b].getItem() == inputs[4*x + 1].getItem()){ for (int c = 0; c < 4; c++){ if (in[c].getItem() == inputs[4*x + 2].getItem()){ for (int d = 0; d < 4; d++){ if (in[d].getItem() == inputs[4*x + 3].getItem()){ result = outputs[x]; } } } } } } } } } if (in1.getItem() == ModItems.essence_dust && in2.getItem() == ModItems.essence_dust && in3.getItem() == ModItems.essence_dust && in4.getItem() == ModItems.essence_dust){ int data = in1.getMetadata(); if (in2.getMetadata() == data && in3.getMetadata() == data && in4.getMetadata() == data) result = new ItemStack(ModItems.essence_dust, 3, data); } } return result; } public static Essence getEssenceOutput(ItemStack in1, ItemStack in2, ItemStack in3, ItemStack in4){ Essence result = null; ItemStack[] in = {in1, in2, in3, in4}; if (in1 == null || in2 == null || in3 == null || in4 == null){ return null; }else{ for(int x = 0; x < recipe_count; x++){ for (int a = 0; a < 4; a++){ if (in[a].getItem() == inputs[4*x].getItem()){ for (int b = 0; b < 4; b++){ if (in[b].getItem() == inputs[4*x + 1].getItem()){ for (int c = 0; c < 4; c++){ if (in[c].getItem() == inputs[4*x + 2].getItem()){ for (int d = 0; d < 4; d++){ if (in[d].getItem() == inputs[4*x + 3].getItem()){ result = essence_outputs[x]; } } } } } } } } } if (in1.getItem() == ModItems.essence_dust && in2.getItem() == ModItems.essence_dust && in3.getItem() == ModItems.essence_dust && in4.getItem() == ModItems.essence_dust){ int data = in1.getMetadata(); if (in2.getMetadata() == data && in3.getMetadata() == data && in4.getMetadata() == data) result = new Essence(20, data); } } return result; } public String getCustomName(){ return this.customName; } public void setCustomName(String customName){ this.customName = customName; } public ItemStack[] getStacks(){ return this.itemStacks; } @Override public String getName() { return this.hasCustomName() ? this.customName : "Manual Essence Mill"; } @Override public boolean hasCustomName() { return this.customName != null && !this.customName.equals(""); } @Override public int getSizeInventory() { return 5; } @Override public ItemStack getStackInSlot(int index) { if(index < 0 || index >= this.getSizeInventory()){ return null; } return this.itemStacks[index]; } @Override public ItemStack decrStackSize(int index, int count) { if(this.getStackInSlot(index)!= null){ ItemStack itemStack; if (this.getStackInSlot(index).stackSize <= count) { itemStack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); this.markDirty(); return itemStack; }else{ itemStack = this.getStackInSlot(index).splitStack(count); if(this.getStackInSlot(index).stackSize <= 0){ this.setInventorySlotContents(index, null); }else{ this.setInventorySlotContents(index, this.getStackInSlot(index)); } this.markDirty(); return itemStack; } } else { return null; } } @Override public ItemStack removeStackFromSlot(int index) { ItemStack stack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); return stack; } @Override public void setInventorySlotContents(int index, ItemStack stack) { if (index < 0 || index >= this.getSizeInventory()) return; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) stack.stackSize = this.getInventoryStackLimit(); if (stack != null && stack.stackSize == 0) stack = null; this.itemStacks[index] = stack; this.markDirty(); } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { return this.worldObj.getTileEntity(this.getPos()) == this && player.getDistanceSq(this.pos.add(0.5, 0.5, 0.5)) <= 64; } @Override public void openInventory(EntityPlayer player) { } @Override public void closeInventory(EntityPlayer player) { } @Override public boolean isItemValidForSlot(int index, ItemStack stack) { return true; } @Override public int getField(int id) { int value = 0; if (id == 0) value = progress; if (id == 1) value = speed; if (id == 2) value = rotation; if (id == 3) value = essence_stored; if (id == 4) value = essence_type; return value; } @Override public void setField(int id, int value) { if (id == 0) progress = value; if (id == 1) speed = value; if (id == 2) rotation = value; if (id == 3) essence_stored = value; if (id == 4) essence_type = value; } @Override public int getFieldCount() { return 5; } @Override public void clear() { for(int i = 0; i < this.getSizeInventory(); i++){ this.setInventorySlotContents(i, null); } } @Override public NBTTagCompound writeToNBT(NBTTagCompound nbt){ super.writeToNBT(nbt); NBTTagList list = new NBTTagList(); for (int i = 0; i < this.getSizeInventory(); i++){ if (this.itemStacks[i] != null){ NBTTagCompound stackTag = new NBTTagCompound(); stackTag.setByte("Slot", ((byte)i)); this.itemStacks[i].writeToNBT(stackTag); list.appendTag(stackTag); } } nbt.setTag("Items", list); nbt.setInteger("progress", progress); nbt.setInteger("speed", speed); nbt.setInteger("rotation", rotation); nbt.setInteger("essence_stored", essence_stored); nbt.setInteger("essence_type", essence_type); if (this.hasCustomName()){ nbt.setString("CustomName",this.getCustomName()); } return nbt; } @Override public void readFromNBT(NBTTagCompound nbt){ super.readFromNBT(nbt); NBTTagList list = nbt.getTagList("Items", 10); for(int i = 0; i < list.tagCount(); ++i){ NBTTagCompound stackTag = list.getCompoundTagAt(i); int slot = stackTag.getByte("Slot") & 255; this.setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(stackTag)); } progress = nbt.getInteger("progress"); speed = nbt.getInteger("speed"); rotation = nbt.getInteger("rotation"); essence_stored = nbt.getInteger("essence_stored"); essence_type = nbt.getInteger("essence_type"); if(nbt.hasKey(customName, ){ this.setCustomName(nbt.getString("CustomName")); } } } HELP Thanks for any response Quote
larsgerrits Posted November 29, 2016 Posted November 29, 2016 Use IItemHandler in combination with Capabilities : http://mcforge.readthedocs.io/en/latest/datastorage/capabilities/ Quote Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
Alexiy Posted November 30, 2016 Posted November 30, 2016 You also need to override following methods to make synchronisation automatic between server and client: @Override public SPacketUpdateTileEntity getUpdatePacket() { BlockPos blockPos=getPos(); return new SPacketUpdateTileEntity(blockPos,0,getUpdateTag()); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { NBTTagCompound nbtTagCompound=pkt.getNbtCompound(); super.readFromNBT(nbtTagCompound); readFromNBT(nbtTagCompound); } @Override public NBTTagCompound getUpdateTag() { NBTTagCompound supertag=super.getUpdateTag(); writeToNBT(supertag); return supertag; } @Override public void handleUpdateTag(NBTTagCompound tag) { super.handleUpdateTag(tag); readFromNBT(tag); } Quote
Villfuk02 Posted November 30, 2016 Author Posted November 30, 2016 I looked at the link, but i dont proprly understand it, can you please say it little bit less complicated? Or even better: give me a code for simple custom chest using it, and i will learn from it. THX Quote
Animefan8888 Posted November 30, 2016 Posted November 30, 2016 On 11/30/2016 at 2:35 PM, Villfuk02 said: I looked at the link, but i dont proprly understand it, can you please say it little bit less complicated? Or even better: give me a code for simple custom chest using it, and i will learn from it. THX In your TE override getCapability(Capability, EnumFacing) and hasCapability(Capability, EnumFacing). return an instance of IItemHandlerModifiable. IE if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY /* Something with EnumFacing here if you want */) return itemHander; Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Animefan8888 Posted November 30, 2016 Posted November 30, 2016 On 11/30/2016 at 3:53 PM, Villfuk02 said: and thats all ?!?! Pretty much. You might need to create a custom implementation of IItemHandlerModifiable instead of using the default one provided (ItemStackHandler). Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted November 30, 2016 Author Posted November 30, 2016 Could you please give me an example code for simple custom chest? I dont have much time for this and it takes some time until somebody responds, so want to have it right pretty much first time. I'm out of time for today, so see you tomorrow and thanks for your help. Quote
Animefan8888 Posted November 30, 2016 Posted November 30, 2016 On 11/30/2016 at 4:18 PM, Villfuk02 said: Could you please give me an example code for simple custom chest? I dont have much time for this and it takes some time until somebody responds, so want to have it right pretty much first time. I'm out of time for today, so see you tomorrow and thanks for your help. ItemStackHandler itemHandler = new ItemstackHandler(size); @Override public boolean hasCapability(Capability capability, EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY ? true : super.hasCapability(capability, facing); } @Override public Capability getCapability(Capability capability, EnumFacing facing) { return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY : itemHandler ? super.getCapability(capability, facing); } Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 and what am i supposed to do with this? private TileEntityStoneCrate te; public ContainerStoneCrate(IInventory playerInv, TileEntityStoneCrate te) { this.te = te; //Tile Entity, Slot 0-80, Slot IDs 0-80 for (int y = 0; y < 9; ++y){ for (int x = 0; x < 9; ++x){ this.addSlotToContainer(new Slot(te, x + y * 9, 15 + x * 16, 15 + y * 16)); } } the Slot() wants IInventory, but the tileentity isn't IInventory anymore. I tried just casting it to IInventory, but that doesn't work. And this: InventoryHelper.dropInventoryItems(world, pos, (IInventory) te); Quote
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 I just dont understand what am i exactly supposed to do. COULD ANYONE PLEASE GIVE ME A CODE FOR SIMPLE CHEST WITH ALL THE THINGS LIKE TILEENTITY, GUI CONTAINER AND BLOCK, PLEASE? I will look at the code and learn how to do it, dont worry, i'll not juct copy and paste it. Quote
Animefan8888 Posted December 1, 2016 Posted December 1, 2016 On 12/1/2016 at 3:35 PM, Villfuk02 said: And how do i use it? Read the docs. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 Sorry, i've read them, but i'm so stupid and new. The language is too technical for me and i dont understand, what am i supposed to do. Quote
Animefan8888 Posted December 1, 2016 Posted December 1, 2016 On 12/1/2016 at 3:43 PM, Villfuk02 said: Sorry, i've read them, but i'm so stupid and new. The language is too technical for me and i dont understand, what am i supposed to do. If you don't understand this then....you could use ItemStackHandler. Javadocs /** * Inserts an ItemStack into the given slot and return the remainder. * The ItemStack should not be modified in this function! * Note: This behaviour is subtly different from IFluidHandlers.fill() * * @param slot Slot to insert into. * @param stack ItemStack to insert. * @param simulate If true, the insertion is only simulated * @return The remaining ItemStack that was not inserted (if the entire stack is accepted, then return null). * May be the same as the input ItemStack if unchanged, otherwise a new ItemStack. **/ ItemStack insertItem(int slot, ItemStack stack, boolean simulate); /** * Extracts an ItemStack from the given slot. The returned value must be null * if nothing is extracted, otherwise it's stack size must not be greater than amount or the * itemstacks getMaxStackSize(). * * @param slot Slot to extract from. * @param amount Amount to extract (may be greater than the current stacks max limit) * @param simulate If true, the extraction is only simulated * @return ItemStack extracted from the slot, must be null, if nothing can be extracted **/ ItemStack extractItem(int slot, int amount, boolean simulate); Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 OooOO that looks good, but where do i find it? Quote
Animefan8888 Posted December 1, 2016 Posted December 1, 2016 On 12/1/2016 at 3:50 PM, Villfuk02 said: OooOO that looks good, but where do i find it? Those Javadocs are found inside the file of IItemHandler itself. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 Still dont know Quote COULD ANYONE PLEASE GIVE ME A CODE FOR SIMPLE CHEST WITH ALL THE THINGS LIKE TILEENTITY, GUI CONTAINER AND BLOCK, PLEASE? I will look at the code and learn how to do it, dont worry, i'll not juct copy and paste it. Quote
Animefan8888 Posted December 1, 2016 Posted December 1, 2016 On 12/1/2016 at 4:24 PM, Villfuk02 said: Still dont know Quote COULD ANYONE PLEASE GIVE ME A CODE FOR SIMPLE CHEST WITH ALL THE THINGS LIKE TILEENTITY, GUI CONTAINER AND BLOCK, PLEASE? I will look at the code and learn how to do it, dont worry, i'll not juct copy and paste it. I gave you the code for the TE, diesieben provided the correct type of slot to use, and the block and gui code was not even posted. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Draco18s Posted December 1, 2016 Posted December 1, 2016 Take Part A and combine with Change B. It's not that hard. Remove "Slot" add "SlotItemHandler" Watch the magic happen. We are not here to give you copy-and-paste code. You should already know how to program on your own, we are not Java school. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 Something is working now, but how do i do this public ItemStack removeStackFromSlot(int index) { ItemStack stack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); return stack; } with IItemHandlerModifiable? (it does not let me take items out from the slots) Quote
Animefan8888 Posted December 1, 2016 Posted December 1, 2016 On 12/1/2016 at 5:07 PM, Villfuk02 said: Something is working now, but how do i do this public ItemStack removeStackFromSlot(int index) { ItemStack stack = this.getStackInSlot(index); this.setInventorySlotContents(index, null); return stack; } with IItemHandlerModifiable? (it does not let me take items out from the slots) What does your extractItem() method look like? Or did you use ItemStackHandler. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Villfuk02 Posted December 1, 2016 Author Posted December 1, 2016 @Override public ItemStack extractItem(int slot, int amount, boolean simulate) { if(!simulate){ if(this.getStackInSlot(slot)!= null){ ItemStack itemStack; if (this.getStackInSlot(slot).stackSize <= amount) { itemStack = this.getStackInSlot(slot); this.setInventorySlotContents(slot, null); this.markDirty(); return itemStack; }else{ itemStack = this.getStackInSlot(slot).splitStack(amount); if(this.getStackInSlot(slot).stackSize <= 0){ this.setInventorySlotContents(slot, null); }else{ this.setInventorySlotContents(slot, this.getStackInSlot(slot)); } this.markDirty(); return itemStack; } } else { return null; } } return null; } also when i placed hopper under it, the game crashed and i cant load the world anymore Quote
Draco18s Posted December 1, 2016 Posted December 1, 2016 So I have to ask: Why are you overriding extractItem here? It does not appear that you are doing anything different than the standard ItemStackHandler class does, except that you always return null in the case of simulate being true (which is incorrect). Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.