Jump to content

WAILA only showing item for east/bottom on 2-block high model


Astewen

Recommended Posts

First, let me say THANKS to all of you for the help you've already given, I never would have made it this far without all the threads here helping me with the problems I never had to post about.

Now for one I could not find. I have created a new model which is 2-blocks high using modified minecraft:door code and everything is now working except the WAILA icon for the model. it shows the right item icon ONLY when facing east and looking at the bottom block. All other directions (tops and bottoms) and the east/top block gives me the missing texture black/purple box. That leads me to believe it has to with the the variants in the blockstates.json file. But, that file is for the model only. I added an inventory tag to it but that does not help.
Here is my blockstates.json file and my models.item file for the block. In the two screenshots you can see that the facing east/bottom one works, all other do not.
Can you point me in the right direction for making the item show correctly for the 7 variants that are not showing it?

 

Spoiler

blockstates.json:

{
    "variants": {
        "facing=north,half=lower": { "model": "rnr:sign_bottom", "y": 180 },
        "facing=east,half=lower":  { "model": "rnr:sign_bottom", "y": 270  },
        "facing=south,half=lower": { "model": "rnr:sign_bottom" },
        "facing=west,half=lower":  { "model": "rnr:sign_bottom", "y": 90 },
        "facing=north,half=upper": { "model": "rnr:sign_top_stop", "y": 180 },
        "facing=east,half=upper":  { "model": "rnr:sign_top_stop", "y": 270 },
        "facing=south,half=upper": { "model": "rnr:sign_top_stop" },
        "facing=west,half=upper":  { "model": "rnr:sign_top_stop", "y": 90 },
        "inventory": [{
            "model": "item/generated",
            "textures": {
                "layer0": "rnr:blocks/sign_stop_front"
            }
        }]
    }
}
 

Spoiler

models.item.sign_stop.json:

{
    "parent": "item/generated",
    "textures": {
        "layer0": "rnr:blocks/sign_stop_front"
    }
}

Spoiler

2017-09-05_11_14_19.png.3ce9fc266a1392b841b9ea484db63702.png

 

Spoiler

2017-09-05_11_14_24.png.25f9f2db2796ac79cd44a44f50266f73.png

 

Edited by Astewen
Link to comment
Share on other sites

Show your item class, if you have one, and your block class.

The JSON files are pretty much irrelevant here.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Certainly. Here is the Block class...

 

Spoiler

package wrminecraft.roadsandrails.blocks;

import java.util.Random;
import javax.annotation.Nullable;

import net.minecraft.block.Block;
import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.EnumPushReaction;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.Mirror;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Rotation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import wrminecraft.roadsandrails.Utils;
import wrminecraft.roadsandrails.init.ModBlocks;
import wrminecraft.roadsandrails.init.ModItems;

