remove instanceof NullValues fixes #1313

This commit is contained in:
gnembon committed 2022-02-06 00:18:42 +01:00
1 parent 5c4e18ead1
commit 695b569977
11 files changed
+35 -30

No files matched your search

@@ -1231,7 +1231,7 @@ public class EntityValue extends Value
});
put("custom_name", (e, v) -> {
if (v instanceof NullValue)
if (v.isNull())
{
e.setCustomNameVisible(false);
e.setCustomName(null);
@@ -1326,7 +1326,7 @@ public class EntityValue extends Value
PathfinderMob ec = (PathfinderMob)e;
if (v == null)
throw new InternalExpressionException("'home' requires at least one position argument, and optional distance, or null to cancel");
if (v instanceof NullValue)
if (v.isNull())
{
ec.restrictTo(BlockPos.ZERO, -1);
Map<String,Goal> tasks = ((MobEntityInterface)ec).getTemporaryTasks();