Jump to content

INTENSS

Members
  • Posts

    32
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

INTENSS's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I switched up the method so it looks like this... private void infuseItem() { if (!canInfuse()) { return; } ItemStack itemstack = InfusionRecipes.getInfusionResults(slots[1].getItem(), slots[2].getItem()); if (slots[3] == null) { slots[3] = itemstack.copy(); } else if (slots[3] == itemstack) { this.slots[3].stackSize++; } for (int i = 0; i < 2; i++) { if (slots[i].stackSize <= 0) { slots[i] = new ItemStack(slots[i].getItem()); } else { slots[i].stackSize--; } if (slots[i].stackSize <= 0) { slots[i] = null; } } } It resolved the crash, however now it will burn fuel but not create the item but that is more than likely in my recipes class so i can figure that out. You were right Belpois, thanks for the help.
  2. I went and reviewed the vanilla smeltItem method and clipped in the the section of code that decreases stack size to see if it was in fact my loop crashing and its not. with the vanilla smeltItem method it crashed when trying to decrease the stack size. as for the setFull3d 'm honestly not sure why i put that in there lol is removed though its not needed. method with error causing line pointed out. private void infuseItem() { if (canInfuse()) { ItemStack itemstack = InfusionRecipes.getInfusionResults(slots[1].getItem(), slots[2].getItem()); if (slots[3] == null) { slots[3] = itemstack.copy(); } else if (slots[3].getItem() == itemstack.getItem()) { this.slots[3].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items } for (int i = 0; i < 2; i++) { if (slots[i].stackSize <= 0) { // < --------------------------------------------------------------------------------------------------- CRASH IS ON THIS LINE slots[i] = new ItemStack(slots[i].getItem()); } else { slots[i].stackSize--; } if (slots[i].stackSize <= 0) { slots[i] = null; } } } } Crash Report ---- Minecraft Crash Report ---- // Oops. Time: 2/5/15 2:18 PM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at AdvancedEnergy.tileentities.MetallicInfuserTE.infuseItem(MetallicInfuserTE.java:237) at AdvancedEnergy.tileentities.MetallicInfuserTE.updateEntity(MetallicInfuserTE.java:286) at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at AdvancedEnergy.tileentities.MetallicInfuserTE.infuseItem(MetallicInfuserTE.java:237) at AdvancedEnergy.tileentities.MetallicInfuserTE.updateEntity(MetallicInfuserTE.java:286) -- Block entity being ticked -- Details: Name: MetallicInfuserTE // AdvancedEnergy.tileentities.MetallicInfuserTE Block type: ID #167 (tile.null // AdvancedEnergy.machines.MetallicInfuser) Block data value: 5 / 0x5 / 0b0101 Block location: World: (229,69,262), Chunk: (at 5,4,6 in 14,16; contains blocks 224,0,256 to 239,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Actual block type: ID #167 (tile.null // AdvancedEnergy.machines.MetallicInfuser) Actual block data value: 5 / 0x5 / 0b0101 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) -- Affected level -- Details: Level name: Copy of New World All players: 1 total; [EntityPlayerMP['Player265'/209, l='Copy of New World', x=231.39, y=69.00, z=261.17]] Chunk stats: ServerChunkCache: 709 Drop: 0 Level seed: 2850766302080461089 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (224,64,248), Chunk: (at 0,4,8 in 14,15; contains blocks 224,0,240 to 239,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 746 game time, 746 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 17383 (now: false), thunder time: 81497 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_31, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 837371904 bytes (798 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available ae{1.0a} [Advanced Energy] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player265'/209, l='Copy of New World', x=231.39, y=69.00, z=261.17]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
  3. I'm getting a ticking block entity error from this method below I know this is where is coming from. Its coming from the for loop. Now I'm building a dual input machine and I'm not sure if I'm doing this correctly. I'm looping through the fuel, and 2 input slots. Now I also have 3 upgrade slots. should I be looping though and checking ALL slots and not just the fuel and 2 inputs? The loop is whats crashing out the game and I'm just not sure if I'm writing it correctly or I'm just not checking what i need too. I can supply the rest of the code if needed but everything worked perfectly until I wrote this method. private void infuseItem() { if (canInfuse()) { ItemStack itemstack = InfusionRecipes.getInfusionResults(slots[1].getItem(), slots[2].getItem()); if (slots[3] == null) { slots[3] = itemstack.copy(); } else if (slots[3].getItem() == itemstack.getItem()) { this.slots[3].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items } for (int i = 0; i < 2; i++) { if (slots[i].stackSize <= 0) { slots[i] = new ItemStack(slots[i].getItem().setFull3D()); } else { slots[i].stackSize--; } if (slots[i].stackSize <= 0) { slots[i] = null; } } } } any help would be appreciated.
  4. thank you deadrecon98 I COMPLETELY overlooked that and it fixed my issue. I went over the code, heck I don't know how many times and simply missed it. I tried creatTileEntity just to test it and that did not work just wanted to let you all know, at least not the with the way I have things configured. Thanks for all those who replied.
  5. I'm working on a new machine and when I go to create the createNewTileEntity() method its keeps giving me and error must override or implement a supertype method I've never had this happen with any other machine I've built in the past and I'm plugging along in the same order of writing as I do with every machine. I'll post my block class and my Tileentity class below. Now neither one of them are finished all the methods needed to get this Gui to work should be completed. I can post the gui, handler, and container classes if needed but this error has to do with calling the tile entity. and YES everything is registered. and help would be appreciated block class: import java.util.Random; import AdvancedEnergy.Main; import AdvancedEnergy.tileentities.MetallicInfuserTE; import AdvancedEnergy.tileentities.OreProTE; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class MetallicInfuser extends Block { private final Random ran = new Random(); private final boolean isActive; private static boolean keepInventory = false; @SideOnly(Side.CLIENT) private IIcon iconTop; @SideOnly(Side.CLIENT) private IIcon iconFront; public MetallicInfuser(boolean state) { super(Material.iron); this.isActive = state; } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register) { this.blockIcon = register.registerIcon("ae:infuser_side"); this.iconFront = register.registerIcon(this.isActive ? "ae:infuser_on" : "ae:infuser_off"); this.iconTop = register.registerIcon("ae:infuser_side"); } @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.placeBlock(world, x, y, z); } private void placeBlock(World world, int x, int y, int z) { if (!world.isRemote) { Block block1 = world.getBlock(x, y, z -1); Block block2 = world.getBlock(x, y, z +1); Block block3 = world.getBlock(x - 1, y, z); Block block4 = world.getBlock(x + 1, y, z); byte i = 3; if (block1.func_149730_j() && !block2.func_149730_j()) { i = 3; } if (block2.func_149730_j() && !block1.func_149730_j()) { i = 2; } if (block3.func_149730_j() && !block4.func_149730_j()) { i = 5; } if (block4.func_149730_j() && !block3.func_149730_j()) { i = 4; } world.setBlockMetadataWithNotify(x, y, z, i, 2); } } public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack itemstack) { int i = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if ( i == 0) { world.setBlockMetadataWithNotify(x, y, z, 2, 2); } if ( i == 1) { world.setBlockMetadataWithNotify(x, y, z, 5, 2); } if ( i == 2) { world.setBlockMetadataWithNotify(x, y, z, 3, 2); } if ( i == 3) { world.setBlockMetadataWithNotify(x, y, z, 4, 2); } if (itemstack.hasDisplayName()) { ((MetallicInfuserTE)world.getTileEntity(x, y, z)).setGuiDisplayName(itemstack.getDisplayName()); } } public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (!world.isRemote) { FMLNetworkHandler.openGui(player, Main.instance, Main.guiIDMetallicInfuser, world, x, y, z); } return true; } @Override public TileEntity createNewTileEntity(World world, int i) { // < --------- ERROR HAPPENS HERE return new MetallicInfuserTE(); } } this is the TileEntity class so far. All tha6ts needed should be completed import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import AdvancedEnergy.machines.OrePro; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class MetallicInfuserTE extends TileEntity implements ISidedInventory { private ItemStack slots[]; private int infuserPower; private int infuserCookTime; private String customName; public MetallicInfuserTE() { slots = new ItemStack[10]; } @Override public int getSizeInventory() { // TODO Auto-generated method stub return 0; } @Override public ItemStack getStackInSlot(int p_70301_1_) { // TODO Auto-generated method stub return null; } @Override public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { // TODO Auto-generated method stub return null; } @Override public ItemStack getStackInSlotOnClosing(int p_70304_1_) { // TODO Auto-generated method stub return null; } @Override public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) { // TODO Auto-generated method stub } public void setGuiDisplayName(String name) { customName = name; } @Override public String getInventoryName() { return hasCustomInventoryName() ? customName : "container.Metallic Infuser"; } @Override public boolean hasCustomInventoryName() { return customName != null && customName.length() > 0; } @Override public int getInventoryStackLimit() { return 64; } @Override public boolean isUseableByPlayer(EntityPlayer player) { if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this) { return false; } else { return player.getDistanceSq((double)xCoord + 0.5D, (double)yCoord + 0.5D, (double)zCoord + 0.5D) <= 64.0D; } } @Override public void openInventory() { // TODO Auto-generated method stub } @Override public void closeInventory() { // TODO Auto-generated method stub } @Override public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) { // TODO Auto-generated method stub return false; } @Override public int[] getAccessibleSlotsFromSide(int p_94128_1_) { // TODO Auto-generated method stub return null; } @Override public boolean canInsertItem(int p_102007_1_, ItemStack p_102007_2_, int p_102007_3_) { // TODO Auto-generated method stub return false; } @Override public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) { // TODO Auto-generated method stub return false; } } Hope someone can maybe see something I missed.
  6. I resolved the issue on my own. I was calling my inactive furnace in my main registry AND in the block class itself. removed the from the class and called it off the main registry and everything work perfect.
  7. Any ideas? Anyone...
  8. I don't get it I have the idle and active blocks registered and intialized.. any ideas as to what might be causing that? I can post all the class files for the furnace if that's what it takes public void preLoad(FMLPreInitializationEvent event) { // Register Items MagnesiumDust.loadItem(); MagnesiumIngot.loadItem(); // Register Blocks // machines magFurnaceIdle = new MagFurnace(false).setHardness(3.5F).setBlockName("MagFuranceIdle").setCreativeTab(MainRegistry.btpTab); magFurnaceActive = new MagFurnace(true).setHardness(3.5F).setLightLevel(0.875F).setBlockName("MagFurnaceActive"); // Register Armor // Register Tools // Register Weapons GameRegistry.registerBlock(magFurnaceIdle, "MagFurnaceIdle"); GameRegistry.registerBlock(magFurnaceActive, "MagFurnaceActive"); /* GameRegistry.registerWorldGenerator(new WorldGeneration(), 0); */ GameRegistry.registerFuelHandler(new FurnaceFuel()); }
  9. it crashed at System.out.println(MagFurnaceActive.magFurnaceActive.getTickRandomly()); full report: Time: 1/28/15 11:07 PM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at com.INTENSS.BTP.Blocks.MagFurnace.updateFurnaceState(MagFurnace.java:117) at com.INTENSS.BTP.TileEntities.MagFurnaceTE.updateEntity(MagFurnaceTE.java:243) at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.INTENSS.BTP.Blocks.MagFurnace.updateFurnaceState(MagFurnace.java:117) at com.INTENSS.BTP.TileEntities.MagFurnaceTE.updateEntity(MagFurnaceTE.java:243) -- Block entity being ticked -- Details: Name: MagFurnaceTE // com.INTENSS.BTP.TileEntities.MagFurnaceTE Block type: ID #165 (tile.MagFuranceIdle // com.INTENSS.BTP.Blocks.MagFurnace) Block data value: 2 / 0x2 / 0b0010 Block location: World: (-94,71,100), Chunk: (at 2,4,4 in -6,6; contains blocks -96,0,96 to -81,255,111), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Actual block type: ID #165 (tile.MagFuranceIdle // com.INTENSS.BTP.Blocks.MagFurnace) Actual block data value: 2 / 0x2 / 0b0010 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) -- Affected level -- Details: Level name: New World All players: 1 total; [EntityPlayerMP['Player109'/854, l='New World', x=-93.37, y=71.00, z=98.39]] Chunk stats: ServerChunkCache: 922 Drop: 0 Level seed: 802661551686316304 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (12,64,212), Chunk: (at 12,4,4 in 0,13; contains blocks 0,0,208 to 15,255,223), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 27433 game time, 12895 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 102794 (now: false), thunder time: 125213 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_31, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 831641168 bytes (793 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available btp{1.0a} [bring The Pain] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available->Available->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player109'/854, l='New World', x=-93.37, y=71.00, z=98.39]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [23:07:51] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-01-28_23.07.51-server.txt [23:07:51] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [23:07:51] [server thread/INFO]: Saving worlds [23:07:51] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [23:07:51] [server thread/INFO]: Saving chunks for level 'New World'/Nether [23:07:51] [server thread/INFO]: Saving chunks for level 'New World'/The End [23:07:52] [server thread/INFO] [FML]: Unloading dimension 0 [23:07:52] [server thread/INFO] [FML]: Unloading dimension -1 [23:07:52] [server thread/INFO] [FML]: Unloading dimension 1 [23:07:52] [server thread/INFO] [FML]: Applying holder lookups [23:07:52] [server thread/INFO] [FML]: Holder lookups applied [23:07:52] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [23:07:52] [Client thread/INFO] [FML]: Server terminated. 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
  10. yeah everything is initialized and registered
  11. Its is the second sipplet in my original post. That crash report is the most recent I since re-named it to updateFurnaceState. I'll post it again but it is in my original post. updateFurnaceState(): public static void updateFurnaceState(boolean state, World worldObj, int xCoord, int yCoord, int zCoord) { int l = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); TileEntity tileentity = worldObj.getTileEntity(xCoord, yCoord, zCoord); active = true; if (state) { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceActive.magFurnaceActive); // < --- LINE 116 } else { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceIdle.magFurnaceIdle); } active = false; worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, l, 2); if (tileentity != null) { tileentity.validate(); worldObj.setTileEntity(xCoord, yCoord, zCoord, tileentity); } } updateEntity(): public void updateEntity() { boolean flag = this.burnTime > 0; boolean flag1 = false; if (this.burnTime > 0) { --this.burnTime; } if (!this.worldObj.isRemote) { if (this.burnTime != 0 || this.furnaceItemStacks[1] != null && this.furnaceItemStacks[0] != null) { if (this.burnTime == 0 && this.canSmelt()) { this.currentItemBurnTime = this.burnTime = getItemBurnTime(this.furnaceItemStacks[1]); if (this.burnTime > 0) { 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 (this.isBurning() && this.canSmelt()) { ++this.cookTime; if (this.cookTime == 200) { this.cookTime = 0; this.smeltItem(); flag1 = true; } } else { this.cookTime = 0; } } // this statement is causing the issue if (flag != this.burnTime > 0) { flag1 = true; MagFurnace.updateFurnaceBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); // < -- LINE 243 } } if (flag1) { this.markDirty(); } }
  12. Complete crash report Time: 1/28/15 7:39 PM Description: Ticking block entity java.lang.NullPointerException: Ticking block entity at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653) at net.minecraft.world.World.setBlock(World.java:519) at net.minecraft.world.World.setBlock(World.java:681) at com.INTENSS.BTP.Blocks.MagFurnace.updateFurnaceState(MagFurnace.java:116) at com.INTENSS.BTP.TileEntities.MagFurnaceTE.updateEntity(MagFurnaceTE.java:243) at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:86) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:653) at net.minecraft.world.World.setBlock(World.java:519) at net.minecraft.world.World.setBlock(World.java:681) at com.INTENSS.BTP.Blocks.MagFurnace.updateFurnaceState(MagFurnace.java:116) at com.INTENSS.BTP.TileEntities.MagFurnaceTE.updateEntity(MagFurnaceTE.java:243) -- Block entity being ticked -- Details: Name: MagFurnaceTE // com.INTENSS.BTP.TileEntities.MagFurnaceTE Block type: ID #165 (tile.MagFuranceIdle // com.INTENSS.BTP.Blocks.MagFurnace) Block data value: 2 / 0x2 / 0b0010 Block location: World: (-89,71,96), Chunk: (at 7,4,0 in -6,6; contains blocks -96,0,96 to -81,255,111), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Actual block type: ID #165 (tile.MagFuranceIdle // com.INTENSS.BTP.Blocks.MagFurnace) Actual block data value: 2 / 0x2 / 0b0010 Stacktrace: at net.minecraft.world.World.updateEntities(World.java:2160) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:515) -- Affected level -- Details: Level name: New World All players: 1 total; [EntityPlayerMP['Player812'/135, l='New World', x=-89.12, y=71.00, z=93.31]] Chunk stats: ServerChunkCache: 731 Drop: 0 Level seed: 802661551686316304 Level generator: ID 00 - default, ver 1. Features enabled: true Level generator options: Level spawn location: World: (12,64,212), Chunk: (at 12,4,4 in 0,13; contains blocks 0,0,208 to 15,255,223), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 23182 game time, 8644 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 107045 (now: false), thunder time: 129464 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:703) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_31, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 533985640 bytes (509 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.85.1230} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.2.1230} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available btp{1.0a} [bring The Pain] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['Player812'/135, l='New World', x=-89.12, y=71.00, z=93.31]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [19:39:30] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-01-28_19.39.30-server.txt [19:39:30] [Client thread/INFO] [FML]: Waiting for the server to terminate/save. [19:39:30] [server thread/INFO]: Saving worlds [19:39:30] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [19:39:30] [server thread/INFO]: Saving chunks for level 'New World'/Nether [19:39:30] [server thread/INFO]: Saving chunks for level 'New World'/The End [19:39:30] [server thread/INFO] [FML]: Unloading dimension 0 [19:39:30] [server thread/INFO] [FML]: Unloading dimension -1 [19:39:30] [server thread/INFO] [FML]: Unloading dimension 1 [19:39:30] [server thread/INFO] [FML]: Applying holder lookups [19:39:30] [server thread/INFO] [FML]: Holder lookups applied [19:39:30] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded. [19:39:30] [Client thread/INFO] [FML]: Server terminated. 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
  13. Thanks for replying, I noted the lines in the code snipplets but that is kind of tough to see so here they are. updateEntity(): if (flag != this.burnTime > 0) { flag1 = true; MagFurnace.updateFurnaceBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); // report points to this line } updateFurnaceBlockState(): if (state) { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceActive.magFurnaceActive); // report points to this line } else { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceIdle.magFurnaceIdle); } Hope that helps I can provide whatever else that may be needed
  14. I had an issue with my furnace crashing the game when breaking the block while it was active or had been active. I fixed that issue however it seems another issue has come up with my updateEntity() method in my TileEntity class & in my updateFurnaceBlockState() method in my main block class. The crash report points out 2 lines of code 1 in each method, I'll post the full methods below and note the lines the report says is an issue. I didn't want to get on here and ask but I've been trying to figure this out since yesterday am starting to pull my hair out. updateEntity() method in my TileEntity class: public void updateEntity() { boolean flag = this.burnTime > 0; boolean flag1 = false; if (this.burnTime > 0) { --this.burnTime; } if (!this.worldObj.isRemote) { if (this.burnTime != 0 || this.furnaceItemStacks[1] != null && this.furnaceItemStacks[0] != null) { if (this.burnTime == 0 && this.canSmelt()) { this.currentItemBurnTime = this.burnTime = getItemBurnTime(this.furnaceItemStacks[1]); if (this.burnTime > 0) { 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 (this.isBurning() && this.canSmelt()) { ++this.cookTime; if (this.cookTime == 200) { this.cookTime = 0; this.smeltItem(); flag1 = true; } } else { this.cookTime = 0; } } // this statement is causing the issue if (flag != this.burnTime > 0) { flag1 = true; MagFurnace.updateFurnaceBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord); // report points to this line } } if (flag1) { this.markDirty(); } } updateFurnaceBlockState() method from my main block class: public static void updateFurnaceBlockState(boolean state, World worldObj, int xCoord, int yCoord, int zCoord) { int l = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); TileEntity tileentity = worldObj.getTileEntity(xCoord, yCoord, zCoord); active = true; if (state) { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceActive.magFurnaceActive); // report points to this line } else { worldObj.setBlock(xCoord, yCoord, zCoord, MagFurnaceIdle.magFurnaceIdle); } active = false; worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, l, 2); if (tileentity != null) { tileentity.validate(); worldObj.setTileEntity(xCoord, yCoord, zCoord, tileentity); } } any suggestions will be appreciated and I can supply any further information needed.
  15. you need to create the slot in your GUI.png then add another drawTexturedModalRect(params of the slot) and replace isBurning with your custom method example: isConsumingFuel(). you'll need to create new methods for your power consumption. example snipplet (this is not the full method, just what you need to modify): if (this.magFurnace.isBurning()) { int i = this.magFurnace.getBurnTimeRemainingScaled(13); this.drawTexturedModalRect(k + 104, l + 33 + 12 - i, 176, 0, 14, i + 1); i = this.magFurnace.getCookProgressScaled(14); this.drawTexturedModalRect(k + 67, l + 33 + 12 - i, 176, 14, 14, i + 1); }
×
×
  • Create New...

Important Information

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