public class BlockSign extends Block
{
    public static final PropertyDirection FACING = BlockHorizontal.FACING;
    public static final PropertyEnum<BlockSign.EnumSignHalf> HALF = PropertyEnum.<BlockSign.EnumSignHalf>create("half", BlockSign.EnumSignHalf.class);
    protected static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
    protected static final AxisAlignedBB NORTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
    protected static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
    protected static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);

    public BlockSign(String unlocalizedName, String registryName)
    {
        super(Material.IRON);
        this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(HALF, BlockSign.EnumSignHalf.LOWER));
        this.setUnlocalizedName(unlocalizedName);
        this.setRegistryName(new ResourceLocation(wrminecraft.roadsandrails.Reference.MODID, registryName));
    }

    public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
    {
        state = state.getActualState(source, pos);
        EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);

        switch (enumfacing)
        {
            case EAST:
            default:
                return SOUTH_AABB;

            case SOUTH:
                return WEST_AABB;

            case WEST:
                return NORTH_AABB;

            case NORTH:
                return EAST_AABB;
        }
    }

    /**
     * Gets the localized name of this block. Used for the statistics page.
     */
    public String getLocalizedName()
    {
        return I18n.translateToLocal((this.getUnlocalizedName() + ".name").replaceAll("tile", "item"));
    }

    /**
     * Used to determine ambient occlusion and culling when rebuilding chunks for render
     */
    public boolean isOpaqueCube(IBlockState state)
    {
        return false;
    }

    public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
    {
        return false;
    }

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

    /**
     * Get the MapColor for this Block and the given BlockState
     */
    public MapColor getMapColor(IBlockState state)
    {
        return MapColor.IRON;
    }

    public void func_189540_a(IBlockState blockStateIn, World worldIn, BlockPos blockPosIn, Block blockIn)
    {
        if (blockStateIn.getValue(HALF) == BlockSign.EnumSignHalf.UPPER)
        {
            BlockPos blockpos = blockPosIn.down();
            IBlockState iblockstate = worldIn.getBlockState(blockpos);

            if (iblockstate.getBlock() != this)
            {
                worldIn.setBlockToAir(blockPosIn);
            }
            else if (blockIn != this)
            {
                iblockstate.neighborChanged(worldIn, blockpos, blockIn);
            }
        }
        else
        {
            boolean flag1 = false;
            BlockPos blockpos1 = blockPosIn.up();
            IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);

            if (iblockstate1.getBlock() != this)
            {
                worldIn.setBlockToAir(blockPosIn);
                flag1 = true;
            }

            if (!worldIn.getBlockState(blockPosIn.down()).isFullyOpaque())
            {
                worldIn.setBlockToAir(blockPosIn);
                flag1 = true;

                if (iblockstate1.getBlock() == this)
                {
                    worldIn.setBlockToAir(blockpos1);
                }
            }

            if (flag1)
            {
                if (!worldIn.isRemote)
                {
                    this.dropBlockAsItem(worldIn, blockPosIn, blockStateIn, 0);
                }
            }
        }
    }

    @Nullable

    /**
     * Get the Item that this Block should drop when harvested.
     */
    public Item getItemDropped(IBlockState state, Random rand, int fortune)
    {
        return state.getValue(HALF) == BlockSign.EnumSignHalf.UPPER ? null : this.getItem();
    }

    public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
    {
        return pos.getY() >= 255 ? false : worldIn.getBlockState(pos.down()).isFullyOpaque() && super.canPlaceBlockAt(worldIn, pos) && super.canPlaceBlockAt(worldIn, pos.up());
    }

    public EnumPushReaction getMobilityFlag(IBlockState state)
    {
        return EnumPushReaction.DESTROY;
    }

    public static int combineMetadata(IBlockAccess worldIn, BlockPos pos)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);
        int i = iblockstate.getBlock().getMetaFromState(iblockstate);
        boolean flag = isTop(i);
        IBlockState iblockstate1 = worldIn.getBlockState(pos.down());
        int j = iblockstate1.getBlock().getMetaFromState(iblockstate1);
        int k = flag ? j : i;
        IBlockState iblockstate2 = worldIn.getBlockState(pos.up());
        int l = iblockstate2.getBlock().getMetaFromState(iblockstate2);
        int i1 = flag ? i : l;
        boolean flag1 = (i1 & 1) != 0;
        boolean flag2 = (i1 & 2) != 0;
        return removeHalfBit(k) | (flag ? 8 : 0) | (flag1 ? 16 : 0) | (flag2 ? 32 : 0);
    }

    public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
    {
        return new ItemStack(this.getItem());
    }

    private Item getItem()
    {
        return this.getItem();
    }

    public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
    {
        BlockPos blockpos = pos.down();
        BlockPos blockpos1 = pos.up();

        if (player.capabilities.isCreativeMode && state.getValue(HALF) == BlockSign.EnumSignHalf.UPPER && worldIn.getBlockState(blockpos).getBlock() == this)
        {
            worldIn.setBlockToAir(blockpos);
        }

        if (state.getValue(HALF) == BlockSign.EnumSignHalf.LOWER && worldIn.getBlockState(blockpos1).getBlock() == this)
        {
            if (player.capabilities.isCreativeMode)
            {
                worldIn.setBlockToAir(pos);
            }

            worldIn.setBlockToAir(blockpos1);
        }
    }

    public BlockRenderLayer getBlockLayer()
    {
        return BlockRenderLayer.CUTOUT;
    }

    /**
     * Get the actual Block state of this Block at the given position. This applies properties not visible in the
     * metadata, such as fence connections.
     */
    public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
    {
        if (state.getValue(HALF) == BlockSign.EnumSignHalf.UPPER)
        {
            IBlockState iblockstate1 = worldIn.getBlockState(pos.down());

            if (iblockstate1.getBlock() == this)
            {
                state = state.withProperty(FACING, iblockstate1.getValue(FACING));
            }
        }

        return state;
    }

    /**
     * Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed
     * blockstate.
     */
    public IBlockState withRotation(IBlockState state, Rotation rot)
    {
        return state.getValue(HALF) != BlockSign.EnumSignHalf.LOWER ? state : state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
    }

    /**
     * Convert the given metadata into a BlockState for this Block
     */
    public IBlockState getStateFromMeta(int meta)
    {
        if  ((meta & 8) > 0) {
            return this.getDefaultState().withProperty(HALF, BlockSign.EnumSignHalf.UPPER);
        } else {
            return this.getDefaultState().withProperty(HALF, BlockSign.EnumSignHalf.LOWER).withProperty(FACING, EnumFacing.getHorizontal(meta & 3).rotateYCCW()); 
            //return this.getDefaultState().withProperty(HALF, BlockSign.EnumSignHalf.LOWER).withProperty(FACING, EnumFacing.getHorizontal(meta & 3));
        }
    }

    /**
     * Convert the BlockState into the correct metadata value
     */
    public int getMetaFromState(IBlockState state)
    {
        int i = 0;

        if (state.getValue(HALF) == BlockSign.EnumSignHalf.UPPER) {
            i = i | 8;
        } else {
            i = i | ((EnumFacing)state.getValue(FACING)).rotateY().getHorizontalIndex();
        }

        return i;
    }

    protected static int removeHalfBit(int meta)
    {
        return meta & 7;
    }

    public static EnumFacing getFacing(IBlockAccess worldIn, BlockPos pos)
    {
        return getFacing(combineMetadata(worldIn, pos));
    }

    public static EnumFacing getFacing(int combinedMeta)
    {
        return EnumFacing.getHorizontal(combinedMeta & 3).rotateYCCW();
        //return EnumFacing.getHorizontal(combinedMeta & 3);
    }

    protected static boolean isTop(int meta)
    {
        return (meta & 8) != 0;
    }

    protected BlockStateContainer createBlockState()
    {
        return new BlockStateContainer(this, new IProperty[] {HALF, FACING});
    }

    public static enum EnumSignHalf implements IStringSerializable
    {
        UPPER,
        LOWER;

        public String toString()
        {
            return this.getName();
        }

        public String getName()
        {
            return this == UPPER ? "upper" : "lower";
        }
    }

}
 

