Jump to content

Recommended Posts

Posted

Hey guys,

I have a problem with my slabs not rendering, other than the rendering issue it seems like everything else is working. They seem to stack correctly, but it's a bit hard to tell as the half slab is rendering as a full block in the standard black and purple texture. Not sure if it's something in my classes, or if it's something in my .json naming(highly doubt this one) and I doubt that it's something in the .json files, as the are 'copied' from how the vanilla slabs .json files is. I have added most of my classes in the spoiler and the names of my .json files, maybe someone can see the error I have made. Cause I sure can't at the moment :P

 

 

  Reveal hidden contents

 

 

I should mention that I have many blocks in my mod that works, however I can't seem to get these slabs to work.

Posted
  On 10/20/2016 at 2:25 PM, larsgerrits said:

Can you post the log where it tells you what the issue is?

[16:53:21] [Client thread/ERROR] [FML]: Could not load vanilla model parent 'em:block/slab_half_maple' for 'net.minecraft.client.renderer.block.model.ModelBlock@6e767943

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model em:block/slab_half_maple 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.getTextures(ModelLoader.java:478) [ModelLoader$VanillaModelWrapper.class:?]

at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:163) [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:170) [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:540) [Minecraft.class:?]

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

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

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

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]

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_77]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_77]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_77]

at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_77]

at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]

at GradleStart.main(GradleStart.java:26) [start/:?]

Caused by: java.io.FileNotFoundException: em:models/block/slab_half_maple.json

at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:68) ~[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:311) ~[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

Posted
[16:53:21] [Client thread/ERROR] [FML]: Could not load vanilla model parent 'em:block/slab_half_maple' for 'net.minecraft.client.renderer.block.model.ModelBlock@6e767943

There's an error in your JSON file, show it.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 10/20/2016 at 4:16 PM, larsgerrits said:

[16:53:21] [Client thread/ERROR] [FML]: Could not load vanilla model parent 'em:block/slab_half_maple' for 'net.minecraft.client.renderer.block.model.ModelBlock@6e767943

There's an error in your JSON file, show it.

 

I don't understand how there can be an error in that, but I digress. Here's the file.

{
    "parent": "block/half_slab",
    "textures": {
        "bottom": "em:blocks/planks_maple",
        "top": "em:blocks/planks_maple",
        "side": "em:blocks/planks_maple"
    }
}

 

I should mention that em:blocks/planks_maple is the exact same I use for a block and it's texture works fine, just so we can rule that out :)

Posted
  On 10/21/2016 at 1:32 PM, Animefan8888 said:

  Quote

Could still use a little help here :)

Is block/half_slab a block json?

 

Yes it is, the vanilla slabs use it as well

Posted
  On 10/21/2016 at 1:35 PM, Erfurt said:

  Quote

  Quote

Could still use a little help here :)

Is block/half_slab a block json?

 

Yes it is, the vanilla slabs use it as well

Is the json in modid:block/json

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
  On 10/21/2016 at 1:39 PM, Animefan8888 said:

  Quote

  Quote

  Quote

Could still use a little help here :)

Is block/half_slab a block json?

 

Yes it is, the vanilla slabs use it as well

Is the json in modid:block/json

 

Should it have to be in my mods assets folder, if I reference it from it's vanilla location, because that makes no sense to me, as I have done this with other models that worked fine

Posted
  On 10/21/2016 at 1:45 PM, Erfurt said:

  Quote

  Quote

  Quote

  Quote

Could still use a little help here :)

Is block/half_slab a block json?

 

Yes it is, the vanilla slabs use it as well

Is the json in modid:block/json

 

Should it have to be in my mods assets folder, if I reference it from it's vanilla location, because that makes no sense to me, as I have done this with other models that worked fine

I meant yours not the vanilla i should have specified.

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
  On 10/21/2016 at 1:47 PM, Animefan8888 said:

  Quote

  Quote

  Quote

  Quote

  Quote

Could still use a little help here :)

Is block/half_slab a block json?

 

