// update tileentity public void updateEntity() { if (this.cookingTime > 0) { --this.cookingTime; if (this.cookingTime == 0) { this.finishedCooking = true; this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.fizz", 1.0F, 1.0F); this.onInventoryChanged(); this.updateTeppannMeta(); this.readyTime = Util.getTeppannReadyTime(); } else if (this.cookingItem == null) { this.cookingTime = 0; this.onInventoryChanged(); this.updateTeppannMeta(); } } else if (this.cookingItem != null && !this.finishedCooking) { this.cookingTime = this.getCookingTime(); this.readyTime = 0; this.tooLate = false; this.onInventoryChanged(); this.updateTeppannMeta(); } else if (this.cookingItem == null && this.finishedCooking) { this.finishedCooking = false; this.updateTeppannMeta(); } if (this.readyTime > 0) { --this.readyTime; if (this.readyTime == 0) { if (this.cookingItem != null || this.finishedCooking) { if (DCsAppleMilk.teppannHardMode) { this.tooLate = true; this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.fizz", 1.0F, 1.0F); this.updateTeppannMeta(); this.onInventoryChanged(); } else { this.tooLate = false; } } else { this.tooLate = false; } } else if (this.cookingItem == null || !this.finishedCooking) { this.tooLate = false; this.readyTime = 0; this.updateTeppannMeta(); this.onInventoryChanged(); } } }
@Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.boxTex = par1IconRegister.registerIcon("applemilk:porcelain"); this.chainTex = par1IconRegister.registerIcon(Util.getTexturePassNoAlt() + "chain"); }