Jump to content

Recommended Posts

Posted

I am creating a custom bow called the Bow of Kindred with a unique texture feature/effect: a custom position and to make it glow.

 

Texture positioning

When not drawn, the player runs around the world with the bow in hand like a regular bow. But when the bow is drawn, it switches from a vertical position to a horizontal position.

 

This screenshot shows it looking properly in Minecraft 1.7.10:

bowofkindredsample_by_fuzzyacornindustri

 

So far my attempts as trying to figure out this how this works for the weird .json junk haven't been successful. With what I have, when the bow is pulled, the textureless purple box appears. Below is what I have coded so far.

 

bow_of_kindred.json

Spoiler

{
    "parent": "item/generated",
    "textures": {
        "layer0": "kindredlegacy:items/bow_of_kindred/bow_of_kindred_standby"
    },
    "display": {
        "thirdperson_righthand": {
            "rotation": [ -80, 260, -40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "thirdperson_lefthand": {
            "rotation": [ -80, -280, 40 ],
            "translation": [ -1, -2, 2.5 ],
            "scale": [ 0.9, 0.9, 0.9 ]
        },
        "firstperson_righthand": {
            "rotation": [ 0, -90, 25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        },
        "firstperson_lefthand": {
            "rotation": [ 0, 90, -25 ],
            "translation": [ 1.13, 3.2, 1.13],
            "scale": [ 0.68, 0.68, 0.68 ]
        }
    },
    "overrides": [
        {
            "predicate": {
                "pulling": 1
            },
            "model": "kindredlegacy:item/bow_of_kindred_pulling_0"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.65
            },
            "model": "kindredlegacy:item/bow_of_kindred_pulling_1"
        },
        {
            "predicate": {
                "pulling": 1,
                "pull": 0.9
            },
            "model": "kindredlegacy:item/bow_of_kindred_pulling_2"
        }
    ]
}

 

bow_of_kindred_pulling_0.json

Spoiler

{
    "parent": "item/generated",
    "textures": {
        "layer0": "kindredlegacy:items/bow_of_kindred/bow_of_kindred_pulling_0"
    },
    "display": {
        "thirdperson_righthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0.00, 0.00, 0.00 ],
            "scale": [ 1.00, 1.00, 1.00 ]
        },
            "thirdperson_lefthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0.00, 0.00, 0.00 ],
            "scale": [ 1.00, 1.00, 1.00 ]
        },
            "firstperson_righthand": {
            "rotation": [ 284, 0, 332 ],
            "translation": [ 0.00, 1.00, -1.50 ],
            "scale": [ 1.00, 1.00, 1.00 ]
        },
            "firstperson_lefthand": {
            "rotation": [ 0, 0, 0 ],
            "translation": [ 0.00, 0.00, 0.00 ],
            "scale": [ 1.00, 1.00, 1.00 ]
    }
}

 

The relevant error message I get on loading the game:

Spoiler

[11:25:04] [Client thread/ERROR] [FML]: Could not load override model kindredlegacy:item/bow_of_kindred_pulling_0 for model kindredlegacy:models/item/bow_of_kindred
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model kindredlegacy:item/bow_of_kindred_pulling_0 with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModelOrLogError(ModelLoaderRegistry.java:203) [ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaModelWrapper.getDependencies(ModelLoader.java:457) [ModelLoader$VanillaModelWrapper.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:174) [ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) [ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:175) [ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) [ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:122) [SimpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:539) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:385) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_121]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 27 column 2
at com.google.gson.internal.Streams.parse(Streams.java:54) ~[Streams.class:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:453) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:51) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:338) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 23 more
Caused by: java.io.EOFException: End of input at line 27 column 2
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:?]
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?]
at net.minecraft.util.JsonUtils.gsonDeserialize(JsonUtils.java:453) ~[JsonUtils.class:?]
at net.minecraft.client.renderer.block.model.ModelBlock.deserialize(ModelBlock.java:51) ~[ModelBlock.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:338) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 23 more

What can I do to fix the texturless box appearing when the bow is pulled?

Glow Effect:

I have absolutely no idea where to even start looking to make the bow texture glow like in the screenshot above with the .json junk. If someone might have some ideas on where to go with that, that would be great.

 

In 1.7.10, the bow rendering was based on clever use of the Spider/Enderman render code.

 

 

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.