and here is the itemBlock class that does the actual placing......

 

Spoiler

package wrminecraft.roadsandrails.items;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import wrminecraft.roadsandrails.blocks.BlockSign;
import wrminecraft.roadsandrails.RoadsAndRails;
import wrminecraft.roadsandrails.Utils;

public class ItemBlockSign extends ItemBlock {

    public ItemBlockSign(Block block) {
        super(block);
    }

    /**
     * Called when a Block is right-clicked with this Item
     */
    public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos,
            EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {

        if (facing != EnumFacing.UP) {
            return EnumActionResult.FAIL;
        } else {
            IBlockState iblockstate = worldIn.getBlockState(pos);
            Block block = iblockstate.getBlock();

            if (!block.isReplaceable(worldIn, pos)) {
                pos = pos.offset(facing);
            }

            if (playerIn.canPlayerEdit(pos, facing, stack) && this.block.canPlaceBlockAt(worldIn, pos)) {
                EnumFacing enumfacing = EnumFacing.fromAngle((double) playerIn.rotationYaw);
                int i = enumfacing.getFrontOffsetX();
                int j = enumfacing.getFrontOffsetZ();
                placeSign(worldIn, pos, enumfacing, this.getBlock());
                SoundType soundtype = this.block.getSoundType();
                worldIn.playSound(playerIn, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS,
                        (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
                --stack.stackSize;
                return EnumActionResult.SUCCESS;
            } else {
                return EnumActionResult.FAIL;
            }
        }
    }

    public static void placeSign(World worldIn, BlockPos pos, EnumFacing facing, Block block) {

        BlockPos blockpos = pos.offset(facing.rotateY());
        BlockPos blockpos1 = pos.offset(facing.rotateYCCW());
        int i = (worldIn.getBlockState(blockpos1).isNormalCube() ? 1 : 0)
                + (worldIn.getBlockState(blockpos1.up()).isNormalCube() ? 1 : 0);
        int j = (worldIn.getBlockState(blockpos).isNormalCube() ? 1 : 0)
                + (worldIn.getBlockState(blockpos.up()).isNormalCube() ? 1 : 0);
        boolean flag = worldIn.getBlockState(blockpos1).getBlock() == block
                || worldIn.getBlockState(blockpos1.up()).getBlock() == block;
        boolean flag1 = worldIn.getBlockState(blockpos).getBlock() == block
                || worldIn.getBlockState(blockpos.up()).getBlock() == block;

        BlockPos blockpos2 = pos.up();
        IBlockState iblockstate = block.getDefaultState().withProperty(BlockSign.FACING, facing);
        worldIn.setBlockState(pos, iblockstate.withProperty(BlockSign.HALF, BlockSign.EnumSignHalf.LOWER),
                2);
        worldIn.setBlockState(blockpos2,
                iblockstate.withProperty(BlockSign.HALF, BlockSign.EnumSignHalf.UPPER), 2);
        worldIn.notifyNeighborsOfStateChange(pos, block);
        worldIn.notifyNeighborsOfStateChange(blockpos2, block);
    }
}
 

And then where I tie them together in ModBlocks...

 

Spoiler

package wrminecraft.roadsandrails.init;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import wrminecraft.roadsandrails.blocks.BlockSign;
import wrminecraft.roadsandrails.items.ItemBlockSign;
import wrminecraft.roadsandrails.Reference;
import wrminecraft.roadsandrails.RoadsAndRails;
import wrminecraft.roadsandrails.Utils;
import wrminecraft.roadsandrails.blocks.BlockTinOre;
import wrminecraft.roadsandrails.tabs.RoadsAndRailsTab;

public class ModBlocks {

    public static Block sign_stop;
    
    public static void init() {
        
        sign_stop = new BlockSign("sign_stop", "sign_stop");
        sign_stop.setCreativeTab(RoadsAndRails.RoadsAndRailsTab);

    }
    
    public static void register() {
    
        GameRegistry.register(sign_stop);
        GameRegistry.register(new ItemBlockSign(sign_stop).setRegistryName(sign_stop.getRegistryName()));

    }
    
    public static void registerRenders() {
        registerRender(sign_stop);
    }
    
    public static void registerRender(Block block) {
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(
                new ResourceLocation(Reference.MODID, block.getUnlocalizedName().substring(5)), "inventory"));
    }
    
}
 

 

Link to comment
Share on other sites

55 minutes ago, Astewen said:

First, let me say THANKS to all of you for the help you've already given, I never would have made it this far without all the threads here helping me with the problems I never had to post about.

Now for one I could not find. I have created a new model which is 2-blocks high using modified minecraft:door code and everything is now working except the WAILA icon for the model. it shows the right item icon ONLY when facing east and looking at the bottom block. All other directions (tops and bottoms) and the east/top block gives me the missing texture black/purple box. That leads me to believe it has to with the the variants in the blockstates.json file. But, that file is for the model only. I added an inventory tag to it but that does not help.
Here is my blockstates.json file and my models.item file for the block. In the two screenshots you can see that the facing east/bottom one works, all other do not.
Can you point me in the right direction for making the item show correctly for the 7 variants that are not showing it?

 

