Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Reopened again][1.12.2] How to change blockstate based on helditem


_Cruelar_
 Share

Recommended Posts

oh sorry. I had the entityPlayer == null Problem since I started the topic and even before. thought it was because there are problems with world should have changed that by now

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

I get now an error with the json

blockstates json

{
  "forge_marker": 1,
  "defaults": {
    "model": "cruelars_triforcemod:dungeonbrick"
  },
  "variants": {
    "normal": [{}],
    "inventory": [{}],
    "visible=false":{
      "model": "cruelars_triforcemod:hidden_block"
    },
    "visible=true":{
      "model": "cruelars_triforcemod:hidden_block"
    }
  }
}

 

model json

{
  "parent": "block/cube_all",
  "textures":{
    "visible=true": "cruelars_triforcemod:blocks/air",
    "visible=false": "cruelars_triforcemod:blocks/dungeonbrick"
  }
}

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

You need to have the normal and inventory variant, even if you don't use them...


And I don't think that the model's textures works that way... because you should set the texture in the blockstate.

Yeah, the "cube_all" uses a "layer0" named texture, in vanilla, and a normal "all" texture in forge, so here's the correct one: 

{
  "forge_marker": 1,
  "defaults": {
    "textures": {
      "all": "whatever:blocks/yourblock_def"
    }
  },
  "variants": {
    "visible=true": {
      "model": "cube_all",
	  "textures": {
        "all": "whatever:blocks/yourblock_true"
      }
    },
    "visible=false": {
      "model": "cube_all",
	  "textures": {
        "all": "whatever:blocks/yourblock_false"
      }
    }
  }
}

 

Edited by Legenes
  • Thanks 1
procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Link to comment
Share on other sites

1 minute ago, Legenes said:

You need to have the normal and inventory variant, even if you don't use them...

This is not true.

 

9 minutes ago, _Cruelar_ said:

I get now an error with the json

What error? Why do you have the normal variant in there? It is never used unless you have a block without properties.

Link to comment
Share on other sites

