Jump to content

[1.8] Model doesn't change with block state


TheRedMezek

Recommended Posts

I have a furnace-like block that is supposed to change its model depending on whether or not it's cooking something. However, even when I explicitly and repeatedly tell the game to put the block state to true, as opposed  to the default of false, it only ever shows the model for false. There are no errors, no crashes. I am at my wit's end.

 

Block class

 

public class CookingBrazier extends BlockContainer {

    private String name = "cookingbrazier";

    private boolean isBurning = false;

    private static boolean keepInventory;

    public static final PropertyBool ISBURNING = PropertyBool.create("active");

 

    public boolean isOpaqueCube(){

        return false;

    }

    public boolean isFullCube()

    {

        return false;

    }

 

    @SideOnly(Side.CLIENT)

    public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)

    {

        if(this.isBurning) {

            double d0 = (double) pos.getX() + 0.5D;

            double d1 = (double) pos.getY() + 0.4D;

            double d2 = (double) pos.getZ() + 0.5D;

 

            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);

        }

    }

 

    @Override

    public int getRenderType() {

        return 3;

    }

 

    public String getName(){

        return name;

    }

 

    public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {

        setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1F, 0.9F);

    }

 

    public CookingBrazier(boolean isBurning){

        super(Material.rock);

        this.isBurning = false;

        this.setDefaultState(this.blockState.getBaseState());//.withProperty(ISBURNING, Boolean.valueOf(false)));

        this.setCreativeTab(CreativeTabs.tabDecorations);

        this.setUnlocalizedName("braziermod" + "_" + name);

        this.setHardness(0.8f);

        this.setLightLevel(.96f);

        GameRegistry.registerBlock(this, name);

    }

 

    public TileEntity createNewTileEntity(World worldIn, int meta)

    {

        return new TileEntityCookingBrazier();

    }

 

    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)

    {

        if (worldIn.isRemote)

        {

            return true;

        }

        else

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityCookingBrazier)

            {

                playerIn.displayGUIChest((TileEntityCookingBrazier)tileentity);

            }

 

            return true;

        }

    }

 

    public void breakBlock(World worldIn, BlockPos pos, IBlockState state)

    {

        if (!keepInventory)

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityFurnace)

            {

                InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity);

                worldIn.updateComparatorOutputLevel(pos, this);

            }

        }

 

        super.breakBlock(worldIn, pos, state);

    }

 

    public void setIsburning(boolean active){

        isBurning = active;

    }

 

    public static void setState(boolean active, World worldIn, BlockPos pos){

        TileEntity tileentity = worldIn.getTileEntity(pos);

 

        if(active){

            //worldIn.setBlockState(pos, );

            //setIsburning(true);

            worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(true)));

        }else{

            worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

            //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

        }

 

        if (tileentity != null)

        {

            tileentity.validate();

            worldIn.setTileEntity(pos, tileentity);

        }

    }

 

    //public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)

    //{

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false));

    //}

 

    protected BlockState createBlockState()

    {

        return new BlockState(this, new IProperty[] {ISBURNING});

    }

 

    public IBlockState getStateFromMeta(int meta)

    {

        return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(isBurning));

    }

 

    public int getMetaFromState(IBlockState state)

    {

        return 0;

    }

 

    //public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)

    //{

        //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

    //}

 

    //public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)

    //{

        //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

    //}

}

 

 

Tile entity

 

public class TileEntityCookingBrazier extends TileEntityLockable implements IUpdatePlayerListBox, ISidedInventory

{

    private static final int[] slotsTop = new int[] {0};

    private static final int[] slotsBottom = new int[] {2, 1};

    private static final int[] slotsSides = new int[] {1};

    /** The ItemStacks that hold the items currently being used in the furnace */

    private ItemStack[] furnaceItemStacks = new ItemStack[3];

    /** The number of ticks that the furnace will keep burning */

    private int furnaceBurnTime;

    /** The number of ticks that a fresh copy of the currently-burning item would keep the furnace burning for */

    private int currentItemBurnTime;

    private int cookTime;

    private int totalCookTime;

    private String furnaceCustomName;

    private static final String __OBFID = "CL_00000357";

 

    /**

    * Returns the number of slots in the inventory.

    */

    public int getSizeInventory()

    {

        return this.furnaceItemStacks.length;

    }

 