  Hide contents

blockstates.json:

{
    "variants": {
        "facing=north,half=lower": { "model": "rnr:sign_bottom", "y": 180 },
        "facing=east,half=lower":  { "model": "rnr:sign_bottom", "y": 270  },
        "facing=south,half=lower": { "model": "rnr:sign_bottom" },
        "facing=west,half=lower":  { "model": "rnr:sign_bottom", "y": 90 },
        "facing=north,half=upper": { "model": "rnr:sign_top_stop", "y": 180 },
        "facing=east,half=upper":  { "model": "rnr:sign_top_stop", "y": 270 },
        "facing=south,half=upper": { "model": "rnr:sign_top_stop" },
        "facing=west,half=upper":  { "model": "rnr:sign_top_stop", "y": 90 },
        "inventory": [{
            "model": "item/generated",
            "textures": {
                "layer0": "rnr:blocks/sign_stop_front"
            }
        }]
    }
}
 

  Reveal hidden contents

models.item.sign_stop.json:

{
    "parent": "item/generated",
    "textures": {
        "layer0": "rnr:blocks/sign_stop_front"
    }
}

  Reveal hidden contents

2017-09-05_11_14_19.png.3ce9fc266a1392b841b9ea484db63702.png

 

  Reveal hidden contents

2017-09-05_11_14_24.png.25f9f2db2796ac79cd44a44f50266f73.png

 

how to add something like facing something like in the tile-entity with count, so how do i add that count to the json? let say the count in the code is equals to 3 so in the json i write "count=3": {...}??

do i need to you nbt for this? if yes so how to use nbt?

Link to comment
Share on other sites

