Jump to content

[1.8] Block Texture not appearing in world


FacelessTiger

Recommended Posts

Hello, I have been trying to make a custom furnace. But suddenly the texture stopped working in the world but continued to work in my hand. I have searched through the console about 1000 times and have found no console errors.

 

models.block.custom_furnace_active.json

{
    "textures": {
        "0": "mm:blocks/custom_furnace_front_active",
        "1": "mm:blocks/custom_furnace_side"
    },
    "elements": [
        {
            "name": "Cube",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

 

models.block.custom_furnace_idle.json

{
    "textures": {
        "0": "mm:blocks/custom_furnace_front_idle",
        "1": "mm:blocks/custom_furnace_side"
    },
    "elements": [
        {
            "name": "Cube",
            "from": [ 0.0, 0.0, 0.0 ], 
            "to": [ 16.0, 16.0, 16.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "east": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "south": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "west": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] },
                "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }
            }
        }
    ]
}

 

CustomFurnace.java

package com.facelesstiger.mod.blocks;

import java.util.Random;

import javax.swing.Icon;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.facelesstiger.mod.init.Blocks;

public class CustomFurnace extends BlockContainer {

private final boolean isActive;
private Icon iconFront;
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

public CustomFurnace(boolean isActive) {
	super(Material.rock);
	//this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
	this.isActive = isActive;
}

// IGNORE ICONS, USE JSON

public Item getItemDropped(IBlockState state, Random rand, int fortune) {
	return Item.getItemFromBlock(Blocks.custom_furnace_idle);
}

public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
	super.onBlockAdded(worldIn, pos, state);
	this.setDefaultDirection(worldIn, pos, state);
}

private void setDefaultDirection(World world, BlockPos pos, IBlockState state) {
	if(!world.isRemote) {
		Block block = world.getBlockState(pos.north()).getBlock();
            Block block1 = world.getBlockState(pos.south()).getBlock();
            Block block2 = world.getBlockState(pos.west()).getBlock();
            Block block3 = world.getBlockState(pos.east()).getBlock();
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

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

public TileEntity createNewTileEntity(World worldIn, int meta) {
	return new TileEntityCustomFurnace();
}

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()) {
		((TileEntityCustomFurnace)worldIn.getTileEntity(pos)).setGuiDisplayName(stack.getDisplayName());
	}
}

    public int getRenderType()
    {
        return 3;
    }
    
    protected BlockState createBlockState()
    {
    	return new BlockState(this, new IProperty[] {FACING});
    }
    
    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);
    }
    
    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

}

 

TileEntityCustomFurnace.java

package com.facelesstiger.mod.blocks;

import net.minecraft.tileentity.TileEntity;

public class TileEntityCustomFurnace extends TileEntity {

private String localizedName;

public void setGuiDisplayName(String displayName) {
	this.localizedName = displayName;
}

}

I don't know what I'm doing, but I'm doing it.

Link to comment
Share on other sites

Do not extend BlockContainer instead just override hasTileEntity(IBlockState state) and createTileEntity(IblockAccess world, IBlockState state.)

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

That seemed to make no difference, I might just be dumb and doing it wrong so I'll post the new code here.

 

package com.facelesstiger.mod.blocks;

import java.util.Random;

import javax.swing.Icon;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.facelesstiger.mod.init.Blocks;

public class CustomFurnace extends Block {

private final boolean isActive;
private Icon iconFront;
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

public CustomFurnace(boolean isActive) {
	super(Material.rock);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
	this.isActive = isActive;
}

// IGNORE ICONS, USE JSON

public Item getItemDropped(IBlockState state, Random rand, int fortune) {
	return Item.getItemFromBlock(Blocks.custom_furnace_idle);
}

public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
	super.onBlockAdded(worldIn, pos, state);
	this.setDefaultDirection(worldIn, pos, state);
}

private void setDefaultDirection(World world, BlockPos pos, IBlockState state) {
	if(!world.isRemote) {
		Block block = world.getBlockState(pos.north()).getBlock();
            Block block1 = world.getBlockState(pos.south()).getBlock();
            Block block2 = world.getBlockState(pos.west()).getBlock();
            Block block3 = world.getBlockState(pos.east()).getBlock();
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

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

public TileEntity createTileEntity(World world, IBlockState state) {
	return new TileEntityCustomFurnace();
}



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()) {
		((TileEntityCustomFurnace)worldIn.getTileEntity(pos)).setGuiDisplayName(stack.getDisplayName());
	}
}

    public int getRenderType()
    {
        return 3;
    }
    
    protected BlockState createBlockState()
    {
    	return new BlockState(this, new IProperty[] {FACING});
    }
    
    public boolean hasTileEntity()
    {
        return true;
    }
    
    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);
    }
    
    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

}

