314owen Posted July 6, 2014 Share Posted July 6, 2014 I am trying to put my modded block into my structure. When I remove the tile entity code from the block, It places fine, but I need to have it have the tile entity code. How do I fix this? I have tried using .setBlock and .setTileEntity Quote Link to comment Share on other sites More sharing options...
314owen Posted July 6, 2014 Author Share Posted July 6, 2014 Why do you use .setTileEntity? .setBlock will automatically create the needed TileEntities. The Block does not get placed either way. Quote Link to comment Share on other sites More sharing options...
314owen Posted July 6, 2014 Author Share Posted July 6, 2014 I'm Just Using Basic setBlock Code Under My Generate Method: First I tried this: world.setBlock(i + 2, j + 6, k + 3, MyMod.MyBlock); Then I tried this: TileEntityMyBlock block = new TileEntityMyBlock(); world.setTileEntity(i + 2, j + 6, k + 3, block); Then I tried both. Here is my block class: public class BlockMyBlock extends Block{ protected BlockMyBlock(Material p_i45394_1_) { super(p_i45394_1_); } public TileEntity createTileEntity(World p_149915_1_, int p_149915_2_) { return new TileEntityMyBlock(); } public boolean hasTileEntity(int metadata) { return true; } } Quote Link to comment Share on other sites More sharing options...
314owen Posted July 7, 2014 Author Share Posted July 7, 2014 HauntedHouse Gen: http://pastebin.com/Nc1p1Psx WorldGenerator: http://pastebin.com/4Y9xayG9 Block: http://pastebin.com/tZQzj0ak Tile Entity: http://pastebin.com/rG96ZiWH Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.