    public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)

    {

        return (oldState.getBlock() != newSate.getBlock());

    }

 

    /**

    * Returns the stack in slot i

    */

    public ItemStack getStackInSlot(int index)

    {

        return this.furnaceItemStacks[index];

    }

 

    /**

    * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a

    * new stack.

    */

    public ItemStack decrStackSize(int index, int count)

    {

        if (this.furnaceItemStacks[index] != null)

        {

            ItemStack itemstack;

 

            if (this.furnaceItemStacks[index].stackSize <= count)

            {

                itemstack = this.furnaceItemStacks[index];

                this.furnaceItemStacks[index] = null;

                return itemstack;

            }

            else

            {

                itemstack = this.furnaceItemStacks[index].splitStack(count);

 

                if (this.furnaceItemStacks[index].stackSize == 0)

                {

                    this.furnaceItemStacks[index] = null;

                }

 

                return itemstack;

            }

        }

        else

        {

            return null;

        }

    }

 

    /**

    * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -

    * like when you close a workbench GUI.

    */

    public ItemStack getStackInSlotOnClosing(int index)

    {

        if (this.furnaceItemStacks[index] != null)

        {

            ItemStack itemstack = this.furnaceItemStacks[index];

            this.furnaceItemStacks[index] = null;

            return itemstack;

        }

        else

        {

            return null;

        }

    }

 

    /**

    * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).

    */

    public void setInventorySlotContents(int index, ItemStack stack)

    {

        boolean flag = stack != null && stack.isItemEqual(this.furnaceItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.furnaceItemStacks[index]);

        this.furnaceItemStacks[index] = stack;

 

        if (stack != null && stack.stackSize > this.getInventoryStackLimit())

        {

            stack.stackSize = this.getInventoryStackLimit();

        }

 

        if (index == 0 && !flag)

        {

            this.totalCookTime = this.func_174904_a(stack);

            this.cookTime = 0;

            this.markDirty();

        }

    }

 

    /**

    * Gets the name of this command sender (usually username, but possibly "Rcon")

    */

    public String getName()

    {

        return this.hasCustomName() ? this.furnaceCustomName : "Cooking Brazier";

    }

 

    /**

    * Returns true if this thing is named

    */

    public boolean hasCustomName()

    {

        return this.furnaceCustomName != null && this.furnaceCustomName.length() > 0;

    }

 

    public void setCustomInventoryName(String p_145951_1_)

    {

        this.furnaceCustomName = p_145951_1_;

    }

 

    public void readFromNBT(NBTTagCompound compound)

    {

        super.readFromNBT(compound);

        NBTTagList nbttaglist = compound.getTagList("Items", 10);

        this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

 

        for (int i = 0; i < nbttaglist.tagCount(); ++i)

        {

            NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);

            byte b0 = nbttagcompound1.getByte("Slot");

 

            if (b0 >= 0 && b0 < this.furnaceItemStacks.length)

            {

                this.furnaceItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);

            }

        }

 

        this.furnaceBurnTime = compound.getShort("BurnTime");

        this.cookTime = compound.getShort("CookTime");

        this.totalCookTime = compound.getShort("CookTimeTotal");

        this.currentItemBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

 

        if (compound.hasKey("CustomName", 8))

        {

            this.furnaceCustomName = compound.getString("CustomName");

        }

    }

 

    public void writeToNBT(NBTTagCompound compound)

    {

        super.writeToNBT(compound);

        compound.setShort("BurnTime", (short)this.furnaceBurnTime);

        compound.setShort("CookTime", (short)this.cookTime);

        compound.setShort("CookTimeTotal", (short)this.totalCookTime);

        NBTTagList nbttaglist = new NBTTagList();

 

        for (int i = 0; i < this.furnaceItemStacks.length; ++i)

        {

            if (this.furnaceItemStacks != null)

            {

                NBTTagCompound nbttagcompound1 = new NBTTagCompound();

                nbttagcompound1.setByte("Slot", (byte)i);

                this.furnaceItemStacks.writeToNBT(nbttagcompound1);

                nbttaglist.appendTag(nbttagcompound1);

            }

        }

 

        compound.setTag("Items", nbttaglist);

 

        if (this.hasCustomName())

        {

            compound.setString("CustomName", this.furnaceCustomName);

        }

    }

 

    /**

    * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't

    * this more of a set than a get?*

    */

    public int getInventoryStackLimit()

    {

        return 64;

    }

 

    /**

    * Furnace isBurning

    */

    public boolean isBurning()

    {

        return this.furnaceBurnTime > 0;

    }

 

    @SideOnly(Side.CLIENT)

    public static boolean isBurning(IInventory p_174903_0_)

    {

        return p_174903_0_.getField(0) > 0;

    }

 

    /**

    * Updates the JList with a new model.

    */

    public void update()

    {

        boolean flag = this.isBurning();

        boolean flag1 = false;

 

 

        if (this.isBurning())

        {

            --this.furnaceBurnTime;

        }

 

        if (!this.worldObj.isRemote)

        {

            if (!this.isBurning() && (this.furnaceItemStacks[1] == null || this.furnaceItemStacks[0] == null))

            {

                if (!this.isBurning() && this.cookTime > 0)

                {

                    this.cookTime = MathHelper.clamp_int(this.cookTime - 2, 0, this.totalCookTime);

                }

            }

            else

            {

                if (!this.isBurning() && this.canSmelt())

                {

                    this.currentItemBurnTime = this.furnaceBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

 

                    if (this.isBurning())

                    {

                        flag1 = true;

 

                        if (this.furnaceItemStacks[1] != null)

                        {

                            --this.furnaceItemStacks[1].stackSize;

 

                            if (this.furnaceItemStacks[1].stackSize == 0)

                            {

                                this.furnaceItemStacks[1] = furnaceItemStacks[1].getItem().getContainerItem(furnaceItemStacks[1]);

                            }

                        }

                    }

                }

 

                if (this.isBurning() && this.canSmelt())

                {

                    ++this.cookTime;

 

                    if (this.cookTime == this.totalCookTime)

                    {

                        this.cookTime = 0;

                        this.totalCookTime = this.func_174904_a(this.furnaceItemStacks[0]);

                        this.smeltItem();

                        flag1 = true;

                    }

                }

                else

                {

                    this.cookTime = 0;

                }

            }

 

            if (flag != this.isBurning())

            {

                flag1 = true;

                //CookingBrazier.setState(this.isBurning(), this.worldObj, this.pos);

                IBlockState iblockstate = this.worldObj.getBlockState(this.getPos());

                iblockstate = iblockstate.withProperty(CookingBrazier.ISBURNING, Boolean.valueOf(true));

                this.worldObj.setBlockState(this.pos, iblockstate, 2);

            }

 

        }

 

        if (flag1)

        {

            this.markDirty();

        }

    }

 

    public int func_174904_a(ItemStack p_174904_1_)

    {

        return 200;

    }

 

    /**

    * Returns true if the furnace can smelt an item, i.e. has a source item, destination stack isn't full, etc.

    */

    private boolean canSmelt()

    {

        if (this.furnaceItemStacks[0] == null)

        {

            return false;

        }

        else

        {

            ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks[0]);

            if (itemstack == null) return false;

            if (this.furnaceItemStacks[2] == null) return true;

            if (!this.furnaceItemStacks[2].isItemEqual(itemstack)) return false;

            int result = furnaceItemStacks[2].stackSize + itemstack.stackSize;

            return result <= getInventoryStackLimit() && result <= this.furnaceItemStacks[2].getMaxStackSize(); //Forge BugFix: Make it respect stack sizes properly.

        }

    }

 

    /**

    * Turn one item from the furnace source stack into the appropriate smelted item in the furnace result stack

    */

    public void smeltItem()

    {

        if (this.canSmelt())

        {

            ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks[0]);

 

            if (this.furnaceItemStacks[2] == null)

            {

                this.furnaceItemStacks[2] = itemstack.copy();

            }

            else if (this.furnaceItemStacks[2].getItem() == itemstack.getItem())

            {

                this.furnaceItemStacks[2].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items

            }

 

            if (this.furnaceItemStacks[0].getItem() == Item.getItemFromBlock(Blocks.sponge) && this.furnaceItemStacks[0].getMetadata() == 1 && this.furnaceItemStacks[1] != null && this.furnaceItemStacks[1].getItem() == Items.bucket)

            {

                this.furnaceItemStacks[1] = new ItemStack(Items.water_bucket);

            }

 

            --this.furnaceItemStacks[0].stackSize;

 

            if (this.furnaceItemStacks[0].stackSize <= 0)

            {

                this.furnaceItemStacks[0] = null;

            }

        }

    }

 

    /**

    * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't

    * fuel

    */

    public static int getItemBurnTime(ItemStack p_145952_0_)

    {

        if (p_145952_0_ == null)

        {

            return 0;

        }

        else

        {

            Item item = p_145952_0_.getItem();

 

            if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air)

            {

                Block block = Block.getBlockFromItem(item);

 

                if (block == Blocks.wooden_slab)

                {

                    return 150;

                }

 

                if (block.getMaterial() == Material.wood)

                {

                    return 300;

                }

 

                if (block == Blocks.coal_block)

                {

                    return 16000;

                }

            }

 

            if (item instanceof ItemTool && ((ItemTool)item).getToolMaterialName().equals("WOOD")) return 200;

            if (item instanceof ItemSword && ((ItemSword)item).getToolMaterialName().equals("WOOD")) return 200;

            if (item instanceof ItemHoe && ((ItemHoe)item).getMaterialName().equals("WOOD")) return 200;

            if (item == Items.stick) return 100;

            if (item == Items.coal) return 1600;

            if (item == Items.lava_bucket) return 20000;

            if (item == Item.getItemFromBlock(Blocks.sapling)) return 100;

            if (item == Items.blaze_rod) return 2400;

            return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_);

        }

    }

 

    public static boolean isItemFuel(ItemStack p_145954_0_)

    {

        /**

        * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't

        * fuel

        */

        return getItemBurnTime(p_145954_0_) > 0;

    }

 

    /**

    * Do not make give this method the name canInteractWith because it clashes with Container

    */

    public boolean isUseableByPlayer(EntityPlayer player)

    {

        return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;

    }

 

    public void openInventory(EntityPlayer player) {}

 

    public void closeInventory(EntityPlayer player) {}

 

    /**

    * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.

    */

    public boolean isItemValidForSlot(int index, ItemStack stack)

    {

        return index == 2 ? false : (index != 1 ? true : isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack));

    }

 

    public int[] getSlotsForFace(EnumFacing side)

    {

        return side == EnumFacing.DOWN ? slotsBottom : (side == EnumFacing.UP ? slotsTop : slotsSides);

    }

 

    /**

    * Returns true if automation can insert the given item in the given slot from the given side. Args: slot, item,

    * side

    */

    public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction)

    {

        return this.isItemValidForSlot(index, itemStackIn);

    }

 

    /**

    * Returns true if automation can extract the given item in the given slot from the given side. Args: slot, item,

    * side

    */

    public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction)

    {

        if (direction == EnumFacing.DOWN && index == 1)

        {

            Item item = stack.getItem();

 

            if (item != Items.water_bucket && item != Items.bucket)

            {

                return false;

            }

        }

 

        return true;

    }

 

    public String getGuiID()

    {

        return "minecraft:furnace";

    }

 

    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)

    {

        return new ContainerCookingBrazier(playerInventory, this);

    }

 

    public int getField(int id)

    {

        switch (id)

        {

            case 0:

                return this.furnaceBurnTime;

            case 1:

                return this.currentItemBurnTime;

            case 2:

                return this.cookTime;

            case 3:

                return this.totalCookTime;

            default:

                return 0;

        }

    }

 

    public void setField(int id, int value)

    {

        switch (id)

        {

            case 0:

                this.furnaceBurnTime = value;

                break;

            case 1:

                this.currentItemBurnTime = value;

                break;

            case 2:

                this.cookTime = value;

                break;

            case 3:

                this.totalCookTime = value;

        }

    }

 

    public int getFieldCount()

    {

        return 4;

    }

 

    public void clear()

    {

        for (int i = 0; i < this.furnaceItemStacks.length; ++i)

        {

            this.furnaceItemStacks = null;

        }

    }

}

 

 

Blockstates json

 

{

  "variants": {

    "active=false": { "model": "braziermod:raisedbrazier" },

    "active=true": { "model": "braziermod:bigbrazier" }

  }

}

 

Link to comment
Share on other sites

Hi

 

You might get some clues from looking at this tutorial project, which has a custom furnace which changes its model.  See MBE31.

https://github.com/TheGreyGhost/MinecraftByExample

 

If that doesn't help, let us know?

 

-TGG

 

Thank you for the resource (I wish I had thought to look up a tutorial earlier), but unfortunately it has not helped. What I see different there is that the blockstate isn't actually set anywhere, but instead there's the getActualState function in the block and the tile entity sets the bock for a forced update instead of setting its state.

 

Current block class

 

public class CookingBrazier extends BlockContainer {

    private String name = "cookingbrazier";

    private boolean isBurning = false;

    private static boolean keepInventory;

    public static final PropertyBool ISBURNING = PropertyBool.create("active");

 

    public boolean isOpaqueCube(){

        return false;

    }

    public boolean isFullCube()

    {

        return false;

    }

 

