Jump to content

[1.8] Why the hell don't door blockstates work at all?!


MacDue

Recommended Posts

 

I've been trying to figure this out for ages now. I have a custom door and no matter what I do it never finds a single block state and just comes with this error.

 

[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=left,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=right,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=left,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=right,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=right,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=left,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=right,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=right,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=right,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=right,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=left,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=right,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=left,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=right,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=left,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=left,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=right,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=right,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=left,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=left,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=left,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=right,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=right,open=false,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=left,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=right,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=left,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=right,open=false,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=left,open=true,powered=true not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=left,open=true,powered=false not found
[23:06:38] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=left,open=true,powered=true not found
[23:06:38] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[23:06:38] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:The Epicarno Mod
[23:06:38] [Client thread/INFO]: SoundSystem shutting down...
[23:06:38] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[23:06:39] [sound Library Loader/INFO]: Starting up SoundSystem...
[23:06:39] [Thread-9/INFO]: Initializing LWJGL OpenAL
[23:06:39] [Thread-9/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[23:06:39] [Thread-9/INFO]: OpenAL initialized.
[23:06:39] [sound Library Loader/INFO]: Sound engine started
[23:06:42] [Client thread/ERROR]: Using missing texture, unable to load forge_theepicarnomod:textures/blocks/YellowLant.png
java.io.FileNotFoundException: forge_theepicarnomod:textures/blocks/YellowLant.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:70) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:116) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadSprites(TextureMap.java:83) [TextureMap.class:?]
at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:94) [ModelLoader.class:?]
at net.minecraft.client.resources.model.ModelManager.onResourceManagerReload(ModelManager.java:29) [ModelManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:727) [Minecraft.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:306) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:484) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:325) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
[23:06:42] [Client thread/INFO]: Created: 512x512 textures-atlas
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=left,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=left,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=left,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=right,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=right,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=right,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=left,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=right,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=left,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=right,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=right,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=right,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=left,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=right,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=right,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=left,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=left,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=upper,hinge=left,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=left,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=right,open=true,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=right,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=upper,hinge=right,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=lower,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=left,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=west,half=lower,hinge=left,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=lower,hinge=right,open=true,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=south,half=lower,hinge=left,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=north,half=upper,hinge=right,open=false,powered=true not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location forge_theepicarnomod:AmboynaDoor#facing=east,half=upper,hinge=right,open=false,powered=false not found
[23:06:42] [Client thread/ERROR] [FML]: Model definition for location f

#

 

ect even though they are all in the json. And I have checked spelling 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000xs. I have no clue why it does not work or find a blockstae.

 

Json file using jungle for now as I got this error with mine I thought it was that

