Jump to content

hotrods20

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by hotrods20

  1. Alright, I updated OP with latest code. Sorry that I didn't do it earlier. I went to bed.
  2. I disabled the inventory and all of that and Minecraft worked just like it was supposed to. So, it is definitely my ender chest and the classes associated with it.
  3. So, that didn't help but I can see how it makes faster and more efficient code. The problem also appears that when I "Save and Quit" from a world, the error also appears. So, every time the game tries to write to NBT, it crashes because it just seems like it's in an infinite loop. It does the "NBTBase.writeNamedTag" and "NBTTagCompound.write" over and over again according to the error.
  4. Well, I mean in the sense of working with NBT or world generation. Less important things like adding items is different.
  5. Yeah, I use a new world every time I test. It just seems like it gets stuck in a loop of writing information and I have no idea where this could start. The errors don't give any information on it.
  6. That's the thing, I removed the nbt variable I created and changed it to use the variable provided by the method. My game still creates an infinite crash without reason.
  7. Alright, I changed to using the provided compound but the same error appears.
  8. Oh? I thought I changed that to: this.IMEC.saveInventoryToNBT(); Wouldn't that make it save the data via the InventoryMinerEC? I still get the crash when I change it. Would I have to change the saveInventoryToNBT() in InventoryMinerEC.java to send data to the PlayerMEC.java?
  9. I recently added code that was to add a new kind of ender chest but it causes my game to crash. Error Report: http://pastebin.com/NXqxm1Hb Code in question(This code is the only different code from normal): ObsidianTools.java BlockMinerEC.java TEMEC.java Only difference is that it references my chest instead of ender chest. MECHandler.java PlayerMEC.java InventoryMinerEC.java
  10. You solved it, thank you so much. It worked last time I did it the normal way. Thank you though.
  11. I see that and I'm trying to fix it. The problem doesn't make sense because it works just fine in my eclipse environment but not in the game.
  12. That's the mod I'm working on right now.
  13. http://pastebin.com/S3RNVunJ I've been updating my mod and adding to it but I keep getting a class not found error when I run it in the Minecraft client but not when I run it in the modding environment. Any ideas to why this may occur? Remember to structure files correctly.
  14. I've been having problems with this and could really help. My problem is setting a owner for a block and corresponding tile entity. I would assume this is done using NBT. How would I go about setting the owner for a single block/tile entity and having it be unique per block/entity? QE: Examples I've seen of objects with owners are cores from Thermal Expansion and personal safes from Industrial Craft. I have not see source code of either available.
  15. Extensive testing shows that the code does get called but the power never gets added even though power can be removed and without putting prop.addPower(int) in the if statement in the BlockPowerProducer lets power be generated. The question seems to be is why doesn't the power work when used in the if statement?
  16. It's not location specific. This isn't like BC or IC. Different power system. Decentralized. The "power" variable starts at 0 and changes based on structures that need power or produce power.
  17. So, when I'm trying to add "power" to the overall power, the code just skips the adding part and just does as it pleases. BlockPowerProducer public boolean onBlockActivated(World world, int par2, int par3, int par4, EntityPlayer player, int par6, float par7, float par8, float par9) { if(this.ownerNeedSet) { this.playerOwner = player.username; PlayerPower prop = PlayerPower.get(player); prop.addPower(power); this.ownerNeedSet = false; } if(player.username.equals(this.playerOwner)) if(!world.isRemote) { TileEntityPP pp = (TileEntityPP) world.getBlockTileEntity(par2, par3, par4); pp.outputPower(player, world); } player.addChatMessage("Owner is: " + this.playerOwner); return true; } The problem in here is that the owner is set but the "power" is never added. PlayerPower.class implements IExtendedEntityProperties public void addPower(long power) { this.currentPower = this.currentPower + power; }
  18. Alright, I did some additional testing and the mod still works when I use it in normal Minecraft. Thanks.
  19. So, I don't know if this is supposed to happen and the documentation didn't seem to mention this. Is this normal or am I doing something wrong? this.oSword = new ItemOSword(3500, obsidian).setCreativeTab(tabObsidianTools).setUnlocalizedName("oSword").setNoRepair().setTextureName("obsidiantools:oSword"); this.oAxe = new ItemOAxe(3501, obsidian).setCreativeTab(tabObsidianTools).setUnlocalizedName("oAxe").setNoRepair().setTextureName("obsidiantools:oAxe"); this.oHoe = new ItemOHoe(3502, obsidian).setCreativeTab(tabObsidianTools).setUnlocalizedName("oHoe").setNoRepair().setTextureName("obsidiantools:oHoe"); this.oPickaxe = new ItemOPickaxe(3503, obsidian).setCreativeTab(tabObsidianTools).setUnlocalizedName("oPickaxe").setNoRepair().setTextureName("obsidiantools:oPickaxe"); this.oSpade = new ItemOSpade(3504, obsidian).setCreativeTab(tabObsidianTools).setUnlocalizedName("oSpade").setNoRepair().setTextureName("obsidiantools:oSpade"); this.enderSword = new ItemEnderSword(3505, false).setCreativeTab(tabObsidianTools).setUnlocalizedName("enderSword").setNoRepair().setTextureName("obsidiantools:enderSword"); this.enderSwordSpecial = new ItemEnderSword(3506, true).setCreativeTab(tabObsidianTools).setUnlocalizedName("enderSword").setNoRepair().setTextureName("obsidiantools:enderSword");
  20. So... putting that in PreInit worked(confused). It is odd because with OTMain, my items are created as the mod is constructed and without any error.
  21. @Init public void load(FMLInitializationEvent evt) { GameRegistry.registerItem(joint, "joint", "PotMod"); LanguageRegistry.addName(joint, "Joint"); LanguageRegistry.instance().addStringLocalization("itemGroup.tabPotMod", "en_US", "Pot Mod"); } I do it the same exact way in ObsidianTools as I do it in PotMod. PM gets an error but OT doesn't. If I change the "PotMod" part of the registration code to "ObsidianTools", then it works just fine.
  22. This is for 1.5.2. Everything should work right in the init par the fact that all my other items in OT are working just fine in init but I will try Pre-Init. EDIT, Pre-Init doesn't work either. I know what it says the error is but my mod is fully created but won't seem to work.
  23. I did that at first and still got the errors.
  24. Okay, that helps me some. I guess I'll just go look around the code for a bit and see if I can find anything out. I have found something interesting, when I register my joint item under my other mods name: GameRegistry.registerItem(joint, "joint", "ObsidianTools"); I receive no errors. Now if I do: GameRegistry.registerItem(joint, "joint", "PotMod"); It craps out an error. Now I am full of WTF...
  25. Well, thank you for your help. Question though, is it possible because I have 2 mods coded in one Eclipse mod environment?
×
×
  • Create New...

Important Information

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