update
Dieser Commit ist enthalten in:
Ursprung
d6a3c0c239
Commit
487555b627
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 13725b794e923a4de0d06edcba1adf1b04611c95..4c0e12d9f36c78eeae4dcb2f58d41503d3a046e4 100644
|
||||
index bbc55b349c338d07646e1449804170799bfa434b..6aac0121a833c860a4eec6a69d2710513fc98086 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2149,6 +2149,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2173,6 +2173,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
@ -25,10 +25,10 @@ index 13725b794e923a4de0d06edcba1adf1b04611c95..4c0e12d9f36c78eeae4dcb2f58d41503
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db8ee80dd5 100644
|
||||
index 09ce9511f52f7f8643fedc325c49580eba4e4645..030be85ff601711007bd2e550f3c534d34e73085 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -320,7 +320,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -322,7 +322,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -56,7 +56,7 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -2055,6 +2075,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2083,6 +2103,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2182,6 +2211,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2210,6 +2239,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -94,10 +94,10 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 0f51f05f334d262b3435cebce47c3b9f08936398..85d77772b003e56382f8c3b55fc11a9ae1ec535f 100644
|
||||
index 0996bfe664e0085dcacdd2b6c08a2737d3b2fa6a..f117d32f3606917ad3526c9140ef5e40990ede8c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -936,4 +936,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -946,4 +946,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e9a160d59 100644
|
||||
index 10e0630d30864f8d38434e58f43c63a6984b974b..d878203f7d013ab5648bca82c9a71cceeda1f11f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -727,11 +727,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
@ -26,11 +26,11 @@ index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa46f169238 100644
|
||||
index 6eef8da8ead8a044aac757693d719ceea431515e..0883e1755eae316faaeae8bf95763a0f80313c5a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -213,7 +213,12 @@ public abstract class BlockEntity {
|
||||
return minecraftkey + " // " + this.getClass().getCanonicalName();
|
||||
@@ -262,7 +262,12 @@ public abstract class BlockEntity {
|
||||
return s + " // " + this.getClass().getCanonicalName();
|
||||
});
|
||||
if (this.level != null) {
|
||||
- CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState());
|
||||
@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa4
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index c2179ea2a16ae0fac0b59d81a57abf13f563843f..e764eecfb2eea62d641c9444831daae6d50c687e 100644
|
||||
index 55b24bf21dce3ab00c19a73b3af797ac1fd2ccc7..c4ff77ed93e17ed816e0325eb5bdfcdb444be4a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1063,11 +1063,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1061,11 +1061,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 6f687387d8f817646dacf0e0373d50db8ee80dd5..c582d2f447384ca3b46c3b8159b7114d7efef52c 100644
|
||||
index 030be85ff601711007bd2e550f3c534d34e73085..f4e0a10eb936ed9d43c9a2fc3ed03a785bf00901 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -683,7 +683,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -696,7 +696,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public void checkBelowWorld() {
|
||||
@ -23,7 +23,7 @@ index 6f687387d8f817646dacf0e0373d50db8ee80dd5..c582d2f447384ca3b46c3b8159b7114d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
index 02e3322ec41108fe9275510e2daa833d180353dc..550b7bc694d861c084769265f6c49c4d44033296 100644
|
||||
index 6987e3e7590a6ddf93622ba5d280db6f4e98310d..f4c8eee7bc574d402a7897a202734047e37c7a67 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
@@ -55,7 +55,7 @@ public class PortalForcer {
|
@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 2 Mar 2016 00:03:55 -0600
|
||||
Subject: [PATCH] Check online mode before converting and renaming player data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 79222a04ef104bf2eed85684479384b7c350ea19..e11c8523e633d2a8e3cea7ecd54978b2958b9684 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -78,7 +78,7 @@ public class PlayerDataStorage {
|
||||
File file1 = new File(file, s1 + s);
|
||||
// Spigot Start
|
||||
boolean usingWrongFile = false;
|
||||
- if ( !file1.exists() )
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
||||
{
|
||||
file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s );
|
||||
if ( file1.exists() )
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 7bad19b7e17bbdac3e8502b6a7e246070ba67e8c..68a376743e531dfe06bf6bd7b5be3e7d8e3154d8 100644
|
||||
index 4277f7c477efe01d4ef917515178b26016bccd7c..d75c3c10dcbd777796e479b9538e5254857ac07c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1030,6 +1030,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1097,6 +1097,7 @@ public class ServerPlayer extends Player {
|
||||
this.unRide();
|
||||
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
|
||||
if (!this.wonGame) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index f8dafdf67447c9627f677fca7160e212239709c4..b600abae1c17e1196ff2b171e054db95cca5c9ff 100644
|
||||
index 230bd20a7a8923f4a4bd4023aeac91ea5908ccd4..cd6d831d8519b406571e6f626053afb662799ad9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -225,7 +225,7 @@ public class Explosion {
|
||||
@@ -226,7 +226,7 @@ public class Explosion {
|
||||
int i1 = Mth.floor(this.y + (double) f2 + 1.0D);
|
||||
int j1 = Mth.floor(this.z - (double) f2 - 1.0D);
|
||||
int k1 = Mth.floor(this.z + (double) f2 + 1.0D);
|
@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
||||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 01a1d2af6b4cf66cff8eb6d14116343a121deed2..638ab8ee2a44445baee91ee7e63b96ce6c098ad0 100644
|
||||
index de18627c6f09ef911c9cb6d6aec9a5f3bfe5a72b..b5f305c7d0972438a686d9b3a022156e39b130a2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1489,6 +1489,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1554,6 +1554,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.profiler.pop();
|
||||
this.profiler.pop();
|
||||
@ -22,19 +22,19 @@ index 01a1d2af6b4cf66cff8eb6d14116343a121deed2..638ab8ee2a44445baee91ee7e63b96ce
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index b600abae1c17e1196ff2b171e054db95cca5c9ff..df17b8cddd7f8bd3f13641c99ad0d25e8a596675 100644
|
||||
index cd6d831d8519b406571e6f626053afb662799ad9..8a4c086d7ac4bf59f39ab37e583b0e8d6dba6bf4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -277,7 +277,7 @@ public class Explosion {
|
||||
@@ -278,7 +278,7 @@ public class Explosion {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
- double d12 = (1.0D - d7) * (double) Explosion.getSeenPercent(vec3d, entity);
|
||||
+ double d12 = (1.0D - d7) * this.getBlockDensity(vec3d, entity); // Paper - Optimize explosions
|
||||
- double d12 = (1.0D - d7) * (double) Explosion.getSeenPercent(vec3d, entity) * (double) this.damageCalculator.getKnockbackMultiplier(entity);
|
||||
+ double d12 = (1.0D - d7) * this.getBlockDensity(vec3d, entity) * (double) this.damageCalculator.getKnockbackMultiplier(entity); // Paper - Optimize explosions
|
||||
double d13;
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
@@ -526,4 +526,84 @@ public class Explosion {
|
||||
@@ -529,4 +529,84 @@ public class Explosion {
|
||||
|
||||
private BlockInteraction() {}
|
||||
}
|
||||
@ -120,10 +120,10 @@ index b600abae1c17e1196ff2b171e054db95cca5c9ff..df17b8cddd7f8bd3f13641c99ad0d25e
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index eb6bf467c92cb04c9f1ffcde0b5df64e9a160d59..673141ab586057b2d05b3921cc4d42b4f5e049ab 100644
|
||||
index d878203f7d013ab5648bca82c9a71cceeda1f11f..b638e223c9ac1019fac9d1a8203feac90cfcc724 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -167,6 +167,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable explosion knockback
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index df17b8cddd7f8bd3f13641c99ad0d25e8a596675..00cfa26783ce0772c75166266ead258a415097bc 100644
|
||||
index 8a4c086d7ac4bf59f39ab37e583b0e8d6dba6bf4..111e6a7ab25e5513154984545c1737d2f7fd7d5f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -283,7 +283,7 @@ public class Explosion {
|
||||
@@ -284,7 +284,7 @@ public class Explosion {
|
||||
if (entity instanceof LivingEntity) {
|
||||
LivingEntity entityliving = (LivingEntity) entity;
|
||||
|
||||
@ -17,7 +17,7 @@ index df17b8cddd7f8bd3f13641c99ad0d25e8a596675..00cfa26783ce0772c75166266ead258a
|
||||
} else {
|
||||
d13 = d12;
|
||||
}
|
||||
@@ -305,7 +305,7 @@ public class Explosion {
|
||||
@@ -306,7 +306,7 @@ public class Explosion {
|
||||
if (entity instanceof Player) {
|
||||
Player entityhuman = (Player) entity;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4c0e12d9f36c78eeae4dcb2f58d41503d3a046e4..31b4d6e0473cf7cad7d4994f5a989a5d7bd9a531 100644
|
||||
index 6aac0121a833c860a4eec6a69d2710513fc98086..f25347b3b06a996aeb9690ea6120162545b0c8de 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -609,7 +609,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -615,7 +615,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
gameprofilerfiller.push("thunder");
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 31b4d6e0473cf7cad7d4994f5a989a5d7bd9a531..5a20dc552423717f91178068dc5f8a30be13ea54 100644
|
||||
index f25347b3b06a996aeb9690ea6120162545b0c8de..a9d03ee785ca9bc593dce35a7dd681d06f58fb70 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -639,11 +639,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -645,11 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable mob spawner tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index e888cf862662ae6baa6d0de8188aa74a9c6a8e00..a46293dafeb73f9206b92a2850df18a6a5f688b4 100644
|
||||
index 418e29971326008ebca0cc4b696a41a49c1c7bb7..aa54237205989f619ac6a3faa2e4285427b9e31d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -47,6 +47,7 @@ public abstract class BaseSpawner {
|
||||
@@ -49,6 +49,7 @@ public abstract class BaseSpawner {
|
||||
public int maxNearbyEntities = 6;
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
@ -16,7 +16,7 @@ index e888cf862662ae6baa6d0de8188aa74a9c6a8e00..a46293dafeb73f9206b92a2850df18a6
|
||||
|
||||
public BaseSpawner() {}
|
||||
|
||||
@@ -81,13 +82,18 @@ public abstract class BaseSpawner {
|
||||
@@ -83,13 +84,18 @@ public abstract class BaseSpawner {
|
||||
}
|
||||
|
||||
public void serverTick(ServerLevel world, BlockPos pos) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 68a376743e531dfe06bf6bd7b5be3e7d8e3154d8..e3e96008d69926c831e5f42b28e1e70160a3c5bd 100644
|
||||
index d75c3c10dcbd777796e479b9538e5254857ac07c..ab2336a30c1ffc1698c327c031a648d4121c116e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -222,7 +222,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -232,7 +232,7 @@ public class ServerPlayer extends Player {
|
||||
private int levitationStartTime;
|
||||
private boolean disconnected;
|
||||
private int requestedViewDistance;
|
||||
@ -17,7 +17,7 @@ index 68a376743e531dfe06bf6bd7b5be3e7d8e3154d8..e3e96008d69926c831e5f42b28e1e701
|
||||
public java.util.Locale adventure$locale = java.util.Locale.US; // Paper
|
||||
@Nullable
|
||||
private Vec3 startingToFallPosition;
|
||||
@@ -272,7 +272,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -288,7 +288,7 @@ public class ServerPlayer extends Player {
|
||||
this.lastActionTime = Util.getMillis();
|
||||
this.recipeBook = new ServerRecipeBook();
|
||||
this.requestedViewDistance = 2;
|
||||
@ -26,7 +26,7 @@ index 68a376743e531dfe06bf6bd7b5be3e7d8e3154d8..e3e96008d69926c831e5f42b28e1e701
|
||||
this.lastSectionPos = SectionPos.of(0, 0, 0);
|
||||
this.chunkTrackingView = ChunkTrackingView.EMPTY;
|
||||
this.respawnDimension = Level.OVERWORLD;
|
||||
@@ -1920,9 +1920,10 @@ public class ServerPlayer extends Player {
|
||||
@@ -2002,9 +2002,10 @@ public class ServerPlayer extends Player {
|
||||
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
@ -39,10 +39,10 @@ index 68a376743e531dfe06bf6bd7b5be3e7d8e3154d8..e3e96008d69926c831e5f42b28e1e701
|
||||
// CraftBukkit end
|
||||
this.language = clientOptions.language();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 4655d1c493651779c2038776e4d6fef23c7e7b43..245f58942b6a69a67fa7ed31121d461e27a98ae0 100644
|
||||
index 6f4d287d8a6992af475e8c94f4316d091d76f921..b1693486297b463c92ce02663aa1727d7d4cabe3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2338,7 +2338,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2406,7 +2406,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public String getLocale() {
|
@ -5,39 +5,43 @@ Subject: [PATCH] Add BeaconEffectEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..25ec3ab534872500a2eb51cd44062e2754c404bb 100644
|
||||
index c731730abe50c521e5ce22b5fd8844ea1caed7ac..d3ef3d9a67bc54a4c82a39718f01201201dfc44c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -43,6 +43,10 @@ import net.minecraft.world.phys.AABB;
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.minecraft.world.level.block.entity;
|
||||
|
||||
+import com.destroystokyo.paper.event.block.BeaconEffectEvent;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.Arrays;
|
||||
@@ -46,6 +47,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
// CraftBukkit end
|
||||
+// Paper start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import com.destroystokyo.paper.event.block.BeaconEffectEvent;
|
||||
+// Paper end
|
||||
|
||||
public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Nameable {
|
||||
|
||||
@@ -289,15 +293,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -295,15 +297,23 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
}
|
||||
}
|
||||
|
||||
- private static void applyEffect(List list, MobEffect mobeffectlist, int j, int b0) {
|
||||
- private static void applyEffect(List list, @Nullable Holder<MobEffect> holder, int j, int b0) {
|
||||
- {
|
||||
+ private static void applyEffect(List list, MobEffect effects, int i, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent
|
||||
+ private static void applyEffect(List list, @Nullable Holder<MobEffect> holder, int j, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent
|
||||
+ if (!list.isEmpty()) { // Paper - BeaconEffectEvent
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
Player entityhuman;
|
||||
+ // Paper start - BeaconEffectEvent
|
||||
+ org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(((Player) list.get(0)).level(), worldPosition);
|
||||
+ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(effects, i, b0, true, true));
|
||||
+ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(holder, j, b0, true, true));
|
||||
+ // Paper end - BeaconEffectEvent
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
- entityhuman = (Player) iterator.next();
|
||||
- entityhuman.addEffect(new MobEffectInstance(mobeffectlist, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
|
||||
- entityhuman.addEffect(new MobEffectInstance(holder, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
|
||||
+ // Paper start - BeaconEffectEvent
|
||||
+ entityhuman = (ServerPlayer) iterator.next();
|
||||
+ BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), isPrimary);
|
||||
@ -47,7 +51,7 @@ index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..25ec3ab534872500a2eb51cd44062e27
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,10 +332,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
@@ -326,10 +336,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
||||
int j = BeaconBlockEntity.getLevel(beaconLevel);
|
||||
List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel);
|
||||
|
@ -1,19 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 2 Mar 2016 00:03:55 -0600
|
||||
Subject: [PATCH] Check online mode before converting and renaming player data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 8292978e1386c55d99241c3ee2ead3440b9e2570..2a167a0131d866b4368fc30849c17acdf0ab9af0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -60,7 +60,7 @@ public class PlayerDataStorage {
|
||||
File file = new File(this.playerDir, player.getStringUUID() + ".dat");
|
||||
// Spigot Start
|
||||
boolean usingWrongFile = false;
|
||||
- if ( !file.exists() )
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
||||
{
|
||||
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||||
if ( file.exists() )
|
In neuem Issue referenzieren
Einen Benutzer sperren