{
    "variants": {
        "facing=east,half=lower,hinge=left,open=false":  { "model": "jungle_door_bottom" },
        "facing=south,half=lower,hinge=left,open=false": { "model": "jungle_door_bottom", "y": 90 },
        "facing=west,half=lower,hinge=left,open=false":  { "model": "jungle_door_bottom", "y": 180 },
        "facing=north,half=lower,hinge=left,open=false": { "model": "jungle_door_bottom", "y": 270 },
        "facing=east,half=lower,hinge=right,open=false":  { "model": "jungle_door_bottom_rh" },
        "facing=south,half=lower,hinge=right,open=false": { "model": "jungle_door_bottom_rh", "y": 90 },
        "facing=west,half=lower,hinge=right,open=false":  { "model": "jungle_door_bottom_rh", "y": 180 },
        "facing=north,half=lower,hinge=right,open=false": { "model": "jungle_door_bottom_rh", "y": 270 },
        "facing=east,half=lower,hinge=left,open=true":  { "model": "jungle_door_bottom_rh", "y": 90 },
        "facing=south,half=lower,hinge=left,open=true": { "model": "jungle_door_bottom_rh", "y": 180 },
        "facing=west,half=lower,hinge=left,open=true":  { "model": "jungle_door_bottom_rh", "y": 270 },
        "facing=north,half=lower,hinge=left,open=true": { "model": "jungle_door_bottom_rh" },
        "facing=east,half=lower,hinge=right,open=true":  { "model": "jungle_door_bottom", "y": 270 },
        "facing=south,half=lower,hinge=right,open=true": { "model": "jungle_door_bottom" },
        "facing=west,half=lower,hinge=right,open=true":  { "model": "jungle_door_bottom", "y": 90 },
        "facing=north,half=lower,hinge=right,open=true": { "model": "jungle_door_bottom", "y": 180 },
        "facing=east,half=upper,hinge=left,open=false":  { "model": "jungle_door_top" },
        "facing=south,half=upper,hinge=left,open=false": { "model": "jungle_door_top", "y": 90 },
        "facing=west,half=upper,hinge=left,open=false":  { "model": "jungle_door_top", "y": 180 },
        "facing=north,half=upper,hinge=left,open=false": { "model": "jungle_door_top", "y": 270 },
        "facing=east,half=upper,hinge=right,open=false":  { "model": "jungle_door_top_rh" },
        "facing=south,half=upper,hinge=right,open=false": { "model": "jungle_door_top_rh", "y": 90 },
        "facing=west,half=upper,hinge=right,open=false":  { "model": "jungle_door_top_rh", "y": 180 },
        "facing=north,half=upper,hinge=right,open=false": { "model": "jungle_door_top_rh", "y": 270 },
        "facing=east,half=upper,hinge=left,open=true":  { "model": "jungle_door_top_rh", "y": 90 },
        "facing=south,half=upper,hinge=left,open=true": { "model": "jungle_door_top_rh", "y": 180 },
        "facing=west,half=upper,hinge=left,open=true":  { "model": "jungle_door_top_rh", "y": 270 },
        "facing=north,half=upper,hinge=left,open=true": { "model": "jungle_door_top_rh" },
        "facing=east,half=upper,hinge=right,open=true":  { "model": "jungle_door_top", "y": 270 },
        "facing=south,half=upper,hinge=right,open=true": { "model": "jungle_door_top" },
        "facing=west,half=upper,hinge=right,open=true":  { "model": "jungle_door_top", "y": 90 },
        "facing=north,half=upper,hinge=right,open=true": { "model": "jungle_door_top", "y": 180 }
    }
}

 

AmboynaDoor.java