Could you try the blockstate I sent, of course with your textures?. (You don't need to have a "_def" texture, it can be the true/false one)

procedure WakeMeUp(Integer plusTime);
var
  I: Integer;
begin
  for I := 0 to plusTime do begin
    println('One more minute!');
    Sleep(1000);
  end;
  println('Okay, nothing to worry, I''m alive!');
  println('So... somebody can give me a coffee?');
  println('I know it''s Pascal, and not Java, but I love it :D.');
end;
Link to comment
Share on other sites

33 minutes ago, diesieben07 said:

What error? Why do you have the normal variant in there? It is never used unless you have a block without properties.

[19:42:43] [main/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

@Legenes, @diesieben07

If it's ok to you, I'll mention you in my changelog

Spoiler

Changelog for mc mod version 0.4.2
+++++++++++++++++++++++++++++++++++

+ false and hidden block finally work (Thanks to Legenes and diesieben07 in the Forge Modder Support Forum)

false block is an air block that gets invisible when the lens of truth is hold

  • Like 1

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

27 minutes ago, _Cruelar_ said:

[19:42:43] [main/WARN]: Unable to resolve texture due to upward reference: #all in minecraft:models/block/cube_all

This is because your model file:

1 hour ago, _Cruelar_ said:

{
  "parent": "block/cube_all",
  "textures":{
    "visible=true": "cruelars_triforcemod:blocks/air",
    "visible=false": "cruelars_triforcemod:blocks/dungeonbrick"
  }
}

Does not have a definition for the #all texture reference.

eg:

"textures": {
    "all": "[some texture png]"
},

Nor is this specified in your blockstate file.

 

Also, these:

  "textures":{
    "visible=true": "cruelars_triforcemod:blocks/air",
    "visible=false": "cruelars_triforcemod:blocks/dungeonbrick"
  }

Are creating texture references, #visible=true and #visible=false.

They are NOT variants!

 

You could then reassign these textures in your blockstate file:

"variants": {
    "visible=true": {
        "textures": {
            "#visible=false": "[some new texture png]"
        }
    },
    ...
}

 

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

I haven't thought of that but this shouldn't be a Problem for me as I'm planning to use these Blocks as obstacles in dungeons not as Material for building invisible things.

Edited by _Cruelar_

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Obstacles in dungeons, allowing all players to see when one person holds the item is a reasonable thing.

If a group goes in together showing the blocks to everyone is a Quality of Life improvement IMO.

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

I'm planning to make similar blocks for the different dungeon environments I'm designing. But I'm in early development so that's all stuff of the future.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

15 minutes ago, _Cruelar_ said:

The Textures doesn't change anymore after reloading the world. Is there a way to fix that?

Do you override write/read to nbt in your TE? If so make sure you call super or the TE will have problems loading. If this is not the case, try stepping through it in your IDEs debugger and find out what is happening.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I haven't overrode the methods. now it works with new placed Blocks although the ones I placed before the change still don't work. Thanks.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

1 minute ago, _Cruelar_ said:

I haven't overrode the methods. now it works with new placed Blocks although the ones I placed before the change still don't work. Thanks.

Did you register your TileEntity?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Yes.

@SubscribeEvent
    public static void registerBlocks(RegistryEvent.Register<net.minecraft.block.Block> event){
        event.getRegistry().register(new False_Block());
        event.getRegistry().register(new Hidden_Block());
        GameRegistry.registerTileEntity(False_Block_TileEntity.class,new ResourceLocation("cruelars_triforcemod:tileentity/False_Block_TileEntity"));
        GameRegistry.registerTileEntity(Hidden_Block_TileEntity.class,new ResourceLocation("cruelars_triforcemod:tileentity/Hidden_Block_TileEntity"));

 

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Randomly the game crashes with this

Spoiler

[16:59:25] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking entity
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:848) ~[MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) ~[MinecraftServer.class:?]
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Caused by: java.lang.NullPointerException
    at net.minecraft.pathfinding.WalkNodeProcessor.getSafePoint(WalkNodeProcessor.java:203) ~[WalkNodeProcessor.class:?]
    at net.minecraft.pathfinding.WalkNodeProcessor.getSafePoint(WalkNodeProcessor.java:230) ~[WalkNodeProcessor.class:?]
    at net.minecraft.pathfinding.WalkNodeProcessor.findPathOptions(WalkNodeProcessor.java:123) ~[WalkNodeProcessor.class:?]
    at net.minecraft.pathfinding.PathFinder.findPath(PathFinder.java:84) ~[PathFinder.class:?]
    at net.minecraft.pathfinding.PathFinder.findPath(PathFinder.java:44) ~[PathFinder.class:?]
    at net.minecraft.pathfinding.PathFinder.findPath(PathFinder.java:34) ~[PathFinder.class:?]
    at net.minecraft.pathfinding.PathNavigate.getPathToPos(PathNavigate.java:129) ~[PathNavigate.class:?]
    at net.minecraft.pathfinding.PathNavigateGround.getPathToPos(PathNavigateGround.java:82) ~[PathNavigateGround.class:?]
    at net.minecraft.pathfinding.PathNavigateClimber.getPathToPos(PathNavigateClimber.java:25) ~[PathNavigateClimber.class:?]
    at net.minecraft.pathfinding.PathNavigate.getPathToXYZ(PathNavigate.java:104) ~[PathNavigate.class:?]
    at net.minecraft.pathfinding.PathNavigate.tryMoveToXYZ(PathNavigate.java:173) ~[PathNavigate.class:?]
    at net.minecraft.entity.ai.EntityAIWander.startExecuting(EntityAIWander.java:83) ~[EntityAIWander.class:?]
    at net.minecraft.entity.ai.EntityAITasks.onUpdateTasks(EntityAITasks.java:84) ~[EntityAITasks.class:?]
    at net.minecraft.entity.EntityLiving.updateEntityActionState(EntityLiving.java:843) ~[EntityLiving.class:?]
    at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2580) ~[EntityLivingBase.class:?]
    at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:647) ~[EntityLiving.class:?]
    at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:49) ~[EntityMob.class:?]
    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2396) ~[EntityLivingBase.class:?]
    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:346) ~[EntityLiving.class:?]
    at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:57) ~[EntityMob.class:?]
    at net.minecraft.entity.monster.EntitySpider.onUpdate(EntitySpider.java:94) ~[EntitySpider.class:?]
    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2168) ~[World.class:?]
    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:871) ~[WorldServer.class:?]
    at net.minecraft.world.World.updateEntity(World.java:2127) ~[World.class:?]
    at net.minecraft.world.World.updateEntities(World.java:1928) ~[World.class:?]
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:643) ~[WorldServer.class:?]
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:842) ~[MinecraftServer.class:?]
    ... 4 more

 