    @SideOnly(Side.CLIENT)

    public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)

    {

        if(this.isBurning) {

            double d0 = (double) pos.getX() + 0.5D;

            double d1 = (double) pos.getY() + 0.4D;

            double d2 = (double) pos.getZ() + 0.5D;

 

            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);

        }

    }

 

    @Override

    public int getRenderType() {

        return 3;

    }

 

    public String getName(){

        return name;

    }

 

    public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {

        setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1F, 0.9F);

    }

 

    public CookingBrazier(boolean isBurning){

        super(Material.rock);

        this.isBurning = false;

        //this.setDefaultState(this.blockState.getBaseState().withProperty(ISBURNING, true));

        this.setCreativeTab(CreativeTabs.tabDecorations);

        this.setUnlocalizedName("braziermod" + "_" + name);

        this.setHardness(0.8f);

        this.setLightLevel(.96f);

        GameRegistry.registerBlock(this, name);

    }

 

    public TileEntity createNewTileEntity(World worldIn, int meta)

    {

        return new TileEntityCookingBrazier();

    }

 

    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)

    {

        if (worldIn.isRemote)

        {

            return true;

        }

        else

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityCookingBrazier)

            {

                playerIn.displayGUIChest((TileEntityCookingBrazier)tileentity);

            }

 

            return true;

        }

    }

 

    public void breakBlock(World worldIn, BlockPos pos, IBlockState state)

    {

        if (!keepInventory)

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityFurnace)

            {

                InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity);

                worldIn.updateComparatorOutputLevel(pos, this);

            }

        }

 

        super.breakBlock(worldIn, pos, state);

    }

 

    public void setIsburning(boolean active){

        isBurning = active;

    }

 

    public static void setState(boolean active, World worldIn, BlockPos pos){

        TileEntity tileentity = worldIn.getTileEntity(pos);

 

        if(active){

            //worldIn.setBlockState(pos, );

            //setIsburning(true);

            //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(true)));

        }else{

            //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

            //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

        }

 

        if (tileentity != null)

        {

            tileentity.validate();

            worldIn.setTileEntity(pos, tileentity);

        }

    }

 

    //public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)

    //{

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false));

    //}

 

    public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)

    {

        TileEntity tileEntity = worldIn.getTileEntity(pos);

        if (tileEntity instanceof TileEntityCookingBrazier) {

            TileEntityCookingBrazier tileInventoryFurnace = (TileEntityCookingBrazier)tileEntity;

            boolean burningSlots = tileInventoryFurnace.isBurning();

            //burningSlots = MathHelper.clamp_int(burningSlots, 0, 4);

            return getDefaultState().withProperty(ISBURNING, burningSlots);

        }

        return state;

    }

 

    protected BlockState createBlockState()

    {

        return new BlockState(this, new IProperty[] {ISBURNING});

    }

 

    public IBlockState getStateFromMeta(int meta)

    {

        return this.getDefaultState();

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(isBurning));

    }

 

    public int getMetaFromState(IBlockState state)

    {

        return 0;

    }

 

    //public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)

    //{

        //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

    //}

 

    //public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)

    //{

        //worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false)));

    //}

}

 

 

Current tile entity

 

public class TileEntityCookingBrazier extends TileEntityLockable implements IUpdatePlayerListBox, ISidedInventory

{

    private static final int[] slotsTop = new int[] {0};

    private static final int[] slotsBottom = new int[] {2, 1};

    private static final int[] slotsSides = new int[] {1};

    /** The ItemStacks that hold the items currently being used in the furnace */

    private ItemStack[] furnaceItemStacks = new ItemStack[3];

    /** The number of ticks that the furnace will keep burning */

    private int furnaceBurnTime;

    /** The number of ticks that a fresh copy of the currently-burning item would keep the furnace burning for */

    private int currentItemBurnTime;

    private int cookTime;

    private int totalCookTime;

    private String furnaceCustomName;

    private static final String

 

 

EDIT: I've got to go to a class, I won't be back for an hour or so. Any help you guys can provide is appreciated! This problem has been the final obstacle for my first mod for nearly two weeks now.

Link to comment
Share on other sites

Hi

 

Your initial Block might work if you implement getMetaFromState() correctly, ie  not just return 0.

 

You will also need to force a block update every time the state changes-  The render information is only updated when the blocks change, so the furnace will turn on (or off) and you won't see it without a block update.

 

From memory I tried it both ways and found getActualState was easier.  Vanilla uses two different blocks entirely instead of changing iblockstate.

 

The latest fragment you posted looks like it's pretty close; I'd suggest you get rid of private boolean isBurning though, and just retrieve or set the TileEntity isBurning every time.  Otherwise you run the risk of updating one and forgetting to update the other.

 

-TGG

 

Link to comment
Share on other sites

I'm not exactly sure how to implement getMetaFromState() correctly, here's what I tried (which didn't work)

 

public int getMetaFromState(IBlockState state)

    {

        return ((Boolean)state.getValue(ISBURNING)).booleanValue() ? 1 : 0;

    }

 

 

I don't see where the state is being changed. I assume it happens whenever getActualState() is called, or perhaps when other methods are called, and that I would need to update the block after that.

 

I got rid of the private boolean isBurning, but I was only using it for the particle generator function anyways. This is what I'm using now (which still doesn't make particles when things are cooking):

 

@SideOnly(Side.CLIENT)

    public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)

    {

        boolean isBurning = ((Boolean)state.getValue(ISBURNING)).booleanValue();

        if(isBurning) {

            double d0 = (double) pos.getX() + 0.5D;

            double d1 = (double) pos.getY() + 0.4D;

            double d2 = (double) pos.getZ() + 0.5D;

 

            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);

        }

    }

 

This in particular suggests to me that the block state isn't being changed at all.

 

I need to go to bed, but will look back here in the morning. Thanks again for your help!

Link to comment
Share on other sites

I do it perhaps more simply. In my block I create a method to update the state. For example, I have a tanning rack where you can see the hide turn to a tanned hide and I do it like this:

 

In my block I have:

    public static void changeBlockBasedOnTanningStatus(int parTanningIngredient, World parWorld, BlockPos parBlockPos)
    {
        TileEntity theTileEntity = parWorld.getTileEntity(parBlockPos);

        parWorld.setBlockState(parBlockPos, BlockSmith.blockTanningRack.getDefaultState().withProperty(TANNING_INGREDIENT, parTanningIngredient), 3);
        if (theTileEntity != null)
        {
            theTileEntity.validate();
            parWorld.setTileEntity(parBlockPos, theTileEntity);
        }
    }

 

This is called from the TileEntity's update() method when the condition for the change is met. In my case I do it when there is leather in the output slot. So my code looks like this (in the update() method of the TileEntity):

            // if leather result is in output slot display it
            if (tanningRackItemStackArray[slotEnum.OUTPUT_SLOT.ordinal()] != null)
            {
                 BlockTanningRack.changeBlockBasedOnTanningStatus(6, worldObj, pos);
            }
            else // display what is in input slot
            {
            	if (tanningRackItemStackArray[slotEnum.INPUT_SLOT.ordinal()] != null)
            {
            		Item inputItem = tanningRackItemStackArray[slotEnum.INPUT_SLOT.ordinal()].getItem();
            		
            	if (inputItem == BlockSmith.cowHide)
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(1, worldObj, pos);
            	}
            	else if (inputItem == BlockSmith.sheepSkin)
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(2, worldObj, pos);
            	}
            	else if (inputItem == BlockSmith.pigSkin)
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(3, worldObj, pos);
            	}
            	else if (inputItem == BlockSmith.horseHide)
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(4, worldObj, pos);
            	}
            	else if (inputItem == Items.rabbit_hide)
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(5, worldObj, pos);
            	}
            	}
            	else
            	{
                	BlockTanningRack.changeBlockBasedOnTanningStatus(0, worldObj, pos);
            	}
            }

 

I should probably enumerate the tanning ingredients, but basically this shows an easy way to create complex logic that controls the model.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Thank you Jabelar, for my first hint of success! I implemented basically what you showed, and now my particle method is making particles when things are cooking! THE BLOCK STATE HAS CHANGED! HUZZAH!

 

Unfortunately the model is still the same. So why would the model be the same even though I KNOW the blockstate has changed?

Link to comment
Share on other sites

Thank you Jabelar, for my first hint of success! I implemented basically what you showed, and now my particle method is making particles when things are cooking! THE BLOCK STATE HAS CHANGED! HUZZAH!

 

Unfortunately the model is still the same. So why would the model be the same even though I KNOW the blockstate has changed?

 

What do your model JSONs look like?

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

Both of them are currently being used by other blocks and work just fine there.

 

bigbrazier

 

