Jump to content

Recommended Posts

Posted

Is it possible to add a 3D model in a furnace ?, I already have my furnace created but I want to try putting a 3D mold

What do you mean by 3D model in the furnace?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

If that. And how would you specify each face of the furnace?

"elements": [ 
{
    "__comment": "Main",
    "from": [ 0, 0, 1 ],
    "to": [ 16, 16, 16 ],
    "shade": true,
    "faces": {
        "down":  { "uv": [ 0, 1, 16, 16 ], "texture": "#flux_machines_rest", "tintindex": 1, "cullface": "down" },
        "up":    { "uv": [ 0, 1, 16, 16 ], "texture": "#flux_machines_rest", "tintindex": 1, "cullface": "up" },
        "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#flux_grinder_front", "tintindex": 1 },
        "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#flux_machines_rest", "tintindex": 1, "cullface": "south" },
        "west":  { "uv": [ 1, 0, 16, 16 ], "texture": "#flux_machines_rest", "tintindex": 1, "cullface": "west" },
        "east":  { "uv": [ 1, 0, 16, 16 ], "texture": "#flux_machines_rest", "tintindex": 1, "cullface": "east" }
    }
}]

This is an excerpt from one of my JSON models.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Did you get the ItemModel for your custom rendered block working? I can't get any ItemBlock models displaying the model that I assigned them. I can't get any orientable blocks or custom rendered ones. Please tell me if you got this problem, and how you fixed it. I really need to fix this... :(

Look at your thread I posted a response there.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

I can not get the model to load :(

 

width=356 height=200http://s2.subirimagenes.com/imagen/previo/thump_96649902016122413.png[/img]

 

Blockstate

{
    "variants": {
        "normal": { "model": "wwmod:wonka_furnace" }
    }
}

 

Model

{
    "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
    "textures": {
        "0": "blocks/cauldron_side",
        "1": "blocks/netherrack",
        "2": "blocks/log_oak_top",
        "3": "blocks/log_oak",
        "4": "blocks/hardened_clay_stained_magenta"
    },
    "elements": [
        {
            "name": "SUELO",
            "from": [ 1.0, 0.0, 1.0 ], 
            "to": [ 15.0, 1.0, 15.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ], "cullface": "north" },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ], "cullface": "east" },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ], "cullface": "south" },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ], "cullface": "west" },
                "up": { "texture": "#1", "uv": [ 1.0, 2.0, 15.0, 16.0 ], "cullface": "up" },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 14.0 ], "cullface": "down" }
            }
        },
        {
            "name": "TRONCO",
            "from": [ 7.0, 1.0, 8.0 ], 
            "to": [ 10.0, 4.0, 17.0 ], 
            "rotation": { "origin": [ 2.0, 8.0, 8.0 ], "axis": "y", "angle": 45.0, "rescale": true },
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "north" },
                "east": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "east" },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "south" },
                "west": { "texture": "#3", "uv": [ 0.0, 16.0, 16.0, 0.0 ], "cullface": "west" },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "up" },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 15.0, 16.0 ], "cullface": "down" }
            }
        },
        {
            "name": "TRONCO 2",
            "from": [ 7.0, 1.0, 7.0 ], 
            "to": [ 10.0, 4.0, 14.0 ], 
            "rotation": { "origin": [ 10.0, 10.0, 10.0 ], "axis": "y", "angle": -22.5, "rescale": true },
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "north" },
                "east": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "east" },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "south" },
                "west": { "texture": "#3", "uv": [ 0.0, 16.0, 16.0, 0.0 ], "cullface": "west" },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "up" },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 15.0, 16.0 ], "cullface": "down" }
            }
        },
        {
            "name": "TRONCO 3",
            "from": [ 0.0, 5.0, 9.0 ], 
            "to": [ 7.0, 8.0, 12.0 ], 
            "rotation": { "origin": [ 12.0, 9.0, 14.0 ], "axis": "z", "angle": 22.5, "rescale": true },
            "faces": {
                "north": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "north" },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "east" },
                "south": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "south" },
                "west": { "texture": "#2", "uv": [ 0.0, 16.0, 16.0, 0.0 ], "cullface": "west" },
                "up": { "texture": "#3", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "up" },
                "down": { "texture": "#3", "uv": [ 0.0, 0.0, 15.0, 16.0 ], "cullface": "down" }
            }
        },
        {
            "name": "Tapa",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 1.0 ], 
            "faces": {
                "north": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "north" },
                "east": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 16.0 ], "cullface": "east" },
                "south": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 16.0 ], "cullface": "south" },
                "west": { "texture": "#4", "uv": [ 0.0, 0.0, 1.0, 16.0 ], "cullface": "west" },
                "up": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 1.0 ], "cullface": "up" },
                "down": { "texture": "#4", "uv": [ 0.0, 0.0, 16.0, 1.0 ], "cullface": "down" }
            }
        }
    ]
}

 

 

