WIT (What Is That)

WIT (What Is That)

408k Downloads

Suggestion: Add TileEntity in WitBlockInfoEvent

LatvianModder opened this issue ยท 2 comments

commented

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 //

commented

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.

commented

\o/