Jump to content

sequituri

Forge Modder
  • Posts

    669
  • Joined

  • Last visited

Everything posted by sequituri

  1. The method is getBlock(x, y, z) and the null check is useless. Blocks.air is returned in any case other than a regular block.
  2. Study net.minecraft.potion.Potion.class - and understand.
  3. Any object that implements IExtendedEntityProperties should exist on client and server both, and the methods (unless that effect the client only) should be executed on both sides. This is normally true, unless the calls to change its values originates from client-only code. So, if you want to change it from clientside-only code, schedule a server update with your own packet handler and pass in any changed data keys and values. You have to handle the update in your own handler. Check this tutorial http://www.minecraftforum.net/topic/1952901-172164-eventhandler-and-iextendedentityproperties/
  4. {ECLIPSE_BASE}/src/main/resources/assets/oddblocks/textures/items/123.png
  5. As long as each method in the chain ends with "return this", you should be able to chain as you were told. The constructor does that automatically, so does setUnlocalizedName and a couple others.
  6. Your code assumes that your statically initialized final references will be set after the Blocks class static final initializers have been set. There is no way to guarantee this is true. So, you'd best not use them that way. In the proper event handler, grab the values you need and assign them That way, you will know they already have their proper values from the registry.
  7. The proper way to do what you seem to want (see ItemDye class) is to assign subtypes via Item#hasSubtypes and getIconFromDamage() as well as getSubItems(). The itemStack contains the damage value from which the subItem is determined, not some added field that has no meaning to minecraft.
  8. Just so you understand the bug you are creating... the Item class creates any number of items (all completely different even if given the same name) and each Item (instancde) created is only a prototype of all such items. Therefore, any fields created in the Item class are shared with every item in the game. That includes yours and every other player who has on in their inventory. So, if you create an ItemX (and assign any 'metadata' to that object) then every itemX in the game will have the same metadata. In other words, every player and every ItemX-based item anywhere in the world will be changed when you change yours. Even the ones in players inventories and chests. I don't think that is what you want.
  9. This problem would not happen if people used the standards already in place. Your mod, as the above poster noted, is just another of the standards people will not use. Thus, the problem is exacerbated, rather than solved by your idea.
  10. Sorry, pregenereating a world is going to take a looooonnnngggg time no matter what mod you make or try. That is the reason chunks are generated as needed by Minecraft.
  11. Best to talk to the technic team about your error.
  12. Start bisecting the issue by taking out 1/2 your mods and trying the game... then take out or add back half of those and try again... then do the same until you find which mod causes the crash.
  13. You have an error in the mmmpowersuits mod. Check with the author.
  14. Or the windows permissions on your home directory have some serious problems or tampering.
  15. All rendering registry stuff goes in the ClientProxy class - not your main class.
  16. Items do not have metadata - the getMetadata(int param) is passed the ItemStacks.itemDamage value and the method converts it to the "metadata" desired. So, this call is not for actual metadata, it is to filter out the useless part of the ItemStack's damage value. Normally useful more for ItemBlocks.
  17. Event handlers must be registered on the proper BUS... there are at least 3 to choose from, so care must be taken to check.
  18. Indeed, as I've tried to get across many times: if you think you are overriding a method - you NEED to put an @override annotation for sanity's sake.
  19. Not advised: Just add instance fields to your entity for each property and maybe getter/setter methods to read and change them. Advised: Use Entity#getExtendedProperties(String propname) to read them... Entity#registerExtendedEntityProperties(String propname, IExtendedEntityProperties object) to set them up.
  20. The proper notation is: @SubscribeEvent(priority=EventPriority.NORMAL|HIGHEST|HIGH|LOW|LOWEST, receiveCanceled=false|true)
  21. OddBlocks <-- not lowercase!!!
  22. What you say is another of the many unfortunate name snafus in the codebase. It is likely to stay that way, so get used to it.
  23. What you are asking makes no sense. You can make as many blocks or items from a class as you want. As long as they each get registered with separate names... and should probably have unique textures as well.
  24. Dispensers and arrows work much like you describe. Try looking at the dispenser ode as well...
  25. "Best" with weapons is a very subjective assessment. Most damage? (against what? Arthropods?) Most enchantable? Most durable? Most undamaged? Yeah, so... you have to decide on a guideline that makes sense. And, what about mod swords from other mods? Some of those are uber!
×
×
  • Create New...

Important Information

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