1.4.113 on 23w31a, many regressions including modded networking, fake players, scoreboard api and more.

This commit is contained in:
gnembon committed 2023-08-03 12:33:49 +02:00
1 parent 8416a2f28b
commit 55a88c6cdc
25 files changed
+356 -109

No files matched your search

@@ -61,7 +61,7 @@ public class Scoreboards
return ListValue.wrap(scoreboard.getObjectiveNames().stream().map(StringValue::new));
}
String objectiveName = lv.get(0).getString();
Objective objective = scoreboard.getOrCreateObjective(objectiveName);
Objective objective = scoreboard.getObjective(objectiveName);
if (objective == null)
{
return Value.NULL;
@@ -103,7 +103,7 @@ public class Scoreboards
CarpetContext cc = (CarpetContext) c;
Scoreboard scoreboard = cc.server().getScoreboard();
String objectiveName = lv.get(0).getString();
Objective objective = scoreboard.getOrCreateObjective(objectiveName);
Objective objective = scoreboard.getObjective(objectiveName);
if (objective == null)
{
return Value.FALSE;
@@ -151,7 +151,7 @@ public class Scoreboards
}
}
Objective objective = scoreboard.getOrCreateObjective(objectiveName);
Objective objective = scoreboard.getObjective(objectiveName);
if (objective != null)
{
c.host.issueDeprecation("reading or modifying an objective's criterion with scoreboard_add");
@@ -181,7 +181,7 @@ public class Scoreboards
}
CarpetContext cc = (CarpetContext) c;
Scoreboard scoreboard = cc.server().getScoreboard();
Objective objective = scoreboard.getOrCreateObjective(lv.get(0).getString());
Objective objective = scoreboard.getObjective(lv.get(0).getString());
if (objective == null)
{
return Value.NULL;
@@ -225,7 +225,7 @@ public class Scoreboards
}
return new FormattedTextValue(objective.getDisplayName());
}
case "display_slot" -> {
case "display_slot" -> { /*
if (modify)
{
int slotId = Scoreboard.getDisplaySlotByName(setValue.getString());
@@ -249,7 +249,8 @@ public class Scoreboards
slots.add(StringValue.of(slotName));
}
}
return ListValue.wrap(slots);
return ListValue.wrap(slots); */
return Value.NULL;
}
case "render_type" -> {
if (modify)
@@ -269,7 +270,7 @@ public class Scoreboards
});
expression.addContextFunction("scoreboard_display", 2, (c, t, lv) ->
{
{ /*
CarpetContext cc = (CarpetContext) c;
Scoreboard scoreboard = cc.server().getScoreboard();
String location = lv.get(0).getString();
@@ -291,7 +292,8 @@ public class Scoreboards
return Value.NULL;
}
scoreboard.setDisplayObjective(slot, objective);
return new NumericValue(slot);
return new NumericValue(slot); */
return Value.NULL;
});
expression.addContextFunction("team_list", -1, (c, t, lv) ->
@@ -258,9 +258,9 @@ public abstract class CommandArgument
true
),
new ScoreholderArgument(),
new VanillaUnconfigurableArgument("scoreboardslot", ScoreboardSlotArgument::displaySlot,
(c, p) -> StringValue.of(Scoreboard.getDisplaySlotName(ScoreboardSlotArgument.getDisplaySlot(c, p))), false
),
//new VanillaUnconfigurableArgument("scoreboardslot", ScoreboardSlotArgument::displaySlot,
// (c, p) -> StringValue.of(Scoreboard.getDisplaySlotName(ScoreboardSlotArgument.getDisplaySlot(c, p))), false
//),
new VanillaUnconfigurableArgument("swizzle", SwizzleArgument::swizzle,
(c, p) -> StringValue.of(SwizzleArgument.getSwizzle(c, p).stream().map(Direction.Axis::getSerializedName).collect(Collectors.joining())), true
),
@@ -633,7 +633,7 @@ public class EntityValue extends Value
put("client_brand", (e, a) -> e instanceof final ServerPlayer sp ? StringValue.of(Carpet.getPlayerStatus(sp)) : Value.NULL);
put("team", (e, a) -> e.getTeam() == null ? Value.NULL : new StringValue(e.getTeam().getName()));
put("ping", (e, a) -> e instanceof final ServerPlayer sp ? new NumericValue(sp.latency) : Value.NULL);
put("ping", (e, a) -> e instanceof final ServerPlayer sp ? new NumericValue(sp.connection.latency()) : Value.NULL);
//spectating_entity
// isGlowing