Lunakki
Members-
Posts
25 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Lunakki's Achievements
Tree Puncher (2/8)
2
Reputation
-
Getting panes to show up differently in inventory depending on metadata
Lunakki replied to Lunakki's topic in Modder Support
What I resorted to was having people overwrite the BlockPane class file with my own version when installing my mod. This is obviously not an ideal solution, especially if you are distributing it to a lot of people. Fortunately my users are limited to my real life friends, so I can install it for them if they run into issues. There is an alternate method using access transformers, but I could never get it to work. Here is the tutorial I was working off of: http://www.minecraftforge.net/wiki/Using_Access_Transformers I also tried using Reflection but was unable to get that to work as well. Here's a tutorial I tried for that (looks outdated now): http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced/ Here's a general Java Reflection tutorial: http://docs.oracle.com/javase/tutorial/reflect/ I imagine it's probably unnecessary in the current version since there are now colored panes in vanilla, but I haven't had the time to look into it myself yet. Let me know what you find out. -
Hi hydroflame, I was having the same problem as Channel_3, but setting up my files as you suggested fixed it. The only thing is I had to change the folder name and reference to lowercase. (And create all of the folders, of course.) Thanks!
-
Really? That would be weird. I guess I could try that and see if it works. Is there some way to test that in Eclipse, or do you just add the mod and try it? I don't think it would compile.
-
I didn't see that tutorial yet; I was looking at the one on the wiki. That's really helpful. Hmm.. it doesn't even mention making a mod container class for the access transformers. It only talks about it in a different section about making the mod show up in the mod list. Maybe that means I don't need to do it after all. I'll have to read that over some more and play with it. Thanks!
-
I went through the tutorial on using access transformers, but I'm still unsure on some things. Basically I want to make the field inGround in EntityArrow protected instead of private, so that subclasses can access it. The config file and all that makes enough sense, but what about the mod container? Do I need to move everything in my mod class (that sets the modID, declares all the new items, etc.) to that class? If so, where exactly do I put my code currently in postInit? The tutorial says to use @subscribe in place of @Postinit, and says to "make sure you use the right event", but what is the right event? Do I even have to move anything? The class(es) that need access to inGround aren't explicitly a member of any particular mod, but I don't know what the purpose of the mod container class is. Is there some documentation somewhere that explains all that? Thanks in advance for any help.
-
How To Patch A Mod To Work With A Dif Mod?!?! [HELP]
Lunakki replied to snipermine's topic in Modder Support
If you know the block/item IDs, then you should be able to use that to create ItemStacks of those items and then register recipes like you normally would. You would have to do it in postInit to make sure the other mods have loaded already though, I think. I haven't actually done anything like that, so I may be totally wrong, but that's what I would try to start with. It seems like it ought to work. -
Bow animations? [Solved & Explained by me][page 2]
Lunakki replied to xXRoboJackXx's topic in Modder Support
RoboJack, thanks for posting your solution once you figured it out. I've been struggling with the same thing, and that was really helpful. Why did you pick the numbers 13 and 18 for the times? Is that the same timing for regular bows or your own timing? -
Missing Method - public Icon getBlockTextureFromSideAndMetadata()
Lunakki replied to rob_bb's topic in Modder Support
I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not. -
Missing Method - public Icon getBlockTextureFromSideAndMetadata()
Lunakki replied to rob_bb's topic in Modder Support
I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not. -
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
Lunakki replied to FloatingGrapefruit's topic in Modder Support
I'm pretty sure that's exactly what I tried in my code that didn't work... Your code has this: GameRegistry.addRecipe(new ItemStack(baconiteChestplate, 1), new Object[] { "T T", "TTT", "TTT", 'T', baconiteIngot }); Which is not exactly the same. Try getting ride of the new Object[] {} part and see if it works then. I also don't see the baconiteIngot registered anywhere, so that might also be part of the issue. You should use GameRegistry.registerItem to register all of your items, just like you use GameRegistry.registerBlock to register your blocks. -
[SOLVED]Armor, Dye, and Tools Crafting Recipes?
Lunakki replied to FloatingGrapefruit's topic in Modder Support
I'm pretty sure that's exactly what I tried in my code that didn't work... Your code has this: GameRegistry.addRecipe(new ItemStack(baconiteChestplate, 1), new Object[] { "T T", "TTT", "TTT", 'T', baconiteIngot }); Which is not exactly the same. Try getting ride of the new Object[] {} part and see if it works then. I also don't see the baconiteIngot registered anywhere, so that might also be part of the issue. You should use GameRegistry.registerItem to register all of your items, just like you use GameRegistry.registerBlock to register your blocks. -
Missing Method - public Icon getBlockTextureFromSideAndMetadata()
Lunakki replied to rob_bb's topic in Modder Support
It's probably because it's not: public Icon getBlockTextureFromSideAndMetadata() It's: public Icon getBlockTextureFromSideAndMetadata(int side, int metadata). If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there. -
Missing Method - public Icon getBlockTextureFromSideAndMetadata()
Lunakki replied to rob_bb's topic in Modder Support
It's probably because it's not: public Icon getBlockTextureFromSideAndMetadata() It's: public Icon getBlockTextureFromSideAndMetadata(int side, int metadata). If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there. -
How to add global command that all players can use?
Lunakki replied to Raekye's topic in Modder Support
I wish I always found the answer to things after I posted a question. I'm jealous. -
Getting panes to show up differently in inventory depending on metadata
Lunakki replied to Lunakki's topic in Modder Support
tl;dr: I need to override a function in GlassPane that is declared public final. Removing the final label in GlassPane.java lets my game run exactly as I want it to. Is there some way to do this that won't interfere with other mods that may want to edit the same class? Long version which may give you an idea of a solution that I haven't thought of: I changed my panes to all be individual items so that they did not have to use metadata. To do this, I had to make a new class that extended Block instead of BlockPane. This is because I need them to connect to each other, and the canThisPaneConnectToThisBlockID cannot be overridden because it's final in BlockPane (why???) and it checks for opaque blocks and certain block IDs (including its own) to see if it can connect. Since my panes no longer all have the same blockID, they no longer connect with that method. It all looked good until I tried to place the block. Then I got this error: Unexpected error java.lang.ClassCastException: krv.minecraft.moreblocks.BlockThinTintedGlass cannot be cast to net.minecraft.block.BlockPane So now it can render the inventory icon correctly, but not the actual block. After looking at the rendering code, sure enough it requires a BlockPane to render as a pane, which my block obviously isn't. This would be easy to fix if I could just override that one function in BlockPane, because then I could just extend that class and it would all work. This is the function I need to override: public final boolean canThisPaneConnectToThisBlockID(int par1) { return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Block.glass.blockID; } I want it to be this in my class: public boolean canThisPaneConnectToThisBlockID(int id) { for (int i = 0; i < 16; i++) { if (id == MoreBlocks.thinTintedGlass[i].blockID) return true; } return Block.opaqueCubeLookup[id] || id == Block.glass.blockID || id == MoreBlocks.tintedGlass.blockID; } What are my options here without actually editing any of the core files? Do I have any?