Posted

What does the console say?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
[13:28:45] [Client thread/INFO]: Created: 512x512 textures-atlas
[13:28:54] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:wonka_furnace#facing=east for blockstate "wwmod:wonka_furnace[facing=east]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:wonka_furnace#facing=east with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more
[13:28:54] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:lit_wonka_furnace#facing=west for blockstate "wwmod:lit_wonka_furnace[facing=west]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:lit_wonka_furnace#facing=west with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:241) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 24 more
[13:28:54] [Client thread/ERROR] [FML]: Exception loading blockstate for the variant wwmod:lit_wonka_furnace#facing=west: 
java.lang.Exception: Could not load model definition for variant wwmod:lit_wonka_furnace
at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:274) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:229) ~[ModelLoader.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:146) ~[ModelLoader.class:?]
at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model wwmod:blockstates/lit_wonka_furnace.json
at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:228) ~[ModelBakery.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?]
... 23 more
Caused by: java.io.FileNotFoundException: wwmod:blockstates/lit_wonka_furnace.json
at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:104) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:79) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:221) ~[ModelBakery.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?]
at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:270) ~[ModelLoader.class:?]
... 23 more
[13:28:55] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:candy_crop#inventory for item "wwmod:candy_crop", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:item/candy_crop with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[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.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: wwmod:models/item/candy_crop.json
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[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
[13:28:55] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:candy_crop#inventory for item "wwmod:candy_crop", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:candy_crop#inventory with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[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.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 23 more
[13:28:55] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:lit_wonka_furnace#inventory for item "wwmod:lit_wonka_furnace", normal location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:item/lit_wonka_furnace with loader VanillaLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[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.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: java.io.FileNotFoundException: wwmod:models/item/lit_wonka_furnace.json
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:69) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:65) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:334) ~[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
[13:28:55] [Client thread/ERROR] [FML]: Exception loading model for variant wwmod:lit_wonka_furnace#inventory for item "wwmod:lit_wonka_furnace", blockstate location exception: 
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model wwmod:lit_wonka_furnace#inventory with loader VariantLoader.INSTANCE, skipping
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?]
at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[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.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:798) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:347) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.init(Minecraft.java:560) [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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
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_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:26) [start/:?]
Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException
at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?]
at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?]
at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
... 23 more

Posted

Your block says that it has a facing property.

Your blockstate file doesn't indicate what to DO with that property.

 

Exception loading model wwmod:wonka_furnace#facing=east

Caused by: ModelBlockDefinition$MissingVariantException

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

You mean this?

 

{
    "variants": {
        "facing=north": { "model": "wwmod:wonka_furnace" },
        "facing=south": { "model": "wwmod:wonka_furnace", "y": 180 },
        "facing=west":  { "model": "wwmod:wonka_furnace", "y": 270 },
        "facing=east":  { "model": "wwmod:wonka_furnace", "y": 90 }
    }
}

 

I do not understand :/

 

 

 

Posted

Because my furnace, when I put to cook something is not cooked and changes the texture to the original oven of minecraft?

 

What?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Because my furnace, when I put to cook something is not cooked and changes the texture to the original oven of minecraft?

Post your code.

 

Because my furnace, when I put to cook something is not cooked and changes the texture to the original oven of minecraft?

 

What?

What I think he is saying is that his furnace is not smelting correctly and that his furnace changes to the vanilla one.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Yes

 

My code

 

Furnace

package com.mod.willywonka.blocks;


