Jump to content

Recommended Posts

Posted

I have 2 questions about NBT here:

1.) How do you create sub blocks with a Tile Entity instead of using meta (need > 16 sub blocks)

i.e. a block with 27 subtypes of stone and having all 27 of them in CreativeTabs.Block.

2.) How do you put a Tile Entity into a crafting table and get a Tile Entity out of a different sub block.

i.e. map + book = world atlas, world atlas + map = world atlas with new map added to a page.

Posted

On 2) TileEntities do no exist in your inventory.  In your inventory everything is an item stack.  You will need to also add NBTtags to the ItemStack for the block when it is in ItemStack form.  Crafting and such will need to have custom recipes (look up IRecipe).

 

On 1) You need to override getActualState() IIRC

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.

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

    • Necro'ing that thread to ask if you found a solution ? I'm encountering the same crash on loading the world. I created the world in Creative to test my MP, went into survival to test combat, died, crashed on respawn and since then crash on loading the world. Deactivating Oculus isn't fixing it either, and I don't have Optifine (Twilight forest is incompatible)
    • Cactus Flowers in vanilla can be placed on #minecraft:dirt, minecraft:farmland, or anything that is face sturdy upwards. Forge has added a line of code that works for other classes that extend VegetationBlock, but because CactusFlowerBlock has special placement, it has broken it. CactusFlowerBlock code @Override protected boolean mayPlaceOn(BlockState p_395694_, BlockGetter p_391810_, BlockPos p_391352_) { BlockState blockstate = p_391810_.getBlockState(p_391352_); return blockstate.is(Blocks.CACTUS) || blockstate.is(Blocks.FARMLAND) || blockstate.isFaceSturdy(p_391810_, p_391352_, Direction.UP, SupportType.CENTER); } VegetationBlock code that broke it @Override protected boolean canSurvive(BlockState p_397664_, LevelReader p_395119_, BlockPos p_393561_) { BlockPos blockpos = p_393561_.below(); if (p_397664_.getBlock() == this) { //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check. return p_395119_.getBlockState(blockpos).canSustainPlant(p_395119_, blockpos, Direction.UP, this); } return this.mayPlaceOn(p_395119_.getBlockState(blockpos), p_395119_, blockpos); }
    • thanks it's working again thanks again
  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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