mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-29 16:47:56 +00:00
Fix NPE when pistons extend.
This commit is contained in:
@@ -31,7 +31,7 @@ public class MixinLevel
|
|||||||
@Inject( method = "setBlockEntity", at = @At( "HEAD" ) )
|
@Inject( method = "setBlockEntity", at = @At( "HEAD" ) )
|
||||||
public void setBlockEntity( @Nullable BlockEntity entity, CallbackInfo info )
|
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 );
|
setWorld( entity, this );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user