-
Posts
1689 -
Joined
-
Last visited
-
Days Won
1
Everything posted by SanAndreaP
-
It means you're passing a TileEntity to a function that is expecting a GuiScreen. not a TileEntity, but a container.
-
How can i make a metadata ore drop a specific item instead of itsself
SanAndreaP replied to Dus998's topic in Modder Support
Yes, there's also that. BlockCrops uses that method IIRC. But just for dropping an item with metadata, the previous methods should be enough. Also if you want to drop multiple items of the same type (which isn't meta-sensitive, though) there's the quantityDropped method. -
the second parameter is the GuiID, which you can use in your GuiHandler to specify which GUI / Container will open.
-
How can i make a metadata ore drop a specific item instead of itsself
SanAndreaP replied to Dus998's topic in Modder Support
I think he means how does he specify which of the subblocks drops what item. I think that because I want to know this too... It'd certainly save on ID's! If you wanna specify which metadata should be dropped, use the damageDropped method. Lets say for example, I wanted to make a custom wool set that dropped a custom dye. The wools are all subblocks (500:1, 500:2 etc) How would I specify that MyWoolRed drops red dye, whilst MyWoolBlue drops blue dye? (I assume this is what the OP meant. He's not replied since the post so just guessing; but it's something I want to know ) Then use both methods, idDropped and damageDropped. Easy as that. -
How can i make a metadata ore drop a specific item instead of itsself
SanAndreaP replied to Dus998's topic in Modder Support
I think he means how does he specify which of the subblocks drops what item. I think that because I want to know this too... It'd certainly save on ID's! If you wanna specify which metadata should be dropped, use the damageDropped method. -
player.openGui(Remula.remulaGuiHandler, 0, world, x, y, z); The first parameter is wrong. It must be your Mod's instance (the @Instance field inside your main mod class) https://github.com/SanAndreasP/TurretModv3/blob/master/sanandreasp/mods/TurretMod3/block/BlockLaptop.java#L104
-
What line of code do you use to open your GUI?
-
You don't need either findGlobalUniqueEntityId nor registerGlobalEntityID. registerModEntity is enough to get it work.
-
You heard of the 'instanceof' keyword?
-
You see the 2 string parameters. The first one is the name given by MCP, so you can test it. The second one is the SRG name of that field. It's like an index given by MCP before the real naming occurs. (path of deobfuscation goes like >> Notch (obfuscated) names -> SRG (index) names -> deobfuscated (community-driven) names << The Notch names and the deobf-names are changing through MC updates, where SRG names are unlikely to change (except the fields / methods have changed or been removed or something like that). Forge comes with "runtime-deobfuscation", meaning it converts the Notch names to SRG names and thus mods don't need to update unless a part in MC changed which the mod uses. To get those SRG names, open the '/forge/mcp/conf/fields.csv' and look up the name. The SRG name is the very first (starts with 'field_'). For methods it's in the 'method.csv' in the same directory.
-
I tried to do the same thing with my turrets. Works quite well, except of the entities move faster than usual when targeted, so you have to ajust the speed (so do I ). Everytime the projectile hits a target, the target will 'target' the shooting entity (the turret). Have some code: https://github.com/SanAndreasP/TurretModv3/blob/master/sanandreasp/mods/TurretMod3/entity/projectile/TurretProjectile.java#L381
-
b doesn't work since Forge makes an instance of the Event class everytime the event is fired. An unregistered subclass would crash / simply not work if you try to register it and 1) don't put it into the net.minecraftforge(.client).event package 2) don't fire it manually with an instance of your subclass
-
[Solved] Entity is invisible (Render doen't work)
SanAndreaP replied to MaSch212's topic in Modder Support
Yes at first I put this into the Main class and then I saw a tutorial. They said that I have to put it into the ClientProxy. I didn't understand this But this doesn't solve my problem Can you post your render class? -
Sorry for all these threads :( Another help is needed
SanAndreaP replied to AssassinHero's topic in Modder Support
-
[Solved] Entity is invisible (Render doen't work)
SanAndreaP replied to MaSch212's topic in Modder Support
Why do you register your entity client-side only? It needs to be registered for the server as well! Shove it out of your prxy directly in your main mod class. -
Go to the RivalRebels mod thread and post it there. Also wrong subforum.
-
Sorry for all these threads :( Another help is needed
SanAndreaP replied to AssassinHero's topic in Modder Support
I see that you don't register your model to your entity: [*]your common proxy should have the same registerRenderInformation as the Client Proxy, just with an empty method body [*]you must call your registerRenderInformation in your @Init method through your proxy field -
Sorry for all these threads :( Another help is needed
SanAndreaP replied to AssassinHero's topic in Modder Support
Pretty sure not. None of it refers to your code and I think I get that error to. That error is deep in the texture stitching code that turns all of our block and item PNGs into a single spritesheet (which doesn't effect mob textures, nor any texture directly referenced like you're doing). I really don't see the issue with the code or anything That error is just because you don't have the latest LWJGL, you don't need to worry about that. Can I see your proxy classes and your main mod class? -
Sorry for all these threads :( Another help is needed
SanAndreaP replied to AssassinHero's topic in Modder Support
I have created the model in Techne at 64x32 and did you actually export the model from techne into a java file, fix the errors, made an animation for this and register your Model class with the RenderingRegistry? -
public static void load(Configuration config) { config = configuration; Probably because you have a parameter which is named the same as a variable and trying to set it with a non-existant variable.
-
So I learned how to use ASM and everything works as expected like adding code lines or even methods. But if I try to modify a method in the RenderBiped class, I get a crash: I noticed if I edit something in the MethodNode's instructions list it does this. Here's the code I use: https://gist.github.com/SanAndreasP/c350016ddaea4d9ff7ae And yes, I know that those method names aren't named like this anymore after reobf, it's just for testing purposes.
-
[Part-solved] Container Tile Entity doesn't like me...
SanAndreaP replied to Flenix's topic in Modder Support
You need to register your TileEntity with the GameRegistry. -
Minecraft crashes when custom mobs are called
SanAndreaP replied to frankstar10's topic in Modder Support
You use this: "EmeraldsPlus" in your registerModEntity calls. This parameter is not supposed to be a string, but the instance variable from your main mod. (EmeraldsPlusCore.instance) -
Forge makes my Minecraft unplayable
SanAndreaP replied to DJBeatBang's topic in Support & Bug Reports
Update Forge