Jump to content

larsgerrits

Members
  • Posts

    3462
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by larsgerrits

  1. I think your problem is with the MAX value. You either need to save it using NBT, or don't initialize it in the constructor but directly when the field is made.
  2. That's because you never write to NBT and read from NBT. So override the methods public void writeToNBT(NBTTagCompound); and public void readFromNBT(NBTTagCompound); . In those method you want to write and read your values from the NBTTagCompound passed in. Be sure to call the super methods!
  3. That needs to go in the main class (i think the init method, not sure)
  4. EntityRegistry#addSpawn();
  5. You can get a IModelCustom (or something like that) using AdvancedModelLoader.loadModel(ResourceLocation), on which you can call the renderAll method, which renders the model for you. You need to do all of that in a class that implements IItemRenderer.
  6. http://www.minecraftforge.net/forum/index.php/topic,22405.0.html
  7. You can use World#getEntitiesWithinAABB(ENTITY_CLASS,BOUNDING_BOX). You can replace the ENTITY_CLASS with EntityPlayer.class for a player. For the BOUNDING_BOX, you can use TileEntity#getRenderBoundingBox().expand(RADIUS,RADIUS,RADIUS).
  8. You can use the GuiOpenEvent, in which you get a GuiScreen object. You can use that object to check if it's a instance of the vanilla menu (GuiMultiplayer in your case) and then set the GuiScreen object to your new class extending the vanilla menu, so it still looks like the main menu instead of remaking all of it.
  9. LivingSpawnEvent
  10. I would probably look in the end portal block, and trace it back to where it actually teleports you.
  11. So inefficient. You can 1) store the List<ItemStack> in the method. That way you don't need those repetetive calls to block.getDrops(*), and 2) you can iterate over a list way easier. You don't even need the if (1 == size) statement.
  12. You can't open up the gui for the workbench that way. In the container class there's a method called canInteractWith that check's if there's a workbench at the location, which you managed to do with a dirty hack, and if the distance between the workbench and the player is less then 4 blocks away, which it isn't in your case, so it returns false so you can't interact with it. A workaround is making your own gui and container extending the vanilla classes, and modify them a bit to your likings, and open that one, istead of the vanilla one.
  13. Can you post a screenshot if the switch statement with the error?
  14. I looked at the EnderIO github and in the en_US.lang file, instead of the reguler tile.*.name, they have enderio.*.name. That's the reason it doesn't work. Try using the block.getLocalizedName method.
  15. campFire.png != FirePitTexture.png
  16. Show how you're using it. Preferably the whole method you use that class in.
  17. You can override the mouseClickMove method, and in that method you can iterate over all the object on your screen, and if the mouse is over a object, update those x and y values to move them.
  18. You can use StatCollector.translateToLocal() to localized the name.
  19. About the onEntityCollidedWithBlock ith block method: yes, the round-of values are thesame coords, but the posX,posY and posZ are doubles so they can be like 6.333, which means it's about a third on that coordinate, so you can be a bit more specific, In this case it might not be useful, but it could be for others.
  20. You are using the GameRegistry.registerBlock with a null object. That's not a forge bug.
  21. They use a custom renderer for the block rendering.
  22. There's no max, just set it at the width of the gui.
  23. You have the set the ySize correctly.
×
×
  • Create New...

Important Information

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