More drawer controller security

This commit is contained in:
Buuz135 2022-08-07 19:11:08 +02:00
parent df75dfa8f0
commit bed714a4fa

View File

@ -218,6 +218,7 @@ public class DrawerControllerTile extends ControllableDrawerTile<DrawerControlle
for (Long connectedDrawer : this.connectedDrawers) {
BlockPos pos = BlockPos.of(connectedDrawer);
BlockEntity entity = level.getBlockEntity(pos);
if (entity instanceof DrawerControllerTile) continue;
if (entity instanceof ControllableDrawerTile) {
this.handlers.add(((ControllableDrawerTile<?>) entity).getStorage());
}