I don't know what I'm doing, but I'm doing it.

Link to comment
Share on other sites

Wrong method hasTileEntity(IBlockState state) not hasTileEntity()

Also remove getRenderType()

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

Ah, sorry I should of payed more attention to arguments you gave. But still it has the same effect.

 

package com.facelesstiger.mod.blocks;

import java.util.Random;

import javax.swing.Icon;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.facelesstiger.mod.init.Blocks;

public class CustomFurnace extends Block {

private final boolean isActive;
private Icon iconFront;
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

public CustomFurnace(boolean isActive) {
	super(Material.rock);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
	this.isActive = isActive;
}

// IGNORE ICONS, USE JSON

public Item getItemDropped(IBlockState state, Random rand, int fortune) {
	return Item.getItemFromBlock(Blocks.custom_furnace_idle);
}

public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
	super.onBlockAdded(worldIn, pos, state);
	this.setDefaultDirection(worldIn, pos, state);
}

private void setDefaultDirection(World world, BlockPos pos, IBlockState state) {
	if(!world.isRemote) {
		Block block = world.getBlockState(pos.north()).getBlock();
            Block block1 = world.getBlockState(pos.south()).getBlock();
            Block block2 = world.getBlockState(pos.west()).getBlock();
            Block block3 = world.getBlockState(pos.east()).getBlock();
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

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

public TileEntity createTileEntity(World world, IBlockState state) {
	return new TileEntityCustomFurnace();
}



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()) {
		((TileEntityCustomFurnace)worldIn.getTileEntity(pos)).setGuiDisplayName(stack.getDisplayName());
	}
}
    
    protected BlockState createBlockState()
    {
    	return new BlockState(this, new IProperty[] {FACING});
    }
    
    public boolean hasTileEntity(IBlockState state)
    {
        return true;
    }
    
    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);
    }
    
    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

}

I don't know what I'm doing, but I'm doing it.

Link to comment
Share on other sites

Ah, sorry I should of payed more attention to arguments you gave. But still it has the same effect.

 

package com.facelesstiger.mod.blocks;

import java.util.Random;

import javax.swing.Icon;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import com.facelesstiger.mod.init.Blocks;

public class CustomFurnace extends Block {

private final boolean isActive;
private Icon iconFront;
public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

public CustomFurnace(boolean isActive) {
	super(Material.rock);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
	this.isActive = isActive;
}

// IGNORE ICONS, USE JSON

public Item getItemDropped(IBlockState state, Random rand, int fortune) {
	return Item.getItemFromBlock(Blocks.custom_furnace_idle);
}

public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
	super.onBlockAdded(worldIn, pos, state);
	this.setDefaultDirection(worldIn, pos, state);
}

private void setDefaultDirection(World world, BlockPos pos, IBlockState state) {
	if(!world.isRemote) {
		Block block = world.getBlockState(pos.north()).getBlock();
            Block block1 = world.getBlockState(pos.south()).getBlock();
            Block block2 = world.getBlockState(pos.west()).getBlock();
            Block block3 = world.getBlockState(pos.east()).getBlock();
            EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

            if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
            {
                enumfacing = EnumFacing.SOUTH;
            }
            else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
            {
                enumfacing = EnumFacing.NORTH;
            }
            else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
            {
                enumfacing = EnumFacing.EAST;
            }
            else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
            {
                enumfacing = EnumFacing.WEST;
            }

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

public TileEntity createTileEntity(World world, IBlockState state) {
	return new TileEntityCustomFurnace();
}



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()) {
		((TileEntityCustomFurnace)worldIn.getTileEntity(pos)).setGuiDisplayName(stack.getDisplayName());
	}
}
    
    protected BlockState createBlockState()
    {
    	return new BlockState(this, new IProperty[] {FACING});
    }
    
    public boolean hasTileEntity(IBlockState state)
    {
        return true;
    }
    
    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);
    }
    
    public int getMetaFromState(IBlockState state)
    {
        return ((EnumFacing)state.getValue(FACING)).getIndex();
    }

}

createBlockState() doesn't return a BlockState it returns a BlockStateContainer, when  you are overriding something always put the @Override annotation it helps a lot.

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

57c759d57c48e.png

Woops didn't see the 1.8 sign... I was going off of 1.10.2... Where do you register the renders? Where is the blockstate JSON do you have 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.

Link to comment
Share on other sites

common mistake lol

 

