mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
some minecraft fixes
This commit is contained in:
@@ -1067,7 +1067,7 @@ index b10cb4a73df58a5fe64e88868733ba41616f59e4..9f9cbe6056f8a4eeca64c40872d7403b
|
|||||||
+ // DivineMC end - Completely remove Mojang profiler
|
+ // DivineMC end - Completely remove Mojang profiler
|
||||||
}
|
}
|
||||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
index 80d04f4eb5122d571409a50f5921c3403dacf31f..ac35fc08574a72be356c48fb6e1cfafe36cd0860 100644
|
index bbe93d1861541991215d32186eec82fa8602fea2..104a9ec97bd39e15f6707f19865fa6fcf47f6e4f 100644
|
||||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
@@ -809,12 +809,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@@ -809,12 +809,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||||
@@ -4006,7 +4006,7 @@ index 39a604c9a53930b53d959b1d2eb504aa964e9a58..0d0380e3955836ce125f777841477503
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f3494979b 100644
|
index 37a22346fabaf71886b3e0a6db10877f5f35a3a0..6e4429db2a0512f78b10c44955384bc893964e6f 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -80,8 +80,6 @@ import net.minecraft.tags.TagKey;
|
@@ -80,8 +80,6 @@ import net.minecraft.tags.TagKey;
|
||||||
@@ -4079,7 +4079,7 @@ index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
@@ -3468,8 +3456,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -3470,8 +3458,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.processPortalCooldown();
|
this.processPortalCooldown();
|
||||||
if (this.portalProcess != null) {
|
if (this.portalProcess != null) {
|
||||||
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
||||||
@@ -4088,7 +4088,7 @@ index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f
|
|||||||
this.setPortalCooldown();
|
this.setPortalCooldown();
|
||||||
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
|
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
|
||||||
if (portalDestination != null) {
|
if (portalDestination != null) {
|
||||||
@@ -3479,8 +3465,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -3481,8 +3467,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
this.teleport(portalDestination);
|
this.teleport(portalDestination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4097,7 +4097,7 @@ index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f
|
|||||||
} else if (this.portalProcess.hasExpired()) {
|
} else if (this.portalProcess.hasExpired()) {
|
||||||
this.portalProcess = null;
|
this.portalProcess = null;
|
||||||
}
|
}
|
||||||
@@ -4047,15 +4031,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4049,15 +4033,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
entity.teleport(this.calculatePassengerTransition(teleportTransition, entity));
|
entity.teleport(this.calculatePassengerTransition(teleportTransition, entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4113,7 +4113,7 @@ index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4071,11 +4052,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4073,11 +4054,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4125,7 +4125,7 @@ index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f
|
|||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
// Paper start - Fix item duplication and teleport issues
|
// Paper start - Fix item duplication and teleport issues
|
||||||
@@ -4095,7 +4073,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4097,7 +4075,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
newLevel.resetEmptyTime();
|
newLevel.resetEmptyTime();
|
||||||
teleportTransition.postTeleportTransition().onTransition(entityx);
|
teleportTransition.postTeleportTransition().onTransition(entityx);
|
||||||
this.teleportSpectators(teleportTransition, oldLevel);
|
this.teleportSpectators(teleportTransition, oldLevel);
|
||||||
@@ -4244,7 +4244,7 @@ index 590ccc9d181d401abd1154ae1f16b1230e8195f1..8df6ceea1536b12d87755c8a69e1b652
|
|||||||
// Purpur start - Ridables
|
// Purpur start - Ridables
|
||||||
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
||||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||||
index b0a5f79eb2c3ea84fd37eaa653a4f2c83caeab5d..e1f5a4814d051a43090bf6df2acbcd20fbbc1934 100644
|
index 5f4b82b2331ceb29b6f61c377259797878c48e88..6e50571901431ab5959ce6b35a047bd7f1025114 100644
|
||||||
--- a/net/minecraft/world/entity/Mob.java
|
--- a/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/net/minecraft/world/entity/Mob.java
|
+++ b/net/minecraft/world/entity/Mob.java
|
||||||
@@ -26,8 +26,6 @@ import net.minecraft.sounds.SoundEvent;
|
@@ -26,8 +26,6 @@ import net.minecraft.sounds.SoundEvent;
|
||||||
@@ -4256,7 +4256,7 @@ index b0a5f79eb2c3ea84fd37eaa653a4f2c83caeab5d..e1f5a4814d051a43090bf6df2acbcd20
|
|||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.Difficulty;
|
import net.minecraft.world.Difficulty;
|
||||||
import net.minecraft.world.DifficultyInstance;
|
import net.minecraft.world.DifficultyInstance;
|
||||||
@@ -321,14 +319,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -321,8 +319,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
@Override
|
@Override
|
||||||
public void baseTick() {
|
public void baseTick() {
|
||||||
super.baseTick();
|
super.baseTick();
|
||||||
@@ -4265,13 +4265,15 @@ index b0a5f79eb2c3ea84fd37eaa653a4f2c83caeab5d..e1f5a4814d051a43090bf6df2acbcd20
|
|||||||
if (this.isAlive() && this.random.nextInt(1000) < this.ambientSoundTime++) {
|
if (this.isAlive() && this.random.nextInt(1000) < this.ambientSoundTime++) {
|
||||||
this.resetAmbientSoundTime();
|
this.resetAmbientSoundTime();
|
||||||
this.playAmbientSound();
|
this.playAmbientSound();
|
||||||
}
|
@@ -330,7 +326,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
|
|
||||||
|
if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc183990 && this.target != null && this.target.isDeadOrDying()) this.setTarget(null); // DivineMC - Fix MC-183990
|
||||||
|
|
||||||
- profilerFiller.pop();
|
- profilerFiller.pop();
|
||||||
incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan
|
incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -526,8 +521,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -528,8 +523,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
@Override
|
@Override
|
||||||
public void aiStep() {
|
public void aiStep() {
|
||||||
super.aiStep();
|
super.aiStep();
|
||||||
@@ -4280,7 +4282,7 @@ index b0a5f79eb2c3ea84fd37eaa653a4f2c83caeab5d..e1f5a4814d051a43090bf6df2acbcd20
|
|||||||
if (this.level() instanceof ServerLevel serverLevel
|
if (this.level() instanceof ServerLevel serverLevel
|
||||||
&& this.canPickUpLoot()
|
&& this.canPickUpLoot()
|
||||||
&& this.isAlive()
|
&& this.isAlive()
|
||||||
@@ -550,8 +543,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -552,8 +545,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4289,7 +4291,7 @@ index b0a5f79eb2c3ea84fd37eaa653a4f2c83caeab5d..e1f5a4814d051a43090bf6df2acbcd20
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Vec3i getPickupReach() {
|
protected Vec3i getPickupReach() {
|
||||||
@@ -765,42 +756,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -767,42 +758,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - Allow nerfed mobs to jump and float
|
// Paper end - Allow nerfed mobs to jump and float
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ index 421b59b24bda3d03dea8fd0fc6237a71900e1cdc..78bf3365b426e7090182af84630111d4
|
|||||||
if (!tickRateManager.isEntityFrozen(entity)) {
|
if (!tickRateManager.isEntityFrozen(entity)) {
|
||||||
entity.checkDespawn();
|
entity.checkDespawn();
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index 5bc7f37290eb99145a2ea3e40d31180f3494979b..bdf9899f960b6cca3529af97ebff738761208439 100644
|
index 6e4429db2a0512f78b10c44955384bc893964e6f..88855cb5d55f1bf6c711e441b037a44f61b8ab27 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -365,6 +365,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -365,6 +365,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -68,7 +68,7 @@ index 9950fccc0a708e701b81fcabc9e8f370e6d3a19d..0159627e2c9a540d062073faf9018f52
|
|||||||
@Nullable
|
@Nullable
|
||||||
private Component description;
|
private Component description;
|
||||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||||
index e1f5a4814d051a43090bf6df2acbcd20fbbc1934..c4292b95a0a90569aa8708cc3e54433d9757f1a5 100644
|
index 6e50571901431ab5959ce6b35a047bd7f1025114..397534250d03848104ed4818d033349ae2245abf 100644
|
||||||
--- a/net/minecraft/world/entity/Mob.java
|
--- a/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/net/minecraft/world/entity/Mob.java
|
+++ b/net/minecraft/world/entity/Mob.java
|
||||||
@@ -209,10 +209,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -209,10 +209,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
@@ -84,7 +84,7 @@ index e1f5a4814d051a43090bf6df2acbcd20fbbc1934..c4292b95a0a90569aa8708cc3e54433d
|
|||||||
this.targetSelector.tick();
|
this.targetSelector.tick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -758,13 +758,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
@@ -760,13 +760,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
// Paper end - Allow nerfed mobs to jump and float
|
// Paper end - Allow nerfed mobs to jump and float
|
||||||
this.sensing.tick();
|
this.sensing.tick();
|
||||||
int i = this.tickCount + this.getId();
|
int i = this.tickCount + this.getId();
|
||||||
|
|||||||
@@ -633,10 +633,10 @@ index f9e7532f86122a379692561a639a209a126e8bba..839f6b7696ef85314da185bedba7cfc5
|
|||||||
if (isLocatorBarEnabledFor(player)) {
|
if (isLocatorBarEnabledFor(player)) {
|
||||||
if (!connection.isBroken()) {
|
if (!connection.isBroken()) {
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index bdf9899f960b6cca3529af97ebff738761208439..adea48cfde04df3107341075f414133ae37d986e 100644
|
index 88855cb5d55f1bf6c711e441b037a44f61b8ab27..0915a08bc8d2dd38ade01e31c34abd69e1abd365 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3459,14 +3459,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -3461,14 +3461,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
if (this.portalProcess != null) {
|
if (this.portalProcess != null) {
|
||||||
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
|
||||||
this.setPortalCooldown();
|
this.setPortalCooldown();
|
||||||
@@ -677,7 +677,7 @@ index bdf9899f960b6cca3529af97ebff738761208439..adea48cfde04df3107341075f414133a
|
|||||||
} else if (this.portalProcess.hasExpired()) {
|
} else if (this.portalProcess.hasExpired()) {
|
||||||
this.portalProcess = null;
|
this.portalProcess = null;
|
||||||
}
|
}
|
||||||
@@ -4043,6 +4063,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4045,6 +4065,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
private Entity teleportCrossDimension(ServerLevel oldLevel, ServerLevel newLevel, TeleportTransition teleportTransition) {
|
private Entity teleportCrossDimension(ServerLevel oldLevel, ServerLevel newLevel, TeleportTransition teleportTransition) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ index 7ca147cf9da67c399806056e5092841f7ca32321..a6bf257ca93e4b3819b65b4ef4ba71d9
|
|||||||
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
||||||
if (rangeY != -1) {
|
if (rangeY != -1) {
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index adea48cfde04df3107341075f414133ae37d986e..c1c8e235b9c096cd36c3e83b0831af7cb722cad2 100644
|
index 0915a08bc8d2dd38ade01e31c34abd69e1abd365..b720230c4bef699fa1b60d949c47aa4c193a24db 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -145,7 +145,7 @@ import net.minecraft.world.waypoints.WaypointTransmitter;
|
@@ -145,7 +145,7 @@ import net.minecraft.world.waypoints.WaypointTransmitter;
|
||||||
@@ -35,7 +35,7 @@ index adea48cfde04df3107341075f414133ae37d986e..c1c8e235b9c096cd36c3e83b0831af7c
|
|||||||
public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes
|
public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private static final int CURRENT_LEVEL = 2;
|
private static final int CURRENT_LEVEL = 2;
|
||||||
@@ -5474,4 +5474,47 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -5476,4 +5476,47 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Purpur end - Ridables
|
// Purpur end - Ridables
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ index 0ad18866c323308ad9b87322932e03a283f740b1..386fdc23b35675a7db66d16bf2a8a6dd
|
|||||||
|
|
||||||
private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2
|
private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2
|
||||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||||
index c1c8e235b9c096cd36c3e83b0831af7cb722cad2..7e6e5d5962de14d064321ed7e4f5254046c15d0b 100644
|
index b720230c4bef699fa1b60d949c47aa4c193a24db..c671370a0addb31bc8ca7d7fa642d3b53b5c00ee 100644
|
||||||
--- a/net/minecraft/world/entity/Entity.java
|
--- a/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/net/minecraft/world/entity/Entity.java
|
+++ b/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1111,29 +1111,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -1111,29 +1111,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
@@ -152,7 +152,7 @@ index c1c8e235b9c096cd36c3e83b0831af7cb722cad2..7e6e5d5962de14d064321ed7e4f52540
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
|
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
|
||||||
@@ -4948,9 +4922,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -4950,9 +4924,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDeltaMovement(Vec3 deltaMovement) {
|
public void setDeltaMovement(Vec3 deltaMovement) {
|
||||||
@@ -162,7 +162,7 @@ index c1c8e235b9c096cd36c3e83b0831af7cb722cad2..7e6e5d5962de14d064321ed7e4f52540
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addDeltaMovement(Vec3 addend) {
|
public void addDeltaMovement(Vec3 addend) {
|
||||||
@@ -5048,9 +5020,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
@@ -5050,9 +5022,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||||
}
|
}
|
||||||
// Paper end - Block invalid positions and bounding box
|
// Paper end - Block invalid positions and bounding box
|
||||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||||
|
|||||||
@@ -16,6 +16,22 @@
|
|||||||
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
|
||||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||||
|
@@ -2576,6 +_,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addAdditionalSaveData(output, includeAll); // CraftBukkit - pass on includeAll
|
||||||
|
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc2025) output.store("AABB", org.bxteam.divinemc.util.Codecs.AABB_CODEC, this.getBoundingBox()); // DivineMC - Fix MC-2025
|
||||||
|
if (this.isVehicle()) {
|
||||||
|
ValueOutput.ValueOutputList valueOutputList = output.childrenList("Passengers");
|
||||||
|
|
||||||
|
@@ -2684,6 +_,7 @@
|
||||||
|
this.tags.clear();
|
||||||
|
input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll);
|
||||||
|
this.readAdditionalSaveData(input);
|
||||||
|
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc2025) input.read("AABB", org.bxteam.divinemc.util.Codecs.AABB_CODEC).ifPresent(this::setBoundingBox); // DivineMC - Fix MC-2025
|
||||||
|
if (this.repositionEntityAfterLoad()) {
|
||||||
|
this.reapplyPosition();
|
||||||
|
}
|
||||||
@@ -4219,6 +_,7 @@
|
@@ -4219,6 +_,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/world/entity/Mob.java
|
||||||
|
+++ b/net/minecraft/world/entity/Mob.java
|
||||||
|
@@ -328,6 +_,8 @@
|
||||||
|
this.playAmbientSound();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc183990 && this.target != null && this.target.isDeadOrDying()) this.setTarget(null); // DivineMC - Fix MC-183990
|
||||||
|
+
|
||||||
|
profilerFiller.pop();
|
||||||
|
incrementTicksSinceLastInteraction(); // Purpur - Entity lifespan
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
--- a/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java
|
||||||
|
+++ b/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java
|
||||||
|
@@ -45,11 +_,11 @@
|
||||||
|
super.tick();
|
||||||
|
} else {
|
||||||
|
if (this.pathToPosition != null) {
|
||||||
|
- if (!this.pathToPosition.closerToCenterThan(this.mob.position(), this.mob.getBbWidth())
|
||||||
|
+ if (!this.pathToPosition.closerToCenterThan(this.mob.position(), org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc94054 ? Math.max(this.mob.getBbWidth(), 1.0F) : this.mob.getBbWidth()) // DivineMC - Fix MC-94054
|
||||||
|
&& (
|
||||||
|
!(this.mob.getY() > this.pathToPosition.getY())
|
||||||
|
|| !BlockPos.containing(this.pathToPosition.getX(), this.mob.getY(), this.pathToPosition.getZ())
|
||||||
|
- .closerToCenterThan(this.mob.position(), this.mob.getBbWidth())
|
||||||
|
+ .closerToCenterThan(this.mob.position(), org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc94054 ? Math.max(this.mob.getBbWidth(), 1.0F) : this.mob.getBbWidth()) // DivineMC - Fix MC-94054
|
||||||
|
)) {
|
||||||
|
this.mob
|
||||||
|
.getMoveControl()
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // DivineMC start - Fix MC-200418
|
+ // DivineMC start - Fix MC-200418
|
||||||
+ if (mob.isPassenger() && mob.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && mob.isBaby()) {
|
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc200418 && mob.isPassenger() && mob.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && mob.isBaby()) {
|
||||||
+ mob.removeVehicle();
|
+ mob.removeVehicle();
|
||||||
+ }
|
+ }
|
||||||
+ // DivineMC end - Fix MC-200418
|
+ // DivineMC end - Fix MC-200418
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||||
|
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||||
|
@@ -511,7 +_,7 @@
|
||||||
|
double d1 = vec3.z + 13.0 / squareRoot * (vec31.z - vec3.z);
|
||||||
|
if (squareRoot <= 64.0 || players.contains(serverPlayer)) {
|
||||||
|
serverPlayer.connection
|
||||||
|
- .send(new ClientboundSoundPacket(SoundEvents.RAID_HORN, SoundSource.NEUTRAL, d, serverPlayer.getY(), d1, 64.0F, 1.0F, randomLong));
|
||||||
|
+ .send(new ClientboundSoundPacket(SoundEvents.RAID_HORN, SoundSource.HOSTILE, d, serverPlayer.getY(), d1, 64.0F, 1.0F, randomLong)); // DivineMC - Fix MC-245394
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
@Override
|
@Override
|
||||||
protected boolean compute() {
|
protected boolean compute() {
|
||||||
+ // DivineMC start - Fix MC-258859
|
+ // DivineMC start - Fix MC-258859
|
||||||
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.slopesVisualFix) {
|
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixMc258859) {
|
||||||
+ int x = this.context.blockX & 15;
|
+ int x = this.context.blockX & 15;
|
||||||
+ int z = this.context.blockZ & 15;
|
+ int z = this.context.blockZ & 15;
|
||||||
+ ChunkAccess chunk = this.context.chunk;
|
+ ChunkAccess chunk = this.context.chunk;
|
||||||
|
|||||||
@@ -545,8 +545,12 @@ public class DivineConfig {
|
|||||||
public static boolean forceMinecraftCommand = false;
|
public static boolean forceMinecraftCommand = false;
|
||||||
public static boolean disableLeafDecay = false;
|
public static boolean disableLeafDecay = false;
|
||||||
|
|
||||||
// Bug fixes (MC-*)
|
// MC Bug fixes
|
||||||
public static boolean slopesVisualFix = false;
|
public static boolean fixMc258859 = false;
|
||||||
|
public static boolean fixMc200418 = false;
|
||||||
|
public static boolean fixMc2025 = false;
|
||||||
|
public static boolean fixMc94054 = false;
|
||||||
|
public static boolean fixMc183990 = false;
|
||||||
|
|
||||||
public static void load() {
|
public static void load() {
|
||||||
gameplayFixes();
|
gameplayFixes();
|
||||||
@@ -572,8 +576,21 @@ public class DivineConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void bugFixes() {
|
private static void bugFixes() {
|
||||||
slopesVisualFix = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-258859"), slopesVisualFix,
|
fixMc258859 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-258859"), fixMc258859,
|
||||||
"Fixes MC-258859, fixing slopes visual bug in biomes like Snowy Slopes, Frozen Peaks, Jagged Peaks, and including Terralith.");
|
"Fixes MC-258859: https://bugs.mojang.com/browse/MC-258859",
|
||||||
|
"Fixes slopes visual bug in biomes like Snowy Slopes, Frozen Peaks, Jagged Peaks, and including Terralith.");
|
||||||
|
fixMc200418 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-200418"), fixMc200418,
|
||||||
|
"Fixes MC-200418: https://bugs.mojang.com/browse/MC-200418",
|
||||||
|
"Baby zombie villagers stay as jockey variant.");
|
||||||
|
fixMc2025 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-2025"), fixMc2025,
|
||||||
|
"Fixes MC-2025: https://bugs.mojang.com/browse/MC-2025",
|
||||||
|
"Mobs going out of fenced areas/suffocate in blocks when loading chunks.");
|
||||||
|
fixMc94054 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-94054"), fixMc94054,
|
||||||
|
"Fixes MC-94054: https://bugs.mojang.com/browse/MC-94054",
|
||||||
|
"Cave spiders spin around when walking.");
|
||||||
|
fixMc183990 = getBoolean(ConfigCategory.FIXES.key("bug.fix-mc-183990"), fixMc183990,
|
||||||
|
"Fixes MC-183990: https://bugs.mojang.com/browse/MC-183990",
|
||||||
|
"AI of some mobs breaks when their target dies.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public class DivineWorldConfig {
|
|||||||
public boolean allowTripwireDupe = false;
|
public boolean allowTripwireDupe = false;
|
||||||
private void unsupportedFeatures() {
|
private void unsupportedFeatures() {
|
||||||
allowEntityPortalWithPassenger = getBoolean("unsupported-features.allow-entity-portal-with-passenger", allowEntityPortalWithPassenger,
|
allowEntityPortalWithPassenger = getBoolean("unsupported-features.allow-entity-portal-with-passenger", allowEntityPortalWithPassenger,
|
||||||
"Enables or disables the fix of MC-67 bug: https://bugs-legacy.mojang.com/browse/MC-67");
|
"Fixes MC-67: https://bugs-legacy.mojang.com/browse/MC-67",
|
||||||
|
"Entities with passengers cannot travel through portals");
|
||||||
allowTripwireDupe = getBoolean("unsupported-features.allow-tripwire-dupe", allowTripwireDupe,
|
allowTripwireDupe = getBoolean("unsupported-features.allow-tripwire-dupe", allowTripwireDupe,
|
||||||
"Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a");
|
"Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.bxteam.divinemc.util;
|
||||||
|
|
||||||
|
import com.mojang.serialization.Codec;
|
||||||
|
import net.minecraft.Util;
|
||||||
|
import net.minecraft.world.phys.AABB;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface Codecs {
|
||||||
|
Codec<AABB> AABB_CODEC = Codec.DOUBLE
|
||||||
|
.listOf()
|
||||||
|
.comapFlatMap(
|
||||||
|
list -> Util.fixedSize(list, 6).map(listx -> new AABB(listx.getFirst(), listx.get(1), listx.get(2), listx.get(3), listx.get(4), listx.get(5))),
|
||||||
|
aabb -> List.of(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ)
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
||||||
Date: Sun, 11 Jun 2023 23:59:29 +0300
|
|
||||||
Subject: [PATCH] Fix MC-2025
|
|
||||||
|
|
||||||
Original post on Mojira: https://bugs.mojang.com/browse/MC-2025
|
|
||||||
Fix taken from Reddit: https://redd.it/8pgd4q
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
index da7ffdf85907c92fe6c4c6a5ebe571ef4666fcb8..7fba17c4802159c50a57f23820a153dcd85a2470 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
||||||
@@ -2745,6 +2745,17 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
nbttagcompound.putBoolean("Purpur.FireImmune", immuneToFire);
|
|
||||||
}
|
|
||||||
// Purpur end
|
|
||||||
+
|
|
||||||
+ // DivineMC start - Fix MC-2025
|
|
||||||
+ // This fix was taken from Reddit: https://redd.it/8pgd4q
|
|
||||||
+ AABB boundingBox = getBoundingBox();
|
|
||||||
+ ListTag boundingBoxList = new ListTag();
|
|
||||||
+ for (double coord : new double[]{boundingBox.minX, boundingBox.minY, boundingBox.minZ, boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ}) {
|
|
||||||
+ boundingBoxList.add(DoubleTag.valueOf(coord));
|
|
||||||
+ }
|
|
||||||
+ nbttagcompound.put("DivineMC.BoundingBox", boundingBoxList);
|
|
||||||
+ // DivineMC end
|
|
||||||
+
|
|
||||||
return nbttagcompound;
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
|
||||||
@@ -2825,6 +2836,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
||||||
this.reapplyPosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // DivineMC start - Fix MC-2025
|
|
||||||
+ // This fix was taken from Reddit: https://redd.it/8pgd4q
|
|
||||||
+ if (nbt.contains("DivineMC.BoundingBox", net.minecraft.nbt.Tag.TAG_LIST)) {
|
|
||||||
+ ListTag boundingBoxList = nbt.getList("DivineMC.BoundingBox", net.minecraft.nbt.Tag.TAG_DOUBLE);
|
|
||||||
+ setBoundingBox(new AABB(boundingBoxList.getDouble(0), boundingBoxList.getDouble(1), boundingBoxList.getDouble(2), boundingBoxList.getDouble(3), boundingBoxList.getDouble(4), boundingBoxList.getDouble(5)));
|
|
||||||
+ }
|
|
||||||
+ // DivineMC end
|
|
||||||
+
|
|
||||||
} else {
|
|
||||||
throw new IllegalStateException("Entity has invalid rotation");
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user