Better guard for Deployer#initHandler

- Addresses #3685
This commit is contained in:
simibubi 2022-09-29 13:00:33 +02:00
parent abdeb212e8
commit 5303d69bf1

View File

@ -124,8 +124,8 @@ public class DeployerTileEntity extends KineticTileEntity {
private void initHandler() {
if (invHandler != null)
return;
if (!level.isClientSide) {
player = new DeployerFakePlayer((ServerLevel) level);
if (level instanceof ServerLevel sLevel) {
player = new DeployerFakePlayer(sLevel);
if (deferredInventoryList != null) {
player.getInventory()
.load(deferredInventoryList);