Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. I know what the problem is. WhiteBlockID = config.getItem(config.CATEGORY_BLOCK, "snow_block", 702).getInt(); This is one of the lines causing the issue. This item is a BLOCK item, what kind of ID are you requesting from config?
  2. Metadata is a byte. Bytes are 4 bits. 4 bits gives 16 variations. You're going to need tile entities.
  3. You certainly can! I just don't have an example of it, because it requires a newer Forge than I can work with. (Specifically because my mod is a plugin to another mod which doesn't work past 664).
  4. Having recently done this... *Digs out code* I actually added in an additional HP bar to act as "overflow healing" from a particular source (potions don't touch it, at least not without base class edits) Here's the main bulk of what you need: 1) A ITickHandler 2) PacketHandler 3) EventHandler 4) Registering it all And the result: I overlayed mine on top of the exp bar because: a) I didn't want it above the armor bar b) Covering a portion of the exp bar was not critical (there are still a few pixels visible for that section). The only problem is that it renders on top of the chat. :\ Also, it goes away if another gui screen (chest, inventory, etc.) is open, but that's not a big deal.
  5. It might be because the duration is stored as an integer, and 27:20ish is right around the signed integer max value (32767). A negative duration is likely interpreted as being infinite.
  6. It's called an override function for a reason. The player is passed to that function when it gets called from vanilla code.
  7. From Block.java /** * Determines if the player can harvest this block, obtaining it's drops when the block is destroyed. * * @param player The player damaging the block, may be null * @param meta The block's current metadata * @return True to spawn the drops */ public boolean canHarvestBlock(EntityPlayer player, int meta) { return ForgeHooks.canHarvestBlock(this, player, meta); } From the wiki MinecraftForge.setBlockHarvestLevel(myFirstBlock, "pickaxe", 2);
  8. Running in Eclipse works just fine for me. I had to do zero setup work. And I did read your post, I got to this part: [My textures are at] forge\mcp\eclipse\Minecraft\bin\mods\Generic\textures\blocks\genericdirt.png At which point I knew that you hadn't actually followed my directions.
  9. Of the 14 times I've posted it, it's actually been what was needed twelve times. So no.
  10. For the 14th time:
  11. Takes a large number of classes, plus packet handling, to pull off. I'm inching along slowly with my own GUI project.
  12. Apparently I'm not allowed to reply to posts any more. The forum whines that I either submitted another post too recently or already submitted that post. The hell I did. entityPlayer.dimension All entities have a reference to the dimension that they're in. No need for listeners or accessing the world object. Apparently I gave up without actually trying that.
  13. Use techne to export to Java, which will give you a rendering class (I haven't imported any yet myself, but it looks to be everything you'd need to create a custom renderer). As for GUIs, those are immensely complicated (though you don't need a TE to make them). Can't help you with the BuildCraft API.
  14. You should be saving that information to the player not to the block.
  15. Look up the Techne modeler.
  16. Or you could register on the LivingFallEvent....then you don't need to check the damage source.
  17. Register an event hander to handle the LivingFallEvent. Not sure what you'd do after that, though.
  18. The parent mod needs to have an API. Very few do, but Mystcraft does (though it's not public; I was messing around doing neat stuff before I was given the API, and a lot of what I've done I've passed back to Mystcraft as starting points for things XCompWiz was going to implement eventually anyway). You might be able to get away with decompiling the original and tying into its classes, then distributing your mod without those classes, but using the required-after dependency. I haven't tried. It'd be messy though and subject to easy breaking if the parent mod changes its structure, etc.
  19. If you do end up going with A* you might want to use Jump Point Search. It'll prune illogical nodes from the search tree due to the fact that there are only so many tiles/blocks that it makes sense to search next based on the fact that the current tile is the shortest distance (that is, in order for the current tile to be part of the path, certain neighbors CANNOT be part of the path, because there's a faster way to get there).
  20. Yup, I use this a lot actually. Namely for packet sending (as I haven't figured out how to convert an EntityPlayer into a Player for use with sendPacketToPlayer, so I use sendPacketToNearby).
  21. I got a little lost with it, so I said "fuck it" and went back to getEntityData Thanks to diesieben07 I now get how to use it SO if you need help with it I can help Not my primary focus right now, but thanks.
  22. I would not be surprised if it also suffered from the bug I am experiencing, but think snow's rarity and the fact it is simply walked on leads to it not being noticed. I was actually using it just fine yesterday. Open creative mode, give yourself snow, right click on the ground to place an 8th. Right click on the snow to add additional 8ths.
  23. Not sure then, because snow works
  24. I got a little lost with it, so I said "fuck it" and went back to getEntityData
  25. Basically you have to let it get passed from a vanilla class, or get it from an existing entity (server side only). Or you can use IExtendedProperties (basically getting data from an existing entity, but more complicated and not depreciated) or extend WordSaveData
×
×
  • Create New...

Important Information

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