Posted May 29, 20178 yr I have an issue with a custom block when I change the light value of it. I use Block#getLightValue(IBlockState, IBlockAccess, BlockPos) to change the light value, and it works. However, as seen in the picture, the light only affects the adjacent blocks. So how do I cause an update of lighting in a wider area?
May 29, 20178 yr Author 4 minutes ago, diesieben07 said: Please post your full block code. https://pastebin.com/5Lg5xbbK EDIT: I use World#markAndNotifyBlock(BlockPos, Chunk, IBlockState, IBlockState, flags) under update() in the TileEntity to update the light, if that's relevant. Edited May 29, 20178 yr by ObliCoo
May 29, 20178 yr Author 1 minute ago, diesieben07 said: Do not implement ITileEntityProvider, override hasTileEntity and createTileEntity from the Block class. Why are you using getTileData on your own TileEntity? Alright, I'll test it out. I store the variable to see if the block is burning in the TileEntity, but judging by your response, I assume there's a more logical way to work around this.
May 29, 20178 yr Author 3 hours ago, diesieben07 said: No, you do not. You are using getTileData, which is for storing NBT data in TileEntities that are not yours. If you want to store data in your own TileEntity just add a field in the TileEntity class. I see, thank you. Could you explain why one should not use ITileEntityProvider?
May 29, 20178 yr 20 minutes ago, ObliCoo said: I see, thank you. Could you explain why one should not use ITileEntityProvider? Because it is old and not needed. 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.