mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 9a129fa99 Add #getEligibleHumans to SkeletonHorseTrapEvent b5e23c7a6 Fix merging spawning values a932e8ad7 Turn off spigot verbose world by default 8ced89f65 Fix Delegation to vanilla chunk gen
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
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/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 974e75945d..9679722a57 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -3438,8 +3438,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.lastYaw = this.yaw;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ public AxisAlignedBB getAxisForFluidCheck() {
|
||||
+ return this.getBoundingBox().shrink(0.001D);
|
||||
+ }
|
||||
public boolean a(Tag<FluidType> tag, double d0) {
|
||||
- AxisAlignedBB axisalignedbb = this.getBoundingBox().shrink(0.001D);
|
||||
+ AxisAlignedBB axisalignedbb = getAxisForFluidCheck();
|
||||
+ // Purpur end
|
||||
int i = MathHelper.floor(axisalignedbb.minX);
|
||||
int j = MathHelper.f(axisalignedbb.maxX);
|
||||
int k = MathHelper.floor(axisalignedbb.minY);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
||||
index b21605a623..148e4b1587 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
|
||||
@@ -25,6 +25,14 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.bu = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public AxisAlignedBB getAxisForFluidCheck() {
|
||||
+ // Stops squids from floating just over the water
|
||||
+ return this.getBoundingBox().shrink(0.001D).offsetY(world.purpurConfig.squidOffsetWaterCheck);
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
this.goalSelector.a(0, new EntitySquid.PathfinderGoalSquid(this));
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index a41cc6da74..cf8f46d439 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -482,8 +482,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public boolean squidImmuneToEAR = true;
|
||||
+ public double squidOffsetWaterCheck = 0.0D;
|
||||
private void squidSettings() {
|
||||
squidImmuneToEAR = getBoolean("mobs.squid.immune-to-EAR", squidImmuneToEAR);
|
||||
+ squidOffsetWaterCheck = getDouble("mobs.squid.water-offset-check", squidOffsetWaterCheck);
|
||||
}
|
||||
|
||||
public int villagerBrainTicks = 1;
|
||||
Reference in New Issue
Block a user