Merge branch 'master' into 1.17

This commit is contained in:
gnembon committed 2020-12-03 22:25:51 -04:00
commit 9d08c54324
13 files changed
+230 -128

No files matched your search

@@ -9,6 +9,7 @@ import carpet.fakes.MobEntityInterface;
import carpet.fakes.HungerManagerInterface;
import carpet.fakes.ServerPlayerInteractionManagerInterface;
import carpet.helpers.Tracer;
import carpet.network.ServerNetworkHandler;
import carpet.patches.EntityPlayerMPFake;
import carpet.script.CarpetContext;
import carpet.script.EntityEventsGroup;
@@ -594,6 +595,14 @@ public class EntityValue extends Value
return Value.NULL;
});
put("client_brand", (e, a) -> {
if (e instanceof ServerPlayerEntity)
{
return StringValue.of(ServerNetworkHandler.getPlayerStatus((ServerPlayerEntity) e));
}
return Value.NULL;
});
put("team", (e, a) -> e.getScoreboardTeam()==null?Value.NULL:new StringValue(e.getScoreboardTeam().getName()));
put("ping", (e, a) -> {