package epicarno.mystical.common.block;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.BlockDoor;
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.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class BlockAmboynaDoor extends Block
{
    public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
    public static final PropertyBool OPEN = PropertyBool.create("open");
    public static final PropertyEnum HINGE = PropertyEnum.create("hinge", BlockAmboynaDoor.EnumHingePosition.class);
    public static final PropertyBool POWERED = PropertyBool.create("powered");
    public static final PropertyEnum HALF = PropertyEnum.create("half", BlockAmboynaDoor.EnumDoorHalf.class);
    private static final String name = "AmboynaDoor";

    public BlockAmboynaDoor(Material materialIn)
    {
super(materialIn);
        GameRegistry.registerBlock(this, name);
        setUnlocalizedName(name);
        setCreativeTab(CreativeTabs.tabBlock);
        this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(OPEN, Boolean.valueOf(false)).withProperty(HINGE, BlockAmboynaDoor.EnumHingePosition.LEFT).withProperty(POWERED, Boolean.valueOf(false)).withProperty(HALF, BlockAmboynaDoor.EnumDoorHalf.LOWER));
    }

    public boolean isOpaqueCube()
    {
        return false;
    }

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

    public boolean isFullCube()
    {
        return false;
    }

    @SideOnly(Side.CLIENT)
    public AxisAlignedBB getSelectedBoundingBox(World worldIn, BlockPos pos)
    {
        this.setBlockBoundsBasedOnState(worldIn, pos);
        return super.getSelectedBoundingBox(worldIn, pos);
    }

    public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
    {
        this.setBlockBoundsBasedOnState(worldIn, pos);
        return super.getCollisionBoundingBox(worldIn, pos, state);
    }

    public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos)
    {
        this.setBoundBasedOnMeta(combineMetadata(worldIn, pos));
    }

    private void setBoundBasedOnMeta(int combinedMeta)
    {
        float f = 0.1875F;
        this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 2.0F, 1.0F);
        EnumFacing enumfacing = getFacing(combinedMeta);
        boolean flag = isOpen(combinedMeta);
        boolean flag1 = isHingeLeft(combinedMeta);

        if (flag)
        {
            if (enumfacing == EnumFacing.EAST)
            {
                if (!flag1)
                {
                    this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
                }
                else
                {
                    this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
                }
            }
            else if (enumfacing == EnumFacing.SOUTH)
            {
                if (!flag1)
                {
                    this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                }
                else
                {
                    this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
                }
            }
            else if (enumfacing == EnumFacing.WEST)
            {
                if (!flag1)
                {
                    this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
                }
                else
                {
                    this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
                }
            }
            else if (enumfacing == EnumFacing.NORTH)
            {
                if (!flag1)
                {
                    this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
                }
                else
                {
                    this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
                }
            }
        }
        else if (enumfacing == EnumFacing.EAST)
        {
            this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
        }
        else if (enumfacing == EnumFacing.SOUTH)
        {
            this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
        }
        else if (enumfacing == EnumFacing.WEST)
        {
            this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        }
        else if (enumfacing == EnumFacing.NORTH)
        {
            this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
        }
    }

    public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
    {
        if (this.blockMaterial == Material.iron)
        {
            return false; //Allow items to interact with the door
        }
        else
        {
            BlockPos blockpos1 = state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.LOWER ? pos : pos.down();
            IBlockState iblockstate1 = pos.equals(blockpos1) ? state : worldIn.getBlockState(blockpos1);

            if (iblockstate1.getBlock() != this)
            {
                return false;
            }
            else
            {
                state = iblockstate1.cycleProperty(OPEN);
                worldIn.setBlockState(blockpos1, state, 2);
                worldIn.markBlockRangeForRenderUpdate(blockpos1, pos);
                worldIn.playAuxSFXAtEntity(playerIn, ((Boolean)state.getValue(OPEN)).booleanValue() ? 1003 : 1006, pos, 0);
                return true;
            }
        }
    }

    public void toggleDoor(World worldIn, BlockPos pos, boolean open)
    {
        IBlockState iblockstate = worldIn.getBlockState(pos);

        if (iblockstate.getBlock() == this)
        {
            BlockPos blockpos1 = iblockstate.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.LOWER ? pos : pos.down();
            IBlockState iblockstate1 = pos == blockpos1 ? iblockstate : worldIn.getBlockState(blockpos1);

            if (iblockstate1.getBlock() == this && ((Boolean)iblockstate1.getValue(OPEN)).booleanValue() != open)
            {
                worldIn.setBlockState(blockpos1, iblockstate1.withProperty(OPEN, Boolean.valueOf(open)), 2);
                worldIn.markBlockRangeForRenderUpdate(blockpos1, pos);
                worldIn.playAuxSFXAtEntity((EntityPlayer)null, open ? 1003 : 1006, pos, 0);
            }
        }
    }

    public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
    {
        if (state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.UPPER)
        {
            BlockPos blockpos1 = pos.down();
            IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);

            if (iblockstate1.getBlock() != this)
            {
                worldIn.setBlockToAir(pos);
            }
            else if (neighborBlock != this)
            {
                this.onNeighborBlockChange(worldIn, blockpos1, iblockstate1, neighborBlock);
            }
        }
        else
        {
            boolean flag1 = false;
            BlockPos blockpos2 = pos.up();
            IBlockState iblockstate2 = worldIn.getBlockState(blockpos2);

            if (iblockstate2.getBlock() != this)
            {
                worldIn.setBlockToAir(pos);
                flag1 = true;
            }

            if (!World.doesBlockHaveSolidTopSurface(worldIn, pos.down()))
            {
                worldIn.setBlockToAir(pos);
                flag1 = true;

                if (iblockstate2.getBlock() == this)
                {
                    worldIn.setBlockToAir(blockpos2);
                }
            }

            if (flag1)
            {
                if (!worldIn.isRemote)
                {
                    this.dropBlockAsItem(worldIn, pos, state, 0);
                }
            }
            else
            {
                boolean flag = worldIn.isBlockPowered(pos) || worldIn.isBlockPowered(blockpos2);

                if ((flag || neighborBlock.canProvidePower()) && neighborBlock != this && flag != ((Boolean)iblockstate2.getValue(POWERED)).booleanValue())
                {
                    worldIn.setBlockState(blockpos2, iblockstate2.withProperty(POWERED, Boolean.valueOf(flag)), 2);

                    if (flag != ((Boolean)state.getValue(OPEN)).booleanValue())
                    {
                        worldIn.setBlockState(pos, state.withProperty(OPEN, Boolean.valueOf(flag)), 2);
                        worldIn.markBlockRangeForRenderUpdate(pos, pos);
                        worldIn.playAuxSFXAtEntity((EntityPlayer)null, flag ? 1003 : 1006, pos, 0);
                    }
                }
            }
        }
    }

    public Item getItemDropped(IBlockState state, Random rand, int fortune)
    {
        return state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.UPPER ? null : this.getItem();
    }

    public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
    {
        this.setBlockBoundsBasedOnState(worldIn, pos);
        return super.collisionRayTrace(worldIn, pos, start, end);
    }

    public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
    {
        return pos.getY() >= worldIn.getHeight() - 1 ? false : World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && super.canPlaceBlockAt(worldIn, pos) && super.canPlaceBlockAt(worldIn, pos.up());
    }

    public int getMobilityFlag()
    {
        return 1;
    }

    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);
    }

    @SideOnly(Side.CLIENT)
    public Item getItem(World worldIn, BlockPos pos)
    {
        return this.getItem();
    }

    private Item getItem()
    {
        return this == Blocks.iron_door ? Items.iron_door : (this == Blocks.spruce_door ? Items.spruce_door : (this == Blocks.birch_door ? Items.birch_door : (this == Blocks.jungle_door ? Items.jungle_door : (this == Blocks.acacia_door ? Items.acacia_door : (this == Blocks.dark_oak_door ? Items.dark_oak_door : Items.oak_door)))));
    }

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

        if (player.capabilities.isCreativeMode && state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.UPPER && worldIn.getBlockState(blockpos1).getBlock() == this)
        {
            worldIn.setBlockToAir(blockpos1);
        }
    }

    public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos)
    {
        IBlockState iblockstate1;

        if (state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.LOWER)
        {
            iblockstate1 = worldIn.getBlockState(pos.up());

            if (iblockstate1.getBlock() == this)
            {
                state = state.withProperty(HINGE, iblockstate1.getValue(HINGE)).withProperty(POWERED, iblockstate1.getValue(POWERED));
            }
        }
        else
        {
            iblockstate1 = worldIn.getBlockState(pos.down());

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

        return state;
    }

    public IBlockState getStateFromMeta(int meta)
    {
        return (meta &  > 0 ? this.getDefaultState().withProperty(HALF, BlockAmboynaDoor.EnumDoorHalf.UPPER).withProperty(HINGE, (meta & 1) > 0 ? BlockAmboynaDoor.EnumHingePosition.RIGHT : BlockAmboynaDoor.EnumHingePosition.LEFT).withProperty(POWERED, Boolean.valueOf((meta & 2) > 0)) : this.getDefaultState().withProperty(HALF, BlockAmboynaDoor.EnumDoorHalf.LOWER).withProperty(FACING, EnumFacing.getHorizontal(meta & 3).rotateYCCW()).withProperty(OPEN, Boolean.valueOf((meta & 4) > 0));
    }

    @SideOnly(Side.CLIENT)
    public EnumWorldBlockLayer getBlockLayer()
    {
        return EnumWorldBlockLayer.CUTOUT;
    }

    public int getMetaFromState(IBlockState state)
    {
        byte b0 = 0;
        int i;

        if (state.getValue(HALF) == BlockAmboynaDoor.EnumDoorHalf.UPPER)
        {
            i = b0 | 8;

            if (state.getValue(HINGE) == BlockAmboynaDoor.EnumHingePosition.RIGHT)
            {
                i |= 1;
            }

            if (((Boolean)state.getValue(POWERED)).booleanValue())
            {
                i |= 2;
            }
        }
        else
        {
            i = b0 | ((EnumFacing)state.getValue(FACING)).rotateY().getHorizontalIndex();

            if (((Boolean)state.getValue(OPEN)).booleanValue())
            {
                i |= 4;
            }
        }

        return i;
    }

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

    public static boolean isOpen(IBlockAccess worldIn, BlockPos pos)
    {
        return isOpen(combineMetadata(worldIn, pos));
    }

    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();
    }

    protected static boolean isOpen(int combinedMeta)
    {
        return (combinedMeta & 4) != 0;
    }

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

    protected static boolean isHingeLeft(int combinedMeta)
    {
        return (combinedMeta & 16) != 0;
    }

    protected BlockState createBlockState()
    {
        return new BlockState(this, new IProperty[] {HALF, FACING, OPEN, HINGE, POWERED});
    }

    public static enum EnumDoorHalf implements IStringSerializable
    {
        UPPER,
        LOWER;

        private static final String __OBFID = "CL_00002124";

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

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

    public static enum EnumHingePosition implements IStringSerializable
    {
        LEFT,
        RIGHT;

        private static final String __OBFID = "CL_00002123";

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

        public String getName()
        {
            return this == LEFT ? "left" : "right";
        }
    }
}

 

Ugh this is pissing me off to much I have to take a break.

 

Link to comment
Share on other sites

Dude, look closer :)

 

