mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-22 08:19:26 +00:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@3ea95ef Do not access world state to see if we can see a Player PaperMC/Paper@71c84c8 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277) PaperMC/Paper@e3bc4c4 Make debug mode print current configuration phase PaperMC/Paper@d0ebfbb Fix corrupted plugin.yml breaking plugin loading (#10279) PaperMC/Paper@681bbff Fix spawnreason saving
This commit is contained in:
@@ -2,7 +2,7 @@ group=me.samsuik.sakura
|
|||||||
version=1.20.4-R0.1-SNAPSHOT
|
version=1.20.4-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion=1.20.4
|
mcVersion=1.20.4
|
||||||
paperRef=4939f8711884901ddf1c56337f606de71cdae78d
|
paperRef=681bbff110d9a56152ae898c4dfe1c0356b40e69
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Branding changes
|
|||||||
From ForkPaper.
|
From ForkPaper.
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..a50a606b7b8a4ae7a7ebf1d0cf6f4dc1d0be1e4e 100644
|
index 241808d8619e17c0681f79acbbc98af5bf52dd89..e75d8907b9a28e882fdc6531a456f76782965bb0 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||||
@@ -24,7 +24,7 @@ index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..a50a606b7b8a4ae7a7ebf1d0cf6f4dc1
|
|||||||
// Paper start
|
// Paper start
|
||||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
@@ -70,7 +74,7 @@ tasks.jar {
|
@@ -71,7 +75,7 @@ tasks.jar {
|
||||||
attributes(
|
attributes(
|
||||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
"Implementation-Title" to "CraftBukkit",
|
"Implementation-Title" to "CraftBukkit",
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ index 23e5fcffe6e1b1a12af5c7399dd8b2f6e0d2f5ff..f6a43cbd45834141e539f87f5bd7240e
|
|||||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 5a7278b093e37b95fb005ad5cc3cac90ac36f8fb..239ba0e6087b310398e7cc6fc7ed983002c8bcc8 100644
|
index 12109446fc76a39faee6cda042ca48b3fd3809f4..bb6a2be67394b9a6904d759b7564008dd1c282b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1424,6 +1424,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1424,6 +1424,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
@@ -391,7 +391,7 @@ index 529ab44baaf573b97cf7e89560c548642733188f..cce8f45c15b9a9acfbf9b769f7670cfd
|
|||||||
|
|
||||||
if (this.entity instanceof LivingEntity) {
|
if (this.entity instanceof LivingEntity) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 5c125a044536f65637ca82870a4a9d8d7de6ef40..730ad919eef9e38bbeea7cfd1153065b14f12ceb 100644
|
index 46e060bab0a9adb05a9dadff7e0cee9277db9511..f217fed953fbb1838a6692ab36018869951ed4e0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1941,7 +1941,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1941,7 +1941,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
@@ -549,10 +549,10 @@ index 0306771b8f90dcdd77f151c19c6c2d75c41f8feb..7451f65cef49248793815965bda4bcbe
|
|||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index ab5b259d8f72022c875cae73be25fe2da346c6b3..bb99728860c08e6c660e0e59906fde5c1a31f884 100644
|
index 87e5ee042ab2c052d25ab4c2521a68cf2e2d67b6..c47c6347fe666cdd83d71c177e57c7fe19ebdc4f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -3099,6 +3099,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
@@ -3103,6 +3103,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
event.setCancelled(cancelled);
|
event.setCancelled(cancelled);
|
||||||
AbstractContainerMenu oldContainer = this.player.containerMenu; // SPIGOT-1224
|
AbstractContainerMenu oldContainer = this.player.containerMenu; // SPIGOT-1224
|
||||||
@@ -561,10 +561,10 @@ index ab5b259d8f72022c875cae73be25fe2da346c6b3..bb99728860c08e6c660e0e59906fde5c
|
|||||||
if (this.player.containerMenu != oldContainer) {
|
if (this.player.containerMenu != oldContainer) {
|
||||||
return;
|
return;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 906eded9a2ab61737a30cfe89292a71237ce4eb7..f426abb7e6db911dfb3609383fce6476fd4233ed 100644
|
index 45439b0cc4ea69e409fd41d4684403c0e0feab12..006cd1fdd4c0f76043609a4b684f7818e21106ac 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -566,6 +566,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -567,6 +567,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
|
|
||||||
public boolean updatingSectionStatus = false;
|
public boolean updatingSectionStatus = false;
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -576,10 +576,10 @@ index 906eded9a2ab61737a30cfe89292a71237ce4eb7..f426abb7e6db911dfb3609383fce6476
|
|||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 05b77bf1af82397c542fde19b54ee545448ce12e..af4875fd0ed635dde59ec579dc198558efab0533 100644
|
index 0aef6a8d51cb1351daaea16022f5cbb27ceaff0d..788915f5e5cf54ee53222ded9939139ea982d306 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -73,6 +73,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -74,6 +74,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.blockState = Blocks.SAND.defaultBlockState();
|
this.blockState = Blocks.SAND.defaultBlockState();
|
||||||
this.dropItem = true;
|
this.dropItem = true;
|
||||||
this.fallDamageMax = 40;
|
this.fallDamageMax = 40;
|
||||||
@@ -588,10 +588,10 @@ index 05b77bf1af82397c542fde19b54ee545448ce12e..af4875fd0ed635dde59ec579dc198558
|
|||||||
|
|
||||||
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index cd7b955754b809826048b80723e2e9055b373a4a..3c5e8c594ff63d93bdd052a6b648120c550f60f5 100644
|
index e712bd07ea2946167782473a536e0c72fab4bccd..2e6691b86e161616bb2dcf5ce0391ad57a3ef422 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -38,6 +38,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -39,6 +39,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
public PrimedTnt(EntityType<? extends PrimedTnt> type, Level world) {
|
public PrimedTnt(EntityType<? extends PrimedTnt> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
this.blocksBuilding = true;
|
this.blocksBuilding = true;
|
||||||
@@ -600,7 +600,7 @@ index cd7b955754b809826048b80723e2e9055b373a4a..3c5e8c594ff63d93bdd052a6b648120c
|
|||||||
|
|
||||||
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
|
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index d40c3aefde1e3b70657b48241cda2d0b0c457531..0b616dfdf9eb60cd0ca8ee00829f7181a728bc4a 100644
|
index 28ddb9e74bc131b043f91107483b92531f5fd252..7b800ebae9787979613be845440a7dfa549c98ee 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -219,6 +219,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -219,6 +219,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
@@ -613,7 +613,7 @@ index d40c3aefde1e3b70657b48241cda2d0b0c457531..0b616dfdf9eb60cd0ca8ee00829f7181
|
|||||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 206520f6f20b2e48b1eefdd4edb26510b88e4c92..50074d93709ad0b595629e86cc3a0832a840bf41 100644
|
index 616d2e479d91673695ade0db151a0099b568904f..ffbc3e08861be286964e01891e76adb0f9eb66d9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -458,6 +458,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -458,6 +458,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Reduce deltaMovement Allocations
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466bff80143 100644
|
index 006cd1fdd4c0f76043609a4b684f7818e21106ac..a63d1a624df5d84f4e8168cbe075ae3d9bd4ff84 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1240,7 +1240,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1253,7 +1253,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.tryCheckInsideBlocks();
|
this.tryCheckInsideBlocks();
|
||||||
float f = this.getBlockSpeedFactor();
|
float f = this.getBlockSpeedFactor();
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
// Paper start - remove expensive streams from here
|
// Paper start - remove expensive streams from here
|
||||||
boolean noneMatch = true;
|
boolean noneMatch = true;
|
||||||
AABB fireSearchBox = this.getBoundingBox().deflate(1.0E-6D);
|
AABB fireSearchBox = this.getBoundingBox().deflate(1.0E-6D);
|
||||||
@@ -2056,6 +2056,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2069,6 +2069,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
||||||
// Paper start - Fix Entity Teleportation and cancel velocity if teleported
|
// Paper start - Fix Entity Teleportation and cancel velocity if teleported
|
||||||
if (!preserveMotion) {
|
if (!preserveMotion) {
|
||||||
@@ -25,7 +25,7 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
this.deltaMovement = Vec3.ZERO;
|
this.deltaMovement = Vec3.ZERO;
|
||||||
} else {
|
} else {
|
||||||
this.preserveMotion = false;
|
this.preserveMotion = false;
|
||||||
@@ -3457,29 +3458,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -3473,29 +3474,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAboveBubbleCol(boolean drag) {
|
public void onAboveBubbleCol(boolean drag) {
|
||||||
@@ -67,7 +67,7 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
this.resetFallDistance();
|
this.resetFallDistance();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4468,16 +4473,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4484,16 +4489,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
vec3d = vec3d.normalize();
|
vec3d = vec3d.normalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.fluidHeight.put(tag, d1);
|
this.fluidHeight.put(tag, d1);
|
||||||
@@ -4548,11 +4556,53 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4564,11 +4572,53 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return this.chunkPosition;
|
return this.chunkPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
synchronized (this.posLock) { // Paper
|
synchronized (this.posLock) { // Paper
|
||||||
this.deltaMovement = velocity;
|
this.deltaMovement = velocity;
|
||||||
} // Paper
|
} // Paper
|
||||||
@@ -4563,7 +4613,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4579,7 +4629,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeltaMovement(double x, double y, double z) {
|
public void setDeltaMovement(double x, double y, double z) {
|
||||||
@@ -158,10 +158,10 @@ index f426abb7e6db911dfb3609383fce6476fd4233ed..d92e4db0051f128fac5653c7920c2466
|
|||||||
|
|
||||||
public final int getBlockX() {
|
public final int getBlockX() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index af4875fd0ed635dde59ec579dc198558efab0533..f345ab3886899e5823e5146b032c41f4e5ef5953 100644
|
index 788915f5e5cf54ee53222ded9939139ea982d306..4e58a786f4c6a4b441e444c41c910b2cd486ee33 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -145,7 +145,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -146,7 +146,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
|
|
||||||
++this.time;
|
++this.time;
|
||||||
if (!this.isNoGravity()) {
|
if (!this.isNoGravity()) {
|
||||||
@@ -170,7 +170,7 @@ index af4875fd0ed635dde59ec579dc198558efab0533..f345ab3886899e5823e5146b032c41f4
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||||
@@ -190,7 +190,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -191,7 +191,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
} else {
|
} else {
|
||||||
BlockState iblockdata = this.level().getBlockState(blockposition);
|
BlockState iblockdata = this.level().getBlockState(blockposition);
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ index af4875fd0ed635dde59ec579dc198558efab0533..f345ab3886899e5823e5146b032c41f4
|
|||||||
if (!iblockdata.is(Blocks.MOVING_PISTON)) {
|
if (!iblockdata.is(Blocks.MOVING_PISTON)) {
|
||||||
if (!this.cancelDrop) {
|
if (!this.cancelDrop) {
|
||||||
boolean flag2 = iblockdata.canBeReplaced((BlockPlaceContext) (new DirectionalPlaceContext(this.level(), blockposition, Direction.DOWN, ItemStack.EMPTY, Direction.UP)));
|
boolean flag2 = iblockdata.canBeReplaced((BlockPlaceContext) (new DirectionalPlaceContext(this.level(), blockposition, Direction.DOWN, ItemStack.EMPTY, Direction.UP)));
|
||||||
@@ -257,7 +257,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -258,7 +258,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,10 +189,10 @@ index af4875fd0ed635dde59ec579dc198558efab0533..f345ab3886899e5823e5146b032c41f4
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 3c5e8c594ff63d93bdd052a6b648120c550f60f5..bc77b3093dbc7312516817d8dd5a9b04534fb09e 100644
|
index 2e6691b86e161616bb2dcf5ce0391ad57a3ef422..7890f84d7a69e2e6820ef0daa35f898534f7372f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -74,7 +74,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -75,7 +75,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot
|
if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot
|
||||||
if (!this.isNoGravity()) {
|
if (!this.isNoGravity()) {
|
||||||
@@ -201,7 +201,7 @@ index 3c5e8c594ff63d93bdd052a6b648120c550f60f5..bc77b3093dbc7312516817d8dd5a9b04
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||||
@@ -84,9 +84,9 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -85,9 +85,9 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - Configurable TNT height nerf
|
// Paper end - Configurable TNT height nerf
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optional Force Position Updates
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index bc77b3093dbc7312516817d8dd5a9b04534fb09e..61a6901c081c64ac576563958f905f0a943b056f 100644
|
index 7890f84d7a69e2e6820ef0daa35f898534f7372f..5aa02f28b6be60688e340099b1637fb0ebfe7aa9 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -107,6 +107,14 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -108,6 +108,14 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,10 @@ index 658e63ebde81dc14c8ab5850fb246dc0aab25dea..f1ff1a67fee37ee7b241ceaa164fa4ee
|
|||||||
public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
|
public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
|
||||||
return new TicketType<>(name, argumentComparator, 0L);
|
return new TicketType<>(name, argumentComparator, 0L);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index d92e4db0051f128fac5653c7920c2466bff80143..71cdfe86643aab810a1f4315edf7cf222ecd9c96 100644
|
index a63d1a624df5d84f4e8168cbe075ae3d9bd4ff84..9ee8a871714167c9b71c926a8ad41e0e6bb2d4e3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -570,6 +570,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -571,6 +571,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
public boolean isPrimedTNT;
|
public boolean isPrimedTNT;
|
||||||
public boolean isFallingBlock;
|
public boolean isFallingBlock;
|
||||||
// Sakura end - visibility api and command
|
// Sakura end - visibility api and command
|
||||||
@@ -74,7 +74,7 @@ index d92e4db0051f128fac5653c7920c2466bff80143..71cdfe86643aab810a1f4315edf7cf22
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -1501,7 +1514,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1514,7 +1527,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
|
|
||||||
io.papermc.paper.util.CollisionUtil.getCollisions(
|
io.papermc.paper.util.CollisionUtil.getCollisions(
|
||||||
world, this, collisionBox, potentialCollisionsVoxel, potentialCollisionsBB,
|
world, this, collisionBox, potentialCollisionsVoxel, potentialCollisionsBB,
|
||||||
@@ -83,7 +83,7 @@ index d92e4db0051f128fac5653c7920c2466bff80143..71cdfe86643aab810a1f4315edf7cf22
|
|||||||
null, null
|
null, null
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -4873,12 +4886,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4897,12 +4910,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldBeSaved() {
|
public boolean shouldBeSaved() {
|
||||||
@@ -99,10 +99,10 @@ index d92e4db0051f128fac5653c7920c2466bff80143..71cdfe86643aab810a1f4315edf7cf22
|
|||||||
|
|
||||||
public boolean mayInteract(Level world, BlockPos pos) {
|
public boolean mayInteract(Level world, BlockPos pos) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index f345ab3886899e5823e5146b032c41f4e5ef5953..3b0c6dbe6b473e2249846f894f85770d5f46ded8 100644
|
index 4e58a786f4c6a4b441e444c41c910b2cd486ee33..1b8c7da956f43f1bebb3ad73d66a22a55fb0e3f5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -74,6 +74,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -75,6 +75,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.dropItem = true;
|
this.dropItem = true;
|
||||||
this.fallDamageMax = 40;
|
this.fallDamageMax = 40;
|
||||||
this.isFallingBlock = true; // Sakura
|
this.isFallingBlock = true; // Sakura
|
||||||
@@ -111,10 +111,10 @@ index f345ab3886899e5823e5146b032c41f4e5ef5953..3b0c6dbe6b473e2249846f894f85770d
|
|||||||
|
|
||||||
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 61a6901c081c64ac576563958f905f0a943b056f..9d92561eb38431ac01416900420793c21f89d82f 100644
|
index 5aa02f28b6be60688e340099b1637fb0ebfe7aa9..7a5ea7e0ea063eb0355dea89746a0e581548d131 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -39,6 +39,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -40,6 +40,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
this.blocksBuilding = true;
|
this.blocksBuilding = true;
|
||||||
this.isPrimedTNT = true; // Sakura
|
this.isPrimedTNT = true; // Sakura
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ index cce8f45c15b9a9acfbf9b769f7670cfd0969d62f..4237442c649845ffb0ff613e6c76ca47
|
|||||||
|
|
||||||
if (this.entity instanceof LivingEntity) {
|
if (this.entity instanceof LivingEntity) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 38d416b4d9acf811f862cd2fbf88de8dfcef077c..9a7b9f72531dfaecb55c089eea412e81ee00ef65 100644
|
index 9ee8a871714167c9b71c926a8ad41e0e6bb2d4e3..72b1fba4430cb2063b5305ee28758dffed272b8a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3402,7 +3402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -3418,7 +3418,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.entityData.markDirty(Entity.DATA_AIR_SUPPLY_ID);
|
this.entityData.markDirty(Entity.DATA_AIR_SUPPLY_ID);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -216,10 +216,10 @@ index 38d416b4d9acf811f862cd2fbf88de8dfcef077c..9a7b9f72531dfaecb55c089eea412e81
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 3b0c6dbe6b473e2249846f894f85770d5f46ded8..85da566b151d6c9995b5c41333c4cd05235c1d70 100644
|
index 1b8c7da956f43f1bebb3ad73d66a22a55fb0e3f5..b8687b3c6386288609cfb1980da2ee727acae03e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -110,7 +110,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -111,7 +111,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartPos(BlockPos pos) {
|
public void setStartPos(BlockPos pos) {
|
||||||
@@ -229,10 +229,10 @@ index 3b0c6dbe6b473e2249846f894f85770d5f46ded8..85da566b151d6c9995b5c41333c4cd05
|
|||||||
|
|
||||||
public BlockPos getStartPos() {
|
public BlockPos getStartPos() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 9d92561eb38431ac01416900420793c21f89d82f..46680f551f83b91581440d89a1c35c048db03638 100644
|
index 7a5ea7e0ea063eb0355dea89746a0e581548d131..90f10473ae441d68333cd497c718a3c982544533 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -188,7 +188,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -189,7 +189,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFuse(int fuse) {
|
public void setFuse(int fuse) {
|
||||||
@@ -242,10 +242,10 @@ index 9d92561eb38431ac01416900420793c21f89d82f..46680f551f83b91581440d89a1c35c04
|
|||||||
|
|
||||||
public int getFuse() {
|
public int getFuse() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 5ca1f834f311a87323ced2578535e66efa14e47f..d89e7f021cc4ac61550ca5dbf660323fc1aec01f 100644
|
index 567704f61034363e48ef2a5b5566ebdc91682297..74dcfabdc66ef289b8d6a5c6606579b5321af1db 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -645,7 +645,7 @@ public abstract class Player extends LivingEntity {
|
@@ -646,7 +646,7 @@ public abstract class Player extends LivingEntity {
|
||||||
public void increaseScore(int score) {
|
public void increaseScore(int score) {
|
||||||
int j = this.getScore();
|
int j = this.getScore();
|
||||||
|
|
||||||
|
|||||||
@@ -5,19 +5,19 @@ Subject: [PATCH] Copy EntityList methods to BasicEntityList
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
index 7e8dc9e8f381abfdcce2746edc93122d623622d1..2d79633d86007c7d40eecf5f9271fa3f351b72b5 100644
|
index c78cbec447032de9fe69748591bef6be300160ed..01701cdd0d984e35ff3453e6253ba9bcaa0db7b9 100644
|
||||||
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
@@ -25,6 +25,8 @@ import java.util.Iterator;
|
@@ -26,6 +26,8 @@ import java.util.List;
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
import org.bukkit.event.entity.EntityRemoveEvent;
|
||||||
|
|
||||||
+import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; // Sakura
|
+import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; // Sakura
|
||||||
+
|
+
|
||||||
public final class ChunkEntitySlices {
|
public final class ChunkEntitySlices {
|
||||||
|
|
||||||
protected final int minSection;
|
protected final int minSection;
|
||||||
@@ -303,6 +305,13 @@ public final class ChunkEntitySlices {
|
@@ -304,6 +306,13 @@ public final class ChunkEntitySlices {
|
||||||
|
|
||||||
protected static final class BasicEntityList<E extends Entity> {
|
protected static final class BasicEntityList<E extends Entity> {
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ index 7e8dc9e8f381abfdcce2746edc93122d623622d1..2d79633d86007c7d40eecf5f9271fa3f
|
|||||||
protected static final Entity[] EMPTY = new Entity[0];
|
protected static final Entity[] EMPTY = new Entity[0];
|
||||||
protected static final int DEFAULT_CAPACITY = 4;
|
protected static final int DEFAULT_CAPACITY = 4;
|
||||||
|
|
||||||
@@ -325,55 +334,52 @@ public final class ChunkEntitySlices {
|
@@ -326,55 +335,52 @@ public final class ChunkEntitySlices {
|
||||||
return this.size;
|
return this.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add utility methods to EntitySlices
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
index 2d79633d86007c7d40eecf5f9271fa3f351b72b5..d917a19c838ed3d74322abd85e1f737e852b5d7b 100644
|
index 01701cdd0d984e35ff3453e6253ba9bcaa0db7b9..8fcaa00e461c7f4413bf655ddd8165a2b908f900 100644
|
||||||
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
@@ -251,6 +251,12 @@ public final class ChunkEntitySlices {
|
@@ -252,6 +252,12 @@ public final class ChunkEntitySlices {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,7 @@ index 2d79633d86007c7d40eecf5f9271fa3f351b72b5..d917a19c838ed3d74322abd85e1f737e
|
|||||||
|
|
||||||
public void getHardCollidingEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
public void getHardCollidingEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
||||||
this.hardCollidingEntities.getEntities(except, box, into, predicate);
|
this.hardCollidingEntities.getEntities(except, box, into, predicate);
|
||||||
@@ -429,6 +435,18 @@ public final class ChunkEntitySlices {
|
@@ -430,6 +436,18 @@ public final class ChunkEntitySlices {
|
||||||
this.nonEmptyBitset[sectionIndex >>> 6] ^= (1L << (sectionIndex & (Long.SIZE - 1)));
|
this.nonEmptyBitset[sectionIndex >>> 6] ^= (1L << (sectionIndex & (Long.SIZE - 1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ index 0000000000000000000000000000000000000000..c9f2c5ae57878283e8c8bc3847fe63b9
|
|||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 9a7b9f72531dfaecb55c089eea412e81ee00ef65..88735691892aa19f30d4e686e88a3c09f565bb56 100644
|
index 72b1fba4430cb2063b5305ee28758dffed272b8a..552780f56247c0f064c704679e4c2d81e652291b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -583,6 +583,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -584,6 +584,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
// Sakura end - load chunks on cannon entity movement
|
// Sakura end - load chunks on cannon entity movement
|
||||||
@@ -91,7 +91,7 @@ index 9a7b9f72531dfaecb55c089eea412e81ee00ef65..88735691892aa19f30d4e686e88a3c09
|
|||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 0b616dfdf9eb60cd0ca8ee00829f7181a728bc4a..b8b9566157e87334f3c7909b96effa0385ebbbf5 100644
|
index 7b800ebae9787979613be845440a7dfa549c98ee..a57ae743a7be1835799d286c8c9d3ea82ed3da3e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -1321,6 +1321,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1321,6 +1321,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ index 06af35cba1a7b9c11cade2bcd0cc72c4bc28e56f..f68da3e0168c9462aa05cce11e523b9c
|
|||||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 7a89e4f70195c62c51bbf1993a0988a9c5706449..2b49e60aba45f997143d6a575c5f39d6d5a26ef2 100644
|
index 4bcbf7810b2c1c2067352f44e91187361c41641a..fe8a1ffe9a8030955d41b9324a59eb30db678e27 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -893,6 +893,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -893,6 +893,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
@@ -209,10 +209,10 @@ index 7a89e4f70195c62c51bbf1993a0988a9c5706449..2b49e60aba45f997143d6a575c5f39d6
|
|||||||
this.guardEntityTick(this::tickNonPassenger, entity);
|
this.guardEntityTick(this::tickNonPassenger, entity);
|
||||||
gameprofilerfiller.pop();
|
gameprofilerfiller.pop();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7eb1d5fc74 100644
|
index 552780f56247c0f064c704679e4c2d81e652291b..aaa10bbc8adafa42ce4a14ae426cc7bb78d145c1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -611,6 +611,108 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -612,6 +612,108 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return BlockPos.asLong(v.getBlockX(), v.getBlockY(), v.getBlockZ());
|
return BlockPos.asLong(v.getBlockX(), v.getBlockY(), v.getBlockZ());
|
||||||
}
|
}
|
||||||
// Sakura end - store entity data/state
|
// Sakura end - store entity data/state
|
||||||
@@ -308,7 +308,7 @@ index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7e
|
|||||||
+ mergeList.clear(); // clear the list to stop our tracking when merging
|
+ mergeList.clear(); // clear the list to stop our tracking when merging
|
||||||
+ stacked = 0; // prevent any possible duplication
|
+ stacked = 0; // prevent any possible duplication
|
||||||
+
|
+
|
||||||
+ discard();
|
+ discard(null); // MERGE is appropriate here but plugins may not expect tnt or falling blocks to merge
|
||||||
+
|
+
|
||||||
+ // update api handle, this is so cannondebug can function
|
+ // update api handle, this is so cannondebug can function
|
||||||
+ //noinspection ConstantValue
|
+ //noinspection ConstantValue
|
||||||
@@ -321,7 +321,7 @@ index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7e
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -659,6 +761,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -660,6 +762,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.getEntityData().registrationLocked = true; // Spigot
|
this.getEntityData().registrationLocked = true; // Spigot
|
||||||
this.setPos(0.0D, 0.0D, 0.0D);
|
this.setPos(0.0D, 0.0D, 0.0D);
|
||||||
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
||||||
@@ -329,7 +329,7 @@ index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7e
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isColliding(BlockPos pos, BlockState state) {
|
public boolean isColliding(BlockPos pos, BlockState state) {
|
||||||
@@ -2526,6 +2629,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2542,6 +2645,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
nbttagcompound.putBoolean("Paper.FreezeLock", true);
|
nbttagcompound.putBoolean("Paper.FreezeLock", true);
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -341,7 +341,7 @@ index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7e
|
|||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||||
@@ -2673,6 +2781,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2689,6 +2797,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -353,23 +353,23 @@ index 88735691892aa19f30d4e686e88a3c09f565bb56..de009d83f54c86f1369c1b7188a0ed7e
|
|||||||
|
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||||
@@ -4874,6 +4987,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4898,6 +5011,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Paper end - rewrite chunk system
|
// Paper end - rewrite chunk system
|
||||||
|
CraftEventFactory.callEntityRemoveEvent(this, cause);
|
||||||
|
// CraftBukkit end
|
||||||
+ // Sakura start
|
+ // Sakura start
|
||||||
+ if (reason == RemovalReason.DISCARDED && !mergeList.isEmpty()) {
|
+ if (entity_removalreason == RemovalReason.DISCARDED && !mergeList.isEmpty()) {
|
||||||
+ level.mergeHistory.markPositions(this);
|
+ level.mergeHistory.markPositions(this);
|
||||||
+ }
|
+ }
|
||||||
+ // Sakura end
|
+ // Sakura end
|
||||||
final boolean alreadyRemoved = this.removalReason != null; // Paper - Folia schedulers
|
final boolean alreadyRemoved = this.removalReason != null; // Paper - Folia schedulers
|
||||||
if (this.removalReason == null) {
|
if (this.removalReason == null) {
|
||||||
this.removalReason = reason;
|
this.removalReason = entity_removalreason;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 85da566b151d6c9995b5c41333c4cd05235c1d70..ff6d82fe45dd9613faebed71f7936451100848df 100644
|
index b8687b3c6386288609cfb1980da2ee727acae03e..b323b87ef01adcef6f21e4daa9566918bd958a67 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -132,6 +132,59 @@ public class FallingBlockEntity extends Entity {
|
@@ -133,6 +133,59 @@ public class FallingBlockEntity extends Entity {
|
||||||
return !this.isRemoved();
|
return !this.isRemoved();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ index 85da566b151d6c9995b5c41333c4cd05235c1d70..ff6d82fe45dd9613faebed71f7936451
|
|||||||
+ fallingBlock.entityState().apply(this);
|
+ fallingBlock.entityState().apply(this);
|
||||||
+ break;
|
+ break;
|
||||||
+ } else if (stacked == 0) {
|
+ } else if (stacked == 0) {
|
||||||
+ this.discard();
|
+ this.discard(EntityRemoveEvent.Cause.DESPAWN);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@@ -429,19 +429,19 @@ index 85da566b151d6c9995b5c41333c4cd05235c1d70..ff6d82fe45dd9613faebed71f7936451
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
// Paper start - fix sand duping
|
// Paper start - fix sand duping
|
||||||
@@ -209,6 +262,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -210,6 +263,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
+ if (this.respawnMerged()) return; // Sakura
|
+ if (this.respawnMerged()) return; // Sakura
|
||||||
if (this.level().setBlock(blockposition, this.blockState, 3)) {
|
if (this.level().setBlock(blockposition, this.blockState, 3)) {
|
||||||
((ServerLevel) this.level()).getChunkSource().chunkMap.broadcast(this, new ClientboundBlockUpdatePacket(blockposition, this.level().getBlockState(blockposition)));
|
((ServerLevel) this.level()).getChunkSource().chunkMap.broadcast(this, new ClientboundBlockUpdatePacket(blockposition, this.level().getBlockState(blockposition)));
|
||||||
this.discard();
|
this.discard(EntityRemoveEvent.Cause.DESPAWN);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 46680f551f83b91581440d89a1c35c048db03638..72fb1690e6a0692b453b9c0997a6eb8544d1dbf5 100644
|
index 90f10473ae441d68333cd497c718a3c982544533..ed0234d6a2718d35af635c4b74243bb2afd40769 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -71,6 +71,44 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -72,6 +72,44 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
return !this.isRemoved();
|
return !this.isRemoved();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ index 46680f551f83b91581440d89a1c35c048db03638..72fb1690e6a0692b453b9c0997a6eb85
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot
|
if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot
|
||||||
@@ -96,6 +134,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -97,6 +135,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
if (i <= 0) {
|
if (i <= 0) {
|
||||||
// CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event
|
// CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event
|
||||||
// this.discard();
|
// this.discard();
|
||||||
@@ -495,7 +495,7 @@ index 46680f551f83b91581440d89a1c35c048db03638..72fb1690e6a0692b453b9c0997a6eb85
|
|||||||
this.explode();
|
this.explode();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index b8b9566157e87334f3c7909b96effa0385ebbbf5..b12ab07a8ff72c91ff0edfaa54b11032817c467f 100644
|
index a57ae743a7be1835799d286c8c9d3ea82ed3da3e..0ccfae5343c88481d3f8ed5ec9839a5b7fa7f25c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -220,6 +220,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -220,6 +220,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ index f68da3e0168c9462aa05cce11e523b9cefefd7e7..771a23258d55cff17502acbe2341ed39
|
|||||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 2b49e60aba45f997143d6a575c5f39d6d5a26ef2..1db051b952cb893d9aa1bfef4dd6439f11285ec2 100644
|
index fe8a1ffe9a8030955d41b9324a59eb30db678e27..942000dd75d1467ed59063173423bb737021be89 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1946,6 +1946,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1946,6 +1946,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
@@ -660,10 +660,10 @@ index 2b49e60aba45f997143d6a575c5f39d6d5a26ef2..1db051b952cb893d9aa1bfef4dd6439f
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 72fb1690e6a0692b453b9c0997a6eb8544d1dbf5..a7f6100520cbcdb4851954bc1b919e232a91a464 100644
|
index ed0234d6a2718d35af635c4b74243bb2afd40769..2800af98260ebdab107466c596d2ec8cba6088fe 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -86,6 +86,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -87,6 +87,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
|| tnt.entityState().fallDistance() > 2.5f && fallDistance > 2.5f);
|
|| tnt.entityState().fallDistance() > 2.5f && fallDistance > 2.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -671,7 +671,7 @@ index 72fb1690e6a0692b453b9c0997a6eb8544d1dbf5..a7f6100520cbcdb4851954bc1b919e23
|
|||||||
@Override
|
@Override
|
||||||
protected boolean respawnMerged() {
|
protected boolean respawnMerged() {
|
||||||
if (stacked <= 1) return false;
|
if (stacked <= 1) return false;
|
||||||
@@ -107,6 +108,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -108,6 +109,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1007,7 +1007,7 @@ index f529f5d0f28533ec89f3ee712e59745991d068ee..d0ff7710577c1cfedae494796e6db420
|
|||||||
public float getEntityDamageAmount(Explosion explosion, Entity entity, double seenPercent) {
|
public float getEntityDamageAmount(Explosion explosion, Entity entity, double seenPercent) {
|
||||||
// Paper end - actually optimise explosions
|
// Paper end - actually optimise explosions
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index b12ab07a8ff72c91ff0edfaa54b11032817c467f..fd93fe7c5ab596c51e2ee30b0aca51fd513a0912 100644
|
index 0ccfae5343c88481d3f8ed5ec9839a5b7fa7f25c..67ea475db771d09232777b08278c3ba881bec905 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -221,6 +221,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -221,6 +221,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise Fast Movement
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 2320cbd0714294c078ec6e16c687713d28b0c174..472a411b18b27f498e3a446d2d335ff25d8da859 100644
|
index 3923ac7ec338956186f33f09d1f1cebebbef8732..d6afc7308698f41760938841967df3706d197082 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1223,6 +1223,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1236,6 +1236,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
// Paper end - detailed watchdog information
|
// Paper end - detailed watchdog information
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ index 2320cbd0714294c078ec6e16c687713d28b0c174..472a411b18b27f498e3a446d2d335ff2
|
|||||||
public void move(MoverType movementType, Vec3 movement) {
|
public void move(MoverType movementType, Vec3 movement) {
|
||||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
@@ -1601,6 +1690,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1614,6 +1703,95 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return offsetFactor;
|
return offsetFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,10 +201,10 @@ index 2320cbd0714294c078ec6e16c687713d28b0c174..472a411b18b27f498e3a446d2d335ff2
|
|||||||
// Paper start - optimise collisions
|
// Paper start - optimise collisions
|
||||||
final boolean xZero = movement.x == 0.0;
|
final boolean xZero = movement.x == 0.0;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index ff6d82fe45dd9613faebed71f7936451100848df..6a18f855d26e5a32f9bc40af5e238754a0697440 100644
|
index 11652215b96f4a0a2be58e5b547a84781731d253..cb216f5f7d5087503ae915915e562b33ccbf7fdd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -202,7 +202,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -203,7 +203,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.addDeltaMovement(0.0D, -0.04D, 0.0D); // Sakura - reduce movement allocations
|
this.addDeltaMovement(0.0D, -0.04D, 0.0D); // Sakura - reduce movement allocations
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,10 +214,10 @@ index ff6d82fe45dd9613faebed71f7936451100848df..6a18f855d26e5a32f9bc40af5e238754
|
|||||||
if (this.isRemoved()) {
|
if (this.isRemoved()) {
|
||||||
return;
|
return;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index a7f6100520cbcdb4851954bc1b919e232a91a464..a7ecf63d18891c61ddbdc55e74aa10da884838e8 100644
|
index 2800af98260ebdab107466c596d2ec8cba6088fe..7ff11a09234606508dac8347af281885b0a1f7e1 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -118,7 +118,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -119,7 +119,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
this.addDeltaMovement(0.0D, -0.04D, 0.0D); // Sakura - reduce movement allocations
|
this.addDeltaMovement(0.0D, -0.04D, 0.0D); // Sakura - reduce movement allocations
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,4 +225,4 @@ index a7f6100520cbcdb4851954bc1b919e232a91a464..a7ecf63d18891c61ddbdc55e74aa10da
|
|||||||
+ this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
+ this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
||||||
// Paper start - Configurable TNT height nerf
|
// Paper start - Configurable TNT height nerf
|
||||||
if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
|
if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
|
||||||
this.discard();
|
this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD);
|
||||||
|
|||||||
@@ -138,10 +138,10 @@ index 15ee41452992714108efe53b708b5a4e1da7c1ff..b62a1ae53a891802db17046271b9981a
|
|||||||
final int minChunkX = (Mth.floor(box.minX) - 2) >> 4;
|
final int minChunkX = (Mth.floor(box.minX) - 2) >> 4;
|
||||||
final int minChunkZ = (Mth.floor(box.minZ) - 2) >> 4;
|
final int minChunkZ = (Mth.floor(box.minZ) - 2) >> 4;
|
||||||
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
index d917a19c838ed3d74322abd85e1f737e852b5d7b..1ba10713c85d6f19f075cc267602a04c7e048252 100644
|
index 8fcaa00e461c7f4413bf655ddd8165a2b908f900..404b99def4562942e036089085a667979b1cac81 100644
|
||||||
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
--- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
|
||||||
@@ -258,6 +258,30 @@ public final class ChunkEntitySlices {
|
@@ -259,6 +259,30 @@ public final class ChunkEntitySlices {
|
||||||
}
|
}
|
||||||
// Sakura end
|
// Sakura end
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ index d917a19c838ed3d74322abd85e1f737e852b5d7b..1ba10713c85d6f19f075cc267602a04c
|
|||||||
public void getHardCollidingEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
public void getHardCollidingEntities(final Entity except, final AABB box, final List<Entity> into, final Predicate<? super Entity> predicate) {
|
||||||
this.hardCollidingEntities.getEntities(except, box, into, predicate);
|
this.hardCollidingEntities.getEntities(except, box, into, predicate);
|
||||||
}
|
}
|
||||||
@@ -448,6 +472,155 @@ public final class ChunkEntitySlices {
|
@@ -449,6 +473,155 @@ public final class ChunkEntitySlices {
|
||||||
}
|
}
|
||||||
// Sakura end
|
// Sakura end
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ index d917a19c838ed3d74322abd85e1f737e852b5d7b..1ba10713c85d6f19f075cc267602a04c
|
|||||||
if (this.count == 0) {
|
if (this.count == 0) {
|
||||||
return;
|
return;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index fd93fe7c5ab596c51e2ee30b0aca51fd513a0912..5316c8802111ea969334a075e542437eabe89f04 100644
|
index 67ea475db771d09232777b08278c3ba881bec905..e3bf4a869e97efc7c09fae134f59d948011812e0 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -223,6 +223,39 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -223,6 +223,39 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] isPushedByFluid API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 472a411b18b27f498e3a446d2d335ff25d8da859..3af0bbc8ac96b6601454046e253f465a5d9e7eb4 100644
|
index d6afc7308698f41760938841967df3706d197082..94d7a8568ffe9ecedcb3a9a6c2f42d8c4562d472 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -713,6 +713,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -714,6 +714,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sakura end - cannon entity merging
|
// Sakura end - cannon entity merging
|
||||||
@@ -16,7 +16,7 @@ index 472a411b18b27f498e3a446d2d335ff25d8da859..3af0bbc8ac96b6601454046e253f465a
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -4236,7 +4237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4252,7 +4253,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPushedByFluid() {
|
public boolean isPushedByFluid() {
|
||||||
@@ -26,10 +26,10 @@ index 472a411b18b27f498e3a446d2d335ff25d8da859..3af0bbc8ac96b6601454046e253f465a
|
|||||||
|
|
||||||
public static double getViewScale() {
|
public static double getViewScale() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 8698104e3eb98e2cc5da5de87a8f538860c1d91d..9c7076df8b89ce2e252ea4a81250d7888ec0eb30 100644
|
index 0b5a31477e3b76833fb97a455842316193663c8e..080d3adf1ffaa1cdd71a01706a89505ef7bc4a10 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -200,6 +200,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -201,6 +201,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
return this.entity.isInWater();
|
return this.entity.isInWater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Cannon Mechanics
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 6a18f855d26e5a32f9bc40af5e238754a0697440..6371253ed8f2d7a35e8ec0de3fc46c5f27e64a0f 100644
|
index cb216f5f7d5087503ae915915e562b33ccbf7fdd..9c41177ed25a93f7aff8795fc56a0a478903630e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -67,6 +67,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -68,6 +68,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
public CompoundTag blockData;
|
public CompoundTag blockData;
|
||||||
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
||||||
public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
||||||
@@ -16,7 +16,7 @@ index 6a18f855d26e5a32f9bc40af5e238754a0697440..6371253ed8f2d7a35e8ec0de3fc46c5f
|
|||||||
|
|
||||||
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
|
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -75,6 +76,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -76,6 +77,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.fallDamageMax = 40;
|
this.fallDamageMax = 40;
|
||||||
this.isFallingBlock = true; // Sakura
|
this.isFallingBlock = true; // Sakura
|
||||||
this.loadChunks = world.sakuraConfig().cannons.sand.loadsChunks; // Sakura - load chunks
|
this.loadChunks = world.sakuraConfig().cannons.sand.loadsChunks; // Sakura - load chunks
|
||||||
@@ -24,7 +24,7 @@ index 6a18f855d26e5a32f9bc40af5e238754a0697440..6371253ed8f2d7a35e8ec0de3fc46c5f
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) {
|
||||||
@@ -184,6 +186,12 @@ public class FallingBlockEntity extends Entity {
|
@@ -185,6 +187,12 @@ public class FallingBlockEntity extends Entity {
|
||||||
return itemEntity;
|
return itemEntity;
|
||||||
}
|
}
|
||||||
// Sakura end
|
// Sakura end
|
||||||
@@ -38,10 +38,10 @@ index 6a18f855d26e5a32f9bc40af5e238754a0697440..6371253ed8f2d7a35e8ec0de3fc46c5f
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index a7ecf63d18891c61ddbdc55e74aa10da884838e8..4deb969309179e2314bd479608e715540d5ea3d6 100644
|
index 7ff11a09234606508dac8347af281885b0a1f7e1..2123f82f881fea63cef197d91c267358c24ff126 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -53,6 +53,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -54,6 +54,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
this.yo = y;
|
this.yo = y;
|
||||||
this.zo = z;
|
this.zo = z;
|
||||||
this.owner = igniter;
|
this.owner = igniter;
|
||||||
@@ -54,7 +54,7 @@ index a7ecf63d18891c61ddbdc55e74aa10da884838e8..4deb969309179e2314bd479608e71554
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -247,7 +253,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -248,7 +254,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
// Paper start - Option to prevent TNT from moving in water
|
// Paper start - Option to prevent TNT from moving in water
|
||||||
@Override
|
@Override
|
||||||
public boolean isPushedByFluid() {
|
public boolean isPushedByFluid() {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise TNT fluid state and pushing
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 3af0bbc8ac96b6601454046e253f465a5d9e7eb4..c4ead1bd76c5bcd694758a993134aaf9b4d20594 100644
|
index 94d7a8568ffe9ecedcb3a9a6c2f42d8c4562d472..432601bc7a33a0da2034b3032e827fbdce8f6b6e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2186,7 +2186,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -2199,7 +2199,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return this.isInWater() || flag;
|
return this.isInWater() || flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,10 +18,10 @@ index 3af0bbc8ac96b6601454046e253f465a5d9e7eb4..c4ead1bd76c5bcd694758a993134aaf9
|
|||||||
|
|
||||||
if (entity instanceof Boat) {
|
if (entity instanceof Boat) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index 4deb969309179e2314bd479608e715540d5ea3d6..186011390569441e4942e4fda84c0df238d9803e 100644
|
index 2123f82f881fea63cef197d91c267358c24ff126..3ebc6fabbd9e5f9e71a97fe6153f24116c66f828 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -116,6 +116,19 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -117,6 +117,19 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// Sakura end
|
// Sakura end
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise LivingEntity#pushEntities
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index aceee33eebd4d5f89e62a42910ec51843f33843b..9dcf75b711924c1630526d99662ccc4ff314ddfc 100644
|
index 23570a0b1227a840b9c1e6ae326827ea655bb5f7..aad41a0026ae3240c9ba97e5b44ccce6d021f8aa 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3572,7 +3572,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3580,7 +3580,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - don't run getEntities if we're not going to use its result
|
// Paper end - don't run getEntities if we're not going to use its result
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Despawn falling blocks inside moving pistons
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 6371253ed8f2d7a35e8ec0de3fc46c5f27e64a0f..7a0ac559dd7d5db76d8e8b88baa76bcc28a0255b 100644
|
index 9c41177ed25a93f7aff8795fc56a0a478903630e..5ff54673066dd26b4eed5c5f86cfd1c0f4190bf3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -241,7 +241,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -242,7 +242,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configure Entity Knockback
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 9dcf75b711924c1630526d99662ccc4ff314ddfc..256d2fd1ad9abccfcee10f1928e9d46644e2e734 100644
|
index aad41a0026ae3240c9ba97e5b44ccce6d021f8aa..4a85c137dee528b56c2b9353bfbad86005ff709f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1541,7 +1541,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1549,7 +1549,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
d0 = (Math.random() - Math.random()) * 0.01D;
|
d0 = (Math.random() - Math.random()) * 0.01D;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ index 9dcf75b711924c1630526d99662ccc4ff314ddfc..256d2fd1ad9abccfcee10f1928e9d466
|
|||||||
if (!flag) {
|
if (!flag) {
|
||||||
this.indicateDamage(d0, d1);
|
this.indicateDamage(d0, d1);
|
||||||
}
|
}
|
||||||
@@ -1588,7 +1588,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1596,7 +1596,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void blockedByShield(LivingEntity target) {
|
protected void blockedByShield(LivingEntity target) {
|
||||||
@@ -26,7 +26,7 @@ index 9dcf75b711924c1630526d99662ccc4ff314ddfc..256d2fd1ad9abccfcee10f1928e9d466
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean checkTotemDeathProtection(DamageSource source) {
|
private boolean checkTotemDeathProtection(DamageSource source) {
|
||||||
@@ -1906,13 +1906,23 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1914,13 +1914,23 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void knockback(double d0, double d1, double d2, @Nullable Entity attacker, EntityKnockbackEvent.KnockbackCause cause) { // Paper - add nullable to attacker param
|
public void knockback(double d0, double d1, double d2, @Nullable Entity attacker, EntityKnockbackEvent.KnockbackCause cause) { // Paper - add nullable to attacker param
|
||||||
@@ -53,10 +53,10 @@ index 9dcf75b711924c1630526d99662ccc4ff314ddfc..256d2fd1ad9abccfcee10f1928e9d466
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index d89e7f021cc4ac61550ca5dbf660323fc1aec01f..3892af6ddcd889f65a46d01322d3e015d7c1fcf7 100644
|
index 74dcfabdc66ef289b8d6a5c6606579b5321af1db..94577ca6de11d23d2a2561b645212a7717088974 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -182,6 +182,7 @@ public abstract class Player extends LivingEntity {
|
@@ -183,6 +183,7 @@ public abstract class Player extends LivingEntity {
|
||||||
public float hurtDir; // Paper - protected -> public
|
public float hurtDir; // Paper - protected -> public
|
||||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||||
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
||||||
@@ -64,7 +64,7 @@ index d89e7f021cc4ac61550ca5dbf660323fc1aec01f..3892af6ddcd889f65a46d01322d3e015
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public boolean fauxSleeping;
|
public boolean fauxSleeping;
|
||||||
@@ -1273,7 +1274,7 @@ public abstract class Player extends LivingEntity {
|
@@ -1274,7 +1275,7 @@ public abstract class Player extends LivingEntity {
|
||||||
byte b0 = 0;
|
byte b0 = 0;
|
||||||
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ index d89e7f021cc4ac61550ca5dbf660323fc1aec01f..3892af6ddcd889f65a46d01322d3e015
|
|||||||
sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
sendSoundEffect(this, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_KNOCKBACK, this.getSoundSource(), 1.0F, 1.0F); // Paper - send while respecting visibility
|
||||||
++i;
|
++i;
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
@@ -1323,10 +1324,20 @@ public abstract class Player extends LivingEntity {
|
@@ -1324,10 +1325,20 @@ public abstract class Player extends LivingEntity {
|
||||||
|
|
||||||
if (flag5) {
|
if (flag5) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@@ -96,7 +96,7 @@ index d89e7f021cc4ac61550ca5dbf660323fc1aec01f..3892af6ddcd889f65a46d01322d3e015
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||||
@@ -1348,7 +1359,7 @@ public abstract class Player extends LivingEntity {
|
@@ -1349,7 +1360,7 @@ public abstract class Player extends LivingEntity {
|
||||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||||
// CraftBukkit start - Only apply knockback if the damage hits
|
// CraftBukkit start - Only apply knockback if the damage hits
|
||||||
if (entityliving.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API
|
if (entityliving.hurt(this.damageSources().playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Falling Block Stacking Restrictions
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
diff --git a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||||
index 1ec5190fe6755e5be10aa30f98bcfd6f1d8ce84b..bc9360ff3e50d5199cf31c331690272050001b88 100644
|
index f9a99319a4ba86762e2486a75f73df1cf74dcfdc..671fa0b3076276741ede09d5ae1f915e525ecf9f 100644
|
||||||
--- a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
--- a/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||||
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
+++ b/src/main/java/me/samsuik/sakura/configuration/WorldConfiguration.java
|
||||||
@@ -70,7 +70,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
@@ -70,7 +70,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||||
@@ -18,10 +18,10 @@ index 1ec5190fe6755e5be10aa30f98bcfd6f1d8ce84b..bc9360ff3e50d5199cf31c3316902720
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 7a0ac559dd7d5db76d8e8b88baa76bcc28a0255b..b10484757f46ba23b3fc07e27d8928755d345083 100644
|
index 5ff54673066dd26b4eed5c5f86cfd1c0f4190bf3..642cfdfa8fe31aa5e0a6a60a5852df3dd11054e7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -259,7 +259,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -260,7 +260,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1);
|
boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1);
|
||||||
boolean flag4 = this.blockState.canSurvive(this.level(), blockposition) && !flag3;
|
boolean flag4 = this.blockState.canSurvive(this.level(), blockposition) && !flag3;
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Added list of ItemEntity's that ignore explosions
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index a39db702063887cf530f272deaf4f334047cc7d4..1a29d35db958c60e014198536d65c4f903863049 100644
|
index c7f06c3cfb737bd17a706798bf9cf0e1af5f0cc0..e5e4e9f67390b407abc1bd01242cddbe118b3e45 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -578,6 +578,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
@@ -579,6 +579,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to disable entity ai
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 5af48151159135b869ec4753bbcf79dd257c1570..0b807081ad85ea91ecf397f6c29c6910010f8638 100644
|
index 2439f8d48daca7329049436414f06a36b4b79029..bdf3c81d9721ac06fd66a3f68ef0cc174858391b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -897,7 +897,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -898,7 +898,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
protected final void serverAiStep() {
|
protected final void serverAiStep() {
|
||||||
++this.noActionTime;
|
++this.noActionTime;
|
||||||
// Paper start - Allow nerfed mobs to jump and float
|
// Paper start - Allow nerfed mobs to jump and float
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove spigot max tnt per tick
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index dcb28daa8daf8fc2af020a7a94e3c9e51a2df63e..8ee03ac1c824fd2476339202c073239292ef62a2 100644
|
index 3ebc6fabbd9e5f9e71a97fe6153f24116c66f828..19397e2556a3cdc7180a5f8889aefb5ef23715b7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -132,7 +132,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -133,7 +133,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Option to configure entity water sensitivity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index f6b893644d74d81f4f07319ae2f7df43a9bc9552..7bc505822ccaf389c0e42d6907758f99956d87bb 100644
|
index 4a85c137dee528b56c2b9353bfbad86005ff709f..decb925446701a38455d7f33a676e73858946e67 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3517,7 +3517,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -3525,7 +3525,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper end - Add EntityMoveEvent
|
// Paper end - Add EntityMoveEvent
|
||||||
|
|||||||
@@ -87,10 +87,10 @@ index fbdd4c4ec21cff4c9651402a9e94dd99996723e1..0dd7b5dcb59e9eee2af769cc0989d30c
|
|||||||
x /= distance;
|
x /= distance;
|
||||||
y /= distance;
|
y /= distance;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2faef0c35 100644
|
index 432601bc7a33a0da2034b3032e827fbdce8f6b6e..d0a70a1035aa7b24879b16d6e85adb834685fb1e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -379,7 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -380,7 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
private final double[] pistonDeltas;
|
private final double[] pistonDeltas;
|
||||||
private long pistonDeltasGameTime;
|
private long pistonDeltasGameTime;
|
||||||
private EntityDimensions dimensions;
|
private EntityDimensions dimensions;
|
||||||
@@ -99,7 +99,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
public boolean isInPowderSnow;
|
public boolean isInPowderSnow;
|
||||||
public boolean wasInPowderSnow;
|
public boolean wasInPowderSnow;
|
||||||
public boolean wasOnFire;
|
public boolean wasOnFire;
|
||||||
@@ -714,6 +714,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -715,6 +715,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
// Sakura end - cannon entity merging
|
// Sakura end - cannon entity merging
|
||||||
public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
public boolean pushedByFluid = true; // Sakura - entity pushed by fluid api
|
||||||
@@ -113,7 +113,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -1169,7 +1176,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1182,7 +1189,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void checkSupportingBlock(boolean onGround, @Nullable Vec3 movement) {
|
protected void checkSupportingBlock(boolean onGround, @Nullable Vec3 movement) {
|
||||||
@@ -122,7 +122,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
AABB axisalignedbb = this.getBoundingBox();
|
AABB axisalignedbb = this.getBoundingBox();
|
||||||
AABB axisalignedbb1 = new AABB(axisalignedbb.minX, axisalignedbb.minY - 1.0E-6D, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.minY, axisalignedbb.maxZ);
|
AABB axisalignedbb1 = new AABB(axisalignedbb.minX, axisalignedbb.minY - 1.0E-6D, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.minY, axisalignedbb.maxZ);
|
||||||
Optional<BlockPos> optional = this.level.findSupportingBlock(this, axisalignedbb1);
|
Optional<BlockPos> optional = this.level.findSupportingBlock(this, axisalignedbb1);
|
||||||
@@ -1231,7 +1238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1244,7 +1251,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
if (this.noPhysics) {
|
if (this.noPhysics) {
|
||||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||||
} else {
|
} else {
|
||||||
@@ -131,7 +131,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
movement = this.limitPistonMovement(movement);
|
movement = this.limitPistonMovement(movement);
|
||||||
if (movement.equals(Vec3.ZERO)) {
|
if (movement.equals(Vec3.ZERO)) {
|
||||||
return;
|
return;
|
||||||
@@ -1249,10 +1256,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1262,10 +1269,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
Vec3 vec3d1 = this.collideScan(movement);
|
Vec3 vec3d1 = this.collideScan(movement);
|
||||||
double d0 = vec3d1.lengthSqr();
|
double d0 = vec3d1.lengthSqr();
|
||||||
|
|
||||||
@@ -144,7 +144,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
BlockHitResult movingobjectpositionblock = this.level().clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
BlockHitResult movingobjectpositionblock = this.level().clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
||||||
|
|
||||||
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
||||||
@@ -1288,6 +1295,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1301,6 +1308,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
if (this.horizontalCollision) {
|
if (this.horizontalCollision) {
|
||||||
Vec3 vec3d2 = this.getDeltaMovement();
|
Vec3 vec3d2 = this.getDeltaMovement();
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1329,7 +1342,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1342,7 +1355,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||||
} else {
|
} else {
|
||||||
this.wasOnFire = this.isOnFire();
|
this.wasOnFire = this.isOnFire();
|
||||||
@@ -166,7 +166,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
this.activatedTick = Math.max(this.activatedTick, MinecraftServer.currentTick + 20); // Paper
|
this.activatedTick = Math.max(this.activatedTick, MinecraftServer.currentTick + 20); // Paper
|
||||||
this.activatedImmunityTick = Math.max(this.activatedImmunityTick, MinecraftServer.currentTick + 20); // Paper
|
this.activatedImmunityTick = Math.max(this.activatedImmunityTick, MinecraftServer.currentTick + 20); // Paper
|
||||||
movement = this.limitPistonMovement(movement);
|
movement = this.limitPistonMovement(movement);
|
||||||
@@ -1356,8 +1369,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1369,8 +1382,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
Vec3 vec3d1 = this.collide(movement);
|
Vec3 vec3d1 = this.collide(movement);
|
||||||
double d0 = vec3d1.lengthSqr();
|
double d0 = vec3d1.lengthSqr();
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
BlockHitResult movingobjectpositionblock = this.level().clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
BlockHitResult movingobjectpositionblock = this.level().clip(new ClipContext(this.position(), this.position().add(vec3d1), ClipContext.Block.FALLDAMAGE_RESETTING, ClipContext.Fluid.WATER, this));
|
||||||
|
|
||||||
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
if (movingobjectpositionblock.getType() != HitResult.Type.MISS) {
|
||||||
@@ -1393,6 +1406,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1406,6 +1419,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
if (this.horizontalCollision) {
|
if (this.horizontalCollision) {
|
||||||
Vec3 vec3d2 = this.getDeltaMovement();
|
Vec3 vec3d2 = this.getDeltaMovement();
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
this.setDeltaMovement(flag ? 0.0D : vec3d2.x, vec3d2.y, flag1 ? 0.0D : vec3d2.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1716,7 +1735,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1729,7 +1748,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
double y = movement.y;
|
double y = movement.y;
|
||||||
double z = movement.z;
|
double z = movement.z;
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
|
|
||||||
if (y != 0.0) {
|
if (y != 0.0) {
|
||||||
y = scanY(currBoundingBox, y, voxelList, bbList);
|
y = scanY(currBoundingBox, y, voxelList, bbList);
|
||||||
@@ -1832,7 +1854,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1845,7 +1867,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return movement;
|
return movement;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
|
|
||||||
if (stepHeight > 0.0
|
if (stepHeight > 0.0
|
||||||
&& (onGround || (limitedMoveVector.y != movement.y && movement.y < 0.0))
|
&& (onGround || (limitedMoveVector.y != movement.y && movement.y < 0.0))
|
||||||
@@ -1948,8 +1970,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1961,8 +1983,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
|
|
||||||
protected void checkInsideBlocks() {
|
protected void checkInsideBlocks() {
|
||||||
AABB axisalignedbb = this.getBoundingBox();
|
AABB axisalignedbb = this.getBoundingBox();
|
||||||
@@ -226,10 +226,10 @@ index c4ead1bd76c5bcd694758a993134aaf9b4d20594..f9c7bb5636fee6e56e73428d1ec7afc2
|
|||||||
if (this.level().hasChunksAt(blockposition, blockposition1)) {
|
if (this.level().hasChunksAt(blockposition, blockposition1)) {
|
||||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9ab0f0a6c4 100644
|
index 642cfdfa8fe31aa5e0a6a60a5852df3dd11054e7..222fb210f97e9bc06cfd9431d297dcdb10fc6e1e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -89,6 +89,8 @@ public class FallingBlockEntity extends Entity {
|
@@ -90,6 +90,8 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.yo = y;
|
this.yo = y;
|
||||||
this.zo = z;
|
this.zo = z;
|
||||||
this.setStartPos(this.blockPosition());
|
this.setStartPos(this.blockPosition());
|
||||||
@@ -238,7 +238,7 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static FallingBlockEntity fall(Level world, BlockPos pos, BlockState state) {
|
public static FallingBlockEntity fall(Level world, BlockPos pos, BlockState state) {
|
||||||
@@ -101,7 +103,11 @@ public class FallingBlockEntity extends Entity {
|
@@ -102,7 +104,11 @@ public class FallingBlockEntity extends Entity {
|
||||||
FallingBlockEntity entityfallingblock = new FallingBlockEntity(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, iblockdata.hasProperty(BlockStateProperties.WATERLOGGED) ? (BlockState) iblockdata.setValue(BlockStateProperties.WATERLOGGED, false) : iblockdata);
|
FallingBlockEntity entityfallingblock = new FallingBlockEntity(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, iblockdata.hasProperty(BlockStateProperties.WATERLOGGED) ? (BlockState) iblockdata.setValue(BlockStateProperties.WATERLOGGED, false) : iblockdata);
|
||||||
if (!CraftEventFactory.callEntityChangeBlockEvent(entityfallingblock, blockposition, iblockdata.getFluidState().createLegacyBlock())) return entityfallingblock; // CraftBukkit
|
if (!CraftEventFactory.callEntityChangeBlockEvent(entityfallingblock, blockposition, iblockdata.getFluidState().createLegacyBlock())) return entityfallingblock; // CraftBukkit
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
world.addFreshEntity(entityfallingblock, spawnReason); // CraftBukkit
|
world.addFreshEntity(entityfallingblock, spawnReason); // CraftBukkit
|
||||||
return entityfallingblock;
|
return entityfallingblock;
|
||||||
}
|
}
|
||||||
@@ -189,9 +195,46 @@ public class FallingBlockEntity extends Entity {
|
@@ -190,9 +196,46 @@ public class FallingBlockEntity extends Entity {
|
||||||
// Sakura start
|
// Sakura start
|
||||||
@Override
|
@Override
|
||||||
public final double getEyeY() {
|
public final double getEyeY() {
|
||||||
@@ -292,14 +292,14 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
+ if (blockstate.is(block)) {
|
+ if (blockstate.is(block)) {
|
||||||
+ ((ServerLevel) level()).getChunkSource().blockChanged(blockposition);
|
+ ((ServerLevel) level()).getChunkSource().blockChanged(blockposition);
|
||||||
+ }
|
+ }
|
||||||
+ this.discard();
|
+ this.discard(EntityRemoveEvent.Cause.DESPAWN);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Sakura end - physics version api
|
+ // Sakura end - physics version api
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
@@ -205,9 +248,16 @@ public class FallingBlockEntity extends Entity {
|
@@ -206,9 +249,16 @@ public class FallingBlockEntity extends Entity {
|
||||||
} else {
|
} else {
|
||||||
Block block = this.blockState.getBlock();
|
Block block = this.blockState.getBlock();
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
||||||
@@ -226,8 +276,16 @@ public class FallingBlockEntity extends Entity {
|
@@ -227,8 +277,16 @@ public class FallingBlockEntity extends Entity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - Configurable falling blocks height nerf
|
// Paper end - Configurable falling blocks height nerf
|
||||||
@@ -335,7 +335,7 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
|
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
|
||||||
boolean flag1 = flag && this.level().getFluidState(blockposition).is(FluidTags.WATER);
|
boolean flag1 = flag && this.level().getFluidState(blockposition).is(FluidTags.WATER);
|
||||||
double d0 = this.getDeltaMovement().lengthSqr();
|
double d0 = this.getDeltaMovement().lengthSqr();
|
||||||
@@ -252,8 +310,11 @@ public class FallingBlockEntity extends Entity {
|
@@ -253,8 +311,11 @@ public class FallingBlockEntity extends Entity {
|
||||||
} else {
|
} else {
|
||||||
BlockState iblockdata = this.level().getBlockState(blockposition);
|
BlockState iblockdata = this.level().getBlockState(blockposition);
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
if (!this.cancelDrop) {
|
if (!this.cancelDrop) {
|
||||||
boolean flag2 = iblockdata.canBeReplaced((BlockPlaceContext) (new DirectionalPlaceContext(this.level(), blockposition, Direction.DOWN, ItemStack.EMPTY, Direction.UP)));
|
boolean flag2 = iblockdata.canBeReplaced((BlockPlaceContext) (new DirectionalPlaceContext(this.level(), blockposition, Direction.DOWN, ItemStack.EMPTY, Direction.UP)));
|
||||||
boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1);
|
boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1);
|
||||||
@@ -320,7 +381,12 @@ public class FallingBlockEntity extends Entity {
|
@@ -321,7 +382,12 @@ public class FallingBlockEntity extends Entity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,10 +364,10 @@ index b10484757f46ba23b3fc07e27d8928755d345083..cc28593be3f99ee0e5ae086872966a9a
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
index d6bd637873052e9919a59490efc7d29157681003..ecc33caa0af31949ad28580537fba9822ced9eb7 100644
|
index 19397e2556a3cdc7180a5f8889aefb5ef23715b7..26fc6a8018cfde3c219a7d828f743663e804d1c6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||||
@@ -59,6 +59,13 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -60,6 +60,13 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
case Y -> multiplyDeltaMovement(0, 1, 0);
|
case Y -> multiplyDeltaMovement(0, 1, 0);
|
||||||
}
|
}
|
||||||
// Sakura end
|
// Sakura end
|
||||||
@@ -381,7 +381,7 @@ index d6bd637873052e9919a59490efc7d29157681003..ecc33caa0af31949ad28580537fba982
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -129,12 +136,30 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -130,12 +137,30 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sakura end
|
// Sakura end
|
||||||
@@ -413,7 +413,7 @@ index d6bd637873052e9919a59490efc7d29157681003..ecc33caa0af31949ad28580537fba982
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise simple entity movement
|
||||||
@@ -144,15 +169,19 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -145,15 +170,19 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - Configurable TNT height nerf
|
// Paper end - Configurable TNT height nerf
|
||||||
@@ -436,7 +436,7 @@ index d6bd637873052e9919a59490efc7d29157681003..ecc33caa0af31949ad28580537fba982
|
|||||||
// CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event
|
// CraftBukkit start - Need to reverse the order of the explosion and the entity death so we have a location for the event
|
||||||
// this.discard();
|
// this.discard();
|
||||||
this.respawnMerged(); // Sakura
|
this.respawnMerged(); // Sakura
|
||||||
@@ -205,7 +234,10 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -206,7 +235,10 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
ExplosionPrimeEvent event = CraftEventFactory.callExplosionPrimeEvent((org.bukkit.entity.Explosive)this.getBukkitEntity());
|
ExplosionPrimeEvent event = CraftEventFactory.callExplosionPrimeEvent((org.bukkit.entity.Explosive)this.getBukkitEntity());
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
@@ -448,7 +448,7 @@ index d6bd637873052e9919a59490efc7d29157681003..ecc33caa0af31949ad28580537fba982
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@@ -266,7 +298,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@@ -267,7 +299,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||||
// Paper start - Option to prevent TNT from moving in water
|
// Paper start - Option to prevent TNT from moving in water
|
||||||
@Override
|
@Override
|
||||||
public boolean isPushedByFluid() {
|
public boolean isPushedByFluid() {
|
||||||
@@ -544,7 +544,7 @@ index e09d159007922d29a2cdc1b2597a52c16958b819..e10a78213da1514f54e0659960f76338
|
|||||||
if (data == null || !data.isExpandable() && (blockDensity == 0.0f || blockDensity == 1.0f)) {
|
if (data == null || !data.isExpandable() && (blockDensity == 0.0f || blockDensity == 1.0f)) {
|
||||||
level.densityCache.createCache(key, entity, vec3d, blockDensity);
|
level.densityCache.createCache(key, entity, vec3d, blockDensity);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 96d67bae33543b90013c6cd312f01f5ab98ff5ab..e4783deff8eafdb6e84bbe8e5f636dd5f4ad10d8 100644
|
index 8dc99872cf778a784e81a54abefa73a4f25e2a49..db433c73df018e5953053041f058291f42ebb8ec 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -257,6 +257,205 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -257,6 +257,205 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configure concrete solidifying in water
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index cc28593be3f99ee0e5ae086872966a9ab0f0a6c4..3ee7b74955550f880cf9237a1b01d8379d5145e9 100644
|
index 222fb210f97e9bc06cfd9431d297dcdb10fc6e1e..14914d0e96f6640e8dd52dd40b98d30b68a1034f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -286,7 +286,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -287,7 +287,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
BlockPos blockposition = this.physics.before(1_17_0) ? this.patchedBlockPosition() : this.blockPosition();
|
BlockPos blockposition = this.physics.before(1_17_0) ? this.patchedBlockPosition() : this.blockPosition();
|
||||||
// Sakura end - physics version api
|
// Sakura end - physics version api
|
||||||
|
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ index a40dcbde87860fd6d3b60d0b9e2d5e63e18e69b7..d0bab6610a0ea8d3e6ba69034a25f409
|
|||||||
AABB singleAABB = blockCollision.getSingleAABBRepresentation();
|
AABB singleAABB = blockCollision.getSingleAABBRepresentation();
|
||||||
if (singleAABB != null) {
|
if (singleAABB != null) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index f9c7bb5636fee6e56e73428d1ec7afc2faef0c35..5d310918daf06bed137438a7ec24c2aa29abb472 100644
|
index d0a70a1035aa7b24879b16d6e85adb834685fb1e..192416a406feb5892862848ed30d395dae665a8e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -580,6 +580,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -581,6 +581,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
flags |= io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_LOAD_CHUNKS | io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_ADD_TICKET;
|
flags |= io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_LOAD_CHUNKS | io.papermc.paper.util.CollisionUtil.COLLISION_FLAG_ADD_TICKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add instant mob death animation
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 7bc505822ccaf389c0e42d6907758f99956d87bb..99b945292ecece36f9d4976493fb42688047ed8b 100644
|
index decb925446701a38455d7f33a676e73858946e67..9cdce5f522e62594fa359b24408950abe15e632a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1768,6 +1768,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -1776,6 +1776,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
if (this.dead) { // Paper
|
if (this.dead) { // Paper
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Option to disable explosions hurting players
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 3892af6ddcd889f65a46d01322d3e015d7c1fcf7..20507c6b48d70fb19cc1cba6ed31bffd0ff88a28 100644
|
index 94577ca6de11d23d2a2561b645212a7717088974..127b83d92719fb5149d936125423a509779e577d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -934,7 +934,7 @@ public abstract class Player extends LivingEntity {
|
@@ -935,7 +935,7 @@ public abstract class Player extends LivingEntity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvulnerableTo(DamageSource damageSource) {
|
public boolean isInvulnerableTo(DamageSource damageSource) {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimise check inside blocks and fluids
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 5d310918daf06bed137438a7ec24c2aa29abb472..071eb3a86fb34aaddb9e47d56cb2c59ceea3e4c4 100644
|
index 192416a406feb5892862848ed30d395dae665a8e..584520739e41d4372e2c4040fc6b2363927e7187 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1984,18 +1984,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -1997,18 +1997,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
BlockPos blockposition1 = BlockPos.containing(axisalignedbb.maxX - offset, axisalignedbb.maxY - offset, axisalignedbb.maxZ - offset);
|
BlockPos blockposition1 = BlockPos.containing(axisalignedbb.maxX - offset, axisalignedbb.maxY - offset, axisalignedbb.maxZ - offset);
|
||||||
// Sakura end
|
// Sakura end
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ index 5d310918daf06bed137438a7ec24c2aa29abb472..071eb3a86fb34aaddb9e47d56cb2c59c
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
iblockdata.entityInside(this.level(), blockposition_mutableblockposition, this);
|
iblockdata.entityInside(this.level(), blockposition_mutableblockposition, this);
|
||||||
@@ -4780,7 +4799,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4796,7 +4815,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||||
@@ -59,7 +59,7 @@ index 5d310918daf06bed137438a7ec24c2aa29abb472..071eb3a86fb34aaddb9e47d56cb2c59c
|
|||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
|
AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
|
||||||
@@ -4797,11 +4816,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -4813,11 +4832,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
int k1 = 0;
|
int k1 = 0;
|
||||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ Subject: [PATCH] Fix doEntityDrops gamerule preventing falling blocks from
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index 3ee7b74955550f880cf9237a1b01d8379d5145e9..d86f360f4f51e54b6999bb3432ad06d2ea621f90 100644
|
index 14914d0e96f6640e8dd52dd40b98d30b68a1034f..c0f8f8b7c7159fb43497376152d16441c3491721 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -361,10 +361,14 @@ public class FallingBlockEntity extends Entity {
|
@@ -362,10 +362,14 @@ public class FallingBlockEntity extends Entity {
|
||||||
tileentity.setChanged();
|
tileentity.setChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- } else if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
- } else if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||||
+ // Sakura start - fix the do entity drops gamerule
|
+ // Sakura start - fix the do entity drops gamerule
|
||||||
+ } else {
|
+ } else {
|
||||||
this.discard();
|
this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
|
||||||
- this.callOnBrokenAfterFall(block, blockposition);
|
- this.callOnBrokenAfterFall(block, blockposition);
|
||||||
- this.spawnAtLocation((ItemLike) block);
|
- this.spawnAtLocation((ItemLike) block);
|
||||||
+ if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
+ if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||||
@@ -26,4 +26,4 @@ index 3ee7b74955550f880cf9237a1b01d8379d5145e9..d86f360f4f51e54b6999bb3432ad06d2
|
|||||||
+ // Sakura end
|
+ // Sakura end
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.discard();
|
this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add entity travel distance limits
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 1db051b952cb893d9aa1bfef4dd6439f11285ec2..ee8bae340448eaa0753833b222de96ccff205939 100644
|
index 942000dd75d1467ed59063173423bb737021be89..0321f48070d2d264e18837a888527543aad78cc2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1417,6 +1417,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1417,6 +1417,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
@@ -14,17 +14,17 @@ index 1db051b952cb893d9aa1bfef4dd6439f11285ec2..ee8bae340448eaa0753833b222de96cc
|
|||||||
entity.tick();
|
entity.tick();
|
||||||
+ // Sakura start - entity travel distance limits
|
+ // Sakura start - entity travel distance limits
|
||||||
+ if (entity.isPastTravelDistanceLimit()) {
|
+ if (entity.isPastTravelDistanceLimit()) {
|
||||||
+ entity.discard();
|
+ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN);
|
||||||
+ }
|
+ }
|
||||||
+ // Sakura end - entity travel distance limits
|
+ // Sakura end - entity travel distance limits
|
||||||
entity.postTick(); // CraftBukkit
|
entity.postTick(); // CraftBukkit
|
||||||
} else { entity.inactiveTick(); } // Paper - EAR 2
|
} else { entity.inactiveTick(); } // Paper - EAR 2
|
||||||
this.getProfiler().pop();
|
this.getProfiler().pop();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index af422f8e5d89c4ac10ea91265fd84cf65cbf28cb..8baa9da071a55f691031668b3f5baf42bc923c98 100644
|
index 584520739e41d4372e2c4040fc6b2363927e7187..8ecf39f1ff7184bb67969b830bb11e2100695c1e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -729,6 +729,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -730,6 +730,19 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
return this.physics;
|
return this.physics;
|
||||||
}
|
}
|
||||||
// Sakura end - physics version api
|
// Sakura end - physics version api
|
||||||
@@ -44,7 +44,7 @@ index af422f8e5d89c4ac10ea91265fd84cf65cbf28cb..8baa9da071a55f691031668b3f5baf42
|
|||||||
|
|
||||||
public Entity(EntityType<?> type, Level world) {
|
public Entity(EntityType<?> type, Level world) {
|
||||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||||
@@ -778,6 +791,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
@@ -779,6 +792,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||||
this.setPos(0.0D, 0.0D, 0.0D);
|
this.setPos(0.0D, 0.0D, 0.0D);
|
||||||
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
this.eyeHeight = this.getEyeHeight(net.minecraft.world.entity.Pose.STANDING, this.dimensions);
|
||||||
this.mergeLevel = level.sakuraConfig().cannons.mergeLevel; // Sakura
|
this.mergeLevel = level.sakuraConfig().cannons.mergeLevel; // Sakura
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ index 391ba45cce8196720e1856626067857ad8ad2443..9d38a45f8fc6583db7dd51aa7d9d69b3
|
|||||||
hitResult = hitResult2;
|
hitResult = hitResult2;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||||
index 0c5bac5d955b1e380103c9b51635010212c6526e..f0580c221a1e64c721d6438daa0950fc46e58450 100644
|
index 19af5552e36964996082226b4f77561d7deb99f6..23c19fb83603974d3d70bc983cf7763bf05142bf 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||||
@@ -60,6 +60,25 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
@@ -61,6 +61,25 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||||
super(EntityType.POTION, x, y, z, world);
|
super(EntityType.POTION, x, y, z, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user