    private Item getItem()
    {
        return this.getItem();
    } 

Yeugh. You realize this is an infinite loop, right?

 

Also, public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) is deprecated with the note // Forge: Use more sensitive version below: getPickBlock

 

You should probably follow that advice. It also appears you've overridden a bunch of functions that you don't need to. It's hard to tell.

 

3 minutes ago, BENM888GAMING said:

how to add something like facing something like in the tile-entity with count, so how do i add that count to the json? let say the count in the code is equals to 3 so in the json i write "count=3": {...}??

do i need to you nbt for this? if yes so how to use nbt?

Start your own thread, dude. Don't hijack someone else's thread to ask them how they did something.

Also: Read the Docs

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

2 minutes ago, BENM888GAMING said:

how to add something like facing something like in the tile-entity with count, so how do i add that count to the json? let say the count in the code is equals to 3 so in the json i write "count=3": {...}??

do i need to you nbt for this? if yes so how to use nbt?

You can use the conditionals as shown here under the "pillarcount" tag:

Forge’s Blockstates - General Structure of the Format

Link to comment
Share on other sites

40 minutes ago, Draco18s said:

    private Item getItem()
    {
        return this.getItem();
    } 

Yeugh. You realize this is an infinite loop, right?

 

Also, public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) is deprecated with the note // Forge: Use more sensitive version below: getPickBlock

 

You should probably follow that advice. It also appears you've overridden a bunch of functions that you don't need to. It's hard to tell.

Duh, now that you point it out, yep, it's a tick burner. Changed it:

    private Item getItem()
    {
        return Item.getItemFromBlock(this);
    }

 

but still not working for the other 7 variants.

Actually, I just copied the minecraft:door code for the entire class, then modified it to change the doors to my blocks and remove the OPEN and POWERED logic. This is my first mod and the first java I've done in 15 years. Since I did not know what functions would be needed, I just kept what was there.

Edited by Astewen
Link to comment
Share on other sites

30 minutes ago, Astewen said:

but still not working for the other 7 variants.

Not working...how?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

22 minutes ago, Draco18s said:

Not working...how?

It's the same as the original post. When I place a sign when I'm facing east, the bottom block shows the stop sign item icon in WAILA, the top block does not (shows missing texture). When I place the sign while I am facing any other direction, neither top nor bottom have the icon in WAILA. Only one of the 8 variants is showing up correctly in WAILA, all the others are 'missing texture'. That is what made me think the problem was related to the blockstates.json - The mod is working fine otherwise.

Edited by Astewen
Link to comment
Share on other sites

