Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/09/17 in all areas

  1. Let me see if my sleep addled brain got that right. Each time you declared a new public class in your example, that opened up a new category page?
    1 point
  2. Hello, I recently began updating my mod for 1.8 and now I am trying to update my multiblock.It works perfectly except for one thing: if I try to change the state of the block in the world, the tile entity in that position in the world is going to change, and all that I modified in my initial tile entity will go to waste.I did try and validate the tile and then use world.setTileEntity to set the original tile back in the world but with no luck. Here is the function that changes the block state.It worked perfectly in 1.7 and it is almost the same, except with setBlockState instead of setBlockMetadata. public static void setState(boolean formed, World world, BlockPos pos, ACRTileE core) { IBlockState state = world.getBlockState(pos); TileEntity tile = world.getTileEntity(pos); keepInv = true; if(formed) { world.setBlockState(pos, state.withProperty(FORMED, true), 2); } else { world.setBlockState(pos, state.withProperty(FORMED, false), 2); } keepInv = false; //world.setBlockState(pos, world.getBlockState(pos).withProperty(KEEPINV, false), 2); if (tile != null) { tile.validate(); world.setTileEntity(pos, tile); //((ACRTileE)tile).setCore(core); } } There are some comments because I tried puting the keepinv in a property (I did this with some other block) and I commented it here to see where the problem lies.If the lines that contain world.setBlockState are deleted or commented, the multiblock works PERFECTLY, but it doesn't change the texture which is to be expected... I really do not know what is going on here and why the tile entity is different(which it is because I tested it with that core variable and set the core to the new tile entity after using world.setBlockState which kind of worked, but my core was now a tile entity that had no block associated to it because it didn't exist in the world anymore).
    1 point
×
×
  • Create New...

Important Information

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