Suggestion: Add TileEntity in WitBlockInfoEvent
LatvianModder opened this issue ยท 2 comments
Since most block info usually comes from TileEntities, it would cool, if every event handler didnt have to get the tile entity from world
To make things faster, it could be smth like
TileEntity tileEntity = null;
if(blockState.getBlock().hasTileEntity(blockState))
{
tileEntity = world.getTileEntity(pos);
}
// pass this tileEntity to WitBlockInfoEvent //
My implementation is a bit different, but I've added a TileEntity variable to WitBlockInfoEvent, and a World variable to WitHudInfoEvent (the superclass). Good suggestion, by the way.