Posted January 12, 201312 yr Hi everyone, can someone please tell me exactly how does it works the function updateEntity()?? I'm programming a custom furnace with two slot for the ingrediente, a slot for the fuel, and obviously the output slot. I made the function cook() which simply check if is possible to cook, and in that case it remove the ingredients and put the output in the output slot, but shoud I put the cook() in updateEntity()? if i do so, it crash with the error: "Ticking tile entity". Can someone explain where is my error please? =) public boolean canCook() { if (this.siliciumFurnaceItemStacks[1].stackSize > 0 && this.siliciumFurnaceItemStacks[2].stackSize > 0 && this.siliciumFurnaceItemStacks[3].stackSize > 0) { return true; } else return true; } public void cook() { ItemStack item; if (canCook() == true) { for (int i = 0; i <=2; i++){ this.siliciumFurnaceItemStacks[i].stackSize--;} this.siliciumFurnaceItemStacks[3] = new ItemStack(Item.diamond, 1); } } public void updateEntity() { cook(); this.onInventoryChanged(); } Attachments and other options
January 12, 201312 yr Wrong section. There's an EAQ for a reason. Read it! "Note that failure to read this will make you look idiotic. You don't want that do you?" -- luacs1998 First rule of bug reports: More information is always better. Oh, and logs OR IT DIDN'T HAPPEN!!
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.