Everything posted by Draco18s
-
[1.5.2]Configuration Files
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?
-
[Solved] Last Metadata Block Resorts to First
Metadata is a byte. Bytes are 4 bits. 4 bits gives 16 variations. You're going to need tile entities.
-
Drawing a new bar.
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).
-
Drawing a new bar.
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.
-
Infinite potion effect?
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.
-
How to create a breakable block only with one tool.
It's called an override function for a reason. The player is passed to that function when it gets called from vanilla code.
-
How to create a breakable block only with one tool.
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);
-
[Solved] help w missing texture problem?
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.
-
[Solved] help w missing texture problem?
Of the 14 times I've posted it, it's actually been what was needed twelve times. So no.
-
[Solved] help w missing texture problem?
For the 14th time:
-
Requesting Modder Support for TileEntities
Takes a large number of classes, plus packet handling, to pull off. I'm inching along slowly with my own GUI project.
-
How to check what dimension the player is in
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.
-
Requesting Modder Support for TileEntities
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.
-
integer gets set globaly instead of per player.
You should be saving that information to the player not to the block.
-
Requesting Modder Support for TileEntities
Look up the Techne modeler.
-
Negating fall damage
Or you could register on the LivingFallEvent....then you don't need to check the damage source.
-
Negating fall damage
Register an event hander to handle the LivingFallEvent. Not sure what you'd do after that, though.
-
Registering/Using ITickHandler
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.
-
Energy Framework
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).
-
How to check what dimension the player is in
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).
-
How to use NBT
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.
-
Block collision bounds are "static" (Java term)
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.
-
Block collision bounds are "static" (Java term)
Not sure then, because snow works
-
How to use NBT
I got a little lost with it, so I said "fuck it" and went back to getEntityData
-
How to use NBT
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
IPS spam blocked by CleanTalk.