Jump to content

MineMaarten

Members
  • Posts

    169
  • Joined

  • Last visited

Everything posted by MineMaarten

  1. I'm not really sure this has something to to with your saving problem, but 2240 ItemStacks??! private ItemStack[] inventoryitems = new ItemStack[2240]; Also I'm noticing that you're telling ISidedInventory that you're only holding 65 stacks? public int getSizeInventory() { return 65; } Apart from that I can't see anything strange...
  2. NBT methods are not properly set up for all the slots?
  3. Then I've confused some of you. Sorry for that! I must have done something wrong whilst testing.
  4. Isn't that the brand new ID used in entity attributes? And isn't that the same for every entity of the same type? But I haven't tested that myself either. Let's stick with datawatchers .
  5. Well you definately need the @ForgeSubscribe annotation. It's normal to surround the addSound() method with a try-catch statement. Do this and print in the catch part something like "Problem when trying to load TronCraft sounds".
  6. To add to that, I've previously tried to sync server- and client sided entities with packets, but I wasn't able to figure out how to add info in the packet that would identify for which entity the packet was for. There is a thing in entities called the EntityID, but these are different for the client and server (as far as I tested it). Sending the position of the entity with the packet is unreliable, as these are one of the variables that need to be synched, plus it could be very possible that there are two entities at the same position. After all this messing around I found out what datawatchers do .
  7. And this event also expects a boolean to return. When this is true it cancels every drop that normally would drop. If false, everything just drops as normal. So your final method looks like: @ForgeSubscribe public boolean onEntityDrop(LivingDropsEvent event) //EDIT: Not true. I was confused with the .setCanceled()
  8. Yup quite derpy mistakes. Syntax errors are btw by definition Java errors...
  9. Yup most of the times when tutorials become 'outdated' it's just because methods/fields get renamed. So like hydroflame said, take a look in the class the method/field is from when you get an error.
  10. I'm suspecting that you're placing the block only client side. Are you placing the block that's holding the TileEntity in a strange way?
  11. And then after these two lines a call to world.spawnEntityInWorld(frame);
  12. Don't make a new TileEntity! When the chest block is generated, this already has generated the TileEntity. You'll need to retrieve the TileEntity (with world.getBlockTileEntity()).
  13. And now is the challenge to figure out how to be able to place the blocks in any way you want, and without the need to rightclick the base multiblock block to form the multiblock . Good luck
  14. Correct me if I'm wrong, but I thought that implementing unnecessary TileEntities isn't good for the performance. //Edit: Sorry hydroflame, you already said that. Good to emphasize though
  15. Well, I don't think this will solve the nullpointer (could you post the stacktrace?), but here are two things that definately are needed: 1. In the GUI class where you send the packet, you're using "PacketDispatcher.sendPacketToAllPlayers()". However, this method is used to send data from the server to all the clients (players). You obviously need the opposite. Use "PacketDispatcher.sendPacketToServer()" instead. 2. Do you have your PacketHandler registered? Make sure you have the @NetworkMod annotation on top of your main mod class (under or above the @Mod annotation). This should work: @NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = {PacketBase.CHANNEL}, packetHandler = PacketHandler.class)
  16. The problem you have is that the NBTTagCompound you're trying to retrieve the info from is not the same that is used to write/read NBT. In fact, you shouldn't have a NBTTagCompound field in your TileEntity class at all. If you want to validate the id you're trying to save has been succesfully saved just print 'networkID', without the checking if the (empty) NBT tag has the info.
  17. Minalien has written one: http://minalien.com/tutorial-advancedmodelloader/.
×
×
  • Create New...

Important Information

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