It's looking for this

facing=west,half=lower,hinge=left,open=false,powered=false

and your blockstates json has this

facing=east,half=lower,hinge=left,open=false

 

    protected BlockState createBlockState()

    {

        return new BlockState(this, new IProperty[] {HALF, FACING, OPEN, HINGE, POWERED});

    }

 

-TGG

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

    • https://pastebin.com/VwpAW6PX My game crashes upon launch when trying to implement the Oculus mod to this mod compilation, above is the crash report, I do not know where to begin to attempt to fix this issue and require assistance.
    • https://youtube.com/shorts/gqLTSMymgUg?si=5QOeSvA4TTs-bL46
    • CubeHaven is a SMP server with unique features that can't be found on the majority of other servers! Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132 3 different stores: - CubeHaven Store: Our store to purchase using real money. - Bitcoin Store: Store for Bitcoin. Bitcoin can be earned from playing the server. Giving options for players if they want to spend real money or grind to obtain exclusive packages. - Black Market: A hidden store for trading that operates outside our traditional stores, like custom enchantments, exclusive items and more. Some of our features include: Rank Up: Progress through different ranks to unlock new privileges and perks. 📈 Skills: RPG-style skill system that enhances your gaming experience! 🎮 Leaderboards: Compete and shine! Top players are rewarded weekly! 🏆 Random Teleporter: Travel instantly across different worlds with a click! 🌐 Custom World Generation: Beautifully generated world. 🌍 Dungeons: Explore challenging and rewarding dungeons filled with treasures and monsters. 🏰 Kits: Unlock ranks and gain access to various kits. 🛠️ Fishing Tournament: Compete in a friendly fishing tournament! 🎣 Chat Games: Enjoy games right within the chat! 🎲 Minions: Get some help from your loyal minions. 👥 Piñata Party: Enjoy a festive party with Piñatas! 🎉 Quests: Over 1000 quests that you can complete! 📜 Bounty Hunter: Set a bounty on a player's head. 💰 Tags: Displayed on nametags, in the tab list, and in chat. 🏷️ Coinflip: Bet with other players on coin toss outcomes, victory, or defeat! 🟢 Invisible & Glowing Frames: Hide your frames for a cleaner look or apply a glow to it for a beautiful look. 🔲✨[ Player Warp: Set your own warp points for other players to teleport to. 🌟 Display Shop: Create your own shop and sell to other players! 🛒 Item Skins: Customize your items with unique skins. 🎨 Pets: Your cute loyal companion to follow you wherever you go! 🐾 Cosmetics: Enhance the look of your character with beautiful cosmetics! 💄 XP-Bottle: Store your exp safely in a bottle for later use! 🍶 Chest & Inventory Sorting: Keep your items neatly sorted in your inventory or chest! 📦 Glowing: Stand out from other players with a colorful glow! ✨ Player Particles: Over 100 unique particle effects to show off. 🎇 Portable Inventories: Over virtual inventories with ease. 🧳 And a lot more! Become part of our growing community today! Discord: https://cubehaven.net/discord Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132
  • Topics

×
×
  • Create New...

Important Information

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