fixed incorrect recognition of some NULL objects

This commit is contained in:
gnembon committed 2020-09-28 22:17:29 -03:00
1 parent 9b35c19bea
commit d5ebe5361c
4 files changed
+5 -6

No files matched your search

@@ -1113,7 +1113,7 @@ public class EntityValue extends Value
put("breaking_progress", (e, a) -> {
if (e instanceof ServerPlayerEntity)
{
int progress = (a == null || a == Value.NULL)?-1:NumericValue.asNumber(a).getInt();
int progress = (a == null || a.isNull())?-1:NumericValue.asNumber(a).getInt();
ServerPlayerInteractionManagerInterface manager = (ServerPlayerInteractionManagerInterface) (((ServerPlayerEntity) e).interactionManager);
manager.setBlockBreakingProgress(progress);
}