Everything posted by Choonster
-
help with shading jar dependency into mod [1.7.10]
jsoup will be added as a dependency in your IDE project. It won't put any source code in your workspace.
-
help with shading jar dependency into mod [1.7.10]
Don't modify the buildscript block, that specifies the dependencies of the buildscript itself rather than the mod. Since jsoup is hosted on Maven Central, you don't need to explicitly add a Maven repository for it; simply add it as a dependency. The new package for the srgExtra line should be something unique to your mod, ForgeGradle will move the classes in org.jsoup to the new package and (at compile time) rewrite any class that references these classes to use the new package. If your mod's package is ultratechx.whatever , use something like ultratechx.whatever.repack.org.jsoup as the new package.
-
[1.9.4] [SOLVED] Singular item class, change block placed upon registry
That will work, but you should make the field private (so it can't be accessed outside of the class) and final (so it can't be modified after it's set in the constructor).
-
[1.9.4] [SOLVED] Singular item class, change block placed upon registry
Draco's point is that a static field will be shared between all instances of the class, so all instances would use the Block passed to the last instance created. This is basic Java that you should already know before creating a mod. Use an instance field instead.
-
1.7.10 Minecraft Crashing
Look for the part that starts with java.lang.IndexOutOfBoundsException (the first line of your crash report).
-
help with shading jar dependency into mod [1.7.10]
See these threads about shading: http://www.minecraftforge.net/forum/index.php/topic,37243.0.html http://www.minecraftforge.net/forum/index.php/topic,37742.0.html
-
MC 1.9.4 World 0% forge error log diagnosing [12.17.0.1965]
Those were the problem mods in benten2000's install. In your install, only Extra Utilities 2 has failed to register its recipe class.
-
forge not working for me and i dont know what to do.
You tried to load a mod built for 1.7.10 while running 1.9.4. Mods only work in the version of Minecraft they were built for. If you post the FML log (logs/fml-client-latest.log), we can probably tell you which mod this is. You could also just look look at your installed mods yourself, mods usually have the Minecraft version they were built for in their file name.
-
[1.9] How to register a custom entity?
What else could go in there besides null? My model is based off of modelbase, but using return new RenderOompah(manager, ModelBase.class, 0); returns "The constructor RenderOompah(RenderManager, Class<ModelBase>, int) is undefined" Pass an instance of ModelBase or a class that extends it (like ModelOompah ). Don't pass the class itself.
-
[1.9] How to register a custom entity?
Are you sure the method is actually being called? Set a breakpoint and run Minecraft in debug mode. EntityRegistry.registerModEntity needs to be called on both sides, so don't put it in your client proxy. Passing null as the ModelBase argument of the RenderOompah constructor will almost certainly cause issues, RenderLivingBase doesn't expect the model to be null .
-
public void Solved(FMLPreInitializationEvent event), one final question
Since I see you mention this again, I have to say this: If you don't own "xyz.com", do not use "com.xyz" as your package name. Package names are tied to domain names. Many people use "me.<name>", but I would prefer "mod.<modID>", since "mod" is not a real TLD. That's a good point. I should probably repackage my code at some point.
-
public void Solved(FMLPreInitializationEvent event), one final question
There is no list, it's mainly just the one convention (prefix your class names with the super type). For examples, simply look at the vanilla class names; these are all assigned by MCP. This section of Forge's official documentation briefly outlines the recommended way to structure your mod, including how to name your classes.
-
[1.9] How to register a custom entity?
Call EntityRegistry#registerModEntity in preInit to register your entity. Use the overload with the two additional int arguments to add a spawn egg for the entity. Call RenderingRegistry#registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) in preInit from your client proxy to register your entity's renderer. I suggest using an anonymous class (Java 6/7) or lambda/method reference (Java to implement IRenderFactory . Edit: Removed smiley.
-
[1.9.4] Creating a custom bow
onPlayerStoppedUsing is a void method. It doesn't return anything. In the code you posted, you're referencing a player variable. Where is this coming from? You should use the EntityLivingBase argument. Only create and spawn entities on the server (when World#isRemote is false ). In future, always post the error message (if it's a compile-time error) or the FML log (if it's a runtime error). This makes it much easier to help you.
-
[1.9.4] Creating a custom bow
Override the method by creating a method with the same name, return type and parameter types and annotating it with @Override . Your IDE should be able to do this for you. It's not strictly necessary, but you should also annotate your override method with the same annotations as the super method. If you've managed to override the method, post your latest code and describe what the current problem is.
-
public void Solved(FMLPreInitializationEvent event), one final question
diesieben07 answered before I could (and noticed that you were handling the wrong event), but here are some other things that I noticed: Entity isn't a singleton class like Block , Item or Potion ; don't store an instance of it (or a subclass) in a static field. Don't bother having a PreInitializationEvent parameter in Common#preInit if you're just going to pass null . Either pass a real value or remove the parameter. Your package name should include your name and your mod name (e.g. com.<yourname>.<modname> ). Don't use src in the package name. You should follow Java naming conventions: PascalCase for class, interface and enum names; camelCase for field, method, parameter and local variable names and UPPER_CASE for constants. You should also follow MCP naming conventions by prefixing your class names with the supertype, e.g. ItemMormonBook rather than MormonBookItem . Your proxy classes should have "proxy" somewhere in the class or package name.
-
public void Solved(FMLPreInitializationEvent event), one final question
If you want to change the texture used to render an entity, override Render#getEntityTexture . That's not what you want to do here though. RenderSnowball already handles the model and texture for you, you just need to pass it the right Item in the constructor (and override RenderSnowball#getStackToRender if you want to use custom metadata/NBT/capabilities). If an entity is rendering as a white box, it hasn't had a Render registered for it. You must do this by calling RenderingRegistry#registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) in preInit. The ModelResourceLocation passed to ItemModelMesher#register or ModelLoader.setCustomModelResourceLocation points to a model (the clue is in the name). Render#bindTexture expects the ResourceLocation to point to a texture. Textures and models are not the same thing.
-
forge instant crashes
Erebus has been configured to use biome ID 100, but that's already been taken by the Kelp Forest biome from Biomes O' Plenty.
-
forge instant crashes
The Magic Touch enchantment from Thaumic Bases and the Magic Resist enchantment from Ars Magica 2 are both configured to use ID 100. Set a new ID for one of them in the appropriate config file.
-
[1.9.4] ASM how to get a private value from a class
I don't think I had much luck with the web client, I ended up downloading HexChat to use MCPBot.
-
Server crash on 1.7.10
Resource Loader is a client-only mod, it doesn't work on the dedicated server.
-
Projectile Rendering Post gone wrong (not really)
ModelLoader.setCustomModelResourceLocation tells Minecraft to load that model (with ModelBakery.registerItemVariants ) and use it for that metadata value of the Item . If it's not working, post the FML log. ModelResourceLocation automatically converts its variant to lowercase, so I'd recommend specifying it in lowercase in the first place.
-
forge instant crashes
You have two versions of Baubles installed, one for 1.7.10 and one for 1.9.4. Remove the 1.9.4 version.
-
[1.9.4] ASM how to get a private value from a class
ASM is a library for manipulating Java bytecode. Minecraft and Forge use it, but mods should avoid using it where possible.
-
Projectile Rendering Post gone wrong (not really)
Ah, I didn't notice that you were using 1.8.9. I'd recommend updating to 1.9.4.
IPS spam blocked by CleanTalk.