it compiles \o/

This commit is contained in:
granny
2025-09-23 21:49:47 -07:00
parent d72168f5c9
commit 4ca9e36463
11 changed files with 18 additions and 17 deletions

View File

@@ -27,7 +27,7 @@ public class CreditsCommand {
for (ServerPlayer player : targets) {
ClientboundGameEventPacket packet = new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 1F);
player.connection.send(packet);
String output = String.format(PurpurConfig.creditsCommandOutput, player.getGameProfile().getName());
String output = String.format(PurpurConfig.creditsCommandOutput, player.getGameProfile().name());
sender.sendSuccess(output, false);
}
return targets.size();

View File

@@ -27,7 +27,7 @@ public class DemoCommand {
for (ServerPlayer player : targets) {
ClientboundGameEventPacket packet = new ClientboundGameEventPacket(ClientboundGameEventPacket.DEMO_EVENT, 0);
player.connection.send(packet);
String output = String.format(PurpurConfig.demoCommandOutput, player.getGameProfile().getName());
String output = String.format(PurpurConfig.demoCommandOutput, player.getGameProfile().name());
sender.sendSuccess(output, false);
}
return targets.size();

View File

@@ -24,7 +24,7 @@ public class PingCommand {
private static int execute(CommandSourceStack sender, Collection<ServerPlayer> targets) {
for (ServerPlayer player : targets) {
String output = String.format(PurpurConfig.pingCommandOutput, player.getGameProfile().getName(), player.connection.latency());
String output = String.format(PurpurConfig.pingCommandOutput, player.getGameProfile().name(), player.connection.latency());
sender.sendSuccess(output, false);
}
return targets.size();

View File

@@ -35,7 +35,7 @@ public class RamBarCommand {
Component output = MiniMessage.miniMessage().deserialize(PurpurConfig.rambarCommandOutput,
Placeholder.component("onoff", Component.translatable(result ? "options.on" : "options.off")
.color(result ? NamedTextColor.GREEN : NamedTextColor.RED)),
Placeholder.parsed("target", player.getGameProfile().getName()));
Placeholder.parsed("target", player.getGameProfile().name()));
sender.sendSuccess(output, false);
}

View File

@@ -35,7 +35,7 @@ public class TPSBarCommand {
Component output = MiniMessage.miniMessage().deserialize(PurpurConfig.tpsbarCommandOutput,
Placeholder.component("onoff", Component.translatable(result ? "options.on" : "options.off")
.color(result ? NamedTextColor.GREEN : NamedTextColor.RED)),
Placeholder.parsed("target", player.getGameProfile().getName()));
Placeholder.parsed("target", player.getGameProfile().name()));
sender.sendSuccess(output, false);
}

View File

@@ -50,7 +50,7 @@ public class LookControllerWASD extends LookControl {
(byte) Mth.floor(entity.getXRot() * 256.0F / 360.0F),
entity.onGround
);
((ServerLevel) entity.level()).getChunkSource().broadcast(entity, entityPacket);
((ServerLevel) entity.level()).getChunkSource().sendToTrackingPlayers(entity, entityPacket);
}
public void setOffsets(float yaw, float pitch) {

View File

@@ -37,7 +37,7 @@ public class PurpurStoredBee implements StoredEntity<Bee> {
this.handle = data;
this.blockStorage = blockStorage;
CompoundTag customData = handle.occupant.entityData().copyTag();
CompoundTag customData = handle.occupant.entityData().copyTagWithEntityId();
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(blockEntity.problemPath(), LOGGER)) {
ValueInput valueInput = TagValueInput.create(scopedCollector, RegistryAccess.EMPTY, customData);
@@ -106,11 +106,11 @@ public class PurpurStoredBee implements StoredEntity<Bee> {
@Override
public void update() {
handle.occupant.entityData().copyTag().put("BukkitValues", this.persistentDataContainer.toTagCompound());
handle.occupant.entityData().copyTagWithEntityId().put("BukkitValues", this.persistentDataContainer.toTagCompound());
if(customName == null) {
handle.occupant.entityData().copyTag().remove("CustomName");
handle.occupant.entityData().copyTagWithEntityId().remove("CustomName");
} else {
handle.occupant.entityData().copyTag().putString("CustomName", CraftChatMessage.toJSON(PaperAdventure.asVanilla(customName)));
handle.occupant.entityData().copyTagWithEntityId().putString("CustomName", CraftChatMessage.toJSON(PaperAdventure.asVanilla(customName)));
}
}
}