Jump to content

gmod622

Members
  • Posts

    214
  • Joined

  • Last visited

Everything posted by gmod622

  1. .. So something like this? @Override public <T> T getCapability(Capability<T> capability, EnumFacing facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return (T) this.furnaceItemStacks; } return super.getCapability(capability, facing); }
  2. One issue though, changing it from ISidedInventory gave me errors on these lines, what whould I change this to. net.minecraftforge.items.IItemHandler handlerTop = new net.minecraftforge.items.wrapper.SidedInvWrapper( this, net.minecraft.util.EnumFacing.UP); net.minecraftforge.items.IItemHandler handlerBottom = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.DOWN); net.minecraftforge.items.IItemHandler handlerSide = new net.minecraftforge.items.wrapper.SidedInvWrapper( this, net.minecraft.util.EnumFacing.WEST);
  3. Hey all! So I was creating a 'coal generator' to create 'energy', however, I ran into some issues that I didn't know how to fix. Here are the issues: Not Burning Fuel On Reconnected, Items 'disappear' into your inventory, and cannot be interacted with, until you click the slot. NOTE: This is my attempt at creating a different TE and trying to learn from it. This was a learning experience, a lot of stuff WILL BE WRONG. Here is the TE package com.lambda.PlentifulMisc.blocks.tile; import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.block.BlockFurnace; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerFurnace; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.inventory.ItemStackHelper; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemHoe; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.item.ItemTool; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityLockable; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.datafix.DataFixer; import net.minecraft.util.datafix.FixTypes; import net.minecraft.util.datafix.walkers.ItemStackDataLists; import net.minecraft.util.math.MathHelper; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class TileEntityCoalGenerator extends TileEntityLockable implements ITickable, ISidedInventory { private static final int[] SLOTS_FUEL = new int[] {0}; /** The ItemStacks that hold the items currently being used in the furnace */ private ItemStack[] furnaceItemStacks = new ItemStack[1]; /** The number of ticks that the furnace will keep burning */ private int fuelBurnTime; /** The number of ticks that a fresh copy of the currently-burning item would keep the furnace burning for */ private String coalGeneratorCustomName; public int currentEnergy; public int maxEnergy; public boolean canAcceptEnergy; /** * Returns the number of slots in the inventory. */ public int getSizeInventory() { return this.furnaceItemStacks.length; } public double fractionOfFuelRemaining(int fuelSlot) { double fraction = currentEnergy / (double)currentEnergy; return MathHelper.clamp_double(fraction, 0.0, 1.0); } public int secondsOfFuelRemaining(int fuelSlot) { if (currentEnergy <= 0 ) return 0; return currentEnergy / 20; // 20 ticks per second } /** * Returns the stack in the given slot. */ @Nullable public ItemStack getStackInSlot(int index) { return this.furnaceItemStacks[index]; } /** * Removes up to a specified number of items from an inventory slot and returns them in a new stack. */ @Nullable public ItemStack decrStackSize(int index, int count) { return ItemStackHelper.getAndSplit(this.furnaceItemStacks, index, count); } /** * Removes a stack from the given slot and returns it. */ @Nullable public ItemStack removeStackFromSlot(int index) { return ItemStackHelper.getAndRemove(this.furnaceItemStacks, index); } /** * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). */ public void setInventorySlotContents(int index, @Nullable ItemStack stack) { boolean flag = stack != null && stack.isItemEqual(this.furnaceItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.furnaceItemStacks[index]); this.furnaceItemStacks[index] = stack; if (stack != null && stack.stackSize > this.getInventoryStackLimit()) { stack.stackSize = this.getInventoryStackLimit(); } if (index == 0 && !flag) { this.markDirty(); } } /** * Get the name of this object. For players this returns their username */ public String getName() { return this.hasCustomName() ? this.coalGeneratorCustomName : "container.coalGenerator.name"; } /** * Returns true if this thing is named */ public boolean hasCustomName() { return this.coalGeneratorCustomName != null && !this.coalGeneratorCustomName.isEmpty(); } public void setCustomInventoryName(String p_145951_1_) { this.coalGeneratorCustomName = p_145951_1_; } public static void registerFixesFurnace(DataFixer fixer) { fixer.registerWalker(FixTypes.BLOCK_ENTITY, new ItemStackDataLists("Furnace", new String[] {"Items"})); } public void readFromNBT(NBTTagCompound compound) { super.readFromNBT(compound); NBTTagList nbttaglist = compound.getTagList("Items", 10); this.furnaceItemStacks = new ItemStack[this.getSizeInventory()]; for (int i = 0; i < nbttaglist.tagCount(); ++i) { NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i); int j = nbttagcompound.getByte("Slot"); if (j >= 0 && j < this.furnaceItemStacks.length) { this.furnaceItemStacks[j] = ItemStack.loadItemStackFromNBT(nbttagcompound); } } this.fuelBurnTime = compound.getInteger("BurnTime"); this.currentEnergy = compound.getInteger("CurrentEnergy"); if (compound.hasKey("CustomName", ) { this.coalGeneratorCustomName = compound.getString("CustomName"); } } public NBTTagCompound writeToNBT(NBTTagCompound compound) { super.writeToNBT(compound); compound.setInteger("BurnTime", this.fuelBurnTime); compound.setInteger("CurrentEnergy", this.currentEnergy); NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.furnaceItemStacks.length; ++i) { if (this.furnaceItemStacks[i] != null) { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setByte("Slot", (byte)i); this.furnaceItemStacks[i].writeToNBT(nbttagcompound); nbttaglist.appendTag(nbttagcompound); } } compound.setTag("Items", nbttaglist); if (this.hasCustomName()) { compound.setString("CustomName", this.coalGeneratorCustomName); } return compound; } /** * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. */ public int getInventoryStackLimit() { return 64; } /** * Furnace isBurning */ public boolean isBurning() { return this.fuelBurnTime > 0; } @SideOnly(Side.CLIENT) public static boolean isBurning(IInventory inventory) { return inventory.getField(0) > 0; } /** * Like the old updateEntity(), except more generic. */ public void update() { boolean flag = this.isBurning(); boolean flag1 = false; if (this.isBurning()) { --this.fuelBurnTime; this.currentEnergy++; } if (!this.worldObj.isRemote) { if (this.isBurning()) { this.fuelBurnTime = getItemBurnTime(this.furnaceItemStacks[1]); if (this.isBurning()) { flag1 = true; if (this.furnaceItemStacks[1] != null) { --this.furnaceItemStacks[1].stackSize; if (this.furnaceItemStacks[1].stackSize == 0) { this.furnaceItemStacks[1] = furnaceItemStacks[1].getItem().getContainerItem(furnaceItemStacks[1]); } } } } if (flag != this.isBurning()) { flag1 = true; BlockFurnace.setState(this.isBurning(), this.worldObj, this.pos); } } if (flag1) { this.markDirty(); } } /** * Returns true if the furnace can smelt an item, i.e. has a source item, destination stack isn't full, etc. */ /* private boolean canSmelt() { if (this.furnaceItemStacks[0] == null) { return false; } else { ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks[0]); if (itemstack == null) return false; if (this.furnaceItemStacks[2] == null) return true; if (!this.furnaceItemStacks[2].isItemEqual(itemstack)) return false; int result = furnaceItemStacks[2].stackSize + itemstack.stackSize; return result <= getInventoryStackLimit() && result <= this.furnaceItemStacks[2].getMaxStackSize(); //Forge BugFix: Make it respect stack sizes properly. } } */ /** * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't * fuel */ public static int getItemBurnTime(ItemStack stack) { if (stack == null) { return 0; } else { Item item = stack.getItem(); if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.AIR) { Block block = Block.getBlockFromItem(item); if (block == Blocks.WOODEN_SLAB) { return 150; } if (block.getDefaultState().getMaterial() == Material.WOOD) { return 300; } if (block == Blocks.COAL_BLOCK) { return 16000; } } if (item instanceof ItemTool && "WOOD".equals(((ItemTool)item).getToolMaterialName())) return 200; if (item instanceof ItemSword && "WOOD".equals(((ItemSword)item).getToolMaterialName())) return 200; if (item instanceof ItemHoe && "WOOD".equals(((ItemHoe)item).getMaterialName())) return 200; if (item == Items.STICK) return 100; if (item == Items.COAL) return 1600; if (item == Items.LAVA_BUCKET) return 20000; if (item == Item.getItemFromBlock(Blocks.SAPLING)) return 100; if (item == Items.BLAZE_ROD) return 2400; return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(stack); } } public static boolean isItemFuel(ItemStack stack) { return getItemBurnTime(stack) > 0; } /** * Don't rename this method to canInteractWith due to conflicts with Container */ public boolean isUseableByPlayer(EntityPlayer player) { return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D; } public void openInventory(EntityPlayer player) { } public void closeInventory(EntityPlayer player) { } /** * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For * guis use Slot.isItemValid */ public boolean isItemValidForSlot(int index, ItemStack stack) { if (index == 2) { return false; } else if (index != 1) { return true; } else { ItemStack itemstack = this.furnaceItemStacks[1]; return isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack) && (itemstack == null || itemstack.getItem() != Items.BUCKET); } } public int[] getSlotsForFace(EnumFacing side) { return side == EnumFacing.DOWN ? SLOTS_FUEL : (side == EnumFacing.UP ? SLOTS_FUEL : SLOTS_FUEL); } /** * Returns true if automation can insert the given item in the given slot from the given side. */ public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) { return this.isItemValidForSlot(index, itemStackIn); } /** * Returns true if automation can extract the given item in the given slot from the given side. */ public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) { if (direction == EnumFacing.DOWN && index == 1) { Item item = stack.getItem(); if (item != Items.WATER_BUCKET && item != Items.BUCKET) { return false; } } return true; } public String getGuiID() { return "minecraft:furnace"; } public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) { return new ContainerFurnace(playerInventory, this); } public int getField(int id) { switch (id) { case 0: return this.fuelBurnTime; case 1: return this.currentEnergy; default: return 0; } } public void setField(int id, int value) { switch (id) { case 0: this.fuelBurnTime = value; break; case 1: this.currentEnergy = value; } } public int getFieldCount() { return 4; } public void clear() { for (int i = 0; i < this.furnaceItemStacks.length; ++i) { this.furnaceItemStacks[i] = null; } } net.minecraftforge.items.IItemHandler handlerTop = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.UP); net.minecraftforge.items.IItemHandler handlerBottom = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.DOWN); net.minecraftforge.items.IItemHandler handlerSide = new net.minecraftforge.items.wrapper.SidedInvWrapper(this, net.minecraft.util.EnumFacing.WEST); @SuppressWarnings("unchecked") @Override public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, net.minecraft.util.EnumFacing facing) { if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) if (facing == EnumFacing.DOWN) return (T) handlerBottom; else if (facing == EnumFacing.UP) return (T) handlerTop; else return (T) handlerSide; return super.getCapability(capability, facing); } } and Container package com.lambda.PlentifulMisc.blocks.container; import javax.annotation.Nullable; import com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IContainerListener; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.inventory.SlotFurnaceFuel; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ContainerCoalGenerator extends Container { private final TileEntityCoalGenerator tileCoalGenerator; private int fuelBurnTime; public int currentEnergy; public int maxEnergy; public boolean canAcceptEnergy; private final int HOTBAR_SLOT_COUNT = 9; private final int PLAYER_INVENTORY_ROW_COUNT = 3; private final int PLAYER_INVENTORY_COLUMN_COUNT = 9; private final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; private final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; public final int FUEL_SLOTS_COUNT = 1; public final int FURNACE_SLOTS_COUNT = FUEL_SLOTS_COUNT; private final int VANILLA_FIRST_SLOT_INDEX = 0; private final int FIRST_FUEL_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; private final int FIRST_FUEL_SLOT_NUMBER = 0; public ContainerCoalGenerator(InventoryPlayer invPlayer, TileEntityCoalGenerator tileInventoryFurnace) { this.tileCoalGenerator = tileInventoryFurnace; final int SLOT_X_SPACING = 18; final int SLOT_Y_SPACING = 18; final int HOTBAR_XPOS = 8; final int HOTBAR_YPOS = 183; // Add the players hotbar to the gui - the [xpos, ypos] location of each item for (int x = 0; x < HOTBAR_SLOT_COUNT; x++) { int slotNumber = x; addSlotToContainer(new Slot(invPlayer, slotNumber, HOTBAR_XPOS + SLOT_X_SPACING * x, HOTBAR_YPOS)); } final int PLAYER_INVENTORY_XPOS = 8; final int PLAYER_INVENTORY_YPOS = 125; // Add the rest of the players inventory to the gui for (int y = 0; y < PLAYER_INVENTORY_ROW_COUNT; y++) { for (int x = 0; x < PLAYER_INVENTORY_COLUMN_COUNT; x++) { int slotNumber = HOTBAR_SLOT_COUNT + y * PLAYER_INVENTORY_COLUMN_COUNT + x; int xpos = PLAYER_INVENTORY_XPOS + x * SLOT_X_SPACING; int ypos = PLAYER_INVENTORY_YPOS + y * SLOT_Y_SPACING; addSlotToContainer(new Slot(invPlayer, slotNumber, xpos, ypos)); } } final int FUEL_SLOTS_XPOS = 83; final int FUEL_SLOTS_YPOS = 60; // Add the tile fuel slots for (int x = 0; x < FUEL_SLOTS_COUNT; x++) { int slotNumber = x + FIRST_FUEL_SLOT_NUMBER; addSlotToContainer(new SlotFurnaceFuel(tileCoalGenerator, slotNumber, FUEL_SLOTS_XPOS + SLOT_X_SPACING * x, FUEL_SLOTS_YPOS)); } } public void addListener(IContainerListener listener) { super.addListener(listener); listener.sendAllWindowProperties(this, this.tileCoalGenerator); } /** * Looks for changes made in the container, sends them to every listener. */ public void detectAndSendChanges() { super.detectAndSendChanges(); for (int i = 0; i < this.listeners.size(); ++i) { IContainerListener icontainerlistener = (IContainerListener)this.listeners.get(i); if (this.fuelBurnTime != this.tileCoalGenerator.getField(0)) { icontainerlistener.sendProgressBarUpdate(this, 0, this.tileCoalGenerator.getField(0)); } } this.fuelBurnTime = this.tileCoalGenerator.getField(0); this.currentEnergy = this.tileCoalGenerator.getField(1); } @SideOnly(Side.CLIENT) public void updateProgressBar(int id, int data) { this.tileCoalGenerator.setField(id, data); } /** * Determines whether supplied player can use this container */ public boolean canInteractWith(EntityPlayer playerIn) { return this.tileCoalGenerator.isUseableByPlayer(playerIn); } /** * Take a stack from the specified inventory slot. */ @Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) { ItemStack itemstack = null; Slot slot = (Slot)this.inventorySlots.get(index); if (slot != null && slot.getHasStack()) { ItemStack itemstack1 = slot.getStack(); itemstack = itemstack1.copy(); if (index == 2) { if (!this.mergeItemStack(itemstack1, 3, 39, true)) { return null; } slot.onSlotChange(itemstack1, itemstack); } else if (index != 1 && index != 0) { if (TileEntityCoalGenerator.isItemFuel(itemstack1)) { if (!this.mergeItemStack(itemstack1, 1, 2, false)) { } } else if (index >= 3 && index < 30) { if (!this.mergeItemStack(itemstack1, 30, 39, false)) { return null; } } else if (index >= 30 && index < 39 && !this.mergeItemStack(itemstack1, 3, 30, false)) { return null; } } else if (!this.mergeItemStack(itemstack1, 3, 39, false)) { return null; } if (itemstack1.stackSize == 0) { slot.putStack((ItemStack)null); } else { slot.onSlotChanged(); } if (itemstack1.stackSize == itemstack.stackSize) { return null; } slot.onPickupFromSlot(playerIn, itemstack1); } return itemstack; } } Thanks!
  4. NVM, had wrong name. EDIT 2: Still same error [19:52:04] [Client thread/FATAL]: Unreported exception thrown! java.lang.ClassCastException: com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator cannot be cast to com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer at com.lambda.PlentifulMisc.client.gui.GuiHandler.getClientGuiElement(GuiHandler.java:59) ~[GuiHandler.class:?] at com.lambda.PlentifulMisc.client.gui.GuiRegistyHandler.getClientGuiElement(GuiRegistyHandler.java:37) ~[GuiRegistyHandler.class:?] at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:273) ~[NetworkRegistry.class:?] at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:110) ~[FMLNetworkHandler.class:?] at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2729) ~[EntityPlayer.class:?] at com.lambda.PlentifulMisc.blocks.BlockCoalGenerator.onBlockActivated(BlockCoalGenerator.java:45) ~[blockCoalGenerator.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:442) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] [19:52:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ---- // Don't be sad, have a hug! <3 Time: 11/21/16 7:52 PM Description: Unexpected error java.lang.ClassCastException: com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator cannot be cast to com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer at com.lambda.PlentifulMisc.client.gui.GuiHandler.getClientGuiElement(GuiHandler.java:59) at com.lambda.PlentifulMisc.client.gui.GuiRegistyHandler.getClientGuiElement(GuiRegistyHandler.java:37) at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:273) at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:110) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2729) at com.lambda.PlentifulMisc.blocks.BlockCoalGenerator.onBlockActivated(BlockCoalGenerator.java:45) at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:442) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) at net.minecraft.client.Minecraft.run(Minecraft.java:406) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at com.lambda.PlentifulMisc.client.gui.GuiHandler.getClientGuiElement(GuiHandler.java:59) at com.lambda.PlentifulMisc.client.gui.GuiRegistyHandler.getClientGuiElement(GuiRegistyHandler.java:37) at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:273) at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:110) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2729) at com.lambda.PlentifulMisc.blocks.BlockCoalGenerator.onBlockActivated(BlockCoalGenerator.java:45) at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:442) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player778'/299, l='MpServer', x=205.48, y=64.00, z=309.54]] Chunk stats: MultiplayerChunkCache: 573, 573 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (32,64,256), Chunk: (at 0,4,0 in 2,16; contains blocks 32,0,256 to 47,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 99393 game time, 487 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 96 total; [EntityZombie['Zombie'/273, l='MpServer', x=220.50, y=59.00, z=232.50], EntitySpider['Spider'/274, l='MpServer', x=212.50, y=58.00, z=254.50], EntityCow['Cow'/275, l='MpServer', x=215.48, y=61.00, z=269.20], EntityZombie['Zombie'/276, l='MpServer', x=223.39, y=38.00, z=332.83], EntitySkeleton['Skeleton'/277, l='MpServer', x=221.46, y=51.00, z=351.70], EntitySheep['Sheep'/278, l='MpServer', x=216.82, y=62.49, z=371.94], EntityPig['Pig'/279, l='MpServer', x=210.13, y=63.00, z=387.16], EntityBat['Bat'/285, l='MpServer', x=228.45, y=36.87, z=245.50], EntityCow['Cow'/286, l='MpServer', x=224.53, y=59.00, z=264.82], EntityCow['Cow'/287, l='MpServer', x=238.69, y=66.00, z=261.81], EntityCow['Cow'/288, l='MpServer', x=238.59, y=70.00, z=300.82], EntitySheep['Sheep'/289, l='MpServer', x=233.58, y=63.00, z=330.45], EntitySheep['Sheep'/290, l='MpServer', x=233.52, y=63.00, z=329.23], EntitySkeleton['Skeleton'/291, l='MpServer', x=225.50, y=37.00, z=360.50], EntityZombie['Zombie'/292, l='MpServer', x=228.30, y=54.00, z=363.55], EntityZombie['Zombie'/293, l='MpServer', x=232.50, y=54.00, z=363.50], EntityZombie['Zombie'/294, l='MpServer', x=226.76, y=55.00, z=362.52], EntityZombie['Zombie'/295, l='MpServer', x=232.76, y=58.00, z=375.50], EntityZombie['Zombie'/296, l='MpServer', x=234.01, y=58.00, z=375.50], EntityCow['Cow'/341, l='MpServer', x=266.23, y=71.00, z=249.46], EntityCow['Cow'/342, l='MpServer', x=263.25, y=71.00, z=248.17], EntityCow['Cow'/343, l='MpServer', x=250.55, y=70.00, z=258.98], EntityCreeper['Creeper'/345, l='MpServer', x=246.50, y=37.00, z=255.50], EntityWitch['Witch'/346, l='MpServer', x=246.50, y=37.00, z=254.50], EntityCreeper['Creeper'/347, l='MpServer', x=242.50, y=37.00, z=248.50], EntityCreeper['Creeper'/348, l='MpServer', x=242.50, y=37.00, z=248.50], EntityCow['Cow'/349, l='MpServer', x=257.48, y=64.00, z=301.23], EntityZombie['entity.Zombie.name'/350, l='MpServer', x=252.50, y=27.00, z=314.50], EntitySheep['Sheep'/351, l='MpServer', x=252.51, y=77.00, z=316.81], EntityZombie['Zombie'/352, l='MpServer', x=279.24, y=18.00, z=278.51], EntityCreeper['Creeper'/353, l='MpServer', x=275.50, y=18.00, z=279.50], EntityCow['Cow'/354, l='MpServer', x=283.35, y=71.00, z=272.51], EntityCow['Cow'/355, l='MpServer', x=277.64, y=71.00, z=248.25], EntityCow['Cow'/356, l='MpServer', x=261.90, y=71.00, z=250.53], EntitySheep['Sheep'/361, l='MpServer', x=279.55, y=65.00, z=304.45], EntitySpider['Spider'/362, l='MpServer', x=258.50, y=20.00, z=326.50], EntityCow['Cow'/364, l='MpServer', x=257.45, y=75.00, z=315.55], EntityZombie['Zombie'/365, l='MpServer', x=247.51, y=20.00, z=333.12], EntityCow['Cow'/366, l='MpServer', x=254.45, y=62.53, z=328.37], EntitySheep['Sheep'/367, l='MpServer', x=257.49, y=77.00, z=356.74], EntitySheep['Sheep'/368, l='MpServer', x=276.67, y=70.00, z=334.20], EntitySheep['Sheep'/371, l='MpServer', x=262.18, y=80.00, z=368.22], EntitySkeleton['Skeleton'/372, l='MpServer', x=241.50, y=20.00, z=387.50], EntityCreeper['Creeper'/373, l='MpServer', x=280.50, y=45.00, z=365.50], EntityBat['Bat'/153, l='MpServer', x=123.24, y=39.01, z=294.37], EntityPlayerSP['Player778'/299, l='MpServer', x=205.48, y=64.00, z=309.54], EntityPig['Pig'/159, l='MpServer', x=127.30, y=63.00, z=366.41], EntitySkeleton['Skeleton'/168, l='MpServer', x=140.50, y=36.00, z=254.50], EntitySkeleton['Skeleton'/169, l='MpServer', x=143.50, y=36.00, z=256.50], EntityCow['Cow'/170, l='MpServer', x=135.80, y=67.00, z=257.17], EntityZombie['Zombie'/171, l='MpServer', x=136.55, y=42.00, z=281.76], EntityZombie['Zombie'/172, l='MpServer', x=139.31, y=11.00, z=299.61], EntitySkeleton['Skeleton'/173, l='MpServer', x=135.50, y=18.00, z=300.50], EntityZombie['Zombie'/174, l='MpServer', x=140.62, y=46.00, z=290.07], EntityZombie['Zombie'/175, l='MpServer', x=142.70, y=46.00, z=290.45], EntityZombie['Zombie'/176, l='MpServer', x=140.50, y=12.00, z=305.50], EntityCreeper['Creeper'/177, l='MpServer', x=142.19, y=35.00, z=314.23], EntityPig['Pig'/178, l='MpServer', x=137.29, y=65.00, z=315.23], EntityPig['Pig'/179, l='MpServer', x=135.29, y=64.00, z=309.49], EntitySheep['Sheep'/180, l='MpServer', x=133.43, y=63.00, z=344.21], EntityPig['Pig'/181, l='MpServer', x=129.49, y=63.00, z=387.76], EntityPig['Pig'/185, l='MpServer', x=158.14, y=71.00, z=267.19], EntityCow['Cow'/186, l='MpServer', x=147.13, y=73.00, z=276.14], EntityCreeper['Creeper'/187, l='MpServer', x=144.23, y=37.00, z=302.51], EntityZombie['Zombie'/188, l='MpServer', x=145.23, y=48.00, z=290.50], EntityCreeper['Creeper'/189, l='MpServer', x=151.50, y=37.00, z=305.50], EntityZombie['Zombie'/190, l='MpServer', x=153.57, y=49.00, z=305.77], EntityPig['Pig'/191, l='MpServer', x=146.79, y=65.00, z=309.49], EntityBat['Bat'/192, l='MpServer', x=164.76, y=32.40, z=346.25], EntitySpider['Spider'/198, l='MpServer', x=162.50, y=43.00, z=319.50], EntityZombie['Zombie'/199, l='MpServer', x=160.50, y=40.00, z=326.77], EntitySheep['Sheep'/200, l='MpServer', x=163.75, y=64.00, z=326.49], EntitySheep['Sheep'/201, l='MpServer', x=169.27, y=63.00, z=347.40], EntitySheep['Sheep'/202, l='MpServer', x=169.56, y=63.00, z=344.91], EntityCow['Cow'/214, l='MpServer', x=187.50, y=72.00, z=247.82], EntityCow['Cow'/215, l='MpServer', x=177.04, y=70.00, z=259.97], EntityCreeper['Creeper'/216, l='MpServer', x=189.50, y=29.00, z=327.50], EntityZombie['Zombie'/217, l='MpServer', x=186.79, y=29.00, z=329.48], EntityWitch['Witch'/218, l='MpServer', x=191.28, y=28.00, z=339.53], EntityCreeper['Creeper'/219, l='MpServer', x=189.79, y=27.00, z=341.59], EntityCow['Cow'/220, l='MpServer', x=179.82, y=64.00, z=344.62], EntitySheep['Sheep'/221, l='MpServer', x=183.45, y=64.00, z=339.35], EntityCreeper['Creeper'/222, l='MpServer', x=184.50, y=39.00, z=353.50], EntityBat['Bat'/237, l='MpServer', x=195.70, y=25.10, z=230.59], EntityZombie['Zombie'/241, l='MpServer', x=191.50, y=44.00, z=236.23], EntitySkeleton['Skeleton'/242, l='MpServer', x=195.30, y=57.00, z=236.50], EntitySkeleton['Skeleton'/243, l='MpServer', x=197.52, y=57.00, z=237.29], EntityCow['Cow'/244, l='MpServer', x=199.17, y=73.00, z=251.69], EntityItem['item.item.porkchopCooked'/245, l='MpServer', x=202.70, y=64.00, z=311.69], EntityCreeper['Creeper'/246, l='MpServer', x=193.50, y=29.00, z=324.50], EntityZombie['Zombie'/247, l='MpServer', x=198.93, y=25.41, z=350.70], EntitySheep['Sheep'/248, l='MpServer', x=195.12, y=62.37, z=347.47], EntityBat['Bat'/249, l='MpServer', x=205.43, y=23.05, z=362.03], EntityCreeper['Creeper'/250, l='MpServer', x=207.50, y=14.00, z=376.50], EntityPig['Pig'/251, l='MpServer', x=195.67, y=63.00, z=377.50], EntityPig['Pig'/252, l='MpServer', x=208.46, y=63.00, z=385.26]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:451) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779) at net.minecraft.client.Minecraft.run(Minecraft.java:435) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_101, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 511411824 bytes (487 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.32 Powered by Forge 12.18.2.2125 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAAAA Forge{12.18.2.2125} [Minecraft Forge] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAAAA plentifulmisc{0.1a} [Plentiful Misc] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 375.70' Renderer: 'GeForce GTX 960/PCIe/SSE2' Launched Version: 1.10.2 LWJGL: 2.9.4 OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 375.70, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 6x AMD FX(tm)-6300 Six-Core Processor [19:52:04] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# F:\Minecraft Workspace\1.10.x\Plentiful Misc Rewrite\run\.\crash-reports\crash-2016-11-21_19.52.04-client.txt AL lib: (EE) alc_cleanup: 1 device not closed here is the updated gui package com.lambda.PlentifulMisc.client.gui; import com.lambda.PlentifulMisc.blocks.container.ContainerCoalGenerator; import com.lambda.PlentifulMisc.blocks.container.ContainerCrate; import com.lambda.PlentifulMisc.blocks.container.ContainerCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCrate; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.IGuiHandler; public class GuiHandler implements IGuiHandler { private static final int GUIID_PM_223 = 223; public static int getGuiID() {return GUIID_PM_223;} // Gets the server side element for the given gui id- this should return a container @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID != getGuiID()) { System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID); } BlockPos xyz = new BlockPos(x, y, z); TileEntity tileEntity = world.getTileEntity(xyz); if (tileEntity instanceof TileEntityCrate) { TileEntityCrate tileEntityInventoryBasic = (TileEntityCrate) tileEntity; return new ContainerCrate(player.inventory, tileEntityInventoryBasic); } if (tileEntity instanceof TileEnityCrystallizer) { TileEnityCrystallizer tileInventoryFurnace = (TileEnityCrystallizer) tileEntity; return new ContainerCrystallizer(player.inventory, tileInventoryFurnace); } if (tileEntity instanceof TileEnityCrystallizer) { TileEntityCoalGenerator tileInventoryFurnace = (TileEntityCoalGenerator) tileEntity; return new ContainerCoalGenerator(player.inventory, tileInventoryFurnace); } return null; } // Gets the client side element for the given gui id- this should return a gui @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID != getGuiID()) { System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID); } BlockPos xyz = new BlockPos(x, y, z); TileEntity tileEntity = world.getTileEntity(xyz); if (tileEntity instanceof TileEntityCrate) { TileEntityCrate tileEntityInventoryBasic = (TileEntityCrate) tileEntity; return new GuiCrate(player.inventory, tileEntityInventoryBasic); } if (tileEntity instanceof TileEntity) { TileEnityCrystallizer tileInventoryFurnace = (TileEnityCrystallizer) tileEntity; return new GuiCrystallizer(player.inventory, tileInventoryFurnace); } if (tileEntity instanceof TileEntity) { TileEntityCoalGenerator tileEntityCoalFurnace = (TileEntityCoalGenerator) tileEntity; return new GuiCoalGenerator(player.inventory, tileEntityCoalFurnace); } return null; } }
  5. oh my bad: package com.lambda.PlentifulMisc.blocks; import javax.annotation.Nullable; import com.lambda.PlentifulMisc.PlentifulMisc; import com.lambda.PlentifulMisc.Reference; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator; import com.lambda.PlentifulMisc.client.gui.GuiHandler; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryHelper; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.EnumBlockRenderType; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockCoalGenerator extends BlockContainer { public BlockCoalGenerator() { super(Material.ROCK); setUnlocalizedName(Reference.PlentifulMiscBlocks.COALGENERATOR.getUnlocalizedName()); setRegistryName(Reference.PlentifulMiscBlocks.COALGENERATOR.getRegistryName()); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntityCoalGenerator(); } @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, @Nullable ItemStack heldItem, EnumFacing side, float hitX, float hitY, float hitZ) { // Uses the gui handler registered to your mod to open the gui for the given gui id // open on the server side only (not sure why you shouldn't open client side too... vanilla doesn't, so we better not either) if (worldIn.isRemote) return true; playerIn.openGui(PlentifulMisc.instance, GuiHandler.getGuiID(), worldIn, pos.getX(), pos.getY(), pos.getZ()); return true; } // This is where you can do something when the block is broken. In this case drop the inventory's contents @Override public void breakBlock(World worldIn, BlockPos pos, IBlockState state) { TileEntity tileEntity = worldIn.getTileEntity(pos); if (tileEntity instanceof IInventory) { InventoryHelper.dropInventoryItems(worldIn, pos, (IInventory)tileEntity); } } @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.SOLID; } // used by the renderer to control lighting and visibility of other blocks. // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isOpaqueCube(IBlockState iBlockState) { return false; } // used by the renderer to control lighting and visibility of other blocks, also by // (eg) wall or fence to control whether the fence joins itself to this block // set to false because this block doesn't fill the entire 1x1x1 space @Override public boolean isFullCube(IBlockState iBlockState) { return false; } // render using a BakedModel // required because the default (super method) is INVISIBLE for BlockContainers. @Override public EnumBlockRenderType getRenderType(IBlockState iBlockState) { return EnumBlockRenderType.MODEL; } }
  6. Hey all! So my gui isnt opening when I activate the block. I cant seem to find the problem. (No Log Report) GUI: package com.lambda.PlentifulMisc.client.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.awt.*; import java.util.ArrayList; import java.util.List; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator; import com.lambda.PlentifulMisc.blocks.container.ContainerCoalGenerator; /** * User: brandon3055 * Date: 06/01/2015 * * GuiInventoryAdvanced is a gui similar to that of a furnace. It has a progress bar and a burn time indicator. * Both indicators have mouse over text */ @SideOnly(Side.CLIENT) public class GuiCoalGenerator extends GuiContainer { // This is the resource location for the background image private static final ResourceLocation texture = new ResourceLocation("plentifulmisc", "textures/gui/guiCoalGenerator.png"); private TileEntityCoalGenerator tileEntity; public GuiCoalGenerator(InventoryPlayer invPlayer, TileEntityCoalGenerator tileInventoryFurnace) { super(new ContainerCoalGenerator(invPlayer, tileInventoryFurnace)); // Set the width and height of the gui xSize = 176; ySize = 207; this.tileEntity = tileInventoryFurnace; } final int FLAME_XPOS = 54; final int FLAME_YPOS = 80; final int FLAME_ICON_U = 178; // texture position of flame icon final int FLAME_ICON_V = 0; final int FLAME_WIDTH = 9; final int FLAME_HEIGHT = 15; final int FLAME_X_SPACING = 18; final int ENERGY_XPOS = -12; final int ENERGY_YPOS = 28; final int ENERGY_ICON_U = 176; // texture position of energy bar final int ENERGY_ICON_V = 21; final int ENERGY_WIDTH = 22; final int ENERGY_HEIGHT = 80; final int ENERGY_X_SPACING = 18; @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int x, int y) { // Bind the image texture Minecraft.getMinecraft().getTextureManager().bindTexture(texture); // Draw the image GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); // get cook progress as a double between 0 and 1 // draw the fuel remaining bar for each fuel slot flame double burnRemaining = tileEntity.fractionOfFuelRemaining(0); int yOffset = (int)((1.0 - burnRemaining) * FLAME_HEIGHT); drawTexturedModalRect(guiLeft + FLAME_XPOS + FLAME_X_SPACING, guiTop + FLAME_YPOS + yOffset, FLAME_ICON_U, FLAME_ICON_V + yOffset, FLAME_WIDTH, FLAME_HEIGHT - yOffset); // draw energy bar double energyRemain = tileEntity.energyDP; int energyMax = tileEntity.energyMax; int yOffsetEnergy = (int)((energyRemain - energyMax) * ENERGY_HEIGHT); drawTexturedModalRect(guiLeft + ENERGY_XPOS + ENERGY_X_SPACING, guiTop + ENERGY_YPOS + yOffset, ENERGY_ICON_U, ENERGY_ICON_V + yOffset, ENERGY_WIDTH, ENERGY_HEIGHT - yOffset); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { super.drawGuiContainerForegroundLayer(mouseX, mouseY); final int LABEL_XPOS = 5; final int LABEL_YPOS = 5; fontRendererObj.drawString(tileEntity.getDisplayName().getUnformattedText(), LABEL_XPOS, LABEL_YPOS, Color.darkGray.getRGB()); List<String> hoveringText = new ArrayList<String>(); // If the mouse is over one of the burn time indicator add the burn time indicator hovering text for (int i = 0; i < tileEntity.FUEL_SLOTS_COUNT; ++i) { if (isInRect(guiLeft + FLAME_XPOS + FLAME_X_SPACING * i, guiTop + FLAME_YPOS, FLAME_WIDTH, FLAME_HEIGHT, mouseX, mouseY)) { hoveringText.add("Fuel Time:"); hoveringText.add(tileEntity.secondsOfFuelRemaining(i) + "s"); } } if (isInRect(guiLeft + ENERGY_XPOS + ENERGY_X_SPACING, guiTop + ENERGY_YPOS, ENERGY_WIDTH, ENERGY_HEIGHT, mouseX, mouseY)) { hoveringText.add("Energy Amount:"); hoveringText.add(tileEntity.energyDP + " DP"); } // If hoveringText is not empty draw the hovering text if (!hoveringText.isEmpty()){ drawHoveringText(hoveringText, mouseX - guiLeft, mouseY - guiTop, fontRendererObj); } // // You must re bind the texture and reset the colour if you still need to use it after drawing a string // Minecraft.getMinecraft().getTextureManager().bindTexture(texture); // GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } // Returns true if the given x,y coordinates are within the given rectangle public static boolean isInRect(int x, int y, int xSize, int ySize, int mouseX, int mouseY){ return ((mouseX >= x && mouseX <= x+xSize) && (mouseY >= y && mouseY <= y+ySize)); } } GUI Handler: package com.lambda.PlentifulMisc.client.gui; import com.lambda.PlentifulMisc.blocks.container.ContainerCoalGenerator; import com.lambda.PlentifulMisc.blocks.container.ContainerCrate; import com.lambda.PlentifulMisc.blocks.container.ContainerCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCoalGenerator; import com.lambda.PlentifulMisc.blocks.tile.TileEntityCrate; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.common.network.IGuiHandler; public class GuiHandler implements IGuiHandler { private static final int GUIID_PM_223 = 223; public static int getGuiID() {return GUIID_PM_223;} // Gets the server side element for the given gui id- this should return a container @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID != getGuiID()) { System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID); } BlockPos xyz = new BlockPos(x, y, z); TileEntity tileEntity = world.getTileEntity(xyz); if (tileEntity instanceof TileEntityCrate) { TileEntityCrate tileEntityInventoryBasic = (TileEntityCrate) tileEntity; return new ContainerCrate(player.inventory, tileEntityInventoryBasic); } if (tileEntity instanceof TileEnityCrystallizer) { TileEnityCrystallizer tileInventoryFurnace = (TileEnityCrystallizer) tileEntity; return new ContainerCrystallizer(player.inventory, tileInventoryFurnace); } if (tileEntity instanceof TileEnityCrystallizer) { TileEntityCoalGenerator tileInventoryFurnace = (TileEntityCoalGenerator) tileEntity; return new ContainerCoalGenerator(player.inventory, tileInventoryFurnace); } return null; } // Gets the client side element for the given gui id- this should return a gui @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID != getGuiID()) { System.err.println("Invalid ID: expected " + getGuiID() + ", received " + ID); } BlockPos xyz = new BlockPos(x, y, z); TileEntity tileEntity = world.getTileEntity(xyz); if (tileEntity instanceof TileEntityCrate) { TileEntityCrate tileEntityInventoryBasic = (TileEntityCrate) tileEntity; return new GuiCrate(player.inventory, tileEntityInventoryBasic); } if (tileEntity instanceof TileEntity) { TileEnityCrystallizer tileInventoryFurnace = (TileEnityCrystallizer) tileEntity; return new GuiCrystallizer(player.inventory, tileInventoryFurnace); } if (tileEntity instanceof TileEntity) { TileEntityCoalGenerator tileInventoryFurnace = (TileEntityCoalGenerator) tileEntity; return new GuiCoalGenerator(player.inventory, tileInventoryFurnace); } return null; } } Registry of the TE + GUI: GameRegistry.registerTileEntity(TileEntityCrate.class, "plentifulmisc_crate"); GameRegistry.registerTileEntity(TileEnityCrystallizer.class, "plentifulmisc_crystallizer"); GameRegistry.registerTileEntity(TileEntitySolarGenerator.class, "plentifulmisc_solargenerator"); GameRegistry.registerTileEntity(TileEntityCoalGenerator.class, "plentifulmisc_coalgenerator"); NetworkRegistry.INSTANCE.registerGuiHandler(PlentifulMisc.instance, GuiRegistyHandler.getInstance()); GuiRegistyHandler.getInstance().registerGuiHandler(new GuiHandler(), GuiHandler.getGuiID()); NOTE: All of my other GUIS work, just not this one
  7. So this: public class BlockSolarGenerator extends Block { TileEntitySolarGenerator tileEntitySolarGenerator = new TileEntitySolarGenerator(); public BlockSolarGenerator() { super(Material.ROCK); setUnlocalizedName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getUnlocalizedName()); setRegistryName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getRegistryName()); setHardness(2); } @Override public boolean hasTileEntity(IBlockState state) { return true; } @Override public TileEntity createTileEntity(World world, IBlockState state) { return new TileEnityCrystallizer(); } @Override public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn) { tileEntitySolarGenerator.neighborChanged(worldIn, pos); } @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY,float hitZ, int meta, EntityLivingBase placer, ItemStack stack) { tileEntitySolarGenerator.getStateForPlacement(world, pos); return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, stack); } //small upgrades, size of torches, act like torches. } Also, what should I be returning on getStateForPlacement in the te & block
  8. So just this in the block class: public class BlockSolarGenerator extends Block { TileEntitySolarGenerator tileEntitySolarGenerator = new TileEntitySolarGenerator(); public BlockSolarGenerator() { super(Material.ROCK); setUnlocalizedName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getUnlocalizedName()); setRegistryName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getRegistryName()); setHardness(2); } @Override public boolean hasTileEntity() { return true; } @Override public TileEntity createTileEntity(World world, IBlockState state) { return new TileEnityCrystallizer(); } //small upgrades, size of torches, act like torches. } te just staying the same
  9. here is the updated te: package com.lambda.PlentifulMisc.blocks.tile; import com.lambda.PlentifulMisc.init.ModBlocks; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class TileEntitySolarGenerator extends TileEntity implements ITickable{ public int energyOutput; public int connectedTiles; public boolean canSendEnergy; @Override public void update() { System.out.println(connectedTiles); if(worldObj.isDaytime()) { canSendEnergy = true; } else { canSendEnergy = false; } } public void neighborChanged(World worldIn, BlockPos pos) { for (EnumFacing face : EnumFacing.values()) { BlockPos posN = getPos().offset(face); if (getWorld().getTileEntity(posN) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } } public IBlockState getStateForPlacement(World world, BlockPos pos) { for (EnumFacing face : EnumFacing.values()) { BlockPos posS = getPos().offset(face); if (getWorld().getTileEntity(posS) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } return null; } } and block package com.lambda.PlentifulMisc.blocks; import com.lambda.PlentifulMisc.Reference; import com.lambda.PlentifulMisc.blocks.tile.TileEntitySolarGenerator; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockSolarGenerator extends Block implements ITileEntityProvider{ TileEntitySolarGenerator tileEntitySolarGenerator = new TileEntitySolarGenerator(); public BlockSolarGenerator() { super(Material.ROCK); setUnlocalizedName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getUnlocalizedName()); setRegistryName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getRegistryName()); setHardness(2); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntitySolarGenerator(); } //small upgrades, size of torches, act like torches. }
  10. So then : package com.lambda.PlentifulMisc.blocks.tile; import com.lambda.PlentifulMisc.init.ModBlocks; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class TileEntitySolarGenerator extends TileEntity implements ITickable{ public int energyOutput; public int connectedTiles; public boolean canSendEnergy; @Override public void update() { System.out.println(connectedTiles); if(worldObj.isDaytime()) { canSendEnergy = true; } else { canSendEnergy = false; } } public void updateFromNeighbor() { } public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn) { for (EnumFacing face : EnumFacing.values()) { BlockPos posN = getPos().offset(face); if (getWorld().getTileEntity(posN) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } } public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, ItemStack stack) { for (EnumFacing face : EnumFacing.values()) { BlockPos posState = getPos().offset(face); if (getWorld().getTileEntity(posState) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } return null; } }
  11. But the methods are Block methods, not TE.
  12. Okay, so I get a crash: [21:12:40] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: net.minecraft.util.ReportedException: Exception while updating neighbours at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_101] Caused by: net.minecraft.util.ReportedException: Exception while updating neighbours at net.minecraft.world.World.notifyBlockOfStateChange(World.java:605) ~[World.class:?] at net.minecraft.world.World.notifyNeighborsOfStateChange(World.java:531) ~[World.class:?] at net.minecraft.world.World.notifyNeighborsRespectDebug(World.java:482) ~[World.class:?] at net.minecraft.world.World.markAndNotifyBlock(World.java:421) ~[World.class:?] at net.minecraft.world.World.setBlockState(World.java:402) ~[World.class:?] at net.minecraft.block.Block.removedByPlayer(Block.java:1324) ~[block.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more Caused by: java.lang.NullPointerException at com.lambda.PlentifulMisc.blocks.tile.TileEntitySolarGenerator.updateFromNeighbor(TileEntitySolarGenerator.java:34) ~[TileEntitySolarGenerator.class:?] at com.lambda.PlentifulMisc.blocks.BlockSolarGenerator.neighborChanged(BlockSolarGenerator.java:35) ~[blockSolarGenerator.class:?] at net.minecraft.block.state.BlockStateContainer$StateImplementation.neighborChanged(BlockStateContainer.java:480) ~[blockStateContainer$StateImplementation.class:?] at net.minecraft.world.World.notifyBlockOfStateChange(World.java:584) ~[World.class:?] at net.minecraft.world.World.notifyNeighborsOfStateChange(World.java:531) ~[World.class:?] at net.minecraft.world.World.notifyNeighborsRespectDebug(World.java:482) ~[World.class:?] at net.minecraft.world.World.markAndNotifyBlock(World.java:421) ~[World.class:?] at net.minecraft.world.World.setBlockState(World.java:402) ~[World.class:?] at net.minecraft.block.Block.removedByPlayer(Block.java:1324) ~[block.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:298) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.removeBlock(PlayerInteractionManager.java:292) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.tryHarvestBlock(PlayerInteractionManager.java:339) ~[PlayerInteractionManager.class:?] at net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(PlayerInteractionManager.java:175) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:658) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:56) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.play.client.CPacketPlayerDigging.processPacket(CPacketPlayerDigging.java:12) ~[CPacketPlayerDigging.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more 0 0 0 0 0 everytime I update it / place it. Also how would I tell if the TE is destroyed and minus connectedTile. here is the block class & te: package com.lambda.PlentifulMisc.blocks; import com.lambda.PlentifulMisc.Reference; import com.lambda.PlentifulMisc.blocks.tile.TileEntitySolarGenerator; import net.minecraft.block.Block; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class BlockSolarGenerator extends Block implements ITileEntityProvider{ TileEntitySolarGenerator tileEntitySolarGenerator = new TileEntitySolarGenerator(); public BlockSolarGenerator() { super(Material.ROCK); setUnlocalizedName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getUnlocalizedName()); setRegistryName(Reference.PlentifulMiscBlocks.SOLARGENERATOR.getRegistryName()); setHardness(2); } @Override public TileEntity createNewTileEntity(World worldIn, int meta) { return new TileEntitySolarGenerator(); } @Override public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn) { tileEntitySolarGenerator.updateFromNeighbor(); } @Override public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, ItemStack stack) { tileEntitySolarGenerator.updateFromPlaced(); return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, stack); } //small upgrades, size of torches, act like torches. } package com.lambda.PlentifulMisc.blocks.tile; import com.lambda.PlentifulMisc.init.ModBlocks; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; public class TileEntitySolarGenerator extends TileEntity implements ITickable{ public int energyOutput; public int connectedTiles; public boolean canSendEnergy; @Override public void update() { System.out.println(connectedTiles); if(worldObj.isDaytime()) { canSendEnergy = true; } else { canSendEnergy = false; } } public void updateFromNeighbor() { for (EnumFacing face : EnumFacing.values()) { BlockPos pos = getPos().offset(face); if (getWorld().getTileEntity(pos) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } } public void updateFromPlaced() { for (EnumFacing face : EnumFacing.values()) { BlockPos pos = getPos().offset(face); if (getWorld().getTileEntity(pos) instanceof TileEnityCrystallizer) { connectedTiles += 1; } else { } } } }
  13. okay this is firing everytick, how would I put make it so it only updates when placed / when the TE is placed next to it, and have it reset if it is destroyed.
  14. Yeah misworded that, how would I check how many are connected? what I want to have happen: 1 connected = full energy output 2 connected = 1/2 3 = 1/3 etc.
  15. How would I iterate though all of these and if a block is found, then do x. I'm using a different tile now, that looks for a tileentity and if ONE found, then keep same amount of energy output 2: 1/2 3: 1/3 ect.
  16. this: for (EnumFacing face : EnumFacing.values()) { BlockPos adj = getPos().offset(face); if(worldObj.getBlockState(adj).getBlock() == ModBlocks.solarGenerator) { energyDP++; }else if(worldObj.getBlockState(adj).getBlock() == null) { return; } } entire TE for future reference: package com.lambda.PlentifulMisc.blocks.tile; import net.minecraft.tileentity.TileEntity; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagInt; import net.minecraft.nbt.NBTTagIntArray; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import javax.annotation.Nullable; import com.lambda.PlentifulMisc.init.ModBlocks; import com.lambda.PlentifulMisc.recipe.CraftingHandlerCrystallizer; import java.util.Arrays; /** * User: brandon3055 * Date: 06/01/2015 * * TileInventorySmelting is an advanced sided inventory that works like a vanilla furnace except that it has 5 input and output slots, * 4 fuel slots and cooks at up to four times the speed. * The input slots are used sequentially rather than in parallel, i.e. the first slot cooks, then the second, then the third, etc * The fuel slots are used in parallel. The more slots burning in parallel, the faster the cook time. * The code is heavily based on TileEntityFurnace. */ public class TileEnityCrystallizer extends TileEntity implements IInventory, ITickable { /** Create and initialize the itemStacks variable that will store store the itemStacks */ public static final int FUEL_SLOTS_COUNT = 1; public static final int INPUT_SLOTS_COUNT = 1; public static final int OUTPUT_SLOTS_COUNT = 5; public static final int TOTAL_SLOTS_COUNT = FUEL_SLOTS_COUNT + INPUT_SLOTS_COUNT + OUTPUT_SLOTS_COUNT; public static final int FIRST_FUEL_SLOT = 0; public static final int FIRST_INPUT_SLOT = FIRST_FUEL_SLOT + FUEL_SLOTS_COUNT; public static final int FIRST_OUTPUT_SLOT = FIRST_INPUT_SLOT + INPUT_SLOTS_COUNT; private ItemStack[] itemStacks = new ItemStack[TOTAL_SLOTS_COUNT]; /** The number of burn ticks remaining on the current piece of fuel */ public int energyDP; public int energyMax = 5000; public int energyPerT = 2; public int energyReceivedT = 1; public boolean canAcceptEnergy = true; /** The initial fuel value of the currently burning fuel (in ticks of burn duration) */ private int [] energyInitial = new int[FUEL_SLOTS_COUNT]; /**The number of ticks the current item has been cooking*/ private short cookTime; /**The number of ticks required to cook an item*/ private static final short COOK_TIME_FOR_COMPLETION = 100; // vanilla value is 200 = 10 seconds private int cachedNumberOfBurningSlots = -1; /** * Returns the amount of fuel remaining on the currently burning item in the given fuel slot. * @fuelSlot the number of the fuel slot (0..3) * @return fraction remaining, between 0 - 1 */ public double fractionOfFuelRemaining(int fuelSlot) { if (energyInitial[fuelSlot] <= 0 ) return 0; double fraction = energyDP / (double)energyDP; return MathHelper.clamp_double(fraction, 0.0, 1.0); } /** * return the remaining burn time of the fuel in the given slot * @param fuelSlot the number of the fuel slot (0..3) * @return seconds remaining */ public int secondsOfFuelRemaining(int fuelSlot) { if (energyDP <= 0 ) return 0; return energyDP / 20; // 20 ticks per second } /** * Get the number of slots which have fuel burning in them. * @return number of slots with burning fuel, 0 - FUEL_SLOTS_COUNT */ /** * Returns the amount of cook time completed on the currently cooking item. * @return fraction remaining, between 0 - 1 */ public double fractionOfCookTimeComplete() { double fraction = cookTime / (double)COOK_TIME_FOR_COMPLETION; return MathHelper.clamp_double(fraction, 0.0, 1.0); } // This method is called every tick to update the tile entity, i.e. // - see if the fuel has run out, and if so turn the furnace "off" and slowly uncook the current item (if any) // - see if any of the items have finished smelting // It runs both on the server and the client. @Override public void update() { // If there is nothing to smelt or there is no room in the output, reset cookTime and return if (canSmelt()) { int energyStored = burnFuel(); // If fuel is available, keep cooking the item, otherwise start "uncooking" it at double speed if (energyStored > 0) { cookTime += energyStored; } else { cookTime -= 1; } if (cookTime < 0) cookTime = 0; // If cookTime has reached maxCookTime smelt the item and reset cookTime if (cookTime >= COOK_TIME_FOR_COMPLETION) { smeltItem(); cookTime = 0; } } else { cookTime = 0; } if(energyDP >= energyMax) { energyDP = energyMax; canAcceptEnergy = false; }else { canAcceptEnergy = true; } // when the number of burning slots changes, we need to force the block to re-render, otherwise the change in // state will not be visible. Likewise, we need to force a lighting recalculation. // The block update (for renderer) is only required on client side, but the lighting is required on both, since // the client needs it for rendering and the server needs it for crop growth etc for (EnumFacing face : EnumFacing.values()) { BlockPos adj = getPos().offset(face); if(worldObj.getBlockState(adj).getBlock() == ModBlocks.solarGenerator) { energyDP++; }else if(worldObj.getBlockState(adj).getBlock() == null) { return; } } if (worldObj.isRemote) { IBlockState iblockstate = this.worldObj.getBlockState(pos); final int FLAGS = 3; // I'm not sure what these flags do, exactly. worldObj.notifyBlockUpdate(pos, iblockstate, iblockstate, FLAGS); } worldObj.checkLightFor(EnumSkyBlock.BLOCK, pos); } /** * for each fuel slot: decreases the burn time, checks if burnTimeRemaining = 0 and tries to consume a new piece of fuel if one is available * @return the number of fuel slots which are burning */ private int burnFuel() { int burningCount = 0; int fuelSlotNumber = FIRST_FUEL_SLOT; if (energyDP > 0) { energyDP -= energyPerT; ++burningCount; if (energyDP == 0) { energyDP = energyInitial[0] = getItemBurnTime(itemStacks[fuelSlotNumber]); ++burningCount; } } markDirty(); return burningCount; } /** * Check if any of the input items are smeltable and there is sufficient space in the output slots * @return true if smelting is possible */ private boolean canSmelt() {return smeltItem(false);} /** * Smelt an input item into an output slot, if possible */ private void smeltItem() {smeltItem(true);} /** * checks that there is an item to be smelted in one of the input slots and that there is room for the result in the output slots * If desired, performs the smelt * @param performSmelt if true, perform the smelt. if false, check whether smelting is possible, but don't change the inventory * @return false if no items can be smelted, true otherwise */ private boolean smeltItem(boolean performSmelt) { Integer firstSuitableInputSlot = null; Integer firstSuitableOutputSlot = null; ItemStack result = null; // finds the first input slot which is smeltable and whose result fits into an output slot (stacking if possible) for (int inputSlot = FIRST_INPUT_SLOT; inputSlot < FIRST_INPUT_SLOT + INPUT_SLOTS_COUNT; inputSlot++) { if (itemStacks[inputSlot] != null) { result = getSmeltingResultForItem(itemStacks[inputSlot]); if (result != null) { // find the first suitable output slot- either empty, or with identical item that has enough space for (int outputSlot = FIRST_OUTPUT_SLOT; outputSlot < FIRST_OUTPUT_SLOT + OUTPUT_SLOTS_COUNT; outputSlot++) { ItemStack outputStack = itemStacks[outputSlot]; if (outputStack == null) { firstSuitableInputSlot = inputSlot; firstSuitableOutputSlot = outputSlot; break; } if (outputStack.getItem() == result.getItem() && (!outputStack.getHasSubtypes() || outputStack.getMetadata() == outputStack.getMetadata()) && ItemStack.areItemStackTagsEqual(outputStack, result)) { int combinedSize = itemStacks[outputSlot].stackSize + result.stackSize; if (combinedSize <= getInventoryStackLimit() && combinedSize <= itemStacks[outputSlot].getMaxStackSize()) { firstSuitableInputSlot = inputSlot; firstSuitableOutputSlot = outputSlot; break; } } } if (firstSuitableInputSlot != null) break; } } } if (firstSuitableInputSlot == null) return false; if (!performSmelt) return true; // alter input and output itemStacks[firstSuitableInputSlot].stackSize--; if (itemStacks[firstSuitableInputSlot].stackSize <=0) itemStacks[firstSuitableInputSlot] = null; if (itemStacks[firstSuitableOutputSlot] == null) { itemStacks[firstSuitableOutputSlot] = result.copy(); // Use deep .copy() to avoid altering the recipe } else { itemStacks[firstSuitableOutputSlot].stackSize += result.stackSize; } markDirty(); return true; } // returns the smelting result for the given stack. Returns null if the given stack can not be smelted public static ItemStack getSmeltingResultForItem(ItemStack stack) { return CraftingHandlerCrystallizer.instance().getSmeltingResult(stack); } // returns the number of ticks the given item will burn. Returns 0 if the given item is not a valid fuel public static short getItemBurnTime(ItemStack stack) { int burntime = TileEntityFurnace.getItemBurnTime(stack); // just use the vanilla values return (short)MathHelper.clamp_int(burntime, 0, Short.MAX_VALUE); } // Gets the number of slots in the inventory @Override public int getSizeInventory() { return itemStacks.length; } // Gets the stack in the given slot @Override public ItemStack getStackInSlot(int i) { return itemStacks[i]; } /** * Removes some of the units from itemstack in the given slot, and returns as a separate itemstack * @param slotIndex the slot number to remove the items from * @param count the number of units to remove * @return a new itemstack containing the units removed from the slot */ @Override public ItemStack decrStackSize(int slotIndex, int count) { ItemStack itemStackInSlot = getStackInSlot(slotIndex); if (itemStackInSlot == null) return null; ItemStack itemStackRemoved; if (itemStackInSlot.stackSize <= count) { itemStackRemoved = itemStackInSlot; setInventorySlotContents(slotIndex, null); } else { itemStackRemoved = itemStackInSlot.splitStack(count); if (itemStackInSlot.stackSize == 0) { setInventorySlotContents(slotIndex, null); } } markDirty(); return itemStackRemoved; } // overwrites the stack in the given slotIndex with the given stack @Override public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { itemStacks[slotIndex] = itemstack; if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); } markDirty(); } // This is the maximum number if items allowed in each slot // This only affects things such as hoppers trying to insert items you need to use the container to enforce this for players // inserting items via the gui @Override public int getInventoryStackLimit() { return 64; } // Return true if the given player is able to use this block. In this case it checks that // 1) the world tileentity hasn't been replaced in the meantime, and // 2) the player isn't too far away from the centre of the block @Override public boolean isUseableByPlayer(EntityPlayer player) { if (this.worldObj.getTileEntity(this.pos) != this) return false; final double X_CENTRE_OFFSET = 0.5; final double Y_CENTRE_OFFSET = 0.5; final double Z_CENTRE_OFFSET = 0.5; final double MAXIMUM_DISTANCE_SQ = 8.0 * 8.0; return player.getDistanceSq(pos.getX() + X_CENTRE_OFFSET, pos.getY() + Y_CENTRE_OFFSET, pos.getZ() + Z_CENTRE_OFFSET) < MAXIMUM_DISTANCE_SQ; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForFuelSlot(ItemStack itemStack) { return true; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForInputSlot(ItemStack itemStack) { return true; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForOutputSlot(ItemStack itemStack) { return false; } //------------------------------ // This is where you save any data that you don't want to lose when the tile entity unloads // In this case, it saves the state of the furnace (burn time etc) and the itemstacks stored in the fuel, input, and output slots @Override public NBTTagCompound writeToNBT(NBTTagCompound parentNBTTagCompound) { super.writeToNBT(parentNBTTagCompound); // The super call is required to save and load the tiles location // // Save the stored item stacks // to use an analogy with Java, this code generates an array of hashmaps // The itemStack in each slot is converted to an NBTTagCompound, which is effectively a hashmap of key->value pairs such // as slot=1, id=2353, count=1, etc // Each of these NBTTagCompound are then inserted into NBTTagList, which is similar to an array. NBTTagList dataForAllSlots = new NBTTagList(); for (int i = 0; i < this.itemStacks.length; ++i) { if (this.itemStacks[i] != null) { NBTTagCompound dataForThisSlot = new NBTTagCompound(); dataForThisSlot.setByte("Slot", (byte) i); this.itemStacks[i].writeToNBT(dataForThisSlot); dataForAllSlots.appendTag(dataForThisSlot); } } // the array of hashmaps is then inserted into the parent hashmap for the container parentNBTTagCompound.setTag("Items", dataForAllSlots); // Save everything else parentNBTTagCompound.setShort("CookTime", cookTime); parentNBTTagCompound.setTag("energyRemaining", new NBTTagInt(energyDP)); parentNBTTagCompound.setTag("energyInitial", new NBTTagIntArray(energyInitial)); return parentNBTTagCompound; } // This is where you load the data that you saved in writeToNBT @Override public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); // The super call is required to save and load the tiles location final byte NBT_TYPE_COMPOUND = 10; // See NBTBase.createNewByType() for a listing NBTTagList dataForAllSlots = nbtTagCompound.getTagList("Items", NBT_TYPE_COMPOUND); Arrays.fill(itemStacks, null); // set all slots to empty for (int i = 0; i < dataForAllSlots.tagCount(); ++i) { NBTTagCompound dataForOneSlot = dataForAllSlots.getCompoundTagAt(i); byte slotNumber = dataForOneSlot.getByte("Slot"); if (slotNumber >= 0 && slotNumber < this.itemStacks.length) { this.itemStacks[slotNumber] = ItemStack.loadItemStackFromNBT(dataForOneSlot); } } // Load everything else. Trim the arrays (or pad with 0) to make sure they have the correct number of elements cookTime = nbtTagCompound.getShort("CookTime"); energyDP = nbtTagCompound.getInteger("energyRemaining"); energyInitial = Arrays.copyOf(nbtTagCompound.getIntArray("energyInitial"), FUEL_SLOTS_COUNT); cachedNumberOfBurningSlots = -1; } // // When the world loads from disk, the server needs to send the TileEntity information to the client // // it uses getUpdatePacket(), getUpdateTag(), onDataPacket(), and handleUpdateTag() to do this @Override @Nullable public SPacketUpdateTileEntity getUpdatePacket() { NBTTagCompound updateTagDescribingTileEntityState = getUpdateTag(); final int METADATA = 0; return new SPacketUpdateTileEntity(this.pos, METADATA, updateTagDescribingTileEntityState); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { NBTTagCompound updateTagDescribingTileEntityState = pkt.getNbtCompound(); handleUpdateTag(updateTagDescribingTileEntityState); } /* Creates a tag containing the TileEntity information, used by vanilla to transmit from server to client Warning - although our getUpdatePacket() uses this method, vanilla also calls it directly, so don't remove it. */ @Override public NBTTagCompound getUpdateTag() { NBTTagCompound nbtTagCompound = new NBTTagCompound(); writeToNBT(nbtTagCompound); return nbtTagCompound; } /* Populates this TileEntity with information from the tag, used by vanilla to transmit from server to client Warning - although our onDataPacket() uses this method, vanilla also calls it directly, so don't remove it. */ @Override public void handleUpdateTag(NBTTagCompound tag) { this.readFromNBT(tag); } //------------------------ // set all slots to empty @Override public void clear() { Arrays.fill(itemStacks, null); } // will add a key for this container to the lang file so we can name it in the GUI @Override public String getName() { return "container.crystallizer.name"; } @Override public boolean hasCustomName() { return false; } // standard code to look up what the human-readable name is @Nullable @Override public ITextComponent getDisplayName() { return this.hasCustomName() ? new TextComponentString(this.getName()) : new TextComponentTranslation(this.getName()); } // Fields are used to send non-inventory information from the server to interested clients // The container code caches the fields and sends the client any fields which have changed. // The field ID is limited to byte, and the field value is limited to short. (if you use more than this, they get cast down // in the network packets) // If you need more than this, or shorts are too small, use a custom packet in your container instead. private static final byte COOK_FIELD_ID = 0; private static final byte FIRST_BURN_TIME_REMAINING_FIELD_ID = 1; private static final byte FIRST_BURN_TIME_INITIAL_FIELD_ID = FIRST_BURN_TIME_REMAINING_FIELD_ID + (byte)FUEL_SLOTS_COUNT; private static final byte NUMBER_OF_FIELDS = FIRST_BURN_TIME_INITIAL_FIELD_ID + (byte)FUEL_SLOTS_COUNT; @Override public int getField(int id) { if (id == COOK_FIELD_ID) return cookTime; if (id >= FIRST_BURN_TIME_REMAINING_FIELD_ID && id < FIRST_BURN_TIME_REMAINING_FIELD_ID + FUEL_SLOTS_COUNT) { return energyDP; } if (id >= FIRST_BURN_TIME_INITIAL_FIELD_ID && id < FIRST_BURN_TIME_INITIAL_FIELD_ID + FUEL_SLOTS_COUNT) { return energyInitial[id - FIRST_BURN_TIME_INITIAL_FIELD_ID]; } System.err.println("Invalid field ID in TileInventorySmelting.getField:" + id); return 0; } @Override public void setField(int id, int value) { if (id == COOK_FIELD_ID) { cookTime = (short)value; } else if (id >= FIRST_BURN_TIME_REMAINING_FIELD_ID && id < FIRST_BURN_TIME_REMAINING_FIELD_ID + FUEL_SLOTS_COUNT) { energyDP = value; } else if (id >= FIRST_BURN_TIME_INITIAL_FIELD_ID && id < FIRST_BURN_TIME_INITIAL_FIELD_ID + FUEL_SLOTS_COUNT) { energyInitial[id - FIRST_BURN_TIME_INITIAL_FIELD_ID] = value; } else { System.err.println("Invalid field ID in TileInventorySmelting.setField:" + id); } } @Override public int getFieldCount() { return NUMBER_OF_FIELDS; } @Override public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) { return false; } /** * This method removes the entire contents of the given slot and returns it. * Used by containers such as crafting tables which return any items in their slots when you close the GUI * @param slotIndex * @return */ @Override public ItemStack removeStackFromSlot(int slotIndex) { ItemStack itemStack = getStackInSlot(slotIndex); if (itemStack != null) setInventorySlotContents(slotIndex, null); return itemStack; } @Override public void openInventory(EntityPlayer player) {} @Override public void closeInventory(EntityPlayer player) {} } and GUI package com.lambda.PlentifulMisc.client.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import java.awt.*; import java.util.ArrayList; import java.util.List; import com.lambda.PlentifulMisc.blocks.container.ContainerCrystallizer; import com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer; /** * User: brandon3055 * Date: 06/01/2015 * * GuiInventoryAdvanced is a gui similar to that of a furnace. It has a progress bar and a burn time indicator. * Both indicators have mouse over text */ @SideOnly(Side.CLIENT) public class GuiCrystallizer extends GuiContainer { // This is the resource location for the background image private static final ResourceLocation texture = new ResourceLocation("plentifulmisc", "textures/gui/guiCrystallizer.png"); private TileEnityCrystallizer tileEntity; public GuiCrystallizer(InventoryPlayer invPlayer, TileEnityCrystallizer tileInventoryFurnace) { super(new ContainerCrystallizer(invPlayer, tileInventoryFurnace)); // Set the width and height of the gui xSize = 176; ySize = 207; this.tileEntity = tileInventoryFurnace; } // some [x,y] coordinates of graphical elements final int COOK_BAR_XPOS = 49; final int COOK_BAR_YPOS = 60; final int COOK_BAR_ICON_U = 0; // texture position of white arrow icon final int COOK_BAR_ICON_V = 207; final int COOK_BAR_WIDTH = 80; final int COOK_BAR_HEIGHT = 17; final int FLAME_XPOS = 54; final int FLAME_YPOS = 80; final int FLAME_ICON_U = 178; // texture position of flame icon final int FLAME_ICON_V = 0; final int FLAME_WIDTH = 9; final int FLAME_HEIGHT = 15; final int FLAME_X_SPACING = 18; final int ENERGY_XPOS = -12; final int ENERGY_YPOS = 28; final int ENERGY_ICON_U = 176; // texture position of energy bar final int ENERGY_ICON_V = 21; final int ENERGY_WIDTH = 22; final int ENERGY_HEIGHT = 80; final int ENERGY_X_SPACING = 18; @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int x, int y) { // Bind the image texture Minecraft.getMinecraft().getTextureManager().bindTexture(texture); // Draw the image GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); // get cook progress as a double between 0 and 1 double cookProgress = tileEntity.fractionOfCookTimeComplete(); // draw the cook progress bar drawTexturedModalRect(guiLeft + COOK_BAR_XPOS, guiTop + COOK_BAR_YPOS, COOK_BAR_ICON_U, COOK_BAR_ICON_V, (int)(cookProgress * COOK_BAR_WIDTH), COOK_BAR_HEIGHT); // draw the fuel remaining bar for each fuel slot flame double burnRemaining = tileEntity.fractionOfFuelRemaining(0); int yOffset = (int)((1.0 - burnRemaining) * FLAME_HEIGHT); drawTexturedModalRect(guiLeft + FLAME_XPOS + FLAME_X_SPACING, guiTop + FLAME_YPOS + yOffset, FLAME_ICON_U, FLAME_ICON_V + yOffset, FLAME_WIDTH, FLAME_HEIGHT - yOffset); // draw energy bar double energyRemain = tileEntity.energyDP; int energyMax = tileEntity.energyMax; int yOffsetEnergy = (int)((energyRemain - energyMax) * ENERGY_HEIGHT); drawTexturedModalRect(guiLeft + ENERGY_XPOS + ENERGY_X_SPACING, guiTop + ENERGY_YPOS + yOffset, ENERGY_ICON_U, ENERGY_ICON_V + yOffset, ENERGY_WIDTH, ENERGY_HEIGHT - yOffset); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { super.drawGuiContainerForegroundLayer(mouseX, mouseY); final int LABEL_XPOS = 5; final int LABEL_YPOS = 5; fontRendererObj.drawString(tileEntity.getDisplayName().getUnformattedText(), LABEL_XPOS, LABEL_YPOS, Color.darkGray.getRGB()); List<String> hoveringText = new ArrayList<String>(); // If the mouse is over the progress bar add the progress bar hovering text if (isInRect(guiLeft + COOK_BAR_XPOS, guiTop + COOK_BAR_YPOS, COOK_BAR_WIDTH, COOK_BAR_HEIGHT, mouseX, mouseY)){ hoveringText.add("Progress:"); int cookPercentage =(int)(tileEntity.fractionOfCookTimeComplete() * 100); hoveringText.add(cookPercentage + "%"); } // If the mouse is over one of the burn time indicator add the burn time indicator hovering text for (int i = 0; i < tileEntity.FUEL_SLOTS_COUNT; ++i) { if (isInRect(guiLeft + FLAME_XPOS + FLAME_X_SPACING * i, guiTop + FLAME_YPOS, FLAME_WIDTH, FLAME_HEIGHT, mouseX, mouseY)) { hoveringText.add("Fuel Time:"); hoveringText.add(tileEntity.secondsOfFuelRemaining(i) + "s"); } } if (isInRect(guiLeft + ENERGY_XPOS + ENERGY_X_SPACING, guiTop + ENERGY_YPOS, ENERGY_WIDTH, ENERGY_HEIGHT, mouseX, mouseY)) { hoveringText.add("Energy Amount:"); hoveringText.add(tileEntity.energyDP + " DP"); } // If hoveringText is not empty draw the hovering text if (!hoveringText.isEmpty()){ drawHoveringText(hoveringText, mouseX - guiLeft, mouseY - guiTop, fontRendererObj); } // // You must re bind the texture and reset the colour if you still need to use it after drawing a string // Minecraft.getMinecraft().getTextureManager().bindTexture(texture); // GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } // Returns true if the given x,y coordinates are within the given rectangle public static boolean isInRect(int x, int y, int xSize, int ySize, int mouseX, int mouseY){ return ((mouseX >= x && mouseX <= x+xSize) && (mouseY >= y && mouseY <= y+ySize)); } } It does update its self with the hover function.
  17. the Update function within the tile entity.
  18. Hey all! So I trying to draw a energy Storage bar, and have it insync with the int, I used furnace GUI for example, but my problem is that it draws, but does not change at all based on energy / manual changes. here is the specific part that I need help on Gui Variables: final int ENERGY_XPOS = -12; final int ENERGY_YPOS = 28; final int ENERGY_ICON_U = 176; // texture position of energy bar final int ENERGY_ICON_V = 21; final int ENERGY_WIDTH = 22; final int ENERGY_HEIGHT = 80; final int ENERGY_X_SPACING = 18; Tile Variables: public int energyDP; public int energyMax = 5000; public int energyPerT = 2; public boolean canAcceptEnergy = true; Code: double energyRemain = tileEntity.energyDP; int energyMax = tileEntity.energyMax; int yOffsetEnergy = (int)((energyRemain - energyMax) * ENERGY_HEIGHT); //where im stuck, energy remain should be what, and what should it be modified by drawTexturedModalRect(guiLeft + ENERGY_XPOS + ENERGY_X_SPACING, guiTop + ENERGY_YPOS + yOffset, ENERGY_ICON_U, ENERGY_ICON_V + yOffset, ENERGY_WIDTH, ENERGY_HEIGHT - yOffset);
  19. So I was calling getWorld(); in my update for some reason. Now I get this crash when I place the tile: 2016-11-20 15:27:06,962 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-11-20 15:27:06,964 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [15:27:07] [main/INFO] [GradleStart]: Extra: [] [15:27:07] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Blake/.gradle/caches/minecraft/assets, --assetIndex, 1.10, --accessToken{REDACTED}, --version, 1.10.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [15:27:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [15:27:07] [main/INFO] [FML]: Forge Mod Loader version 12.18.2.2125 for Minecraft 1.10.2 loading [15:27:07] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_101, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_101 [15:27:07] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [15:27:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [15:27:07] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [15:27:07] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [15:27:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [15:27:07] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [15:27:07] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work! [15:27:08] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [15:27:08] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [15:27:08] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [15:27:09] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [15:27:09] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [15:27:09] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [15:27:09] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} 2016-11-20 15:27:10,141 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-11-20 15:27:10,174 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream 2016-11-20 15:27:10,177 WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream [15:27:10] [Client thread/INFO]: Setting user: Player979 [15:27:14] [Client thread/WARN]: Skipping bad option: lastServer: [15:27:14] [Client thread/INFO]: LWJGL Version: 2.9.4 [15:27:16] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:221]: ---- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 11/20/16 3:27 PM Description: Loading screen debug info This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_101, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 640402280 bytes (610 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 375.70' Renderer: 'GeForce GTX 960/PCIe/SSE2' [15:27:16] [Client thread/INFO] [FML]: MinecraftForge v12.18.2.2125 Initialized [15:27:16] [Client thread/INFO] [FML]: Replaced 231 ore recipes [15:27:17] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer [15:27:17] [Client thread/INFO] [FML]: Searching F:\Minecraft Workspace\1.10.x\Plentiful Misc Rewrite\run\mods for mods [15:27:18] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load [15:27:19] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, plentifulmisc] at CLIENT [15:27:19] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, plentifulmisc] at SERVER [15:27:19] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Plentiful Misc [15:27:19] [Client thread/INFO] [FML]: Processing ObjectHolder annotations [15:27:19] [Client thread/INFO] [FML]: Found 423 ObjectHolder annotations [15:27:19] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations [15:27:19] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [15:27:19] [Client thread/INFO] [FML]: Applying holder lookups [15:27:19] [Client thread/INFO] [FML]: Holder lookups applied [15:27:19] [Client thread/INFO] [FML]: Applying holder lookups [15:27:19] [Client thread/INFO] [FML]: Holder lookups applied [15:27:19] [Client thread/INFO] [FML]: Applying holder lookups [15:27:19] [Client thread/INFO] [FML]: Holder lookups applied [15:27:19] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [15:27:19] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [15:27:20] [Client thread/INFO] [FML]: Applying holder lookups [15:27:20] [Client thread/INFO] [FML]: Holder lookups applied [15:27:20] [Client thread/INFO] [FML]: Injecting itemstacks [15:27:20] [Client thread/INFO] [FML]: Itemstack injection complete [15:27:20] [Forge Version Check/INFO] [ForgeVersionCheck]: [Forge] Found status: OUTDATED Target: 12.18.2.2151 [15:27:23] [sound Library Loader/INFO]: Starting up SoundSystem... [15:27:23] [Thread-8/INFO]: Initializing LWJGL OpenAL [15:27:23] [Thread-8/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [15:27:23] [Thread-8/INFO]: OpenAL initialized. [15:27:23] [sound Library Loader/INFO]: Sound engine started [15:27:28] [Client thread/INFO] [FML]: Max texture size: 16384 [15:27:28] [Client thread/INFO]: Created: 16x16 textures-atlas [15:27:29] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=3 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=3]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=3 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant plentifulmisc:BlockCrystalizer#burning_sides_count=3: java.lang.Exception: Could not load model definition for variant plentifulmisc:BlockCrystalizer at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:274) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model plentifulmisc:blockstates/BlockCrystalizer.json at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 20 more Caused by: java.io.FileNotFoundException: plentifulmisc:blockstates/BlockCrystalizer.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:198) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 20 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=4 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=4]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=4 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockSolarGenerator#inventory for item "plentifulmisc:BlockSolarGenerator", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:item/BlockSolarGenerator with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.io.FileNotFoundException: plentifulmisc:models/item/BlockSolarGenerator.json at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:68) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:311) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 20 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockSolarGenerator#inventory for item "plentifulmisc:BlockSolarGenerator", blockstate location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockSolarGenerator#inventory with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 20 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant plentifulmisc:BlockSolarGenerator#inventory: java.lang.Exception: Could not load model definition for variant plentifulmisc:BlockSolarGenerator at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:274) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model plentifulmisc:blockstates/BlockSolarGenerator.json at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 20 more Caused by: java.io.FileNotFoundException: plentifulmisc:blockstates/BlockSolarGenerator.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:198) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 20 more [15:27:29] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=1 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=1]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=1 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:540) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [15:27:29] [Client thread/ERROR] [FML]: Suppressed additional 3 model loading errors for domain plentifulmisc [15:27:30] [Client thread/INFO] [FML]: Injecting itemstacks [15:27:30] [Client thread/INFO] [FML]: Itemstack injection complete [15:27:30] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods [15:27:30] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Plentiful Misc [15:27:33] [Client thread/INFO]: SoundSystem shutting down... [15:27:33] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [15:27:33] [sound Library Loader/INFO]: Starting up SoundSystem... [15:27:34] [Thread-10/INFO]: Initializing LWJGL OpenAL [15:27:34] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [15:27:34] [Thread-10/INFO]: OpenAL initialized. [15:27:34] [sound Library Loader/INFO]: Sound engine started [15:27:37] [Client thread/INFO] [FML]: Max texture size: 16384 [15:27:38] [Client thread/INFO]: Created: 512x512 textures-atlas [15:27:39] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=3 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=3]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=3 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 24 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant plentifulmisc:BlockCrystalizer#burning_sides_count=3: java.lang.Exception: Could not load model definition for variant plentifulmisc:BlockCrystalizer at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:274) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model plentifulmisc:blockstates/BlockCrystalizer.json at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 23 more Caused by: java.io.FileNotFoundException: plentifulmisc:blockstates/BlockCrystalizer.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:198) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 23 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=4 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=4]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=4 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 24 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockSolarGenerator#inventory for item "plentifulmisc:BlockSolarGenerator", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:item/BlockSolarGenerator with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.io.FileNotFoundException: plentifulmisc:models/item/BlockSolarGenerator.json at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:68) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:311) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 23 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockSolarGenerator#inventory for item "plentifulmisc:BlockSolarGenerator", blockstate location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockSolarGenerator#inventory with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 23 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant plentifulmisc:BlockSolarGenerator#inventory: java.lang.Exception: Could not load model definition for variant plentifulmisc:BlockSolarGenerator at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:274) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model plentifulmisc:blockstates/BlockSolarGenerator.json at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 23 more Caused by: java.io.FileNotFoundException: plentifulmisc:blockstates/BlockSolarGenerator.json at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:198) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?] ... 23 more [15:27:39] [Client thread/ERROR] [FML]: Exception loading model for variant plentifulmisc:BlockCrystalizer#burning_sides_count=1 for blockstate "plentifulmisc:BlockCrystalizer[burning_sides_count=1]" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model plentifulmisc:BlockCrystalizer#burning_sides_count=1 with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:145) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 24 more [15:27:39] [Client thread/ERROR] [FML]: Suppressed additional 3 model loading errors for domain plentifulmisc [15:27:39] [Client thread/WARN]: Skipping bad option: lastServer: [15:27:40] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id [15:27:42] [server thread/INFO]: Starting integrated minecraft server version 1.10.2 [15:27:42] [server thread/INFO]: Generating keypair [15:27:42] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance [15:27:42] [server thread/INFO] [FML]: Found a missing id from the world plentifulmisc:BlockJarSmelter [15:27:42] [server thread/INFO] [FML]: Applying holder lookups [15:27:42] [server thread/INFO] [FML]: Holder lookups applied [15:27:43] [server thread/INFO] [FML]: Loading dimension 0 (Update Test) (net.minecraft.server.integrated.IntegratedServer@799a1df5) [15:27:43] [server thread/INFO] [FML]: Loading dimension 1 (Update Test) (net.minecraft.server.integrated.IntegratedServer@799a1df5) [15:27:43] [server thread/INFO] [FML]: Loading dimension -1 (Update Test) (net.minecraft.server.integrated.IntegratedServer@799a1df5) [15:27:43] [server thread/INFO]: Preparing start region for level 0 [15:27:44] [server thread/INFO]: Preparing spawn area: 20% [15:27:45] [server thread/INFO]: Changing view distance to 12, from 10 [15:27:46] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2 [15:27:46] [Netty Server IO #1/INFO] [FML]: Client protocol version 2 [15:27:46] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : FML@8.0.99.99,Forge@12.18.2.2125,mcp@9.19,plentifulmisc@0.1a [15:27:46] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established [15:27:46] [server thread/INFO] [FML]: [server thread] Server side modded connection established [15:27:46] [server thread/INFO]: Player979[local:E:0545cc6e] logged in with entity id 288 at (211.61426120267586, 64.0, 292.97826264153287) [15:27:46] [server thread/INFO]: Player979 joined the game [15:27:48] [server thread/INFO]: Saving and pausing game... [15:27:48] [server thread/INFO]: Saving chunks for level 'Update Test'/Overworld [15:27:48] [server thread/INFO]: Saving chunks for level 'Update Test'/Nether [15:27:48] [server thread/INFO]: Saving chunks for level 'Update Test'/The End [15:27:48] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@71a690a6[id=a358f576-55e4-36d3-950a-a39f1875bc3b,name=Player979,properties={},legacy=false] com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?] at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?] at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?] at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?] at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?] at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3060) [Minecraft.class:?] at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:131) [skinManager$3.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_101] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_101] at java.lang.Thread.run(Unknown Source) [?:1.8.0_101] [15:27:50] [server thread/INFO]: Player979 has just earned the achievement [Taking Inventory] [15:27:50] [Client thread/INFO]: [CHAT] Player979 has just earned the achievement [Taking Inventory] [15:27:54] [server thread/FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:26) [util.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:742) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:687) [MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:156) [integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:536) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_101] Caused by: java.lang.NullPointerException at com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer.getWorld(TileEnityCrystallizer.java:173) ~[TileEnityCrystallizer.class:?] at net.minecraft.world.World.addTileEntity(World.java:2032) ~[World.class:?] at net.minecraft.world.World.setTileEntity(World.java:2645) ~[World.class:?] at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:667) ~[Chunk.class:?] at net.minecraft.world.World.setBlockState(World.java:384) ~[World.class:?] at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:184) ~[itemBlock.class:?] at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:60) ~[itemBlock.class:?] at net.minecraftforge.common.ForgeHooks.onPlaceItemIntoWorld(ForgeHooks.java:771) ~[ForgeHooks.class:?] at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:158) ~[itemStack.class:?] at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:509) ~[PlayerInteractionManager.class:?] at net.minecraft.network.NetHandlerPlayServer.processRightClickBlock(NetHandlerPlayServer.java:706) ~[NetHandlerPlayServer.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?] at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?] at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_101] at net.minecraft.util.Util.runTask(Util.java:25) ~[util.class:?] ... 5 more [15:27:55] [server thread/INFO]: Stopping server [15:27:55] [server thread/INFO]: Saving players [15:27:55] [server thread/INFO]: Saving worlds [15:27:55] [server thread/INFO]: Saving chunks for level 'Update Test'/Overworld [15:27:55] [server thread/INFO]: Saving chunks for level 'Update Test'/Nether [15:27:55] [server thread/INFO]: Saving chunks for level 'Update Test'/The End [15:27:56] [server thread/INFO] [FML]: Unloading dimension 0 [15:27:56] [server thread/INFO] [FML]: Unloading dimension -1 [15:27:56] [server thread/INFO] [FML]: Unloading dimension 1 [15:27:56] [server thread/INFO] [FML]: Applying holder lookups [15:27:56] [server thread/INFO] [FML]: Holder lookups applied [15:27:57] [Client thread/FATAL]: Unreported exception thrown! java.lang.NullPointerException at com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer.getWorld(TileEnityCrystallizer.java:173) ~[TileEnityCrystallizer.class:?] at net.minecraft.world.World.addTileEntity(World.java:2032) ~[World.class:?] at net.minecraft.world.World.setTileEntity(World.java:2645) ~[World.class:?] at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:667) ~[Chunk.class:?] at net.minecraft.world.World.setBlockState(World.java:384) ~[World.class:?] at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:184) ~[itemBlock.class:?] at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:60) ~[itemBlock.class:?] at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:159) ~[itemStack.class:?] at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:486) ~[PlayerControllerMP.class:?] at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] [15:27:57] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: ---- Minecraft Crash Report ---- // Why did you do that? Time: 11/20/16 3:27 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer.getWorld(TileEnityCrystallizer.java:173) at net.minecraft.world.World.addTileEntity(World.java:2032) at net.minecraft.world.World.setTileEntity(World.java:2645) at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:667) at net.minecraft.world.World.setBlockState(World.java:384) at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:184) at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:60) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:159) at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:486) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) at net.minecraft.client.Minecraft.run(Minecraft.java:406) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer.getWorld(TileEnityCrystallizer.java:173) at net.minecraft.world.World.addTileEntity(World.java:2032) at net.minecraft.world.World.setTileEntity(World.java:2645) at net.minecraft.world.chunk.Chunk.setBlockState(Chunk.java:667) at net.minecraft.world.World.setBlockState(World.java:384) at net.minecraft.item.ItemBlock.placeBlockAt(ItemBlock.java:184) at net.minecraft.item.ItemBlock.onItemUse(ItemBlock.java:60) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:159) at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:486) at net.minecraft.client.Minecraft.rightClickMouse(Minecraft.java:1603) at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2281) at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2058) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player979'/288, l='MpServer', x=213.42, y=64.00, z=293.88]] Chunk stats: MultiplayerChunkCache: 599, 599 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (32,64,256), Chunk: (at 0,4,0 in 2,16; contains blocks 32,0,256 to 47,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 60665 game time, 487 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 101 total; [EntitySkeleton['Skeleton'/256, l='MpServer', x=209.50, y=44.00, z=235.50], EntityCreeper['Creeper'/257, l='MpServer', x=209.20, y=40.00, z=230.44], EntitySkeleton['Skeleton'/258, l='MpServer', x=215.48, y=56.00, z=225.31], EntityZombie['Zombie'/259, l='MpServer', x=217.28, y=22.00, z=252.52], EntityBat['Bat'/260, l='MpServer', x=212.24, y=24.10, z=255.02], EntitySpider['Spider'/261, l='MpServer', x=223.30, y=36.08, z=257.30], EntityCow['Cow'/262, l='MpServer', x=216.50, y=61.00, z=259.79], EntityCow['Cow'/263, l='MpServer', x=215.42, y=60.00, z=259.83], EntitySkeleton['Skeleton'/264, l='MpServer', x=214.50, y=25.00, z=363.50], EntityZombie['Zombie'/265, l='MpServer', x=213.50, y=30.00, z=357.50], EntityCreeper['Creeper'/266, l='MpServer', x=214.50, y=30.00, z=357.50], EntityCreeper['Creeper'/267, l='MpServer', x=215.50, y=30.00, z=354.50], EntityCreeper['Creeper'/268, l='MpServer', x=216.86, y=30.00, z=356.47], EntityZombie['Zombie'/279, l='MpServer', x=227.52, y=17.00, z=215.80], EntityEnderman['Enderman'/280, l='MpServer', x=229.47, y=45.00, z=213.44], EntitySkeleton['Skeleton'/281, l='MpServer', x=235.50, y=37.00, z=222.50], EntityCreeper['Creeper'/282, l='MpServer', x=236.50, y=38.00, z=250.50], EntityCreeper['Creeper'/283, l='MpServer', x=233.50, y=27.00, z=309.50], EntityCreeper['Creeper'/284, l='MpServer', x=234.50, y=27.00, z=309.50], EntitySheep['Sheep'/285, l='MpServer', x=229.67, y=62.01, z=339.63], EntitySheep['Sheep'/302, l='MpServer', x=247.27, y=71.00, z=369.52], EntityEnderman['Enderman'/322, l='MpServer', x=250.31, y=49.00, z=223.59], EntityCow['Cow'/325, l='MpServer', x=247.84, y=69.00, z=258.56], EntityCow['Cow'/326, l='MpServer', x=262.79, y=71.00, z=244.67], EntityCreeper['Creeper'/327, l='MpServer', x=246.50, y=37.00, z=255.50], EntityCow['Cow'/328, l='MpServer', x=255.20, y=70.00, z=250.50], EntityCow['Cow'/329, l='MpServer', x=254.22, y=69.00, z=244.50], EntityCow['Cow'/330, l='MpServer', x=263.79, y=71.00, z=235.48], EntityCow['Cow'/331, l='MpServer', x=255.84, y=64.00, z=301.51], EntityCow['Cow'/332, l='MpServer', x=253.78, y=64.00, z=302.56], EntityCow['Cow'/333, l='MpServer', x=274.94, y=71.00, z=263.47], EntityCow['Cow'/334, l='MpServer', x=283.80, y=71.00, z=264.52], EntityCow['Cow'/335, l='MpServer', x=283.42, y=70.00, z=255.83], EntityCreeper['Creeper'/336, l='MpServer', x=247.50, y=19.00, z=332.50], EntityCreeper['Creeper'/337, l='MpServer', x=249.50, y=19.00, z=328.50], EntityCreeper['Creeper'/338, l='MpServer', x=246.50, y=19.00, z=331.50], EntitySkeleton['Skeleton'/339, l='MpServer', x=249.50, y=19.00, z=329.50], EntitySheep['Sheep'/340, l='MpServer', x=249.76, y=74.00, z=324.59], EntityCow['Cow'/341, l='MpServer', x=250.24, y=74.00, z=325.58], EntitySheep['Sheep'/342, l='MpServer', x=242.49, y=64.00, z=330.73], EntitySheep['Sheep'/343, l='MpServer', x=265.74, y=71.00, z=313.54], EntitySheep['Sheep'/344, l='MpServer', x=257.50, y=77.00, z=358.11], EntitySheep['Sheep'/345, l='MpServer', x=273.52, y=70.00, z=324.20], EntityCow['Cow'/346, l='MpServer', x=272.57, y=65.00, z=335.50], EntitySheep['Sheep'/360, l='MpServer', x=288.73, y=67.00, z=295.58], EntityCreeper['Creeper'/373, l='MpServer', x=289.30, y=19.00, z=324.50], EntitySheep['Sheep'/376, l='MpServer', x=289.75, y=72.00, z=318.67], EntityBat['Bat'/150, l='MpServer', x=136.79, y=38.25, z=250.85], EntityCreeper['Creeper'/151, l='MpServer', x=139.50, y=36.00, z=257.50], EntityCreeper['Creeper'/152, l='MpServer', x=133.50, y=41.00, z=290.50], EntityCreeper['Creeper'/153, l='MpServer', x=141.50, y=48.00, z=301.50], EntityCreeper['Creeper'/155, l='MpServer', x=132.50, y=44.00, z=305.50], EntityPig['Pig'/156, l='MpServer', x=137.73, y=64.00, z=319.47], EntityZombie['Zombie'/157, l='MpServer', x=144.61, y=34.00, z=350.81], EntitySheep['Sheep'/158, l='MpServer', x=137.23, y=63.00, z=348.50], EntityPlayerSP['Player979'/288, l='MpServer', x=213.42, y=64.00, z=293.88], EntityPig['Pig'/159, l='MpServer', x=133.50, y=63.00, z=370.37], EntitySheep['Sheep'/160, l='MpServer', x=132.41, y=63.00, z=371.23], EntityCow['Cow'/163, l='MpServer', x=147.22, y=67.00, z=252.39], EntityCow['Cow'/164, l='MpServer', x=150.15, y=71.00, z=268.46], EntityPig['Pig'/165, l='MpServer', x=152.67, y=72.00, z=273.51], EntityBat['Bat'/166, l='MpServer', x=154.50, y=39.10, z=295.25], EntityZombie['Zombie'/167, l='MpServer', x=149.26, y=50.00, z=293.50], EntityPig['Pig'/168, l='MpServer', x=144.30, y=64.00, z=323.57], EntitySheep['Sheep'/169, l='MpServer', x=149.18, y=63.00, z=339.76], EntitySheep['Sheep'/170, l='MpServer', x=150.61, y=62.02, z=356.14], EntitySkeleton['Skeleton'/173, l='MpServer', x=164.50, y=39.00, z=299.50], EntitySheep['Sheep'/174, l='MpServer', x=173.18, y=64.00, z=342.20], EntitySheep['Sheep'/175, l='MpServer', x=168.24, y=63.00, z=347.43], EntitySkeleton['Skeleton'/185, l='MpServer', x=181.50, y=28.00, z=249.50], EntityCow['Cow'/186, l='MpServer', x=178.36, y=70.00, z=244.21], EntitySkeleton['Skeleton'/187, l='MpServer', x=179.50, y=31.00, z=331.50], EntitySkeleton['Skeleton'/188, l='MpServer', x=180.50, y=31.00, z=330.50], EntitySkeleton['Skeleton'/189, l='MpServer', x=181.50, y=31.00, z=330.50], EntitySkeleton['Skeleton'/190, l='MpServer', x=180.50, y=31.00, z=333.50], EntitySheep['Sheep'/191, l='MpServer', x=188.50, y=64.00, z=339.70], EntityCreeper['Creeper'/209, l='MpServer', x=202.50, y=38.00, z=223.50], EntityCreeper['Creeper'/210, l='MpServer', x=205.50, y=38.00, z=223.50], EntityZombie['Zombie'/211, l='MpServer', x=206.71, y=58.00, z=222.50], EntityCreeper['Creeper'/212, l='MpServer', x=206.83, y=59.00, z=218.52], EntityWitch['Witch'/214, l='MpServer', x=207.50, y=23.00, z=237.50], EntityBat['Bat'/215, l='MpServer', x=203.31, y=21.87, z=217.21], EntityBat['Bat'/216, l='MpServer', x=203.90, y=26.95, z=232.21], EntityBat['Bat'/217, l='MpServer', x=205.38, y=25.68, z=227.61], EntityBat['Bat'/218, l='MpServer', x=203.77, y=25.42, z=224.44], EntityCreeper['Creeper'/219, l='MpServer', x=207.50, y=44.00, z=235.50], EntitySkeleton['Skeleton'/220, l='MpServer', x=200.50, y=42.00, z=232.50], EntityCreeper['Creeper'/221, l='MpServer', x=207.67, y=39.00, z=227.47], EntitySpider['Spider'/222, l='MpServer', x=193.00, y=46.00, z=243.99], EntityZombie['Zombie'/223, l='MpServer', x=204.73, y=53.00, z=248.45], EntityCreeper['Creeper'/224, l='MpServer', x=206.50, y=54.00, z=250.52], EntityCow['Cow'/225, l='MpServer', x=194.16, y=73.00, z=249.37], EntityCow['Cow'/226, l='MpServer', x=194.80, y=73.00, z=253.47], EntityCow['Cow'/227, l='MpServer', x=202.53, y=63.00, z=329.85], EntitySpider['Spider'/228, l='MpServer', x=195.50, y=36.00, z=350.50], EntitySkeleton['Skeleton'/229, l='MpServer', x=200.50, y=38.00, z=356.50], EntityCreeper['Creeper'/251, l='MpServer', x=209.50, y=40.00, z=218.78], EntityZombie['Zombie'/252, l='MpServer', x=201.74, y=60.00, z=218.54], EntityZombie['Zombie'/253, l='MpServer', x=208.56, y=23.00, z=235.30], EntityWitch['Witch'/254, l='MpServer', x=209.50, y=23.00, z=238.50], EntityWitch['Witch'/255, l='MpServer', x=209.35, y=24.00, z=235.98]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:451) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779) at net.minecraft.client.Minecraft.run(Minecraft.java:435) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_101, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 538883080 bytes (513 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.32 Powered by Forge 12.18.2.2125 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAAAA Forge{12.18.2.2125} [Minecraft Forge] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAAAA plentifulmisc{0.1a} [Plentiful Misc] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 375.70' Renderer: 'GeForce GTX 960/PCIe/SSE2' Launched Version: 1.10.2 LWJGL: 2.9.4 OpenGL: GeForce GTX 960/PCIe/SSE2 GL version 4.5.0 NVIDIA 375.70, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 6x AMD FX(tm)-6300 Six-Core Processor [15:27:57] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:649]: #@!@# Game crashed! Crash report saved to: #@!@# F:\Minecraft Workspace\1.10.x\Plentiful Misc Rewrite\run\.\crash-reports\crash-2016-11-20_15.27.57-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release TileEntity: package com.lambda.PlentifulMisc.blocks.tile; import net.minecraft.tileentity.TileEntity; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagInt; import net.minecraft.nbt.NBTTagIntArray; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.play.server.SPacketUpdateTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.util.EnumFacing; import net.minecraft.util.ITickable; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import javax.annotation.Nullable; import com.lambda.PlentifulMisc.init.ModBlocks; import com.lambda.PlentifulMisc.recipe.CraftingHandlerCrystallizer; import java.util.Arrays; /** * User: brandon3055 * Date: 06/01/2015 * * TileInventorySmelting is an advanced sided inventory that works like a vanilla furnace except that it has 5 input and output slots, * 4 fuel slots and cooks at up to four times the speed. * The input slots are used sequentially rather than in parallel, i.e. the first slot cooks, then the second, then the third, etc * The fuel slots are used in parallel. The more slots burning in parallel, the faster the cook time. * The code is heavily based on TileEntityFurnace. */ public class TileEnityCrystallizer extends TileEntity implements IInventory, ITickable { /** Create and initialize the itemStacks variable that will store store the itemStacks */ public static final int FUEL_SLOTS_COUNT = 1; public static final int INPUT_SLOTS_COUNT = 1; public static final int OUTPUT_SLOTS_COUNT = 5; public static final int TOTAL_SLOTS_COUNT = FUEL_SLOTS_COUNT + INPUT_SLOTS_COUNT + OUTPUT_SLOTS_COUNT; public static final int FIRST_FUEL_SLOT = 0; public static final int FIRST_INPUT_SLOT = FIRST_FUEL_SLOT + FUEL_SLOTS_COUNT; public static final int FIRST_OUTPUT_SLOT = FIRST_INPUT_SLOT + INPUT_SLOTS_COUNT; private ItemStack[] itemStacks = new ItemStack[TOTAL_SLOTS_COUNT]; /** The number of burn ticks remaining on the current piece of fuel */ private int energyDP; /** The initial fuel value of the currently burning fuel (in ticks of burn duration) */ private int [] energyInitial = new int[FUEL_SLOTS_COUNT]; /**The number of ticks the current item has been cooking*/ private short cookTime; /**The number of ticks required to cook an item*/ private static final short COOK_TIME_FOR_COMPLETION = 600; // vanilla value is 200 = 10 seconds private int cachedNumberOfBurningSlots = -1; /** * Returns the amount of fuel remaining on the currently burning item in the given fuel slot. * @fuelSlot the number of the fuel slot (0..3) * @return fraction remaining, between 0 - 1 */ public double fractionOfFuelRemaining(int fuelSlot) { if (energyInitial[fuelSlot] <= 0 ) return 0; double fraction = energyDP / (double)energyDP; return MathHelper.clamp_double(fraction, 0.0, 1.0); } /** * return the remaining burn time of the fuel in the given slot * @param fuelSlot the number of the fuel slot (0..3) * @return seconds remaining */ public int secondsOfFuelRemaining(int fuelSlot) { if (energyDP <= 0 ) return 0; return energyDP / 20; // 20 ticks per second } /** * Get the number of slots which have fuel burning in them. * @return number of slots with burning fuel, 0 - FUEL_SLOTS_COUNT */ /** * Returns the amount of cook time completed on the currently cooking item. * @return fraction remaining, between 0 - 1 */ public double fractionOfCookTimeComplete() { double fraction = cookTime / (double)COOK_TIME_FOR_COMPLETION; return MathHelper.clamp_double(fraction, 0.0, 1.0); } // This method is called every tick to update the tile entity, i.e. // - see if the fuel has run out, and if so turn the furnace "off" and slowly uncook the current item (if any) // - see if any of the items have finished smelting // It runs both on the server and the client. @Override public void update() { // If there is nothing to smelt or there is no room in the output, reset cookTime and return if (canSmelt()) { int energyStored = burnFuel(); // If fuel is available, keep cooking the item, otherwise start "uncooking" it at double speed if (energyStored > 0) { cookTime += energyStored; } else { cookTime -= 1; } if (cookTime < 0) cookTime = 0; // If cookTime has reached maxCookTime smelt the item and reset cookTime if (cookTime >= COOK_TIME_FOR_COMPLETION) { smeltItem(); cookTime = 0; } } else { cookTime = 0; } // when the number of burning slots changes, we need to force the block to re-render, otherwise the change in // state will not be visible. Likewise, we need to force a lighting recalculation. // The block update (for renderer) is only required on client side, but the lighting is required on both, since // the client needs it for rendering and the server needs it for crop growth etc if (worldObj.isRemote) { IBlockState iblockstate = this.worldObj.getBlockState(pos); final int FLAGS = 3; // I'm not sure what these flags do, exactly. worldObj.notifyBlockUpdate(pos, iblockstate, iblockstate, FLAGS); } worldObj.checkLightFor(EnumSkyBlock.BLOCK, pos); } /** * for each fuel slot: decreases the burn time, checks if burnTimeRemaining = 0 and tries to consume a new piece of fuel if one is available * @return the number of fuel slots which are burning */ //WHERE LAVA TANK WOULD ADD FUEL! private int burnFuel() { int burningCount = 0; // Iterate over all the fuel slots int fuelSlotNumber = FIRST_FUEL_SLOT; if (energyDP > 0) { --energyDP; ++burningCount; if (energyDP == 0) { energyDP = energyInitial[0] = getItemBurnTime(itemStacks[fuelSlotNumber]); --itemStacks[fuelSlotNumber].stackSize; ++burningCount; } } markDirty(); return burningCount; } public World getWorld() { for (EnumFacing face : EnumFacing.values()) { BlockPos adj = getPos().offset(face); if(worldObj.getBlockState(adj).getBlock() == ModBlocks.solarGenerator) { //energyDP++; }else if(worldObj.getBlockState(adj).getBlock() == null) { return super.getWorld(); } } return super.getWorld(); } /** * Check if any of the input items are smeltable and there is sufficient space in the output slots * @return true if smelting is possible */ private boolean canSmelt() {return smeltItem(false);} /** * Smelt an input item into an output slot, if possible */ private void smeltItem() {smeltItem(true);} /** * checks that there is an item to be smelted in one of the input slots and that there is room for the result in the output slots * If desired, performs the smelt * @param performSmelt if true, perform the smelt. if false, check whether smelting is possible, but don't change the inventory * @return false if no items can be smelted, true otherwise */ private boolean smeltItem(boolean performSmelt) { Integer firstSuitableInputSlot = null; Integer firstSuitableOutputSlot = null; ItemStack result = null; // finds the first input slot which is smeltable and whose result fits into an output slot (stacking if possible) for (int inputSlot = FIRST_INPUT_SLOT; inputSlot < FIRST_INPUT_SLOT + INPUT_SLOTS_COUNT; inputSlot++) { if (itemStacks[inputSlot] != null) { result = getSmeltingResultForItem(itemStacks[inputSlot]); if (result != null) { // find the first suitable output slot- either empty, or with identical item that has enough space for (int outputSlot = FIRST_OUTPUT_SLOT; outputSlot < FIRST_OUTPUT_SLOT + OUTPUT_SLOTS_COUNT; outputSlot++) { ItemStack outputStack = itemStacks[outputSlot]; if (outputStack == null) { firstSuitableInputSlot = inputSlot; firstSuitableOutputSlot = outputSlot; break; } if (outputStack.getItem() == result.getItem() && (!outputStack.getHasSubtypes() || outputStack.getMetadata() == outputStack.getMetadata()) && ItemStack.areItemStackTagsEqual(outputStack, result)) { int combinedSize = itemStacks[outputSlot].stackSize + result.stackSize; if (combinedSize <= getInventoryStackLimit() && combinedSize <= itemStacks[outputSlot].getMaxStackSize()) { firstSuitableInputSlot = inputSlot; firstSuitableOutputSlot = outputSlot; break; } } } if (firstSuitableInputSlot != null) break; } } } if (firstSuitableInputSlot == null) return false; if (!performSmelt) return true; // alter input and output itemStacks[firstSuitableInputSlot].stackSize--; if (itemStacks[firstSuitableInputSlot].stackSize <=0) itemStacks[firstSuitableInputSlot] = null; if (itemStacks[firstSuitableOutputSlot] == null) { itemStacks[firstSuitableOutputSlot] = result.copy(); // Use deep .copy() to avoid altering the recipe } else { itemStacks[firstSuitableOutputSlot].stackSize += result.stackSize; } markDirty(); return true; } // returns the smelting result for the given stack. Returns null if the given stack can not be smelted public static ItemStack getSmeltingResultForItem(ItemStack stack) { return CraftingHandlerCrystallizer.instance().getSmeltingResult(stack); } // returns the number of ticks the given item will burn. Returns 0 if the given item is not a valid fuel public static short getItemBurnTime(ItemStack stack) { int burntime = TileEntityFurnace.getItemBurnTime(stack); // just use the vanilla values return (short)MathHelper.clamp_int(burntime, 0, Short.MAX_VALUE); } // Gets the number of slots in the inventory @Override public int getSizeInventory() { return itemStacks.length; } // Gets the stack in the given slot @Override public ItemStack getStackInSlot(int i) { return itemStacks[i]; } /** * Removes some of the units from itemstack in the given slot, and returns as a separate itemstack * @param slotIndex the slot number to remove the items from * @param count the number of units to remove * @return a new itemstack containing the units removed from the slot */ @Override public ItemStack decrStackSize(int slotIndex, int count) { ItemStack itemStackInSlot = getStackInSlot(slotIndex); if (itemStackInSlot == null) return null; ItemStack itemStackRemoved; if (itemStackInSlot.stackSize <= count) { itemStackRemoved = itemStackInSlot; setInventorySlotContents(slotIndex, null); } else { itemStackRemoved = itemStackInSlot.splitStack(count); if (itemStackInSlot.stackSize == 0) { setInventorySlotContents(slotIndex, null); } } markDirty(); return itemStackRemoved; } // overwrites the stack in the given slotIndex with the given stack @Override public void setInventorySlotContents(int slotIndex, ItemStack itemstack) { itemStacks[slotIndex] = itemstack; if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize = getInventoryStackLimit(); } markDirty(); } // This is the maximum number if items allowed in each slot // This only affects things such as hoppers trying to insert items you need to use the container to enforce this for players // inserting items via the gui @Override public int getInventoryStackLimit() { return 64; } // Return true if the given player is able to use this block. In this case it checks that // 1) the world tileentity hasn't been replaced in the meantime, and // 2) the player isn't too far away from the centre of the block @Override public boolean isUseableByPlayer(EntityPlayer player) { if (this.worldObj.getTileEntity(this.pos) != this) return false; final double X_CENTRE_OFFSET = 0.5; final double Y_CENTRE_OFFSET = 0.5; final double Z_CENTRE_OFFSET = 0.5; final double MAXIMUM_DISTANCE_SQ = 8.0 * 8.0; return player.getDistanceSq(pos.getX() + X_CENTRE_OFFSET, pos.getY() + Y_CENTRE_OFFSET, pos.getZ() + Z_CENTRE_OFFSET) < MAXIMUM_DISTANCE_SQ; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForFuelSlot(ItemStack itemStack) { return true; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForInputSlot(ItemStack itemStack) { return true; } // Return true if the given stack is allowed to be inserted in the given slot // Unlike the vanilla furnace, we allow anything to be placed in the fuel slots static public boolean isItemValidForOutputSlot(ItemStack itemStack) { return false; } //------------------------------ // This is where you save any data that you don't want to lose when the tile entity unloads // In this case, it saves the state of the furnace (burn time etc) and the itemstacks stored in the fuel, input, and output slots @Override public NBTTagCompound writeToNBT(NBTTagCompound parentNBTTagCompound) { super.writeToNBT(parentNBTTagCompound); // The super call is required to save and load the tiles location // // Save the stored item stacks // to use an analogy with Java, this code generates an array of hashmaps // The itemStack in each slot is converted to an NBTTagCompound, which is effectively a hashmap of key->value pairs such // as slot=1, id=2353, count=1, etc // Each of these NBTTagCompound are then inserted into NBTTagList, which is similar to an array. NBTTagList dataForAllSlots = new NBTTagList(); for (int i = 0; i < this.itemStacks.length; ++i) { if (this.itemStacks[i] != null) { NBTTagCompound dataForThisSlot = new NBTTagCompound(); dataForThisSlot.setByte("Slot", (byte) i); this.itemStacks[i].writeToNBT(dataForThisSlot); dataForAllSlots.appendTag(dataForThisSlot); } } // the array of hashmaps is then inserted into the parent hashmap for the container parentNBTTagCompound.setTag("Items", dataForAllSlots); // Save everything else parentNBTTagCompound.setShort("CookTime", cookTime); parentNBTTagCompound.setTag("energyRemaining", new NBTTagInt(energyDP)); parentNBTTagCompound.setTag("energyInitial", new NBTTagIntArray(energyInitial)); return parentNBTTagCompound; } // This is where you load the data that you saved in writeToNBT @Override public void readFromNBT(NBTTagCompound nbtTagCompound) { super.readFromNBT(nbtTagCompound); // The super call is required to save and load the tiles location final byte NBT_TYPE_COMPOUND = 10; // See NBTBase.createNewByType() for a listing NBTTagList dataForAllSlots = nbtTagCompound.getTagList("Items", NBT_TYPE_COMPOUND); Arrays.fill(itemStacks, null); // set all slots to empty for (int i = 0; i < dataForAllSlots.tagCount(); ++i) { NBTTagCompound dataForOneSlot = dataForAllSlots.getCompoundTagAt(i); byte slotNumber = dataForOneSlot.getByte("Slot"); if (slotNumber >= 0 && slotNumber < this.itemStacks.length) { this.itemStacks[slotNumber] = ItemStack.loadItemStackFromNBT(dataForOneSlot); } } // Load everything else. Trim the arrays (or pad with 0) to make sure they have the correct number of elements cookTime = nbtTagCompound.getShort("CookTime"); energyDP = nbtTagCompound.getInteger("energyRemaining"); energyInitial = Arrays.copyOf(nbtTagCompound.getIntArray("energyInitial"), FUEL_SLOTS_COUNT); cachedNumberOfBurningSlots = -1; } // // When the world loads from disk, the server needs to send the TileEntity information to the client // // it uses getUpdatePacket(), getUpdateTag(), onDataPacket(), and handleUpdateTag() to do this @Override @Nullable public SPacketUpdateTileEntity getUpdatePacket() { NBTTagCompound updateTagDescribingTileEntityState = getUpdateTag(); final int METADATA = 0; return new SPacketUpdateTileEntity(this.pos, METADATA, updateTagDescribingTileEntityState); } @Override public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) { NBTTagCompound updateTagDescribingTileEntityState = pkt.getNbtCompound(); handleUpdateTag(updateTagDescribingTileEntityState); } /* Creates a tag containing the TileEntity information, used by vanilla to transmit from server to client Warning - although our getUpdatePacket() uses this method, vanilla also calls it directly, so don't remove it. */ @Override public NBTTagCompound getUpdateTag() { NBTTagCompound nbtTagCompound = new NBTTagCompound(); writeToNBT(nbtTagCompound); return nbtTagCompound; } /* Populates this TileEntity with information from the tag, used by vanilla to transmit from server to client Warning - although our onDataPacket() uses this method, vanilla also calls it directly, so don't remove it. */ @Override public void handleUpdateTag(NBTTagCompound tag) { this.readFromNBT(tag); } //------------------------ // set all slots to empty @Override public void clear() { Arrays.fill(itemStacks, null); } // will add a key for this container to the lang file so we can name it in the GUI @Override public String getName() { return "container.crystallizer.name"; } @Override public boolean hasCustomName() { return false; } // standard code to look up what the human-readable name is @Nullable @Override public ITextComponent getDisplayName() { return this.hasCustomName() ? new TextComponentString(this.getName()) : new TextComponentTranslation(this.getName()); } // Fields are used to send non-inventory information from the server to interested clients // The container code caches the fields and sends the client any fields which have changed. // The field ID is limited to byte, and the field value is limited to short. (if you use more than this, they get cast down // in the network packets) // If you need more than this, or shorts are too small, use a custom packet in your container instead. private static final byte COOK_FIELD_ID = 0; private static final byte FIRST_BURN_TIME_REMAINING_FIELD_ID = 1; private static final byte FIRST_BURN_TIME_INITIAL_FIELD_ID = FIRST_BURN_TIME_REMAINING_FIELD_ID + (byte)FUEL_SLOTS_COUNT; private static final byte NUMBER_OF_FIELDS = FIRST_BURN_TIME_INITIAL_FIELD_ID + (byte)FUEL_SLOTS_COUNT; @Override public int getField(int id) { if (id == COOK_FIELD_ID) return cookTime; if (id >= FIRST_BURN_TIME_REMAINING_FIELD_ID && id < FIRST_BURN_TIME_REMAINING_FIELD_ID + FUEL_SLOTS_COUNT) { return energyDP; } if (id >= FIRST_BURN_TIME_INITIAL_FIELD_ID && id < FIRST_BURN_TIME_INITIAL_FIELD_ID + FUEL_SLOTS_COUNT) { return energyInitial[id - FIRST_BURN_TIME_INITIAL_FIELD_ID]; } System.err.println("Invalid field ID in TileInventorySmelting.getField:" + id); return 0; } @Override public void setField(int id, int value) { if (id == COOK_FIELD_ID) { cookTime = (short)value; } else if (id >= FIRST_BURN_TIME_REMAINING_FIELD_ID && id < FIRST_BURN_TIME_REMAINING_FIELD_ID + FUEL_SLOTS_COUNT) { energyDP = value; } else if (id >= FIRST_BURN_TIME_INITIAL_FIELD_ID && id < FIRST_BURN_TIME_INITIAL_FIELD_ID + FUEL_SLOTS_COUNT) { energyInitial[id - FIRST_BURN_TIME_INITIAL_FIELD_ID] = value; } else { System.err.println("Invalid field ID in TileInventorySmelting.setField:" + id); } } @Override public int getFieldCount() { return NUMBER_OF_FIELDS; } @Override public boolean isItemValidForSlot(int slotIndex, ItemStack itemstack) { return false; } /** * This method removes the entire contents of the given slot and returns it. * Used by containers such as crafting tables which return any items in their slots when you close the GUI * @param slotIndex * @return */ @Override public ItemStack removeStackFromSlot(int slotIndex) { ItemStack itemStack = getStackInSlot(slotIndex); if (itemStack != null) setInventorySlotContents(slotIndex, null); return itemStack; } @Override public void openInventory(EntityPlayer player) {} @Override public void closeInventory(EntityPlayer player) {} }
  20. No, I am not anymore. Still get the crash though
  21. ---- Minecraft Crash Report ---- // Why did you do that? Time: 11/20/16 2:52 PM Description: Exception in server tick loop java.lang.NullPointerException: Exception in server tick loop at com.lambda.PlentifulMisc.blocks.tile.TileEnityCrystallizer.getWorld(TileEnityCrystallizer.java:173) at net.minecraft.world.chunk.Chunk.addTileEntity(Chunk.java:862) at net.minecraft.world.chunk.Chunk.addTileEntity(Chunk.java:852) at net.minecraft.world.chunk.storage.AnvilChunkLoader.loadEntities(AnvilChunkLoader.java:519) at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:96) at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:121) at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:92) at net.minecraft.world.gen.ChunkProviderServer.provideChunk(ChunkProviderServer.java:138) at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:336) at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:107) at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:124) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:496) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_101, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 614824648 bytes (586 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP 9.32 Powered by Forge 12.18.2.2125 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAA mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCHIJAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAA Forge{12.18.2.2125} [Minecraft Forge] (forgeSrc-1.10.2-12.18.2.2125.jar) UCHIJAA plentifulmisc{0.1a} [Plentiful Misc] (bin) Loaded coremods (and transformers): GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 0 / 8; [] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.