public class WonkaFurnace extends BlockContainer{


public static final PropertyDirection FACING = BlockHorizontal.FACING;
private final boolean isBurning;
private static boolean keepInventory;


public WonkaFurnace(boolean isBurning) {
	super(Material.ROCK);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
	this.isBurning = isBurning;
}

@Override
public boolean isOpaqueCube(IBlockState state) {
	return false;
}


   /**
     * Get the Item that this Block should drop when harvested.
     */
    public Item getItemDropped(IBlockState state, Random rand, int fortune)
    {
        return Item.getItemFromBlock(ModBlocks.WONKA_FURNACE);
    }

    /**
     * Called after the block is set in the Chunk data, but before the Tile Entity is set
     */
    public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
    {
        this.setDefaultFacing(worldIn, pos, state);
    }

    private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state)
    {
        if (!worldIn.isRemote)
        {
            IBlockState iblockstate = worldIn.getBlockState(pos.north());
            IBlockState iblockstate1 = worldIn.getBlockState(pos.south());
            IBlockState iblockstate2 = worldIn.getBlockState(pos.west());
            IBlockState iblockstate3 = worldIn.getBlockState(pos.east());
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && iblockstate.isFullBlock() && !iblockstate1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && iblockstate1.isFullBlock() && !iblockstate.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && iblockstate2.isFullBlock() && !iblockstate3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && iblockstate3.isFullBlock() && !iblockstate2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

            worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
        }
    }

    @SideOnly(Side.CLIENT)
    @SuppressWarnings("incomplete-switch")
    public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
    {
        if (this.isBurning)
        {
            EnumFacing enumfacing = (EnumFacing)stateIn.getValue(FACING);
            double d0 = (double)pos.getX() + 0.5D;
            double d1 = (double)pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
            double d2 = (double)pos.getZ() + 0.5D;
            double d3 = 0.52D;
            double d4 = rand.nextDouble() * 0.6D - 0.3D;

            if (rand.nextDouble() < 0.1D)
            {
                worldIn.playSound((double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);
            }

            switch (enumfacing)
            {
                case WEST:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case EAST:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case NORTH:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
                    break;
                case SOUTH:
                    worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
                    worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
            }
        }
    }

    /**
     * Called when the block is right clicked by a player.
     */
    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
    {
        if (worldIn.isRemote)
        {
            return true;
        }
        else
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityFurnace)
            {
                playerIn.displayGUIChest((TileEntityFurnace)tileentity);
                playerIn.addStat(StatList.FURNACE_INTERACTION);
            }

            return true;
        }
    }

    public static void setState(boolean active, World worldIn, BlockPos pos)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);
        TileEntity tileentity = worldIn.getTileEntity(pos);
        keepInventory = true;

        if (active)
        {
            worldIn.setBlockState(pos, ModBlocks.LIT_WONKA_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
            worldIn.setBlockState(pos, ModBlocks.LIT_WONKA_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        }
        else
        {
            worldIn.setBlockState(pos, ModBlocks.WONKA_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
            worldIn.setBlockState(pos, ModBlocks.WONKA_FURNACE.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
        }

        keepInventory = false;

        if (tileentity != null)
        {
            tileentity.validate();
            worldIn.setTileEntity(pos, tileentity);
        }
    }

    /**
     * Returns a new instance of a block's tile entity class. Called on placing the block.
     */
    public TileEntity createNewTileEntity(World worldIn, int meta)
    {
        return new TileEntityFurnace();
    }

    /**
     * Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
     * IBlockstate
     */
    public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
    {
        return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
    }

    /**
     * Called by ItemBlocks after a block is set in the world, to allow post-place logic
     */
    public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
    {
        worldIn.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);

        if (stack.hasDisplayName())
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityFurnace)
            {
                ((TileEntityFurnace)tileentity).setCustomInventoryName(stack.getDisplayName());
            }
        }
    }

    /**
     * Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
     */
    public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
    {
        if (!keepInventory)
        {
            TileEntity tileentity = worldIn.getTileEntity(pos);

            if (tileentity instanceof TileEntityFurnace)
            {
                InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity);
                worldIn.updateComparatorOutputLevel(pos, this);
            }
        }

        super.breakBlock(worldIn, pos, state);
    }

    public boolean hasComparatorInputOverride(IBlockState state)
    {
        return true;
    }

    public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
    {
        return Container.calcRedstone(worldIn.getTileEntity(pos));
    }

    public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
    {
        return new ItemStack(ModBlocks.WONKA_FURNACE);
    }

    /**
     * The type of render function called. MODEL for mixed tesr and static model, MODELBLOCK_ANIMATED for TESR-only,
     * LIQUID for vanilla liquids, INVISIBLE to skip all rendering
     */
    public EnumBlockRenderType getRenderType(IBlockState state)
    {
        return EnumBlockRenderType.MODEL;
    }

    /**
     * Convert the given metadata into a BlockState for this Block
     */
    public IBlockState getStateFromMeta(int meta)
    {
        EnumFacing enumfacing = EnumFacing.getFront(meta);

        if (enumfacing.getAxis() == EnumFacing.Axis.Y)
        {
            enumfacing = EnumFacing.NORTH;
        }

        return this.getDefaultState().withProperty(FACING, enumfacing);
    }

    /**
     * Convert the BlockState into the correct metadata value
     */
    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

    /**
     * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed
     * blockstate.
     */
    public IBlockState withRotation(IBlockState state, Rotation rot)
    {
        return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
    }

    /**
     * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed
     * blockstate.
     */
    public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
    {
        return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
    }

    protected BlockStateContainer createBlockState()
    {
        return new BlockStateContainer(this, new IProperty[] {FACING});
    }
}

 

