Jump to content

1.10.2 Partially transparent block, forge multilayer isn't working


Maideniles

Recommended Posts

I'm making a block that has some transparent parts on the front.  I tried using the BlockRenderLayer method for a transparent block, and it looked glitchy and awful. I did some digging and found that I can use a multi layer blockstates file to render the two separate pieces of my block. I have two block models, one with the regular solid layer, the other with the translucent layer that goes on the front.  When I load my game, I get the dreaded purple and black block that says I've goofed up somewhere. I went as far as to test each separate model in game by replacing an existing block model with each of the models in question. They both work, so I am stumped.  My Console does show errors that there was an exception loading the models into the file but it doesn't give any more specifics.  Can someone help me figure out where I've gone wrong?  Thanks.

 

Here is what I am working with:

 

blockstates file: 

{
    "forge_marker": 1,
    "defaults": {
        "model": "forge:multi-layer",
        "transform": "forge:default-block"
    },
    "variants": {
        "normal": [{
            "custom": {
                "base": "mff:backsplash_base#base",
                "Solid": "mff:backsplash_base#base",
                "Translucent": "mff:backsplash_bricks#trans"
            }
        }],
        "base": [{
            "model": "backsplash_base"
        }],
        "trans": [{
            "model": "backsplash_bricks"
        }]
    }
}



 

block model file for base: 

{
    "textures": {
        "0": "mff:blocks/white",
        "1": "mff:blocks/gemstone_glass",
        "2": "mff:blocks/pearl",
        "particle": "mff:blocks/gemstone_glass_tile"
    },
    "elements": [
        
                {
            "name": "grout1",
            "from": [ 15.0, 15.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }
            }
        },
        {
            "name": "grout 4",
            "from": [ 15.0, 11.0, 0.0 ], 
            "to": [ 16.0, 12.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }
            }
        },
        {
            "name": "grout 7",
            "from": [ 15.0, 7.0, 0.0 ], 
            "to": [ 16.0, 8.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }
            }
        },
        {
            "name": "grout 10",
            "from": [ 15.0, 3.0, 0.0 ], 
            "to": [ 16.0, 4.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 1.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 12.0, 0.0 ], 
            "to": [ 16.0, 15.0, 1.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 12.0, 8.0 ], 
            "to": [ 16.0, 15.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 8.0, 12.0 ], 
            "to": [ 16.0, 11.0, 13.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 8.0, 4.0 ], 
            "to": [ 16.0, 11.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 4.0, 0.0 ], 
            "to": [ 16.0, 7.0, 1.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 4.0, 8.0 ], 
            "to": [ 16.0, 7.0, 9.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 0.0, 12.0 ], 
            "to": [ 16.0, 3.0, 13.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        {
            "name": "Cube",
            "from": [ 15.0, 0.0, 4.0 ], 
            "to": [ 16.0, 3.0, 5.0 ], 
            "faces": {
                "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "south": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] },
                "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }
            }
        },
        
        {
            "name": "base",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 15.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 15.0, 16.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 15.0, 16.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 15.0, 16.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 15.0, 16.0 ] }
            }
        }
    ]
}

 

block model file for front (transparent) part:

{
    "textures": {
        
        "0": "mff:blocks/gemstone_glass",
        
        "particle": "mff:blocks/gemstone_glass_tile"
    },
    "elements": [
        
        {
            "name": "brick 1",
            "from": [ 15.0, 12.0, 9.0 ], 
            "to": [ 16.0, 15.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 2",
            "from": [ 15.0, 12.0, 1.0 ], 
            "to": [ 16.0, 15.0, 8.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 3",
            "from": [ 15.0, 8.0, 13.0 ], 
            "to": [ 16.0, 11.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }
            }
        },
        {
            "name": "brick 4",
            "from": [ 15.0, 8.0, 5.0 ], 
            "to": [ 16.0, 11.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 5",
            "from": [ 15.0, 8.0, 0.0 ], 
            "to": [ 16.0, 11.0, 4.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }
            }
        },
        {
            "name": "brick 6",
            "from": [ 15.0, 4.0, 9.0 ], 
            "to": [ 16.0, 7.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 7",
            "from": [ 15.0, 4.0, 1.0 ], 
            "to": [ 16.0, 7.0, 8.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 8",
            "from": [ 15.0, 0.0, 13.0 ], 
            "to": [ 16.0, 3.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] }
            }
        },
        {
            "name": "brick 9",
            "from": [ 15.0, 0.0, 5.0 ], 
            "to": [ 16.0, 3.0, 12.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }
            }
        },
        {
            "name": "brick 10",
            "from": [ 15.0, 0.0, 0.0 ], 
            "to": [ 16.0, 3.0, 4.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] },
                "down": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }
            }
            
        }
        
    ]
}


 

and lastly, the block class file:

package maideniles.fancyfurnishings.blocks;

