mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
it compiles \o/
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user