in the terminal. I post here as I think its related to this block.

Updated code:

package com.cruelar.cruelars_triforcemod.blocks;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.init.ModBlocks;
import com.cruelar.cruelars_triforcemod.init.ModItems;
import com.cruelar.cruelars_triforcemod.tileentity.Hidden_Block_TileEntity;
import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.EnumPushReaction;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import java.util.Objects;

import static com.cruelar.cruelars_triforcemod.inventory.cruelars_triforcemod.CRUELARS_TRIFORCEMOD;

public class Hidden_Block extends Block {
    public static final PropertyBool VISIBLE = PropertyBool.create("visible");

    /**
     * Creates an new Hidden Block from another Block
     * @param blockname name of the block. hidden_ will be added before
     * @param blockmaterial material of the block*/
    public Hidden_Block(String blockname, Material blockmaterial){
        super(blockmaterial);
        this.setDefaultState(this.blockState.getBaseState().withProperty(VISIBLE,true));
        this.setRegistryName(("hidden_"+blockname));
        this.setUnlocalizedName((Cruelars_Triforcemod_Core.MODID+".hidden_"+blockname));
        this.setCreativeTab(CRUELARS_TRIFORCEMOD);
    }

    @MethodsReturnNonnullByDefault
    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, new IProperty[]{VISIBLE});
    }

    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getStateFromMeta(int meta) {
        return getDefaultState()
                .withProperty(VISIBLE, meta!=0);

    }

    @SuppressWarnings("deprecation")
    @Override
    public IBlockState getActualState(IBlockState iBlockState,IBlockAccess iBlockAccess, BlockPos blockPos) {
        return iBlockState;
    }

    @Override
    public int getMetaFromState(IBlockState blockState) {
        int i = 0;
        if ((boolean)blockState.getValue(VISIBLE)){
            i |= 2;
        }
        return i;
    }

    @Override
    public TileEntity createTileEntity(World world, IBlockState iBlockState){
        return new Hidden_Block_TileEntity();
    }

    @Override
    public boolean hasTileEntity(IBlockState p_hasTileEntity_1_) {
        return true;
    }

    @SuppressWarnings("deprecation")
    @Override
    public boolean isOpaqueCube(IBlockState p_isOpaqueCube_1_) {
        return false;
    }

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

    @Override
    public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState iBlockState, EntityPlayer entityPlayer, EnumHand enumHand, EnumFacing enumFacing, float p_float_1, float p_float_2, float p_float_3) {
        if (entityPlayer.getHeldItem(enumHand).getItem()== ModItems.lens_of_truth&&!iBlockState.getValue(VISIBLE)){
            iBlockState.cycleProperty(VISIBLE);
        } else if (iBlockState.getValue(VISIBLE)){
            iBlockState.cycleProperty(VISIBLE);
        }
        return true;
    }

    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(Objects.requireNonNull(this.getRegistryName()), "inventory"));
    }

    @Override
    @SuppressWarnings("deprecation")
    public EnumPushReaction getMobilityFlag(IBlockState p_getMobilityFlag_1_) {
        return EnumPushReaction.IGNORE;
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isTopSolid(IBlockState state) {
        return true;
    }
}

Everything else is the same as before I only changed it to be a blueprint for hidden_blocks

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

As far as I can tell, Minecraft vanilla code is crashing here:

double d0 = (double)y - (1.0D - this.blockaccess.getBlockState(blockpos1).getBoundingBox(this.blockaccess, blockpos1).maxY);

The only thing that could even be null on this line is the return from getBoundingBox(), but the code you've shown does not override this method.

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

On 8/1/2018 at 6:00 PM, Draco18s said:

The only thing that could even be null on this line is the return from getBoundingBox(), but the code you've shown does not override this method.

What's about this:

package com.cruelar.cruelars_triforcemod.blocks;

import com.cruelar.cruelars_triforcemod.Cruelars_Triforcemod_Core;
import com.cruelar.cruelars_triforcemod.init.ModBlocks;
import com.cruelar.cruelars_triforcemod.proxy.CommonProxy;
import com.cruelar.cruelars_triforcemod.tileentity.False_Block_TileEntity;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.EnumPushReaction;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import static com.cruelar.cruelars_triforcemod.inventory.cruelars_triforcemod.CRUELARS_TRIFORCEMOD;

