Jump to content

Recommended Posts

Posted

I've created a block "campfire" that should remove itself after a certain amount of times (As explained in the code below). However. Upon being removed and set to air, the tile entity still exists invisibly and prevents the player from walking through that air block. (As if it didn't actually set the block to air).

 

    @SideOnly(Side.CLIENT)

    public void randomDisplayTick(World world, int x, int y, int z, Random random) {

 

        ++ticksExisted;

        if (ticksExisted >= 100) {

            world.removeTileEntity(x, y, z);

            world.setBlockToAir(x, y, z);

            world.notifyBlockChange(x, y, z, Blocks.air);

        }

 

    }

 

Could it be because its Client-side only? Should I create a new method that deletes the block instead of using randomDisplayTick?

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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