-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
Fixed that for you. Madao, why are you using ModLoader.addName instead of LanguageRegistry.addName? ModLoader.addRecipe instead of GameRegistry.addShapedRecipe ?
-
Custom Mob attacks other Custom Mob [Solved]
Draco18s replied to SilasOtoko's topic in Modder Support
~CODE~ -
Ok, basic question: Why?
-
Learn Java
-
Fixed. It's not about the classes Minecraft has, you just need to learn more about classes in general.
-
lower-case all of your file references. Minecraft performs a toLowerCase on the string you provide it, but does not attempt to toLowerCase the file and directory names.
-
Using coloured Icon overlays like vanilla spawn eggs
Draco18s replied to SamTebbs33's topic in Modder Support
Specifically, you need multiple render passes. 1) requiresMultipleRenderPasses() needs to return true 2) getIcon(ItemStack stack, int pass) needs to return two different icons based on the pass (the integers are 0 for the first pass and 1 for the second pass) 3) getColorFromItemStack(ItemStack par1ItemStack, int pass) needs to return two different values (hex representation*) for each pass. Take a look at this item class of mine. *You can either return a number like 0xff0000 or you can return the decimal equivalent, 16711680. -
"Primed" TNT isn't a block, it's an entity. Specifically EntityTNTPrimed (IIRC). In your block's onPlaced (or onAddedToWorld--both are called when the player places it, the former is not if the block is created via some other means) method, make it replace itself with air and spawn a new EnityTNTPrimed. Also, take a look at the TNT block, see what it does when it gets set off, the code you need is there, just inside a different method.
-
The entity ID never changes. The only time the client will have a different entity ID for an entity is when it is just created.
-
The IDs are different...until the client receives an entity update packet. Then they're the same.
-
I would also like to know. I ended up using the potion effect, but if I could get the same effect without, that would be awesome.
-
Custom BlockContainer - I know I've done something stupid
Draco18s replied to meganmorgangames's topic in Modder Support
Where is the null pointer exception? This is key to solving the problem. -
Your 7th argument is "test" 1 - 1st 1 - 2nd 1 - 3rd 5 - 4th 5 - 5th 5 - 6th test - 7th 1 - 8th false - 9th 0 - 10th if(!isNumeric(arguments[7])){ should be if(!isNumeric(arguments[8])){
-
You're probably going to have to use Reflections and modify the Block class at runtime. Not a guarantee that it'll work though, as mod blocks might not call super.onBlockPlaced(...) when they override it.
-
1.6.4 crash Exception in server tick loop
Draco18s replied to ranson42's topic in Support & Bug Reports
This is the wrong place to be asking for help. This is a forum for people who MAKE mods. My guess is that one of your mods isn't the right version. I'd suggest double-checking the Forge version you have installed with the version ChickenBones recommends. -
You don't need the player or the player's inventory. The item they're using is already being passed to the function. (And adding another parameter is not Magic, it won't make that reference suddenly show up)
-
Dude: parsedFile.length != parsedFile[0].length
-
A...boolean... True if the block is allowed to be destroyed, false otherwise. If you don't know what you want it to do, specifically, you can always run your code and then do return super.onBlockDestroyed(...)
-
...put it in that function?
-
So...what about it? What is insufficient?
-
You mean public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int blockID, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase){}
-
Funny, I didn't think of that. Oh wait, I did. They're always 0.
-
Way too complex.
-
How to load different textures for one item / block?
Draco18s replied to SackCastellon's topic in Modder Support
See my code here: https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java While I'm using dozens of textures and figuring out which one to draw based on NBT data, the relevant info is there.