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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • hola thanks for answering  i set some system outs to see what was happening and is a little weirder than i thought     @Override     protected void saveAdditional( CompoundTag nbt ){                  nbt.put("itemhandler", itemhandler.serializeNBT() );         nbt.putInt("progress", this.progress );         System.out.println("saveAdditional(nbt)");                 System.out.println(NbtUtils.prettyPrint(nbt)); //<-- this is whats getting saved         super.saveAdditional( nbt );     }     @Override     public void load( CompoundTag nbt ){         itemhandler.deserializeNBT( nbt.getCompound("itemhandler") );         this.progress = nbt.getInt("progress" );         System.out.println(NbtUtils.prettyPrint(nbt)); //<-- this is whats minecraft is giving back to the entity          System.out.println("load(nbt)");         super.load( nbt );     }   this dead adventurer body has two parts a block and the blockItem  both has their own itemhandlers and their own menus  *when i change some element inside the menu gui  it triguers the saveAdditional(nbt) system out whit a pretty print of the data beign saved  *when the world map loads it triguers the load(nbt) system out whit a pretty print of the data minecraft is gibing to this BlockEntity       ################ first i set the block entity (dead adventurer body like shaped) and put only a weath seed  in the slot 10 and i get this in the console soo its all right    close minecraft launch it again i see the system out whit the data returned to the entity and its look good theres is only a weed seed  ################ Second, now i gonna change the seed for two arrows  the console says its all right the two arrows are beign saved    now close and fireback again minecraft bam minecraft returns again the original data whit only a wheat seed the arrow data has been loss   try again now i gonna put 3 wheat seeds minecraft's system out says he gets it and save it    close fire again  data loss once more time  and it return just the original wheat seed    ####################################################################################### sorry for the long post and the crappy video  this is the reason why i say its saving the Block Entity data only when it feels like             
    • Yesterday I buy a minecraft server to play with my friends you know... One of my friends send me the list of mods to add and then i start to dowload them, when i add them to the server it start crashing but i don't know about this things because it's my first time buying a minecraft server This is the error: https://paste.ee/p/sJf7B
    • Discovering that a trusted colleague had accessed my Bitcoin account and transferred $30,000 worth of bitcoins was a devastating blow. It shattered the trust I had placed in them and left me feeling vulnerable and betrayed. However, in the face of adversity, I turned to MUYERN TRUST HACKER for assistance in reclaiming control over my finances and holding the perpetrators accountable for their actions. One of the standout features of MUYERN TRUST HACKER was its ability to provide real-time alerts and notifications, keeping me informed every step of the way. With the support of MUYERN TRUST HACKER, I was able to gather irrefutable evidence of the perpetrator's actions and hold them accountable for their crimes. Armed with the information provided by the platform, I pursued legal recourse and ensured that justice was served. The perpetrator faced severe consequences for their actions, including legal penalties and financial restitution. Beyond its role in facilitating the recovery process, MUYERN TRUST HACKER provided me with a sense of empowerment and resilience in the face of adversity. While the experience was undoubtedly challenging, it ultimately served as a testament to the importance of vigilance and the power of technology in safeguarding our digital assets. Thanks to MUYERN TRUST HACKER, I emerged stronger and more resilient, ready to face whatever challenges the future may hold. Mail; muyerntrusted[At] mail-me .c o m
    • Discovering that a trusted colleague had accessed my Bitcoin account and transferred $30,000 worth of bitcoins was a devastating blow. It shattered the trust I had placed in them and left me feeling vulnerable and betrayed. However, in the face of adversity, I turned to MUYERN TRUST HACKER web [ ht tps:// muyerntrusthack.solutions/ ] for assistance in reclaiming control over my finances and holding the perpetrators accountable for their actions. One of the standout features of MUYERN TRUST HACKER was its ability to provide real-time alerts and notifications, keeping me informed every step of the way. With the support of MUYERN TRUST HACKER, I was able to gather irrefutable evidence of the perpetrator's actions and hold them accountable for their crimes. Armed with the information provided by the platform, I pursued legal recourse and ensured that justice was served. The perpetrator faced severe consequences for their actions, including legal penalties and financial restitution. Beyond its role in facilitating the recovery process, MUYERN TRUST HACKER provided me with a sense of empowerment and resilience in the face of adversity. While the experience was undoubtedly challenging, it ultimately served as a testament to the importance of vigilance and the power of technology in safeguarding our digital assets. Thanks to MUYERN TRUST HACKER, I emerged stronger and more resilient, ready to face whatever challenges the future may hold. Mail; muyerntrusted[At] mail-me .c o m  
    • Do you have still this problem? (I have it too so I want to know if you did something with it)  
  • Topics

×
×
  • Create New...

Important Information

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