TileEntityFurnace

package com.mod.willywonka.tileentities.blocks;

import net.minecraft.block.Block;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ContainerFurnace;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.inventory.ItemStackHelper;
import net.minecraft.inventory.SlotFurnaceFuel;
import net.minecraft.item.Item;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntityLockable;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.NonNullList;
import net.minecraft.util.datafix.DataFixer;
import net.minecraft.util.datafix.FixTypes;
import net.minecraft.util.datafix.walkers.ItemStackDataLists;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;


public class TileEntityWonkaFurnace extends TileEntityLockable implements ITickable, ISidedInventory{
private static final int[] SLOTS_TOP = new int[] { 0 };
private static final int[] SLOTS_BOTTOM = new int[] { 2, 1 };
private static final int[] SLOTS_SIDES = new int[] { 1 };
private NonNullList<ItemStack> furnaceItemStacks = NonNullList.<ItemStack>withSize(3, ItemStack.EMPTY);
/** The number of ticks that the furnace will keep burning */
private int furnaceBurnTime;
/**
 * The number of ticks that a fresh copy of the currently-burning item would
 * keep the furnace burning for
 */
private int currentItemBurnTime;
private int cookTime;
private int totalCookTime;
private String furnaceCustomName;

/**
 * Returns the number of slots in the inventory.
 */
public int getSizeInventory() {
	return this.furnaceItemStacks.size();
}

public boolean isEmpty() {
	for (ItemStack itemstack : this.furnaceItemStacks) {
		if (!itemstack.isEmpty()) {
			return false;
		}
	}

	return true;
}

/**
 * Returns the stack in the given slot.
 */
public ItemStack getStackInSlot(int index) {
	return (ItemStack) this.furnaceItemStacks.get(index);
}

/**
 * Removes up to a specified number of items from an inventory slot and
 * returns them in a new stack.
 */
public ItemStack decrStackSize(int index, int count) {
	return ItemStackHelper.getAndSplit(this.furnaceItemStacks, index, count);
}

/**
 * Removes a stack from the given slot and returns it.
 */
public ItemStack removeStackFromSlot(int index) {
	return ItemStackHelper.getAndRemove(this.furnaceItemStacks, index);
}

/**
 * Sets the given item stack to the specified slot in the inventory (can be
 * crafting or armor sections).
 */
public void setInventorySlotContents(int index, ItemStack stack) {
	ItemStack itemstack = (ItemStack) this.furnaceItemStacks.get(index);
	boolean flag = !stack.isEmpty() && stack.isItemEqual(itemstack)
			&& ItemStack.areItemStackTagsEqual(stack, itemstack);
	this.furnaceItemStacks.set(index, stack);

	if (stack.getCount() > this.getInventoryStackLimit()) {
		stack.setCount(this.getInventoryStackLimit());
	}

	if (index == 0 && !flag) {
		this.totalCookTime = this.getCookTime(stack);
		this.cookTime = 0;
		this.markDirty();
	}
}

/**
 * Get the name of this object. For players this returns their username
 */
public String getName() {
	return this.hasCustomName() ? this.furnaceCustomName : "container.furnace";
}

/**
 * Returns true if this thing is named
 */
public boolean hasCustomName() {
	return this.furnaceCustomName != null && !this.furnaceCustomName.isEmpty();
}

public void setCustomInventoryName(String p_145951_1_) {
	this.furnaceCustomName = p_145951_1_;
}

public static void registerFixesFurnace(DataFixer fixer) {
	fixer.registerWalker(FixTypes.BLOCK_ENTITY,
			new ItemStackDataLists(TileEntityWonkaFurnace.class, new String[] { "Items" }));
}

public void readFromNBT(NBTTagCompound compound) {
	super.readFromNBT(compound);
	this.furnaceItemStacks = NonNullList.<ItemStack>withSize(this.getSizeInventory(), ItemStack.EMPTY);
	ItemStackHelper.loadAllItems(compound, this.furnaceItemStacks);
	this.furnaceBurnTime = compound.getInteger("BurnTime");
	this.cookTime = compound.getInteger("CookTime");
	this.totalCookTime = compound.getInteger("CookTimeTotal");
	this.currentItemBurnTime = getItemBurnTime((ItemStack) this.furnaceItemStacks.get(1));

	if (compound.hasKey("CustomName", ) {
		this.furnaceCustomName = compound.getString("CustomName");
	}
}

public NBTTagCompound writeToNBT(NBTTagCompound compound) {
	super.writeToNBT(compound);
	compound.setInteger("BurnTime", (short) this.furnaceBurnTime);
	compound.setInteger("CookTime", (short) this.cookTime);
	compound.setInteger("CookTimeTotal", (short) this.totalCookTime);
	ItemStackHelper.saveAllItems(compound, this.furnaceItemStacks);

	if (this.hasCustomName()) {
		compound.setString("CustomName", this.furnaceCustomName);
	}

	return compound;
}

/**
 * Returns the maximum stack size for a inventory slot. Seems to always be
 * 64, possibly will be extended.
 */
public int getInventoryStackLimit() {
	return 64;
}

/**
 * Furnace isBurning
 */
public boolean isBurning() {
	return this.furnaceBurnTime > 0;
}

@SideOnly(Side.CLIENT)
public static boolean isBurning(IInventory inventory) {
	return inventory.getField(0) > 0;
}

/**
 * Like the old updateEntity(), except more generic.
 */
public void update() {
	boolean flag = this.isBurning();
	boolean flag1 = false;

	if (this.isBurning()) {
		--this.furnaceBurnTime;
	}

	if (!this.world.isRemote) {
		ItemStack itemstack = (ItemStack) this.furnaceItemStacks.get(1);

		if (this.isBurning() || !itemstack.isEmpty() && !((ItemStack) this.furnaceItemStacks.get(0)).isEmpty()) {
			if (!this.isBurning() && this.canSmelt()) {
				this.furnaceBurnTime = getItemBurnTime(itemstack);
				this.currentItemBurnTime = this.furnaceBurnTime;

				if (this.isBurning()) {
					flag1 = true;

					if (!itemstack.isEmpty()) {
						Item item = itemstack.getItem();
						itemstack.shrink(1);

						if (itemstack.isEmpty()) {
							ItemStack item1 = item.getContainerItem(itemstack);
							this.furnaceItemStacks.set(1, item1);
						}
					}
				}
			}

			if (this.isBurning() && this.canSmelt()) {
				++this.cookTime;

				if (this.cookTime == this.totalCookTime) {
					this.cookTime = 0;
					this.totalCookTime = this.getCookTime((ItemStack) this.furnaceItemStacks.get(0));
					this.smeltItem();
					flag1 = true;
				}
			} else {
				this.cookTime = 0;
			}
		} else if (!this.isBurning() && this.cookTime > 0) {
			this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.totalCookTime);
		}

		if (flag != this.isBurning()) {
			flag1 = true;
			BlockFurnace.setState(this.isBurning(), this.world, this.pos);
		}
	}

	if (flag1) {
		this.markDirty();
	}
}

public int getCookTime(ItemStack stack) {
	return 300;
}

/**
 * Returns true if the furnace can smelt an item, i.e. has a source item,
 * destination stack isn't full, etc.
 */
private boolean canSmelt() {
	if (((ItemStack) this.furnaceItemStacks.get(0)).isEmpty()) {
		return false;
	} else {
		ItemStack itemstack = FurnaceRecipes.instance()
				.getSmeltingResult((ItemStack) this.furnaceItemStacks.get(0));

		if (itemstack.isEmpty()) {
			return false;
		} else {
			ItemStack itemstack1 = (ItemStack) this.furnaceItemStacks.get(2);
			if (itemstack1.isEmpty())
				return true;
			if (!itemstack1.isItemEqual(itemstack))
				return false;
			int result = itemstack1.getCount() + itemstack.getCount();
			return result <= getInventoryStackLimit() && result <= itemstack1.getMaxStackSize(); // Forge
																									// fix:
																									// make
																									// furnace
																									// respect
																									// stack
																									// sizes
																									// in
																									// furnace
																									// recipes
		}
	}
}

/**
 * Turn one item from the furnace source stack into the appropriate smelted
 * item in the furnace result stack
 */
public void smeltItem() {
	if (this.canSmelt()) {
		ItemStack itemstack = (ItemStack) this.furnaceItemStacks.get(0);
		ItemStack itemstack1 = FurnaceRecipes.instance().getSmeltingResult(itemstack);
		ItemStack itemstack2 = (ItemStack) this.furnaceItemStacks.get(2);

		if (itemstack2.isEmpty()) {
			this.furnaceItemStacks.set(2, itemstack1.copy());
		} else if (itemstack2.getItem() == itemstack1.getItem()) {
			itemstack2.grow(itemstack1.getCount());
		}

		if (itemstack.getItem() == Item.getItemFromBlock(Blocks.SPONGE) && itemstack.getMetadata() == 1
				&& !((ItemStack) this.furnaceItemStacks.get(1)).isEmpty()
				&& ((ItemStack) this.furnaceItemStacks.get(1)).getItem() == Items.BUCKET) {
			this.furnaceItemStacks.set(1, new ItemStack(Items.WATER_BUCKET));
		}

		itemstack.shrink(1);
	}
}

/**
 * Returns the number of ticks that the supplied fuel item will keep the
 * furnace burning, or 0 if the item isn't fuel
 */
public static int getItemBurnTime(ItemStack stack) {
	if (stack.isEmpty()) {
		return 0;
	} else {
		Item item = stack.getItem();

		if (item instanceof net.minecraft.item.ItemBlock && Block.getBlockFromItem(item) != Blocks.AIR) {
			Block block = Block.getBlockFromItem(item);

			if (block == Blocks.WOODEN_SLAB) {
				return 150;
			}

			if (block.getDefaultState().getMaterial() == Material.WOOD) {
				return 300;
			}

			if (block == Blocks.COAL_BLOCK) {
				return 16000;
			}

			if (block == Blocks.WOOL) {
				return 750;
			}
		}

		if (item instanceof ItemTool && "WOOD".equals(((ItemTool) item).getToolMaterialName()))
			return 200;
		if (item instanceof ItemSword && "WOOD".equals(((ItemSword) item).getToolMaterialName()))
			return 200;
		if (item instanceof ItemHoe && "WOOD".equals(((ItemHoe) item).getMaterialName()))
			return 200;
		if (item == Items.STICK)
			return 100;
		if (item == Items.COAL)
			return 1600;
		if (item == Items.LAVA_BUCKET)
			return 20000;
		if (item == Item.getItemFromBlock(Blocks.SAPLING))
			return 100;
		if (item == Items.BLAZE_ROD)
			return 2400;
		if (item == Items.BOWL)
			return 150;
		return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(stack);
	}
}

public static boolean isItemFuel(ItemStack stack) {
	/**
	 * Returns the number of ticks that the supplied fuel item will keep the
	 * furnace burning, or 0 if the item isn't fuel
	 */
	return getItemBurnTime(stack) > 0;
}

/**
 * Don't rename this method to canInteractWith due to conflicts with
 * Container
 */
public boolean isUsableByPlayer(EntityPlayer player) {
	return this.world.getTileEntity(this.pos) != this ? false
			: player.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D,
					(double) this.pos.getZ() + 0.5D) <= 64.0D;
}

