mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: d985976 Add config for mobs immune to default effects (#4835) Tuinity Changes: ea43797 Fix portalling from the overworld above y 255
This commit is contained in:
@@ -1,81 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Thu, 13 Aug 2020 04:00:26 -0500
|
||||
Subject: [PATCH] Stop squids floating on top of water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d4f1984fcf965cb5b9bb9f2e10d790286d25c613..3d947ba3719d494f202f28c5d93d28944a6860c9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3829,11 +3829,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
this.yRotO = this.getYRot();
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ public AABB getAxisForFluidCheck() {
|
||||
+ return this.getBoundingBox().deflate(0.001D);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public boolean updateFluidHeightAndDoFluidPushing(Tag<Fluid> tag, double d0) {
|
||||
if (this.touchingUnloadedChunk()) {
|
||||
return false;
|
||||
} else {
|
||||
- AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
|
||||
+ AABB axisalignedbb = getAxisForFluidCheck(); // Purpur
|
||||
int i = Mth.floor(axisalignedbb.minX);
|
||||
int j = Mth.ceil(axisalignedbb.maxX);
|
||||
int k = Mth.floor(axisalignedbb.minY);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
index f96def2ebdf114823c322c2d4318d039e20eab97..2affff346a7fe81480e86cb61996039df0569853 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
@@ -79,6 +79,12 @@ public class Squid extends WaterAnimal {
|
||||
public void initAttributes() {
|
||||
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level.purpurConfig.squidMaxHealth);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraft.world.phys.AABB getAxisForFluidCheck() {
|
||||
+ // Stops squids from floating just over the water
|
||||
+ return this.getBoundingBox().deflate(0.001D).offsetY(level.purpurConfig.squidOffsetWaterCheck);
|
||||
+ }
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/phys/AABB.java b/src/main/java/net/minecraft/world/phys/AABB.java
|
||||
index 6f7e6429c35eea346517cbf08cf223fc6d838a8c..6a77112180556675af38cb1b3ce0b38a42ce9525 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/AABB.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/AABB.java
|
||||
@@ -367,4 +367,10 @@ public class AABB {
|
||||
public static AABB ofSize(Vec3 center, double dx, double dy, double dz) {
|
||||
return new AABB(center.x - dx / 2.0D, center.y - dy / 2.0D, center.z - dz / 2.0D, center.x + dx / 2.0D, center.y + dy / 2.0D, center.z + dz / 2.0D);
|
||||
}
|
||||
+
|
||||
+ // Purpur - tuinity added method
|
||||
+ public final AABB offsetY(double dy) {
|
||||
+ return new AABB(this.minX, this.minY + dy, this.minZ, this.maxX, this.maxY + dy, this.maxZ);
|
||||
+ }
|
||||
+ // Purpur
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index d46484ca99fac9751db3ab8cae430f7167733a2e..298b246a383100a9860afad156ed9e9219d61bf6 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1313,6 +1313,7 @@ public class PurpurWorldConfig {
|
||||
public boolean squidRidable = false;
|
||||
public double squidMaxHealth = 10.0D;
|
||||
public boolean squidImmuneToEAR = true;
|
||||
+ public double squidOffsetWaterCheck = 0.0D;
|
||||
private void squidSettings() {
|
||||
squidRidable = getBoolean("mobs.squid.ridable", squidRidable);
|
||||
if (PurpurConfig.version < 10) {
|
||||
@@ -1322,6 +1323,7 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
squidMaxHealth = getDouble("mobs.squid.attributes.max_health", squidMaxHealth);
|
||||
squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
|
||||
+ squidOffsetWaterCheck = getDouble("mobs.squid.water-offset-check", squidOffsetWaterCheck);
|
||||
}
|
||||
|
||||
public boolean spiderRidable = false;
|
||||
Reference in New Issue
Block a user