Everything posted by Choonster
-
[Solved] Water plant
Set the tint index for each model face you want to be coloured at runtime and register an IBlockColor for the Block that returns the appropriate colour for each tint index depending on the location. Look at BlockColors for vanilla examples.
-
[1.11.2] Replace Access Transformer
Use ReflectionHelper.findField or ReflectionHelper.findMethod to get a Field/Method object for the field/method and store it in a private static final field. You'll need to provide both the MCP and SRG names of the field/method. Use Field#get or Field#set to get or set the value of a field. If it's an instance field, pass the instance as the first argument. If it's a static field, pass null as the first argument instead. Use Method#invoke to call a method. If it's an instance method, pass the instance as the first argument. If it's a static method, pass null as the first argument instead. Pass the method's arguments as the vararg argument.
-
[SOLVED] [1.11.2] RenderManager Issue - Null Pointer Exception when spawning in a throwable entity
That's the correct way to create a ResourceLocation, assuming your shuriken texture is located at assets/<modid>/textures/items/shuriken.png. It's not directly related to your issue, but I noticed that you're extending the raw Render type instead of specifying its generic type argument. If you specify the type argument as EntityShuriken, you can delete the getEntityTexture(Entity) and doRender(Entity, ...) methods, since the getEntityTexture(EntityShuriken) and doRender(EntityShuriken, ...) methods will override the corresponding super methods. If you want your entity to render as an item model (like snowballs, ender pearls, eggs, etc.), you can use or extend RenderSnowball.
-
[SOLVED] [1.11.2] RenderManager Issue - Null Pointer Exception when spawning in a throwable entity
IRenderFactory#createRenderFor is called from the RenderManager constructor, before the RenderManager instance is stored in the Minecraft#renderManager field (used by Minecraft#getRenderManager). This means you're passing null as the RenderManager argument of your RenderShuriken constructor, so Render#bindTexture throws a NullPointerException when it tries to get the RenderManager#renderEngine field from it. You need to use the RenderManager instance passed as an argument to IRenderFactory#createRenderFor instead of trying to get it from Minecraft. This is also a general guideline you should follow: Use the data you've been given rather than trying to get the data yourself (unless you have a specific reason not to).
-
[SOLVED] [1.11.2] RenderManager Issue - Null Pointer Exception when spawning in a throwable entity
Post the crash report.
-
Armour Models
Even if they only run on older versions of Minecraft, the models produced by them should work in 1.11.2.
-
Armour Models
You can try Tabula or Qubble.
-
[1.11.2] [Solved] Changing Break Speed With Hoe
You need to handle the random chance and random amounts yourself: generate a random number for the amount of soil and add a stack of that much soil to the list (or that many stacks of 1 soil), then generate a random number for the rock drop chance and add a rock to the drops list if it's within the 10% range.
-
[1.11.2] [Solved] Changing Break Speed With Hoe
You can do exactly the same thing as you would in BreakEvent, just add drops to the list instead of manually spawning them as entities.
-
[1.11] Capability NPEs
PlayerTickEvent is fired for all players (even on the client side), not just the client player. If you want to do something every tick on the client, use ClientTickEvent.
-
[1.11] [Client-Mod] Gui word wrap
I'm not too sure, sorry. I don't know all that much about rendering.
-
[1.11] [Client-Mod] Gui word wrap
You should be able to use FontRenderer#drawSplitString or FontRenderer#listFormattedStringToWidth for this.
-
Forge 1.11 Axe
If you're developing a mod and you have a class that extends ItemAxe, you need to use the ItemAxe(ToolMaterial, float, float) constructor for non-vanilla ToolMaterials. The ItemAxe(ToolMaterial) constructor only works for vanilla ToolMaterials because it uses the ordinal as an array index.
-
Minecraft Crash Report
1.6.4 is no longer supported by Forge, you won't get any help with it here.
-
Multiplayer error
A task that was scheduled with IThreadListener#addScheduledTask is throwing an ArrayIndexOutOfBoundsException, but I can't tell you where it's being thrown from because you didn't post the full stack trace. Either post the full stack trace/crash report in a code block (the <> button) or post the full FML log (logs/fml-client-latest.log) using Gist or Pastebin. Alternatively, read it yourself and figure out why the exception is being thrown and what you can do to stop it.
-
i can't download forge 1.10.2 - 12.18.3.2185
If you click "Show all downloads" on the Forge download page, you'll see a full list of downloads with an i icon next to each download link. Hover over this and there'll be a "Direct Download" link that bypasses AdFocus (if the regular link uses AdFocus) and downloads the file directly.
-
Forestry problem
Like the error message says, Forestry requires Forge 13.20.0.2230 or above, but you're using an older version. You need to update Forge.
-
Adequate item display in GUI and inventory for 3D OBJ loaded model in 1.11.2?
I don't think this is true. Looking at ModelLoader#loadItemModels, Forge tries to load the item model first and only tries to load the model from the blockstates file if that throws an exception.
-
[1.11.2]Setting up a Skillsystem properly
You can read more about capabilities here.
-
[1.9.4] Registering SoundEvent ignoring my modid?
It's possible that you'd want to create a sound event that consists of a combination of vanilla files not present in any existing sound event. For example, a sound event consisting of minecraft:block/chorus_flower/grow1, minecraft:dig/cloth1 and youmod:foo/bar. There's no existing sound event with this combination of sound files.
-
[1.11.2] Use #inventory variant for a .obj model
By default, the same model is used for an item regardless of where it's being rendered (e.g. in the hand or in the inventory). You'll need to create an IPerspectiveAwareModel wrapper that uses either the full OBJ model or the simple JSON model based on where it's being rendered (the TransformType). diesieben07 helped someone else with something similar here.
-
[1.9.4] Registering SoundEvent ignoring my modid?
The sound events in your sounds.json file have their resource domain set automatically from the file's resource domain, but the individual sound files used by the sound events don't, they need to be specified manually. Replace special/levelup with dynamicswordskills:special/levelup in your sounds.json file.
-
Noticed registEntityRenderHandler is deprecated, what to use instead
IRenderFactory is an interface with a single method, you shouldn't need an example. All your implementation needs to do is create and return the Render instance using the provided RenderManager instance. You can implement it with a lambda/constructor method reference (requires Java 8), an anonymous class or a regular class.
-
Noticed registEntityRenderHandler is deprecated, what to use instead
Use the non-deprecated overload with an IRenderFactory argument.
-
[1.11.2] Can you use an obj for an entity model?
AnimationModelBase is a ModelBase that renders an animated baked model. If the model isn't animated, you can create your own Render/ModelBase and cache the IBakedModel instead of re-baking it each frame.
IPS spam blocked by CleanTalk.