Updated Upstream (Paper) (#1170)

This commit is contained in:
frog-commits
2022-10-25 04:05:30 -04:00
committed by GitHub
parent 74b72a5f42
commit cd1bb761a9
10 changed files with 59 additions and 67 deletions

View File

@@ -57,7 +57,7 @@ index 68eb990c7d461c611310419c1eefaed79a7c8538..dabf1649f5bf14ec17dad6d43dcd7e2b
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2238,6 +2238,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public float getLocalDifficultyAt(Location location) {
return getHandle().getCurrentDifficultyAt(net.minecraft.server.MCUtil.toBlockPosition(location)).getEffectiveDifficulty();
return getHandle().getCurrentDifficultyAt(io.papermc.paper.util.MCUtil.toBlockPosition(location)).getEffectiveDifficulty();
}
+
+ @Override
@@ -77,7 +77,7 @@ index 68eb990c7d461c611310419c1eefaed79a7c8538..dabf1649f5bf14ec17dad6d43dcd7e2b
+
+ @Override
+ public void sendBlockHighlight(Location location, int duration, String text, int argb) {
+ net.minecraft.network.protocol.game.DebugPackets.sendGameTestAddMarker(getHandle(), net.minecraft.server.MCUtil.toBlockPosition(location), text, argb, duration);
+ net.minecraft.network.protocol.game.DebugPackets.sendGameTestAddMarker(getHandle(), io.papermc.paper.util.MCUtil.toBlockPosition(location), text, argb, duration);
+ }
+
+ @Override
@@ -126,7 +126,7 @@ index 98ba88906a817bbfedd0e326b0faf59ea4cdcb66..fc20789aae6f30cc5ae71a7ae391a6b2
+ public void sendBlockHighlight(Location location, int duration, String text, int argb) {
+ if (this.getHandle().connection == null) return;
+ FriendlyByteBuf buf = new FriendlyByteBuf(Unpooled.buffer());
+ buf.writeBlockPos(net.minecraft.server.MCUtil.toBlockPosition(location));
+ buf.writeBlockPos(io.papermc.paper.util.MCUtil.toBlockPosition(location));
+ buf.writeInt(argb);
+ buf.writeUtf(text);
+ buf.writeInt(duration);