{

"ambientocclusion": true,

"textures": {

"Iron Texture": "braziermod:blocks/iron_texture",

"Fire": "braziermod:blocks/brazier_top_large_lit",

"particle": "braziermod:blocks/iron_texture"

},

"elements": [

{

"from": [ 3, 2, 3 ],

"to": [ 13, 3, 13 ],

"faces": {

"north": { "uv": [ 3, 5, 13, 6 ], "texture": "#Iron Texture", "cullface": true },

"south": { "uv": [ 3, 6, 13, 7 ], "texture": "#Iron Texture", "cullface": true },

"east": { "uv": [ 3, 8, 13, 9 ], "texture": "#Iron Texture", "cullface": true },

"west": { "uv": [ 3, 11, 13, 12 ], "texture": "#Iron Texture", "cullface": true },

"up": { "uv": [ 3, 3, 13, 13 ], "texture": "#Fire", "cullface": true },

"down": { "uv": [ 3, 3, 13, 13 ], "texture": "#Iron Texture", "cullface": true }

}

},

{

"from": [ 2, 2, 5 ],

"to": [ 3, 4, 11 ],

"faces": {

"north": { "uv": [ 10, 2, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 9, 5, 10, 7 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 0, 14, 6, 16 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 14, 16, 16 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 6, 3, 7, 9 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 7, 1, 13 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 3, 3, 3 ],

"to": [ 4, 4, 5 ],

"faces": {

"north": { "uv": [ 14, 5, 15, 6 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 1, 8, 3, 9 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 6, 6, 8, 7 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 10, 5, 11, 7 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 11, 5, 12, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 3, 3 ],

"to": [ 5, 4, 4 ],

"faces": {

"north": { "uv": [ 9, 4, 10, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 10, 4, 11, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 4, 12, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 12, 4, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 4, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 2, 2 ],

"to": [ 11, 4, 3 ],

"faces": {

"north": { "uv": [ 1, 8, 7, 10 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 8, 4, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 8, 3, 9, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 9, 5, 10, 7 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 0, 10, 6, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 11, 6, 12 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 11, 3, 3 ],

"to": [ 12, 4, 4 ],

"faces": {

"north": { "uv": [ 5, 6, 6, 7 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 12, 6, 13, 7 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 10, 9, 11, 10 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 8, 11, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 10, 7, 11, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 6, 11, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 12, 3, 3 ],

"to": [ 13, 4, 5 ],

"faces": {

"north": { "uv": [ 10, 3, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 0, 16, 1 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 1, 16, 2 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 2, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 15, 5, 16, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 13, 2, 5 ],

"to": [ 14, 4, 11 ],

"faces": {

"north": { "uv": [ 14, 1, 15, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 13, 3, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 0, 5, 6, 7 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 0, 7, 6, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 8, 5, 9, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 9, 5, 10, 11 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 12, 3, 11 ],

"to": [ 13, 4, 13 ],

"faces": {

"north": { "uv": [ 10, 3, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 11, 3, 12, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 4, 11, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 7, 7, 9, 8 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 8, 6, 9, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 1, 8, 2, 10 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 11, 3, 12 ],

"to": [ 12, 4, 13 ],

"faces": {

"north": { "uv": [ 15, 1, 16, 2 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 2, 12, 3 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 6, 4, 7, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 7, 15, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 2, 13 ],

"to": [ 11, 4, 14 ],

"faces": {

"north": { "uv": [ 6, 3, 12, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 6, 11, 12, 13 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 10, 10, 12 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 11, 10, 12, 12 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 0, 8, 6, 9 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 15, 16, 16 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 3, 12 ],

"to": [ 5, 4, 13 ],

"faces": {

"north": { "uv": [ 5, 5, 6, 6 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 3, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 15, 4, 16, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 6, 11, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 3, 3, 11 ],

"to": [ 4, 4, 13 ],

"faces": {

"north": { "uv": [ 10, 2, 11, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 12, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 12, 4, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 4, 16, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 4, 15, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 15, 6, 16, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 1, 4 ],

"to": [ 12, 2, 12 ],

"faces": {

"north": { "uv": [ 5, 4, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 8, 11, 16, 12 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 8, 15, 16, 16 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 3, 15, 11, 16 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 0, 8, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 0, 5 ],

"to": [ 11, 1, 11 ],

"faces": {

"north": { "uv": [ 7, 7, 13, 8 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 0, 3, 6, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 7, 15, 8 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 4, 10, 10, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 8, 5, 14, 11 ], "texture": "#Iron Texture", "cullface": false }

}

}

]

}

 

 

raisedbrazier

 

{

"ambientocclusion": true,

"textures": {

"Iron Texture": "braziermod:blocks/iron_texture",

"Fire": "braziermod:blocks/brazier_top_large_lit",

"particle": "braziermod:blocks/iron_texture"

},

"elements": [

{

"from": [ 3, 13, 3 ],

"to": [ 13, 14, 13 ],

"faces": {

"north": { "uv": [ 3, 5, 13, 6 ], "texture": "#Iron Texture", "cullface": true },

"south": { "uv": [ 3, 6, 13, 7 ], "texture": "#Iron Texture", "cullface": true },

"east": { "uv": [ 3, 8, 13, 9 ], "texture": "#Iron Texture", "cullface": true },

"west": { "uv": [ 3, 11, 13, 12 ], "texture": "#Iron Texture", "cullface": true },

"up": { "uv": [ 3, 3, 13, 13 ], "texture": "#Fire", "cullface": true },

"down": { "uv": [ 3, 3, 13, 13 ], "texture": "#Iron Texture", "cullface": true }

}

},

{

"from": [ 2, 13, 5 ],

"to": [ 3, 15, 11 ],

"faces": {

"north": { "uv": [ 10, 2, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 9, 5, 10, 7 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 0, 14, 6, 16 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 14, 16, 16 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 6, 3, 7, 9 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 7, 1, 13 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 3, 14, 3 ],

"to": [ 4, 15, 5 ],

"faces": {

"north": { "uv": [ 14, 5, 15, 6 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 1, 8, 3, 9 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 6, 6, 8, 7 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 10, 5, 11, 7 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 11, 5, 12, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 14, 3 ],

"to": [ 5, 15, 4 ],

"faces": {

"north": { "uv": [ 9, 4, 10, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 10, 4, 11, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 4, 12, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 12, 4, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 4, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 13, 2 ],

"to": [ 11, 15, 3 ],

"faces": {

"north": { "uv": [ 1, 8, 7, 10 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 8, 4, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 8, 3, 9, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 9, 5, 10, 7 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 0, 10, 6, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 11, 6, 12 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 11, 14, 3 ],

"to": [ 12, 15, 4 ],

"faces": {

"north": { "uv": [ 5, 6, 6, 7 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 12, 6, 13, 7 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 10, 9, 11, 10 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 8, 11, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 10, 7, 11, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 6, 11, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 12, 14, 3 ],

"to": [ 13, 15, 5 ],

"faces": {

"north": { "uv": [ 10, 3, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 0, 16, 1 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 1, 16, 2 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 2, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 15, 5, 16, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 13, 13, 5 ],

"to": [ 14, 15, 11 ],

"faces": {

"north": { "uv": [ 14, 1, 15, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 13, 3, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 0, 5, 6, 7 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 0, 7, 6, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 8, 5, 9, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 9, 5, 10, 11 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 12, 14, 11 ],

"to": [ 13, 15, 13 ],

"faces": {

"north": { "uv": [ 10, 3, 11, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 11, 3, 12, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 4, 11, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 7, 7, 9, 8 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 8, 6, 9, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 1, 8, 2, 10 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 11, 14, 12 ],

"to": [ 12, 15, 13 ],

"faces": {

"north": { "uv": [ 15, 1, 16, 2 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 2, 12, 3 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 6, 4, 7, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 7, 15, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 13, 13 ],

"to": [ 11, 15, 14 ],

"faces": {

"north": { "uv": [ 6, 3, 12, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 6, 11, 12, 13 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 10, 10, 12 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 11, 10, 12, 12 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 0, 8, 6, 9 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 15, 16, 16 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 14, 12 ],

"to": [ 5, 15, 13 ],

"faces": {

"north": { "uv": [ 5, 5, 6, 6 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 3, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 13, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 15, 4, 16, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 6, 11, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 3, 14, 11 ],

"to": [ 4, 15, 13 ],

"faces": {

"north": { "uv": [ 10, 2, 11, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 12, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 12, 4, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 4, 16, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 4, 15, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 15, 6, 16, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 4, 12, 4 ],

"to": [ 12, 13, 12 ],

"faces": {

"north": { "uv": [ 5, 4, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 8, 11, 16, 12 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 8, 15, 16, 16 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 3, 15, 11, 16 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 0, 8, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 11, 5 ],

"to": [ 11, 12, 11 ],

"faces": {

"north": { "uv": [ 7, 7, 13, 8 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 0, 3, 6, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 7, 15, 8 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 4, 10, 10, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 8, 5, 14, 11 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 6, 7 ],

"to": [ 9, 11, 9 ],

"faces": {

"north": { "uv": [ 8, 4, 10, 9 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 10, 4, 12, 9 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 11, 16, 16 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 4, 16, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 11, 3, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 0, 14, 2, 16 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 1, 10 ],

"to": [ 9, 7, 11 ],

"faces": {

"north": { "uv": [ 9, 2, 11, 8 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 11, 2, 13, 8 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 2, 12, 8 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 15, 2, 16, 8 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 8, 0, 10, 1 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 5, 16, 6 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 5, 1, 7 ],

"to": [ 6, 7, 9 ],

"faces": {

"north": { "uv": [ 9, 4, 10, 10 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 8, 4, 9, 10 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 0, 6, 2, 12 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 3, 12, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 5, 15, 7 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 5, 11, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 1, 5 ],

"to": [ 9, 7, 6 ],

"faces": {

"north": { "uv": [ 9, 0, 11, 6 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 0, 16, 6 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 12, 0, 13, 6 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 13, 0, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 5, 16, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 6, 16, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 10, 1, 7 ],

"to": [ 11, 7, 9 ],

"faces": {

"north": { "uv": [ 4, 8, 5, 14 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 14, 3, 15, 9 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 12, 3, 14, 9 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 3, 12, 9 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 11, 6, 12, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 6, 11, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 9, 6, 7 ],

"to": [ 10, 7, 9 ],

"faces": {

"north": { "uv": [ 14, 2, 15, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 13, 3, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 13, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 4, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 4, 15, 6 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 6, 6 ],

"to": [ 9, 7, 7 ],

"faces": {

"north": { "uv": [ 11, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 11, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 3, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 13, 4, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 14, 5, 16, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 10, 7, 12, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 6, 6, 7 ],

"to": [ 7, 7, 9 ],

"faces": {

"north": { "uv": [ 13, 2, 14, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 15, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 2, 16, 3 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 3, 16, 4 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 3, 14, 5 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 3, 15, 5 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 6, 9 ],

"to": [ 9, 7, 10 ],

"faces": {

"north": { "uv": [ 14, 0, 16, 1 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 13, 2, 15, 3 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 14, 3, 15, 4 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 14, 4, 15, 5 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 9, 6, 11, 7 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 9, 7, 11, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 0, 10 ],

"to": [ 9, 1, 13 ],

"faces": {

"north": { "uv": [ 10, 2, 12, 3 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 10, 3, 12, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 10, 4, 13, 5 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 11, 6, 14, 7 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 11, 5, 13, 8 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 12, 5, 14, 8 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 10, 0, 7 ],

"to": [ 13, 1, 9 ],

"faces": {

"north": { "uv": [ 1, 8, 4, 9 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 6, 9, 9, 10 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 9, 5, 11, 6 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 5, 12, 6 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 5, 16, 7 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 8, 2, 11, 4 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 7, 0, 3 ],

"to": [ 9, 1, 6 ],

"faces": {

"north": { "uv": [ 8, 3, 10, 4 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 11, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 11, 3, 14, 4 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 13, 5, 16, 6 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 10, 3, 12, 6 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 14, 4, 16, 7 ], "texture": "#Iron Texture", "cullface": false }

}

},

{

"from": [ 3, 0, 7 ],

"to": [ 6, 1, 9 ],

"faces": {

"north": { "uv": [ 13, 1, 16, 2 ], "texture": "#Iron Texture", "cullface": false },

"south": { "uv": [ 10, 3, 13, 4 ], "texture": "#Iron Texture", "cullface": false },

"east": { "uv": [ 12, 5, 14, 6 ], "texture": "#Iron Texture", "cullface": false },

"west": { "uv": [ 10, 5, 12, 6 ], "texture": "#Iron Texture", "cullface": false },

"up": { "uv": [ 13, 9, 16, 11 ], "texture": "#Iron Texture", "cullface": false },

"down": { "uv": [ 8, 6, 11, 8 ], "texture": "#Iron Texture", "cullface": false }

}

}

]

}

 

Link to comment
Share on other sites

Hi

 

show your blockstates json, your Block code, your TileEntity code, and any relevant errors in the console?

 

-TGG

No relevant errors in the console as far as I can see

 

[08:33:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker

[08:33:16] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1335 for Minecraft 1.8 loading

[08:33:16] [main/INFO] [FML]: Java is Java HotSpot 64-Bit Server VM, version 1.8.0_25, running on Windows 7:amd64:6.1, installed at C:\Program Files (x86)\Minecraft\runtime\jre-x64\1.8.0_25

[08:33:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker

[08:33:16] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:33:20] [main/INFO] [FML]: Found valid fingerprint for Minecraft Forge. Certificate fingerprint e3c3d50c7c986df74c645c0ac54639741c90a557

[08:33:20] [main/INFO] [FML]: Found valid fingerprint for Minecraft. Certificate fingerprint cd99959656f753dc28d863b46769f7f8fbaefcfc

[08:33:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:33:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:33:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper

[08:33:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker

[08:33:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker

[08:33:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker

[08:33:22] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[08:33:23] [Client thread/INFO]: Setting user: 630tiger

[08:33:30] [Client thread/INFO]: LWJGL Version: 2.9.1

[08:33:32] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization

[08:33:32] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1335 Initialized

[08:33:32] [Client thread/INFO] [FML]: Replaced 204 ore recipies

[08:33:32] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization

[08:33:33] [Client thread/INFO] [FML]: Searching C:\Users\TheRedMezek\AppData\Roaming\.minecraft\mods for mods

[08:33:37] [Client thread/INFO] [FML]: Forge Mod Loader has identified 13 mods to load

[08:33:37] [Client thread/INFO] [FML]: FML has found a non-mod file CrafableHorseArmour 1.2.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.

[08:33:37] [Client thread/INFO] [FML]: FML has found a non-mod file parachutemod-1.7.10-2.5.6.jar in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible.

[08:33:37] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, ChickenShed, craft++, customnpcs, wonderfulwands, hopperducts, braziermod, me, AencEx, redstonepaste, tnkgol] at CLIENT

[08:33:37] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, ChickenShed, craft++, customnpcs, wonderfulwands, hopperducts, braziermod, me, AencEx, redstonepaste, tnkgol] at SERVER

[08:33:40] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Chicken Shed, FMLFileResourcePack:Craft++, FMLFileResourcePack:CustomNpcs, FMLFileResourcePack:Wonderful Wands, FMLFileResourcePack:Hopper Ducts, FMLFileResourcePack:Brazier Mod, FMLFileResourcePack:More Enchantments, FMLFileResourcePack:AencEx, FMLFileResourcePack:Redstone Paste, FMLFileResourcePack:The Game of Life

[08:33:40] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

[08:33:40] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations

[08:33:40] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0

[08:33:42][FINE/CustomNPCs][noppes.npcs.LogWriter:71] Fri Apr 17 08:33:42 PDT 2015

[08:33:42][FINE/CustomNPCs][noppes.npcs.controllers.ScriptController:78] Script Engines Available:

[08:33:43] [Client thread/INFO] [craft++]: Initialized the logger

[08:33:43] [Client thread/INFO] [craft++]: Hard-coding the mcmod.info

[08:33:43] [Client thread/INFO] [craft++]: Enabling the Version Checker Support

[08:33:43] [Client thread/INFO] [craft++]: Initializing the config handler

[08:33:43] [Client thread/INFO] [craft++]: Registering the blocks

[08:33:43] [Client thread/INFO] [craft++]: Pre-initialization completed successfully

[08:33:43] [Client thread/INFO] [FML]: Applying holder lookups

[08:33:43] [Client thread/INFO] [FML]: Holder lookups applied

[08:33:44] [sound Library Loader/INFO]: Starting up SoundSystem...

[08:33:44] [Thread-8/INFO]: Initializing LWJGL OpenAL

[08:33:44] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[08:33:45] [Client thread/WARN]: File customnpcs:sounds/human/male/villager/What Do You Need.ogg does not exist, cannot add it to event customnpcs:human.male.villager.what_do_you_need

[08:33:45] [Client thread/WARN]: File customnpcs:sounds/human/male/villager/Would You Like To Trade.ogg does not exist, cannot add it to event customnpcs:human.male.villager.trade

[08:33:50] [Thread-8/INFO]: OpenAL initialized.

[08:33:50] [sound Library Loader/INFO]: Sound engine started

[08:33:52] [Client thread/INFO]: Created: 1024x512 textures-atlas

[08:33:54] [Client thread/INFO] [sTDOUT]: [net.fybertech.nwr.NowWithRendering$RenderBlockDamageMethodVisitor:visitCode:98]: PATCH 2

[08:33:54] [Client thread/INFO] [sTDOUT]: [net.fybertech.nwr.NowWithRendering$RenderBlockMethodVisitor:visitCode:72]: PATCH 1

[08:33:54] [Client thread/INFO] [sTDOUT]: [net.fybertech.nwr.NowWithRendering$RenderBlockDamageMethodVisitor:visitCode:98]: PATCH 2

[08:33:54] [Client thread/INFO] [sTDOUT]: [net.fybertech.nwr.NowWithRendering$RenderBlockMethodVisitor:visitCode:72]: PATCH 1

[08:33:55] [Client thread/INFO] [craft++]: Registering the block inventory renderers

[08:33:55] [Client thread/INFO] [craft++]: Registering the event handler

[08:33:55] [Client thread/INFO] [craft++]: Registering the key bindings

[08:33:55] [Client thread/INFO] [craft++]: Registering the fuel handler

[08:33:55] [Client thread/INFO] [craft++]: Registering the crafting/furnace recipes

[08:33:55] [Client thread/INFO] [craft++]: Registering the dispenser behaviors

[08:33:55] [Client thread/INFO] [craft++]: Registering dispenser behavior for Sand/Red Sand

[08:33:55] [Client thread/INFO] [craft++]: Registering dispenser behavior for Gravel

[08:33:55] [Client thread/INFO] [craft++]: Registering dispenser behavior for Block of Sugar

[08:33:55] [Client thread/INFO] [craft++]: Initializing the vanilla properties changer

[08:33:55] [Client thread/INFO] [craft++]: Did not find NotEnoughItems/TooManyItems, using fake spawner item

[08:33:55] [Client thread/INFO] [craft++]: Initializing the crafting recipe remover

[08:33:55] [Client thread/INFO] [craft++]: Replacing stone tool recipes

[08:33:55] [Client thread/INFO] [craft++]: Replacing stairs recipes

[08:33:55] [Client thread/INFO] [craft++]: Replacing vanilla button recipes

[08:33:55] [Client thread/INFO] [craft++]: Removing tool repair recipes

[08:33:55] [Client thread/INFO] [craft++]: Initialization completed successfully

[08:33:55] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 13 mods

[08:33:55] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Chicken Shed, FMLFileResourcePack:Craft++, FMLFileResourcePack:CustomNpcs, FMLFileResourcePack:Wonderful Wands, FMLFileResourcePack:Hopper Ducts, FMLFileResourcePack:Brazier Mod, FMLFileResourcePack:More Enchantments, FMLFileResourcePack:AencEx, FMLFileResourcePack:Redstone Paste, FMLFileResourcePack:The Game of Life

[08:33:56] [Client thread/INFO]: SoundSystem shutting down...

[08:33:56] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

[08:33:56] [sound Library Loader/INFO]: Starting up SoundSystem...

[08:33:56] [Thread-10/INFO]: Initializing LWJGL OpenAL

[08:33:56] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

[08:33:56] [Thread-10/INFO]: OpenAL initialized.

[08:33:57] [sound Library Loader/INFO]: Sound engine started

[08:33:57] [Client thread/WARN]: File customnpcs:sounds/human/male/villager/What Do You Need.ogg does not exist, cannot add it to event customnpcs:human.male.villager.what_do_you_need

[08:33:57] [Client thread/WARN]: File customnpcs:sounds/human/male/villager/Would You Like To Trade.ogg does not exist, cannot add it to event customnpcs:human.male.villager.trade

[08:34:01] [Client thread/INFO]: Created: 1024x512 textures-atlas

[08:34:14] [server thread/INFO]: Starting integrated minecraft server version 1.8

[08:34:14] [server thread/INFO]: Generating keypair

[08:34:14][FINE/CustomNPCs][noppes.npcs.controllers.LinkedNpcController:42] Loading Linked Npcs

[08:34:14][FINE/CustomNPCs][noppes.npcs.controllers.LinkedNpcController:62] Done loading Linked Npcs

[08:34:14] [server thread/INFO] [FML]: Injecting existing block and item data into this server instance

[08:34:14] [server thread/INFO] [FML]: Applying holder lookups

[08:34:14] [server thread/INFO] [FML]: Holder lookups applied

[08:34:14] [server thread/INFO] [FML]: Loading dimension 0 (Mod dev) (net.minecraft.server.integrated.IntegratedServer@6d0385d3)

[08:34:14] [server thread/INFO] [FML]: Loading dimension 1 (Mod dev) (net.minecraft.server.integrated.IntegratedServer@6d0385d3)

[08:34:15] [server thread/INFO] [FML]: Loading dimension -1 (Mod dev) (net.minecraft.server.integrated.IntegratedServer@6d0385d3)

[08:34:15] [server thread/INFO]: Preparing start region for level 0

[08:34:16] [server thread/INFO]: Preparing spawn area: 32%

[08:34:16][FINE/CustomNPCs][noppes.npcs.controllers.DialogController:31] Loading Dialogs

[08:34:16][FINE/CustomNPCs][noppes.npcs.controllers.DialogController:33] Done loading Dialogs

[08:34:17] [server thread/INFO]: Changing view distance to 12, from 10

[08:34:18] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 1

[08:34:18] [Netty Server IO #1/INFO] [FML]: Client protocol version 1

[08:34:18] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 13 mods : [email protected],[email protected],[email protected],[email protected]_alpha,[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]

[08:34:18] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established

[08:34:18] [server thread/INFO] [FML]: [server thread] Server side modded connection established

[08:34:18] [server thread/INFO]: 630tiger[local:E:d9fb97b0] logged in with entity id 59 at (1121.2047831201141, 9.0, 906.7253438147818)

[08:34:18] [server thread/INFO]: 630tiger joined the game

[08:34:20] [Thread-7/INFO]: [CHAT] §2CustomNpcs§f installed. For more info §9§nClick here

[08:34:21] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 2491ms behind, skipping 49 tick(s)

[08:34:41] [server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 3297ms behind, skipping 65 tick(s)

[08:34:49] [server thread/INFO]: Saving and pausing game...

[08:34:49] [server thread/INFO]: Saving chunks for level 'Mod dev'/Overworld

[08:34:49] [server thread/INFO]: Saving chunks for level 'Mod dev'/Nether

[08:34:49] [server thread/INFO]: Saving chunks for level 'Mod dev'/The End

[08:34:50] [server thread/INFO]: Stopping server

[08:34:50] [server thread/INFO]: Saving players

[08:34:50] [server thread/INFO]: Saving worlds

[08:34:50] [server thread/INFO]: Saving chunks for level 'Mod dev'/Overworld

[08:34:50] [server thread/INFO]: Saving chunks for level 'Mod dev'/Nether

[08:34:50] [server thread/INFO]: Saving chunks for level 'Mod dev'/The End

[08:34:50] [server thread/INFO] [FML]: Unloading dimension 0

[08:34:50] [server thread/INFO] [FML]: Unloading dimension -1

[08:34:50] [server thread/INFO] [FML]: Unloading dimension 1

[08:34:50] [server thread/INFO] [FML]: Applying holder lookups

[08:34:50] [server thread/INFO] [FML]: Holder lookups applied

[08:35:13] [Client thread/INFO]: Stopping!

[08:35:13] [Client thread/INFO]: SoundSystem shutting down...

[08:35:13] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

 

 

 

Blockstate json

 

{

  "variants": {

    "active=true": { "model": "braziermod:bigbrazier" },

    "active=false": { "model": "braziermod:raisedbrazier" }

  }

}

 

 

 

Block code

 

public class CookingBrazier extends BlockContainer {

    private String name = "cookingbrazier";

    private static boolean keepInventory;

    public static final PropertyBool ISBURNING = PropertyBool.create("active");

 

    public boolean isOpaqueCube(){

        return false;

    }

    public boolean isFullCube()

    {

        return false;

    }

 

    @SideOnly(Side.CLIENT)

    public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)

    {

        boolean isBurning = ((Boolean)state.getValue(ISBURNING)).booleanValue();

        if(isBurning) {

            double d0 = (double) pos.getX() + 0.5D;

            double d1 = (double) pos.getY() + 0.4D;

            double d2 = (double) pos.getZ() + 0.5D;

 

            worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);

        }

    }

 

    @Override

    public int getRenderType() {

        return 3;

    }

 

    public String getName(){

        return name;

    }

 

    public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {

        setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 1F, 0.9F);

    }

 

    public CookingBrazier(boolean isBurning){

        super(Material.rock);

        //this.setDefaultState(this.blockState.getBaseState().withProperty(ISBURNING, true));

        this.setCreativeTab(CreativeTabs.tabDecorations);

        this.setUnlocalizedName("braziermod" + "_" + name);

        this.setHardness(0.8f);

        this.setLightLevel(.96f);

        GameRegistry.registerBlock(this, name);

    }

 

    public TileEntity createNewTileEntity(World worldIn, int meta)

    {

        return new TileEntityCookingBrazier();

    }

 

    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)

    {

        if (worldIn.isRemote)

        {

            return true;

        }

        else

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityCookingBrazier)

            {

                playerIn.displayGUIChest((TileEntityCookingBrazier)tileentity);

            }

 

            return true;

        }

    }

 

    public void breakBlock(World worldIn, BlockPos pos, IBlockState state)

    {

        if (!keepInventory)

        {

            TileEntity tileentity = worldIn.getTileEntity(pos);

 

            if (tileentity instanceof TileEntityFurnace)

            {

                InventoryHelper.dropInventoryItems(worldIn, pos, (TileEntityFurnace)tileentity);

                worldIn.updateComparatorOutputLevel(pos, this);

            }

        }

 

        super.breakBlock(worldIn, pos, state);

    }

 

    public static void setState(boolean active, World worldIn, BlockPos pos){

        TileEntity tileentity = worldIn.getTileEntity(pos);

        worldIn.setBlockState(pos, BrazierMod.cookingbrazier.getDefaultState().withProperty(ISBURNING, active), 3);

 

        if (tileentity != null)

        {

            tileentity.validate();

            worldIn.setTileEntity(pos, tileentity);

        }

    }

 

    //public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)

    //{

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(false));

    //}

 

    public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)

    {

        TileEntity tileEntity = worldIn.getTileEntity(pos);

        if (tileEntity instanceof TileEntityCookingBrazier) {

            TileEntityCookingBrazier tileInventoryFurnace = (TileEntityCookingBrazier)tileEntity;

            boolean burningSlots = tileInventoryFurnace.isBurning();

            //burningSlots = MathHelper.clamp_int(burningSlots, 0, 4);

            return getDefaultState().withProperty(ISBURNING, burningSlots);

        }

        return state;

    }

 

    protected BlockState createBlockState()

    {

        return new BlockState(this, new IProperty[] {ISBURNING});

    }

 

    public IBlockState getStateFromMeta(int meta)

    {

        return this.getDefaultState();

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(isBurning));

    }

 

    public int getMetaFromState(IBlockState state)

    {

        return ((Boolean)state.getValue(ISBURNING)).booleanValue() ? 1 : 0;

    }

}

 

 

Tile entity

 

public class TileEntityCookingBrazier extends TileEntityLockable implements IUpdatePlayerListBox, ISidedInventory

{

    private static final int[] slotsTop = new int[] {0};

    private static final int[] slotsBottom = new int[] {2, 1};

    private static final int[] slotsSides = new int[] {1};

    /** The ItemStacks that hold the items currently being used in the furnace */

    private ItemStack[] furnaceItemStacks = new ItemStack[3];

    /** The number of ticks that the furnace will keep burning */

    private int furnaceBurnTime;

    /** The number of ticks that a fresh copy of the currently-burning item would keep the furnace burning for */

    private int currentItemBurnTime;

    private int cookTime;

    private int totalCookTime;

    private String furnaceCustomName;

    private static final String __OBFID = "CL_00000357";

 

    /**

    * Returns the number of slots in the inventory.

    */

    public int getSizeInventory()

    {

        return this.furnaceItemStacks.length;

    }

 

    public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate)

    {

        return (oldState.getBlock() != newSate.getBlock());

    }

 

    /**

    * Returns the stack in slot i

    */

    public ItemStack getStackInSlot(int index)

    {

        return this.furnaceItemStacks[index];

    }

 

    /**

    * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a

    * new stack.

    */

    public ItemStack decrStackSize(int index, int count)

    {

        if (this.furnaceItemStacks[index] != null)

        {

            ItemStack itemstack;

 

            if (this.furnaceItemStacks[index].stackSize <= count)

            {

                itemstack = this.furnaceItemStacks[index];

                this.furnaceItemStacks[index] = null;

                return itemstack;

            }

            else

            {

                itemstack = this.furnaceItemStacks[index].splitStack(count);

 

                if (this.furnaceItemStacks[index].stackSize == 0)

                {

                    this.furnaceItemStacks[index] = null;

                }

 

                return itemstack;

            }

        }

        else

        {

            return null;

        }

    }

 

    /**

    * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -

    * like when you close a workbench GUI.

    */

    public ItemStack getStackInSlotOnClosing(int index)

    {

        if (this.furnaceItemStacks[index] != null)

        {

            ItemStack itemstack = this.furnaceItemStacks[index];

            this.furnaceItemStacks[index] = null;

            return itemstack;

        }

        else

        {

            return null;

        }

    }

 

    /**

    * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).

    */

    public void setInventorySlotContents(int index, ItemStack stack)

    {

        boolean flag = stack != null && stack.isItemEqual(this.furnaceItemStacks[index]) && ItemStack.areItemStackTagsEqual(stack, this.furnaceItemStacks[index]);

        this.furnaceItemStacks[index] = stack;

 

        if (stack != null && stack.stackSize > this.getInventoryStackLimit())

        {

            stack.stackSize = this.getInventoryStackLimit();

        }

 

        if (index == 0 && !flag)

        {

            this.totalCookTime = this.func_174904_a(stack);

            this.cookTime = 0;

            this.markDirty();

        }

    }

 

    /**

    * Gets the name of this command sender (usually username, but possibly "Rcon")

    */

    public String getName()

    {

        return this.hasCustomName() ? this.furnaceCustomName : "Cooking Brazier";

    }

 

    /**

    * Returns true if this thing is named

    */

    public boolean hasCustomName()

    {

        return this.furnaceCustomName != null && this.furnaceCustomName.length() > 0;

    }

 

    public void setCustomInventoryName(String p_145951_1_)

    {

        this.furnaceCustomName = p_145951_1_;

    }

 

    public void readFromNBT(NBTTagCompound compound)

    {

        super.readFromNBT(compound);

        NBTTagList nbttaglist = compound.getTagList("Items", 10);

        this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

 

        for (int i = 0; i < nbttaglist.tagCount(); ++i)

        {

            NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);

            byte b0 = nbttagcompound1.getByte("Slot");

 

            if (b0 >= 0 && b0 < this.furnaceItemStacks.length)

            {

                this.furnaceItemStacks[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);

            }

        }

 

        this.furnaceBurnTime = compound.getShort("BurnTime");

        this.cookTime = compound.getShort("CookTime");

        this.totalCookTime = compound.getShort("CookTimeTotal");

        this.currentItemBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

 

        if (compound.hasKey("CustomName", 8))

        {

            this.furnaceCustomName = compound.getString("CustomName");

        }

    }

 

    public void writeToNBT(NBTTagCompound compound)

    {

        super.writeToNBT(compound);

        compound.setShort("BurnTime", (short)this.furnaceBurnTime);

        compound.setShort("CookTime", (short)this.cookTime);

        compound.setShort("CookTimeTotal", (short)this.totalCookTime);

        NBTTagList nbttaglist = new NBTTagList();

 

        for (int i = 0; i < this.furnaceItemStacks.length; ++i)

        {

            if (this.furnaceItemStacks != null)

            {

                NBTTagCompound nbttagcompound1 = new NBTTagCompound();

                nbttagcompound1.setByte("Slot", (byte)i);

                this.furnaceItemStacks.writeToNBT(nbttagcompound1);

                nbttaglist.appendTag(nbttagcompound1);

            }

        }

 

        compound.setTag("Items", nbttaglist);

 

        if (this.hasCustomName())

        {

            compound.setString("CustomName", this.furnaceCustomName);

        }

    }

 

    /**

    * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't

    * this more of a set than a get?*

    */

    public int getInventoryStackLimit()

    {

        return 64;

    }

 

    /**

    * Furnace isBurning

    */

    public boolean isBurning()

    {

        return this.furnaceBurnTime > 0;

    }

 

    @SideOnly(Side.CLIENT)

    public static boolean isBurning(IInventory p_174903_0_)

    {

        return p_174903_0_.getField(0) > 0;

    }

 

    /**

    * Updates the JList with a new model.

    */

    public void update()

    {

        boolean flag = this.isBurning();

        boolean flag1 = false;

 

 

        if (this.isBurning())

        {

            --this.furnaceBurnTime;

        }

 

        if (!this.worldObj.isRemote)

        {

            if (!this.isBurning() && (this.furnaceItemStacks[1] == null || this.furnaceItemStacks[0] == null))

            {

                if (!this.isBurning() && this.cookTime > 0)

                {

                    this.cookTime = MathHelper.clamp_int(this.cookTime - 2, 0, this.totalCookTime);

                }

            }

            else

            {

                if (!this.isBurning() && this.canSmelt())

                {

                    this.currentItemBurnTime = this.furnaceBurnTime = getItemBurnTime(this.furnaceItemStacks[1]);

 

                    if (this.isBurning())

                    {

                        flag1 = true;

 

                        if (this.furnaceItemStacks[1] != null)

                        {

                            --this.furnaceItemStacks[1].stackSize;

 

                            if (this.furnaceItemStacks[1].stackSize == 0)

                            {

                                this.furnaceItemStacks[1] = furnaceItemStacks[1].getItem().getContainerItem(furnaceItemStacks[1]);

                            }

                        }

                    }

                }

 

                if (this.isBurning() && this.canSmelt())

                {

                    ++this.cookTime;

 

                    if (this.cookTime == this.totalCookTime)

                    {

                        this.cookTime = 0;

                        this.totalCookTime = this.func_174904_a(this.furnaceItemStacks[0]);

                        this.smeltItem();

                        flag1 = true;

                    }

                }

                else

                {

                    this.cookTime = 0;

                }

            }

 

            if (flag != this.isBurning())

            {

                flag1 = true;

                //CookingBrazier.setState(this.isBurning(), this.worldObj, this.pos);

                //IBlockState iblockstate = this.worldObj.getBlockState(this.getPos());

                //iblockstate = iblockstate.withProperty(CookingBrazier.ISBURNING, true);

                //this.worldObj.setBlockState(this.pos, iblockstate, 2);

            }

            CookingBrazier.setState(this.isBurning(), this.worldObj, this.pos);

            worldObj.markBlockForUpdate(pos);

 

 

        }

 

        if (flag1)

        {

            this.markDirty();

        }

 

 

    }

 

    public int func_174904_a(ItemStack p_174904_1_)

    {

        return 200;

    }

 

    /**

    * Returns true if the furnace can smelt an item, i.e. has a source item, destination stack isn't full, etc.

    */

    private boolean canSmelt()

    {

        if (this.furnaceItemStacks[0] == null)

        {

            return false;

        }

        else

        {

            ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks[0]);

            if (itemstack == null) return false;

            if (this.furnaceItemStacks[2] == null) return true;

            if (!this.furnaceItemStacks[2].isItemEqual(itemstack)) return false;

            int result = furnaceItemStacks[2].stackSize + itemstack.stackSize;

            return result <= getInventoryStackLimit() && result <= this.furnaceItemStacks[2].getMaxStackSize(); //Forge BugFix: Make it respect stack sizes properly.

        }

    }

 

    /**

    * Turn one item from the furnace source stack into the appropriate smelted item in the furnace result stack

    */

    public void smeltItem()

    {

        if (this.canSmelt())

        {

            ItemStack itemstack = FurnaceRecipes.instance().getSmeltingResult(this.furnaceItemStacks[0]);

 

            if (this.furnaceItemStacks[2] == null)

            {

                this.furnaceItemStacks[2] = itemstack.copy();

            }

            else if (this.furnaceItemStacks[2].getItem() == itemstack.getItem())

            {

                this.furnaceItemStacks[2].stackSize += itemstack.stackSize; // Forge BugFix: Results may have multiple items

            }

 

            if (this.furnaceItemStacks[0].getItem() == Item.getItemFromBlock(Blocks.sponge) && this.furnaceItemStacks[0].getMetadata() == 1 && this.furnaceItemStacks[1] != null && this.furnaceItemStacks[1].getItem() == Items.bucket)

            {

                this.furnaceItemStacks[1] = new ItemStack(Items.water_bucket);

            }

 

            --this.furnaceItemStacks[0].stackSize;

 

            if (this.furnaceItemStacks[0].stackSize <= 0)

            {

                this.furnaceItemStacks[0] = null;

            }

        }

    }

 

    /**

    * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't

    * fuel

    */

    public static int getItemBurnTime(ItemStack p_145952_0_)

    {

        if (p_145952_0_ == null)

        {

            return 0;

        }

        else

        {

            Item item = p_145952_0_.getItem();

 

            if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air)

            {

                Block block = Block.getBlockFromItem(item);

 

                if (block == Blocks.wooden_slab)

                {

                    return 150;

                }

 

                if (block.getMaterial() == Material.wood)

                {

                    return 300;

                }

 

                if (block == Blocks.coal_block)

                {

                    return 16000;

                }

            }

 

            if (item instanceof ItemTool && ((ItemTool)item).getToolMaterialName().equals("WOOD")) return 200;

            if (item instanceof ItemSword && ((ItemSword)item).getToolMaterialName().equals("WOOD")) return 200;

            if (item instanceof ItemHoe && ((ItemHoe)item).getMaterialName().equals("WOOD")) return 200;

            if (item == Items.stick) return 100;

            if (item == Items.coal) return 1600;

            if (item == Items.lava_bucket) return 20000;

            if (item == Item.getItemFromBlock(Blocks.sapling)) return 100;

            if (item == Items.blaze_rod) return 2400;

            return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_);

        }

    }

 

    public static boolean isItemFuel(ItemStack p_145954_0_)

    {

        /**

        * Returns the number of ticks that the supplied fuel item will keep the furnace burning, or 0 if the item isn't

        * fuel

        */

        return getItemBurnTime(p_145954_0_) > 0;

    }

 

    /**

    * Do not make give this method the name canInteractWith because it clashes with Container

    */

    public boolean isUseableByPlayer(EntityPlayer player)

    {

        return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;

    }

 

    public void openInventory(EntityPlayer player) {}

 

    public void closeInventory(EntityPlayer player) {}

 

    /**

    * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.

    */

    public boolean isItemValidForSlot(int index, ItemStack stack)

    {

        return index == 2 ? false : (index != 1 ? true : isItemFuel(stack) || SlotFurnaceFuel.isBucket(stack));

    }

 

    public int[] getSlotsForFace(EnumFacing side)

    {

        return side == EnumFacing.DOWN ? slotsBottom : (side == EnumFacing.UP ? slotsTop : slotsSides);

    }

 

    /**

    * Returns true if automation can insert the given item in the given slot from the given side. Args: slot, item,

    * side

    */

    public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction)

    {

        return this.isItemValidForSlot(index, itemStackIn);

    }

 

    /**

    * Returns true if automation can extract the given item in the given slot from the given side. Args: slot, item,

    * side

    */

    public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction)

    {

        if (direction == EnumFacing.DOWN && index == 1)

        {

            Item item = stack.getItem();

 

            if (item != Items.water_bucket && item != Items.bucket)

            {

                return false;

            }

        }

 

        return true;

    }

 

    public String getGuiID()

    {

        return "minecraft:furnace";

    }

 

    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)

    {

        return new ContainerCookingBrazier(playerInventory, this);

    }

 

    public int getField(int id)

    {

        switch (id)

        {

            case 0:

                return this.furnaceBurnTime;

            case 1:

                return this.currentItemBurnTime;

            case 2:

                return this.cookTime;

            case 3:

                return this.totalCookTime;

            default:

                return 0;

        }

    }

 

    public void setField(int id, int value)

    {

        switch (id)

        {

            case 0:

                this.furnaceBurnTime = value;

                break;

            case 1:

                this.currentItemBurnTime = value;

                break;

            case 2:

                this.cookTime = value;

                break;

            case 3:

                this.totalCookTime = value;

        }

    }

 

    public int getFieldCount()

    {

        return 4;

    }

 

    public void clear()

    {

        for (int i = 0; i < this.furnaceItemStacks.length; ++i)

        {

            this.furnaceItemStacks = null;

        }

    }

}

 

Link to comment
Share on other sites

Hi

 

Your bigbrazier and raisedbrazier jsons appear to be both lit (use "fire" texture)?

 

Your

    public IBlockState getStateFromMeta(int meta)

    {

        return this.getDefaultState();

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(isBurning));

    }

 

should be something like

return this.getDefaultState().withProperty(ISBURNING, meta == 1);

 

Apart from that I don't see anything, sorry...

 

-TGG

Link to comment
Share on other sites

Hi

 

Your bigbrazier and raisedbrazier jsons appear to be both lit (use "fire" texture)?

 

Your

    public IBlockState getStateFromMeta(int meta)

    {

        return this.getDefaultState();

        //return this.getDefaultState().withProperty(ISBURNING, Boolean.valueOf(isBurning));

    }

 

should be something like

return this.getDefaultState().withProperty(ISBURNING, meta == 1);

 

Apart from that I don't see anything, sorry...

 

-TGG

 

I changed getStateFromMeta() as you suggested, I don't see any change.

 

The models aren't the actual models I plan to use for this block (since I haven't made those yet), they're just placeholders. raisedbrazier is two or three times as many  pixels high as bigbrazier, so when the model changes it will be quite obvious.

 

God help me, TheGreyGhost is stumped.

Link to comment
Share on other sites

At this point I think you should just do standard debug process. Trace the variables' behavior to ensure it is following your expectations. You can use debug mode of your IDE or just put a bunch of System.out.println() console statements.

 

Also I want to point out that logically it is possible that the particles work and the models don't if there are multiple places where the block's state is updated. For example, during the random tick you directly read the is burning and act on it, so you know it will be good at that point. But maybe something else comes along and changes it before the renderer gets chance to start processing the model.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.