import maideniles.fancyfurnishings.Reference;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBreakable;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class BlockBacksplash extends BlockFurnishing {
    
    
    
    public BlockBacksplash(String unlocalizedName, String registryName){
    super(Material.GLASS);
    this.setUnlocalizedName(unlocalizedName);
    this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
    }
    
    
     
     @Override
        public boolean canRenderInLayer(IBlockState state, BlockRenderLayer layer)
        {
        return layer == BlockRenderLayer.TRANSLUCENT || layer == BlockRenderLayer.SOLID;
        }
}

 

Link to comment
Share on other sites

Instead of attaching the entire log, here is the snippet which applies:

[Client thread/ERROR] [FML/]: Couldn't load MultiLayerModel dependency: mff:backsplash_base#base
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model mff:backsplash_base#base with loader VariantLoader.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.MultiLayerModel.buildModels(MultiLayerModel.java:82) [MultiLayerModel.class:?]
    at net.minecraftforge.client.model.MultiLayerModel.bake(MultiLayerModel.java:93) [MultiLayerModel.class:?]
    at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:809) [ModelLoader$WeightedRandomModel.class:?]
    at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:193) [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:799) [Minecraft.class:?]
    at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:350) [FMLClientHandler.class:?]
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [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_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
    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_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
    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:1195) ~[ModelLoader$VariantLoader.class:?]
    at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
    ... 25 more
 

 

Link to comment
Share on other sites

You will need to post more. Use Pastebin

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

That contains no errors.

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

Caused by: java.io.FileNotFoundException: mff:models/block/absynthium_slab_top.json

Caused by: java.io.FileNotFoundException: mff:models/block/shelving_white.json

Caused by: java.io.FileNotFoundException: mff:models/item/shelf_deco1.json

And three or so MissingVariantException for the lamp1

 

I don't see an error related to the backsplash_base.

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

2 hours ago, Maideniles said:

Bump...

If there is more than one error in the log, could you please remove all the other error causing items/blocks besides the one you want us to debug. It honestly makes the log hell to go through. But I believe what you need to do is in your blockstate the model paths need block/ in front of them.

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.

Link to comment
Share on other sites

Hi, sorry it took so long to get this.  I went back and fixed a bunch of the other errors from the blocks I left unfinished last year.  The log is much shorter now and I had a much easier time finding all the errors related to this particular block. So, here you go...

[22:37:37] [Client thread/ERROR] [FML]: Exception loading model for variant mff:backsplash_bricks#trans
java.lang.Exception: Could not load model definition for variant mff:backsplash_bricks#trans
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:285) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1192) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModelOrLogError(ModelLoaderRegistry.java:203) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.MultiLayerModel.buildModels(MultiLayerModel.java:82) ~[MultiLayerModel.class:?]
	at net.minecraftforge.client.model.MultiLayerModel.bake(MultiLayerModel.java:93) ~[MultiLayerModel.class:?]
	at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:809) ~[ModelLoader$WeightedRandomModel.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:193) ~[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:799) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.processKeyF3(Minecraft.java:2146) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2002) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	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_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	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 mff:blockstates/backsplash_bricks.json
	at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
	... 29 more
Caused by: java.io.FileNotFoundException: mff:blockstates/backsplash_bricks.json
	at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[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:198) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
	... 29 more
[22:37:37] [Client thread/ERROR] [FML]: Exception loading model for variant mff:backsplash_base#base
java.lang.Exception: Could not load model definition for variant mff:backsplash_base#base
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:285) ~[ModelLoader.class:?]
	at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1192) ~[ModelLoader$VariantLoader.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.ModelLoaderRegistry.getModelOrLogError(ModelLoaderRegistry.java:203) ~[ModelLoaderRegistry.class:?]
	at net.minecraftforge.client.model.MultiLayerModel.buildModels(MultiLayerModel.java:82) ~[MultiLayerModel.class:?]
	at net.minecraftforge.client.model.MultiLayerModel.bake(MultiLayerModel.java:93) ~[MultiLayerModel.class:?]
	at net.minecraftforge.client.model.ModelLoader$WeightedRandomModel.bake(ModelLoader.java:809) ~[ModelLoader$WeightedRandomModel.class:?]
	at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:193) ~[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:799) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.processKeyF3(Minecraft.java:2146) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2002) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1846) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1118) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:406) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	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_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_151]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_151]
	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 mff:blockstates/backsplash_base.json
	at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:205) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
	... 29 more
Caused by: java.io.FileNotFoundException: mff:blockstates/backsplash_base.json
	at net.minecraft.client.resources.FallbackResourceManager.getAllResources(FallbackResourceManager.java:103) ~[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:198) ~[ModelBakery.class:?]
	at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:185) ~[ModelBakery.class:?]
	at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?]
	... 29 more

 

Link to comment
Share on other sites

14 minutes ago, Maideniles said:

Hi, sorry it took so long to get this.  I went back and fixed a bunch of the other errors from the blocks I left unfinished last year.  The log is much shorter now and I had a much easier time finding all the errors related to this particular block. So, here you go...