Yes it is, the vanilla slabs use it as well

Is the json in modid:block/json

 

Should it have to be in my mods assets folder, if I reference it from it's vanilla location, because that makes no sense to me, as I have done this with other models that worked fine

I meant yours not the vanilla i should have specified.

 

Well I haven't made a copy of it into my own folder, if that's what you mean. Should I try that?

Posted
  On 10/21/2016 at 1:53 PM, Animefan8888 said:

Your json not the parent. em:block/slab_half_maple.json

 

I just noticed some of the naming was a bit wrong, but after fixing that, the model still isn't rendering correctly. Still checking all of the naming right now. But I do believe I've gotten all of them

Posted
  On 10/21/2016 at 1:53 PM, Animefan8888 said:

Your json not the parent. em:block/slab_half_maple.json

Could it be the way I register the render that's the problem?

Posted
  On 10/21/2016 at 2:03 PM, Erfurt said:

  Quote

Your json not the parent. em:block/slab_half_maple.json

Could it be the way I register the render that's the problem?

How do you register the renderer ModelLoader.serCustomModelResourceLocation(...) in preInit?

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
  On 10/21/2016 at 9:55 PM, Animefan8888 said:

  Quote

  Quote

Your json not the parent. em:block/slab_half_maple.json

Could it be the way I register the render that's the problem?

How do you register the renderer ModelLoader.serCustomModelResourceLocation(...) in preInit?

I use this method to register my renders and yes it's in preInit :)

public static void registerRender(Block block)
{
	Item item = Item.getItemFromBlock(block);
	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(block.getRegistryName(), "normal"));
}

 

What I find somewhat wierd is that the item is rendering fine in hand, but not when I place it, so I would think that I'm doing something wrong, I just can't figure out what it is  :-\

Posted

Sooo...question.

Why are you using Item.getItemFromBlock when you're the one who had to create the item in the first place?

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
  On 10/21/2016 at 10:48 PM, Draco18s said:

Sooo...question.

Why are you using Item.getItemFromBlock when you're the one who had to create the item in the first place?

 

Just the way I have learned to do it. Anything wrong with doing it that way?

Posted

Show us your blockstate file. You only provided a model file for your block.

 

If you use the non-forge json method you need:

-a blockstate .json file

-a block model .json file

-a item model .json file

 

If you use the forge version (wich i recommend) you only need the blockstate file and you do everything inside that.

 

But first show us your blockstate file

Posted
  On 10/22/2016 at 10:02 PM, winnetrie said:

Show us your blockstate file. You only provided a model file for your block.

 

If you use the non-forge json method you need:

-a blockstate .json file

-a block model .json file

-a item model .json file

 

If you use the forge version (wich i recommend) you only need the blockstate file and you do everything inside that.

 

But first show us your blockstate file

 

slab_half_maple.json

{
    "variants": {
        "half=bottom": { "model": "em:slab_half_maple" },
        "half=top": { "model": "em:slab_upper_maple" }
    }
}

slab_double_maple.json

{
    "variants": {
        "normal": { "model": "em:planks_maple" }
    }
}

 

I'm using the traditional way, mostly to test if everything works, and after that's all good, I mostly try and convert it over to the forge version. Before, in this case, making more slabs.

Posted
  On 10/22/2016 at 10:51 PM, winnetrie said:

i see you have this error:

 

Caused by: java.io.FileNotFoundException: em:models/block/slab_half_maple.json

 

This means you do not have that file or it isn't in the right place!

 

Yeah, at the time I had some files named wrong, however that is corrected. Yet it still doesn't work.

 

Here's the newest log.

 

  Reveal hidden contents

 

 

I hope this is alright. But here's a picture of the problem, in the picture is only a single slab placed. I can walk over it as a normal slab and everything seems to be fine, except the texture. This is just to illustrate my problem, if someone was a bit unaware :)

http://imgur.com/a/LISWv

Posted

Your blockstate file is missing a variant, "half=top,variant=false"

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.