mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-28 16:22:18 +00:00
Fix NPE when pistons extend.
This commit is contained in:
parent
27102e6381
commit
4914ad0040
@ -31,7 +31,7 @@ public class MixinLevel
|
||||
@Inject( method = "setBlockEntity", at = @At( "HEAD" ) )
|
||||
public void setBlockEntity( @Nullable BlockEntity entity, CallbackInfo info )
|
||||
{
|
||||
if( entity != null && !entity.isRemoved() && entity.getLevel().isInWorldBounds( entity.getBlockPos() ) && tickingBlockEntities )
|
||||
if( entity != null && !entity.isRemoved() && entity.getLevel() != null && entity.getLevel().isInWorldBounds( entity.getBlockPos() ) && tickingBlockEntities )
|
||||
{
|
||||
setWorld( entity, this );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user