public class False_Block extends Block {
    public static final PropertyBool VISIBLE = PropertyBool.create("visible");

    /**
     * Creates an new False Block from another Block
     * @param blockname name of the block. false_ will be added before*/
    public False_Block(String blockname){
        super(Material.AIR);
        this.setDefaultState(this.blockState.getBaseState().withProperty(VISIBLE,true));
        this.setRegistryName("false_"+blockname);
        this.setUnlocalizedName(Cruelars_Triforcemod_Core.MODID+".false_"+blockname);
        this.setCreativeTab(CRUELARS_TRIFORCEMOD);
    }

    @Override
    protected BlockStateContainer createBlockState() {
        return new BlockStateContainer(this, new IProperty[]{VISIBLE});
    }

    @Override
    @SuppressWarnings("deprecation")
    public AxisAlignedBB getBoundingBox(IBlockState iBlockState, IBlockAccess p_getBoundingBox_2_, BlockPos p_getBoundingBox_3_) {
        return NULL_AABB;
    }

    @Override
    public boolean canCollideCheck(IBlockState p_canCollideCheck_1_, boolean p_canCollideCheck_2_) {
        return false;
    }

    @Override
    @SuppressWarnings("deprecation")
    public EnumBlockRenderType getRenderType(IBlockState p_getRenderType_1_) {
        return EnumBlockRenderType.MODEL;
    }

    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getStateFromMeta(int meta) {
        return this.getDefaultState().withProperty(VISIBLE,(meta & 2)>0);

    }

    @Override
    @SuppressWarnings("deprecation")
    public IBlockState getActualState(IBlockState iBlockState,IBlockAccess iBlockAccess, BlockPos blockPos) {
        return iBlockState;
    }

    @Override
    public int getMetaFromState(IBlockState blockState) {
        int i = 0;
        if ((boolean)blockState.getValue(VISIBLE)){
            i |= 2;
        }
        return i;
    }

    @Override
    public TileEntity createTileEntity(World world,IBlockState iBlockState){
        return new False_Block_TileEntity();
    }

    @Override
    public boolean hasTileEntity(IBlockState p_hasTileEntity_1_) {
        return true;
    }

    @Override
    @SuppressWarnings("deprecation")
    public boolean isOpaqueCube(IBlockState p_isOpaqueCube_1_) {
        return false;
    }

    public static void setVisible(IBlockState iBlockState){
        iBlockState.cycleProperty(VISIBLE);
    }

    @Override
    public boolean isReplaceable(IBlockAccess p_isReplaceable_1_, BlockPos p_isReplaceable_2_) {
        return true;
    }

    @SideOnly(Side.CLIENT)
    public void initModel(){
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }

    @Override
    @SuppressWarnings("deprecation")
    public EnumPushReaction getMobilityFlag(IBlockState p_getMobilityFlag_1_) {
        return EnumPushReaction.IGNORE;
    }

    @Override
    @SideOnly(Side.CLIENT)
    @SuppressWarnings("deprecation")
    public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos blockPos, EnumFacing side){
        return true;
    }

    @Override
    @SuppressWarnings("deprecation")
    public BlockFaceShape getBlockFaceShape(IBlockAccess p_getBlockFaceShape_1_, IBlockState p_getBlockFaceShape_2_, BlockPos p_getBlockFaceShape_3_, EnumFacing p_getBlockFaceShape_4_) {
        return BlockFaceShape.UNDEFINED;
    }

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

    @Override
    @SuppressWarnings("deprecation")
    public boolean isFullCube(IBlockState p_isFullCube_1_) {
        return false;
    }
    
    @Override
    public boolean isAir(IBlockState p_isAir_1_, IBlockAccess p_isAir_2_, BlockPos p_isAir_3_) {
        return false;
    }

    @Override
    public boolean isPassable(IBlockAccess p_isPassable_1_, BlockPos p_isPassable_2_) {
        return true;
    }

    @Override
    public boolean isNormalCube(IBlockState p_isNormalCube_1_, IBlockAccess p_isNormalCube_2_, BlockPos p_isNormalCube_3_) {
        return false;
    }
}

That overrides getBoundingBox()

Sorry for the late answer.

My Projects:

Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming)

 

Important:

As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts

Link to comment
Share on other sites

Try returning something other than NULL_AABB. I realize that Minecraft uses it and it doesn't crash, but I can't figure out why your block is a problem.

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

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
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.

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.