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: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
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 0961b33349ac09e182899d35b4af950babb83331..429f710c6814ad796d78ad6d5dbbffd66c4961df 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3832,11 +3832,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 91697c96d7133f1815fd6d89b4fc55c24609b2aa..1d804ff002c3736b3c6199130a4c1c27fd048dd3 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -1300,6 +1300,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) {
|
||||
@@ -1309,6 +1310,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