No, problem and thank you for cleaning it up. The problem seems to be that the custom json object in your blockstate json refers to other blockstate files and then a variant in those files. Do you have a backsplash_bricks blockstate json that has a trans variable. And a backsplash_base blockstate json that has a base variant?

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.

Link to comment
Share on other sites

I don't... there is only one blockstates file for this one, and I did a thorough search through my entire folder to make sure that there is only one blockstates file that refers to the backsplash_bricks and backsplash_base models. Am I supposed to have a blockstate for each of those models? Or do I need to put something in the models that will connect with the blockstate?  I'm not fantastic with Java, what I know I have learned from trial and error, tutorials and just looking through github and the minecraft block classes to figure stuff out...so I'm still kind of a noob at this. 

 

As I was looking through the log from before I noticed there was reference to the blockstate not being able to find the variants for facing in the different directions.  I went back and instead of having this block extend the blockfurnishing (its the base block I use that contains the methods for facing, and connecting to eachother, etc), I changed it to just extend Block. Did that mess it up even further? I hope I didn't.  I'm half tempted to delete the whole thing from the mod and start the block from scratch...?

Link to comment
Share on other sites

Post the blockstate file you do have

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

9 hours ago, Maideniles said:

I don't... there is only one blockstates file for this one

Then why are you referencing other blockstate jsons? 

 

On 7/22/2018 at 1:43 PM, Maideniles said:

"custom": {                 "base": "mff:backsplash_base#base",                 "Solid": "mff:backsplash_base#base",                 "Translucent": "mff:backsplash_bricks#trans"             }

 

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.

Link to comment
Share on other sites

On 7/22/2018 at 4:43 PM, Maideniles said:

        "normal": [{
            "custom": {
                "base": "mff:backsplash_base#base",
                "Solid": "mff:backsplash_base#base",
                "Translucent": "mff:backsplash_bricks#trans"
            }
        }],

That is not the correct way to specify variants.

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

42 minutes ago, Draco18s said:

Post the blockstate file you do have

{
    "forge_marker": 1,
    "defaults": {
        "model": "forge:multi-layer",
        "transform": "forge:default-block"
    },
    "variants": {
        "normal": [{
            "custom": {
                "base": "mff:backsplash_base#base",
                "Solid": "mff:backsplash_base#base",
                "Translucent": "mff:backsplash_bricks#trans"
            }
        }],
        "base": [{
            "model": "mff:backsplash_base"
        }],
        "trans": [{
            "model": "mff:backsplash_bricks"
        }]
    }
}

 

Link to comment
Share on other sites

37 minutes ago, Draco18s said:

That is not the correct way to specify variants.

I'm sorry, this is my first time doing something complicated ike this with json files. I know how to do facing and block connecting and changing the block faces depending on the state. I didn't even know that multi-layering is possible until I read those forum posts about it.  I was just following what I saw since they had the same problem, and they managed to get it working with the suggestions and corrections given to them.   I have tried putting mff:block/backsplash_base, and mff:block/backsplash_bricks to point to the models that I made for it. It still didn't work.  :(

Link to comment
Share on other sites

41 minutes ago, Animefan8888 said:

Then why are you referencing other blockstate jsons? 

 

 

So you are saying that my code isn't telling it that the variants are the models, rather, it is referencing other (nonexistent) blockstates?  I'm sorry if I sound like a dunce here, like I said, I'm still learning.  If that is the case, do you have a suggestion that would help it point to the models instead? 

Link to comment
Share on other sites

1 minute ago, Maideniles said:

So you are saying that my code isn't telling it that the variants are the models, rather, it is referencing other (nonexistent) blockstates?  I'm sorry if I sound like a dunce here, like I said, I'm still learning.  If that is the case, do you have a suggestion that would help it point to the models instead? 

Instead of backsplash_base and backsplash_bricks put the name of your blockstate file.

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.

Link to comment
Share on other sites

13 minutes ago, Maideniles said:

I didn't even know that multi-layering is possible until I read those forum posts about it

That has no bearing here. You've literally stuffed things inside an object that has no relevance.

 

      "variants": {         //lets define variants!
        "foo": [{           //this is a variant type named "foo"
            "bar": { ... }  //this is the variant value named "bar" with some model overrides
        }],
        "facing": [{           //this is a variant type named "facing"
            "north": { ... },  //this is the variant value named "north" with some model overrides
            //other values (south, east, west, up, down...)
        }],
        "normal": [{        //this is a variant type named "normal"
            "custom": {     //this is the variant value named "custom"
                "base": "mff:backsplash_base#base",    //override the model property named "base" to have the value "mff:backsplash_base#base"
                "Solid": "mff:backsplash_base#base",
                "Translucent": "mff:backsplash_bricks#trans"
            }
        }],

I am almost certain that that is not what you want.

1 minute ago, Maideniles said:

Sorry if this is a dumb question, but does each model file need it's own blockstate? Is that what I'm missing?

No.

 

Each block needs its own blockstate file. Models are not relevant here.

Edited by Draco18s

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.