public void openInventory(EntityPlayer player) {
}

public void closeInventory(EntityPlayer player) {
}

/**
 * Returns true if automation is allowed to insert the given stack (ignoring
 * stack size) into the given slot. For guis use Slot.isItemValid
 */
public boolean isItemValidForSlot(int index, ItemStack stack) {
	if (index == 2) {
		return false;
	} else if (index != 1) {
		return true;
	} else {
		ItemStack itemstack = (ItemStack) this.furnaceItemStacks.get(1);
		return isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack) && itemstack.getItem() != Items.BUCKET;
	}
}

public int[] getSlotsForFace(EnumFacing side) {
	return side == EnumFacing.DOWN ? SLOTS_BOTTOM : (side == EnumFacing.UP ? SLOTS_TOP : SLOTS_SIDES);
}

/**
 * Returns true if automation can insert the given item in the given slot
 * from the given side.
 */
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) {
	return this.isItemValidForSlot(index, itemStackIn);
}

/**
 * Returns true if automation can extract the given item in the given slot
 * from the given side.
 */
public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) {
	if (direction == EnumFacing.DOWN && index == 1) {
		Item item = stack.getItem();

		if (item != Items.WATER_BUCKET && item != Items.BUCKET) {
			return false;
		}
	}

	return true;
}

