Jump to content

Minecraft Forge 1.8 Throwable Entity Not Rendering


abrad1212

Recommended Posts

All right I finally got my throwable entity to register and be throwable and have particles after about 2 weeks of research ;( but now I have another problem the entity is not rendering properly making it just that checkered box the code is here https://github.com/abrad1212/Minecraft-Mod

 

Hopefully I explained everything well and it didn't confuse anyone

 

-abrad1212

Edited by abrad1212
Made things sound nicer
Link to comment
Share on other sites

One thing is that the way you are registering your entity renderer, you need to do it during the FML init event, not pre-init, because the render manager should be null during pre-init. How are you not crashing?

 

Still not working its not crashing but its giving me this error in the log

Model definition for location moretools:throwable#inventory not found

 

 

{

    "parent": "builtin/generated",

    "textures": {

        "layer0": "moretools:items/throwable"

    },

    "display": {

        "thirdperson": {

            "rotation": [ -90, 0, 0 ],

            "translation": [ 0, 1, -3 ],

            "scale": [ 0.55, 0.55, 0.55 ]

        },

        "firstperson": {

            "rotation": [ 0, -135, 25 ],

            "translation": [ 0, 4, 2 ],

            "scale": [ 1.7, 1.7, 1.7 ]

        }

    }

 

Link to comment
Share on other sites

Still not working its not crashing but its giving me this error in the log

Model definition for location moretools:throwable#inventory not found

 

Here is the full error

 

 

Exception loading model moretools:item/throwable with loader instance, skipping

com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 17 column 6

at com.google.gson.internal.Streams.parse(Streams.java:54) ~[streams.class:?]

at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]

at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]

at com.google.gson.Gson.fromJson(Gson.java:741) ~[Gson.class:?]

at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:47) ~[ModelBlock.class:?]

at net.minecraft.client.resources.model.ModelBakery.loadModel(ModelBakery.java:269) ~[ModelBakery.class:?]

at net.minecraftforge.client.model.ModelLoader.access$800(ModelLoader.java:73) ~[ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:650) ~[ModelLoader$VanillaLoader.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:107) [ModelLoaderRegistry.class:?]

at net.minecraftforge.client.model.ModelLoader.loadAnyModel(ModelLoader.java:228) [ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.getModel(ModelLoader.java:211) [ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.loadItems(ModelLoader.java:190) [ModelLoader.class:?]

at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:99) [ModelLoader.class:?]

at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) [ModelManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:130) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:511) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:356) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]

at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]

at GradleStart.main(Unknown Source) [start/:?]

Caused by: java.io.EOFException: End of input at line 17 column 6

at com.google.gson.stream.JsonReader.nextNonWhitespace(JsonReader.java:1377) ~[JsonReader.class:?]

at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:471) ~[JsonReader.class:?]

at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) ~[JsonReader.class:?]

at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:666) ~[TypeAdapters$25.class:?]

at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642) ~[TypeAdapters$25.class:?]

at com.google.gson.internal.Streams.parse(Streams.java:44) ~[streams.class:?]

... 25 more

 

Link to comment
Share on other sites

{

    "parent": "builtin/generated",

    "textures": {

        "layer0": "moretools:items/throwable"

    }, // end textures

    "display": {

        "thirdperson": {

            "rotation": [ -90, 0, 0 ],

            "translation": [ 0, 1, -3 ],

            "scale": [ 0.55, 0.55, 0.55 ]

        }, // end thirdperson

        "firstperson": {

            "rotation": [ 0, -135, 25 ],

            "translation": [ 0, 4, 2 ],

            "scale": [ 1.7, 1.7, 1.7 ]

        } // end firstperson

    } // end display

// uh oh...

You are missing the closing brace.

Link to comment
Share on other sites

{

    "parent": "builtin/generated",

    "textures": {

        "layer0": "moretools:items/throwable"

    }, // end textures

    "display": {

        "thirdperson": {

            "rotation": [ -90, 0, 0 ],

            "translation": [ 0, 1, -3 ],

            "scale": [ 0.55, 0.55, 0.55 ]

        }, // end thirdperson

        "firstperson": {

            "rotation": [ 0, -135, 25 ],

            "translation": [ 0, 4, 2 ],

            "scale": [ 1.7, 1.7, 1.7 ]

        } // end firstperson

    } // end display

// uh oh...

You are missing the closing brace.

 

THANKS THIS WORKED

but one problem it's still showing the checkered boxed but there is not error any more :)

Link to comment
Share on other sites

First of all, moving text is hella annoying. Stop it...

 

You are using the deprecated version of registerEntityRenderingHandler, use the proper one and call it in preinit.

Sorry bro just trying to get people's attention and what would be the updated version?

Link to comment
Share on other sites

The OP is still using 1.8 rather than 1.8.9, so

IRenderFactory

and the corresponding registration don't exist for them.

 

I would suggest updating to 1.8.9 or 1.9 and using the method diesieben07 mentioned.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

The OP is still using 1.8 rather than 1.8.9, so

IRenderFactory

and the corresponding registration don't exist for them.

 

I would suggest updating to 1.8.9 or 1.9 and using the method diesieben07 mentioned.

 

I would rather not spend the time updating could you give me a example of what diesieben07 was talking about.

Link to comment
Share on other sites

I would rather not spend the time updating could you give me a example of what diesieben07 was talking about.

 

Like I said, what diesieben07 is talking about doesn't exist in 1.8. It was added in 1.8.9.

 

This is how I register the

Render

for my arrow entity in 1.8.9. This uses Java 8's method references, you'd use an anonymous class instead if you were targeting Java 6/7.

 

This is how I register it in 1.8.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Okay but how will I be able to make this

RenderingRegistry.registerEntityRenderingHandler(EntityModArrow.class, new RenderModArrow(renderManager));

work with this

RenderingRegistry.registerEntityRenderingHandler(TestThrowable.class, new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), MoreToolsMod.throwable, Minecraft.getMinecraft().getRenderItem()));

 

Because arrows and throwables are different!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.