The register renders are in my block class

package com.facelesstiger.mod.init;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

import com.facelesstiger.mod.MyMod;
import com.facelesstiger.mod.Reference;
import com.facelesstiger.mod.blocks.BlockTest;
import com.facelesstiger.mod.blocks.CustomFurnace;
import com.facelesstiger.mod.blocks.TileEntityCustomFurnace;

public class Blocks {

public static Block test_block;


public static Block custom_furnace_idle;
public static Block custom_furnace_active;

public static void init()
{
	test_block = new BlockTest(Material.cloth).setUnlocalizedName("test_block").setCreativeTab(MyMod.tab);
	custom_furnace_idle = new CustomFurnace(false).setUnlocalizedName("custom_furnace_idle").setCreativeTab(MyMod.tab).setHardness(3.5f);
	custom_furnace_active = new CustomFurnace(true).setUnlocalizedName("custom_furnace_active").setHardness(3.5f).setLightLevel(0.9f);
}

public static void register()
{
	GameRegistry.registerBlock(test_block, test_block.getUnlocalizedName().substring(5));	
	GameRegistry.registerBlock(custom_furnace_idle, custom_furnace_idle.getUnlocalizedName().substring(5));
	GameRegistry.registerBlock(custom_furnace_active, custom_furnace_active.getUnlocalizedName().substring(5));
	GameRegistry.registerTileEntity(TileEntityCustomFurnace.class, "tile_entity_custom_furnace");
}

public static void registerRenders() 
{
	registerRender(test_block);
	registerRender(custom_furnace_idle);
	registerRender(custom_furnace_active);
}

public static void registerRender(Block block)
{
	Item item = Item.getItemFromBlock(block);
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}

 

The blockstate JSON is src/main/resources/assets/mm/blockstates

 

{
    "variants": {
        "normal": {"model": "mm:custom_furnace_active"}
    }
}

 

both active and idle are the same except using a different model directory

I don't know what I'm doing, but I'm doing it.

Link to comment
Share on other sites

common mistake lol

 

The register renders are in my block class

package com.facelesstiger.mod.init;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

import com.facelesstiger.mod.MyMod;
import com.facelesstiger.mod.Reference;
import com.facelesstiger.mod.blocks.BlockTest;
import com.facelesstiger.mod.blocks.CustomFurnace;
import com.facelesstiger.mod.blocks.TileEntityCustomFurnace;

public class Blocks {

public static Block test_block;


public static Block custom_furnace_idle;
public static Block custom_furnace_active;

public static void init()
{
	test_block = new BlockTest(Material.cloth).setUnlocalizedName("test_block").setCreativeTab(MyMod.tab);
	custom_furnace_idle = new CustomFurnace(false).setUnlocalizedName("custom_furnace_idle").setCreativeTab(MyMod.tab).setHardness(3.5f);
	custom_furnace_active = new CustomFurnace(true).setUnlocalizedName("custom_furnace_active").setHardness(3.5f).setLightLevel(0.9f);
}

public static void register()
{
	GameRegistry.registerBlock(test_block, test_block.getUnlocalizedName().substring(5));	
	GameRegistry.registerBlock(custom_furnace_idle, custom_furnace_idle.getUnlocalizedName().substring(5));
	GameRegistry.registerBlock(custom_furnace_active, custom_furnace_active.getUnlocalizedName().substring(5));
	GameRegistry.registerTileEntity(TileEntityCustomFurnace.class, "tile_entity_custom_furnace");
}

public static void registerRenders() 
{
	registerRender(test_block);
	registerRender(custom_furnace_idle);
	registerRender(custom_furnace_active);
}

public static void registerRender(Block block)
{
	Item item = Item.getItemFromBlock(block);
	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
}
}

 

The blockstate JSON is src/main/resources/assets/mm/blockstates

 

{
    "variants": {
        "normal": {"model": "mm:custom_furnace_active"}
    }
}

 

both active and idle are the same except using a different model directory

Are you sure there is still no errors? The only thing I could think of is that you do not have the facing variants...

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

Ah, you're right. I thought that was just a don't worry about it console message, my bad. It's working now, thank you.

Post the solution was it the missing 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

Yeah, it was the missing variant. I was just using normal instead of

        "facing=north": { "model": "mm:custom_furnace_active" },
        "facing=south": { "model": "mm:custom_furnace_active", "y": 180 },
        "facing=west":  { "model": "mm:custom_furnace_active", "y": 270 },
        "facing=east":  { "model": "mm:custom_furnace_active", "y": 90 }

 

I don't know what I'm doing, but I'm doing it.

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.