Jump to content

Recommended Posts

Posted (edited)

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
Posted

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 ]

        }

    }

 

Posted

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

 

Posted

{

    "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.

Posted

{

    "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 :)

Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted

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!

Posted

What you've posted should work 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.

Posted

Are there any errors in the log? Upload the full FML log (logs/fml-client-latest.log) to Gist and link it here.

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.

Posted

There don't seem to be any errors in the log, I'm not too sure what's going wrong.

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.

Posted

Your item render registration is broken.

 

- Use

ModelLoader.setCustomModelResourceLocation

instead of

ItemModelMesher#register

.

- Call it in preInit, not init.

- Do not use the unlocalized name to determine the model name.

 

I don't know how to use this

ModelLoader.setCustomModelResourceLocation

Any help

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I need to know what mod is doing this crash, i mean the mod xenon is doing the crash but i want to know who mod is incompatible with xenon, but please i need to know a solution if i need to replace xenon, i cant use optifine anymore and all the other mods i tried(sodium, lithium, vulkan, etc) doesn't work, it crash the game.
    • I have been trying to solve a consistent crashing issue on my brother's computer where it will crash during the "Scanning Mod Candidates" phase of the loading process that starts when you click the play button on the Minecraft launcher. The issue seems to stem from a missing library that it mentions in the log file I provide below. I might I'm missing the bigger issue here for a smaller one but hopefully someone can find what I'm missing. Here's all of the stuff that I've been able to figure out so far: 1. It has nothing to do with mods, the crash happened with a real modpack, and even when I made a custom modpack and launched it without putting ANY mods into it (That is where the log file comes from by the way). 2. I have tried to find this class like a file in the Minecraft folders, but I've had no luck finding it (I don't think it works like that, but since I really don't understand how it works, I just figured I'd try). 3. I haven't seen anyone else have this issue before. 4. I know that my modpack (with mods) does work since I've run it on my computer, and it works fantastic. For some reason my brother's computer can't seem to run anything through curseforge. 5. This is for Minecraft version 1.20.1, Minecraft launcher version 3.4.50-2.1.3, forge 47.3.0, and curseforge app version 1.256.0.21056 6. My brother is using a Dell laptop from 6 years ago running Windows 10 (If you think more info on this would help, please ask as I do have it. I'm just choosing not to put it here for now). 7. I have reinstalled the curseforge app and installed Minecraft version 1.20.1. I have not reinstalled Minecraft or forge 47.3.0 but I didn't know if that would help. 8. I had an error code of 1 Please let me know if there is anything else that I am missing that you would like me to add to this post/add in a comment! Lastly, many thanks in advance to whoever can help! ------------- LOG FILE (latest.log) ------------- (from /Users/<NAME OF USER>/cursforge/minecraft/Instances/<THE NAME OF MY EMPTY MODPACK>/logs/latest.log) (This was made after running an empty modpack with same versions for all apps) ("[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/hxXvGGEK ------------- DEBUG.LOG (I realized that I should have put this here first after I had done all of the work on putting latest.log in) -------------------- (again, "[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/Fmh8GHYs
    • Pastebin... https://pastebin.com/Y3iZ85L5   Brand new profile, does not point to a mod as far as I can tell, my fatal message just has something about mixins. Don't know much about reading logs like this, but am genuinely stuck, please help. Java updated, pc restarted.
    • I was playing minecraft, forge 47.3.0 and 1.20.1, but when i tried to play minecraft now only crashes, i need help please. here is the crash report: https://securelogger.net/files/e6640a4f-9ed0-4acc-8d06-2e500c77aaaf.txt
  • Topics

×
×
  • Create New...

Important Information

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