Join the conversation

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

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I have done this now but have got the error:   'food(net.minecraft.world.food.FoodProperties)' in 'net.minecraft.world.item.Item.Properties' cannot be applied to                '(net.minecraftforge.registries.RegistryObject<net.minecraft.world.item.Item>)' public static final RegistryObject<Item> LEMON_JUICE = ITEMS.register( "lemon_juice", () -> new Item( new HoneyBottleItem.Properties().stacksTo(1).food( (new FoodProperties.Builder()) .nutrition(3) .saturationMod(0.25F) .effect(() -> new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 1500), 0.01f ) .build() ) )); The code above is from the ModFoods class, the one below from the ModItems class. public static final RegistryObject<Item> LEMON_JUICE = ITEMS.register("lemon_juice", () -> new Item(new Item.Properties().food(ModFoods.LEMON_JUICE)));   I shall keep going between them to try and figure out the cause. I am sorry if this is too much for you to help with, though I thank you greatly for your patience and all the effort you have put in to help me.
    • I have been following these exact tutorials for quite a while, I must agree that they are amazing and easy to follow. I have registered the item in the ModFoods class, I tried to do it in ModItems (Where all the items should be registered) but got errors, I think I may need to revert this and figure it out from there. Once again, thank you for your help! 👍 Just looking back, I have noticed in your code you added ITEMS.register, which I am guessing means that they are being registered in ModFoods, I shall go through the process of trial and error to figure this out.
    • ♈+2349027025197ஜ Are you a pastor, business man or woman, politician, civil engineer, civil servant, security officer, entrepreneur, Job seeker, poor or rich Seeking how to join a brotherhood for protection and wealth here’s is your opportunity, but you should know there’s no ritual without repercussions but with the right guidance and support from this great temple your destiny is certain to be changed for the better and equally protected depending if you’re destined for greatness Call now for enquiry +2349027025197☎+2349027025197₩™ I want to join ILLUMINATI occult without human sacrificeGREATORLDRADO BROTHERHOOD OCCULT , Is The Club of the Riches and Famous; is the world oldest and largest fraternity made up of 3 Millions Members. We are one Family under one father who is the Supreme Being. In Greatorldrado BROTHERHOOD we believe that we were born in paradise and no member should struggle in this world. Hence all our new members are given Money Rewards once they join in order to upgrade their lifestyle.; interested viewers should contact us; on. +2349027025197 ۝ஐℰ+2349027025197 ₩Greatorldrado BROTHERHOOD OCCULT IS A SACRED FRATERNITY WITH A GRAND LODGE TEMPLE SITUATED IN G.R.A PHASE 1 PORT HARCOURT NIGERIA, OUR NUMBER ONE OBLIGATION IS TO MAKE EVERY INITIATE MEMBER HERE RICH AND FAMOUS IN OTHER RISE THE POWERS OF GUARDIANS OF AGE+. +2349027025197   SEARCHING ON HOW TO JOIN THE Greatorldrado BROTHERHOOD MONEY RITUAL OCCULT IS NOT THE PROBLEM BUT MAKE SURE YOU'VE THOUGHT ABOUT IT VERY WELL BEFORE REACHING US HERE BECAUSE NOT EVERYONE HAS THE HEART TO DO WHAT IT TAKES TO BECOME ONE OF US HERE, BUT IF YOU THINK YOU'RE SERIOUS MINDED AND READY TO RUN THE SPIRITUAL RACE OF LIFE IN OTHER TO ACQUIRE ALL YOU NEED HERE ON EARTH CONTACT SPIRITUAL GRANDMASTER NOW FOR INQUIRY +2349027025197   +2349027025197 Are you a pastor, business man or woman, politician, civil engineer, civil servant, security officer, entrepreneur, Job seeker, poor or rich Seeking how to join
    • Hi, I'm trying to use datagen to create json files in my own mod. This is my ModRecipeProvider class. public class ModRecipeProvider extends RecipeProvider implements IConditionBuilder { public ModRecipeProvider(PackOutput pOutput) { super(pOutput); } @Override protected void buildRecipes(Consumer<FinishedRecipe> pWriter) { ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModBlocks.COMPRESSED_DIAMOND_BLOCK.get()) .pattern("SSS") .pattern("SSS") .pattern("SSS") .define('S', ModItems.COMPRESSED_DIAMOND.get()) .unlockedBy(getHasName(ModItems.COMPRESSED_DIAMOND.get()), has(ModItems.COMPRESSED_DIAMOND.get())) .save(pWriter); ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ModItems.COMPRESSED_DIAMOND.get(),9) .requires(ModBlocks.COMPRESSED_DIAMOND_BLOCK.get()) .unlockedBy(getHasName(ModBlocks.COMPRESSED_DIAMOND_BLOCK.get()), has(ModBlocks.COMPRESSED_DIAMOND_BLOCK.get())) .save(pWriter); ShapedRecipeBuilder.shaped(RecipeCategory.MISC, ModItems.COMPRESSED_DIAMOND.get()) .pattern("SSS") .pattern("SSS") .pattern("SSS") .define('S', Blocks.DIAMOND_BLOCK) .unlockedBy(getHasName(ModItems.COMPRESSED_DIAMOND.get()), has(ModItems.COMPRESSED_DIAMOND.get())) .save(pWriter); } } When I try to run the runData client, it shows an error:  Caused by: java.lang.IllegalStateException: Duplicate recipe compressed:compressed_diamond I know that it's caused by the fact that there are two recipes for the ModItems.COMPRESSED_DIAMOND. But I need both of these recipes, because I need a way to craft ModItems.COMPRESSED_DIAMOND_BLOCK and restore 9 diamond blocks from ModItems.COMPRESSED_DIAMOND. Is there a way to solve this?
  • Topics

×
×
  • Create New...

Important Information

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