Everything posted by Draco18s
-
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
-
[1.5.2]Configuration Files
Less than 4096 actually. Powers of 2.
-
Registering/Using ITickHandler
He is updating, and when he updates I'll update my addon. There's no point in updating my addon before the base mod updates, it would be unusable.
-
How to use NBT
Next question: Where is the nbtcompound tag coming from? If you're instanciating it yourself, it's not going to save.
-
[Unsolved] Setting bounding boxes for block and handheld icon [1.5.2]
Think of a vanilla block that's larger than one block, peek at its class code.
-
How to use NBT
Are you ever calling nbt.setString(...)?
IPS spam blocked by CleanTalk.