Jump to content

Eternaldoom

Forge Modder
  • Posts

    592
  • Joined

  • Last visited

Everything posted by Eternaldoom

  1. You have to save the value to NBT in the writeToNBT method and read it when opening the world in the readFromNBT method.
  2. Use @Override to check if you are actually overriding a method. You have to use that method's parameters. Look at the onEntityCollidedWithBlock method in Block or BlockCactus.
  3. You could use IExtendedEntityProperties to add a boolean to the player's NBT (defaulting to false). When the player logs in, if the boolean is false for that player, open the GUI and set it to true.
  4. What stack? Are you trying to decrease the durability of a held item? If so, you can get the stack from player.inventory
  5. Have a look here on how to make a worldgen class. Look where I use WorldGenWaterPlants, it's very similar to WorldGenFlowers.
  6. Blocks don't exist in inventories, they exist as ItemBlocks, a subclass of Item. Get an ItemBlock for the Block with Item.getItemFromBlock(block).
  7. Get the blocks metadata (or whatever data from the fluid), and adjust the players motion depending on that.
  8. Have you ever made an IWorldGenerator for ores? It's the same thing, but use WorldGenFlowers instead of WorldGenMineable.
  9. You're right, thanks. I'm probably going to switch over to GameRegistry.addSubstitutionAlias. It'll be more seamless anyway.
  10. You mean the block won't drop the item when broken? Post where you register the item. And why does your code look so... obfuscated?
  11. Also, for the event, the annotation should be @SubscribeEvent, not @EventHandler.
  12. Use a PlayerTickEvent and check with !event.player.inventory.hasItem()
  13. I dont have access to the src at the minute, but i think what you do is check for some pattern of blocks that would only exist in a temple and set the blocks relative to that.
  14. No its not. All you did was define a variable.
  15. What I do for this in my mod is to use a PlayerTickEvent to replace the items if they are in the player's inventory.
  16. in your preinit method
  17. Yeah, the register() method in WorldGenRuby that you are calling is empty. How is it supposed to do anything if you arent telling it to? Use this to register the WorldGenerator: GameRegistry.registerWorldGenerator(new WorldGenRuby(), 1);
  18. No, that's the Worldgen code. Post your main class. If you don't get it, follow a basic Java tutorial. You have to register your world generator.
  19. There's a message from cpw at the top saying its no good and can cause memory leaks. You don't need to write a new system, FML already has one. Diesieben's tutorial is on how to use it.
  20. Thanks! You can play it now, just get FML here.
  21. Methods don't get magically called.
  22. Some kind of worldgen event; just replace chests with trapped chests. Im not sure what event though since i've never used worldgen events.
  23. Post your code. Where do you register the item?
×
×
  • Create New...

Important Information

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