public String getGuiID() {
	return "minecraft:furnace";
}

public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
	return new ContainerFurnace(playerInventory, this);
}

public int getField(int id) {
	switch (id) {
	case 0:
		return this.furnaceBurnTime;
	case 1:
		return this.currentItemBurnTime;
	case 2:
		return this.cookTime;
	case 3:
		return this.totalCookTime;
	default:
		return 0;
	}
}

public void setField(int id, int value) {
	switch (id) {
	case 0:
		this.furnaceBurnTime = value;
		break;
	case 1:
		this.currentItemBurnTime = value;
		break;
	case 2:
		this.cookTime = value;
		break;
	case 3:
		this.totalCookTime = value;
	}
}

public int getFieldCount() {
	return 4;
}

public void clear() {
	this.furnaceItemStacks.clear();
}

net.minecraftforge.items.IItemHandler handlerTop = new net.minecraftforge.items.wrapper.SidedInvWrapper(this,
		net.minecraft.util.EnumFacing.UP);
net.minecraftforge.items.IItemHandler handlerBottom = new net.minecraftforge.items.wrapper.SidedInvWrapper(this,
		net.minecraft.util.EnumFacing.DOWN);
net.minecraftforge.items.IItemHandler handlerSide = new net.minecraftforge.items.wrapper.SidedInvWrapper(this,
		net.minecraft.util.EnumFacing.WEST);

@SuppressWarnings("unchecked")
@Override
public <T> T getCapability(net.minecraftforge.common.capabilities.Capability<T> capability,
		net.minecraft.util.EnumFacing facing) {
	if (facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)
		if (facing == EnumFacing.DOWN)
			return (T) handlerBottom;
		else if (facing == EnumFacing.UP)
			return (T) handlerTop;
		else
			return (T) handlerSide;
	return super.getCapability(capability, facing);
}
}

Posted

Gosh, I wonder what this code does.

 

			if (flag != this.isBurning()) {
			flag1 = true;
			BlockFurnace.setState(this.isBurning(), this.world, this.pos);

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

I dont know

This part

BlockFurnace.setState(this.isBurning(), this.world, this.pos);

Switches the block on of off depending on if the furnace is smelting anything.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

You might want to try not completely whole-sale copying the furnace class.  You don't know what 90% of it does and so when it does something you don't want, you don't know why.

 

For example, it keeps making the block a vanilla furnace. Well, that's because your furnace tile entity told the game to do that.  I even quoted the section of code responsible and you still couldn't figure out what it did or why.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.