Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 04:50:05 +01:00
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
49 Zeilen
3.1 KiB
Diff
49 Zeilen
3.1 KiB
Diff
From ac9156a326012ffc4bd53e63bed9531d22bb5005 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 31 May 2016 22:53:50 -0400
|
|
Subject: [PATCH] Only send Dragon/Wither Death sounds to same world
|
|
|
|
Also fix view distance lookup
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
index 5375ef4699..b9afeaf72e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
|
@@ -573,8 +573,12 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
|
if (this.bO == 1) {
|
|
// CraftBukkit start - Use relative location for far away sounds
|
|
// this.world.a(1028, new BlockPosition(this), 0);
|
|
- int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
|
- for (EntityPlayer player : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
|
|
+ // Paper start
|
|
+ //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
|
+ for (EntityHuman human : world.players) {
|
|
+ EntityPlayer player = (EntityPlayer) human;
|
|
+ int viewDistance = player.getViewDistance();
|
|
+ // Paper end
|
|
double deltaX = this.locX - player.locX;
|
|
double deltaZ = this.locZ - player.locZ;
|
|
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
|
index b84e5728a0..485cac3240 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
|
@@ -199,8 +199,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
|
|
|
// CraftBukkit start - Use relative location for far away sounds
|
|
// this.world.a(1023, new BlockPosition(this), 0);
|
|
- int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
|
- for (EntityPlayer player : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
|
|
+ // Paper start
|
|
+ //int viewDistance = ((WorldServer) this.world).spigotConfig.viewDistance * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
|
|
+ for (EntityHuman human : world.players) {
|
|
+ EntityPlayer player = (EntityPlayer) human;
|
|
+ int viewDistance = player.getViewDistance();
|
|
+ // Paper end
|
|
double deltaX = this.locX - player.locX;
|
|
double deltaZ = this.locZ - player.locZ;
|
|
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
|
--
|
|
2.18.0
|
|
|