Jump to content

Json model to big, how do i fix it?


Recommended Posts

I just made a json model of a 2x3x3 block, i tought you could do this becouse making it 1.5 blocks tall worked, i get this error:

 

Spoiler

[21:26:53] [Client thread/ERROR] [FML]: Could not load vanilla model parent 'walkingdeadmod:block/airdrop' for 'net.minecraft.client.renderer.block.model.ModelBlock@7acff702
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model walkingdeadmod:block/airdrop 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:498) [ModelLoader$VanillaModelWrapper.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:163) [ModelLoaderRegistry.class:?]
    at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:336) [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:156) [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:800) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:366) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.init(Minecraft.java:562) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:387) [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.JsonParseException: 'to' specifier exceeds the allowed boundaries: Vector3f[36.0, 2.0, 32.0]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.parsePositionTo(BlockPart.java:192) ~[BlockPart$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.deserialize(BlockPart.java:77) ~[BlockPart$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.BlockPart$Deserializer.deserialize(BlockPart.java:70) ~[BlockPart$Deserializer.class:?]
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[TreeTypeAdapter.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?]
    at com.google.gson.Gson.fromJson(Gson.java:868) ~[Gson.class:?]
    at com.google.gson.Gson$1.deserialize(Gson.java:126) ~[Gson$1.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.getModelElements(ModelBlock.java:315) ~[ModelBlock$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.deserialize(ModelBlock.java:248) ~[ModelBlock$Deserializer.class:?]
    at net.minecraft.client.renderer.block.model.ModelBlock$Deserializer.deserialize(ModelBlock.java:242) ~[ModelBlock$Deserializer.class:?]
    at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[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$1600(ModelLoader.java:126) ~[ModelLoader.class:?]
    at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:937) ~[ModelLoader$VanillaLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]

 

 

i know that it errors becouse the model is to big, is there a way to make it work with a bigger model?

package com.walkingdead.walkingdeadmod.blocks.lootblocks;

import java.util.ArrayList;
import java.util.List;

import com.walkingdead.walkingdeadmod.WalkingDeadMod;
import com.walkingdead.walkingdeadmod.weapons.ModTools;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;

public class Airdrop extends Block {
	
	
    public Airdrop(Material material, String name) {
        super(material);
        this.setUnlocalizedName(name);
        this.setCreativeTab(WalkingDeadMod.WalkingDead);
        this.setHardness(10F);
        this.setResistance(1000F);
        this.setSoundType(SoundType.GROUND);
        this.setBlockUnbreakable();
    }


    
    public boolean isFullCube(IBlockState state)
    {
        return false;
    }


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

 modclass

Link to comment
Share on other sites

JSON models with sizes that are bigger than 1 cube (16x16x16) already behave strange enough with incorrect UVs and bounding box issues. Solution: use custom IBakedModel(s)/make your block consist of multiple 1x1x1 'parts'

Here is a good example of the 'weirdness' I am talking about.

 

Link to comment
Share on other sites

If your block has a collision bounds greater than 1x1x1 you're in trouble there too: it won't work either.  Getting fences to work properly was a problem Mojang took several versions to get right.

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.

Link to comment
Share on other sites

57 minutes ago, Draco18s said:

If your block has a collision bounds greater than 1x1x1 you're in trouble there too: it won't work either.  Getting fences to work properly was a problem Mojang took several versions to get right.

What kind of trouble?

Link to comment
Share on other sites

Basically, you'll collide from some directions and not others and general wonkiness.  The only, the only, direction it is safe to extend a collision box outside the 1x1x1 cube is +Y and even then only an extra half-block.

  • Like 1

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.

Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Announcements



×
×
  • Create New...

Important Information

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