mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 10:57:43 +01:00
PaperPR - Projectile load/save limit per chunk
- Dropped "Add option to disable saving projectiles to disk" in favor of the above patch - Config migration is automatic. If "gameplay-mechanics.save-projectiles-to-disk" was set to false in purpur.yml, "projectile-load-save-per-chunk-limit" will be set to 0 in paper.yml (resulting in unchanged behaviour)
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 87d40ea50a..d76a93dc14 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 0ce1c2325b..8e28b639b1 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -484,8 +484,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