mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
another 6 bite the dust
This commit is contained in:
@@ -3,6 +3,7 @@ From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:07:08 -0600
|
||||
Subject: [PATCH] Add canSaveToDisk to Entity
|
||||
|
||||
1.17: major stuff was changed around this area
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5a235642c702e6a0c1971d060b5e5a41ad277b65..0bb2b362f257801d3ec8d232f2970d88b32f2748 100644
|
||||
@@ -1,78 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 23 Nov 2019 17:55:42 -0600
|
||||
Subject: [PATCH] Implement infinite lava
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..963b7edab813cd32f04c51fd2c6c137988e2a754 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
@@ -217,7 +217,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.f() && j >= 2) {
|
||||
+ if (infinite(iworldreader) && j >= getRequiredSources(iworldreader)) { // Purpur
|
||||
IBlockData iblockdata2 = iworldreader.getType(blockposition.down());
|
||||
Fluid fluid1 = iblockdata2.getFluid();
|
||||
|
||||
@@ -288,6 +288,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
return (Fluid) this.e().h().set(FluidTypeFlowing.FALLING, flag);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ protected boolean infinite(IWorldReader iworldreader) {
|
||||
+ return infinite();
|
||||
+ }
|
||||
+
|
||||
+ protected int getRequiredSources(IWorldReader iworldreader) {
|
||||
+ return 2;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
+ protected boolean infinite() { return f(); } // Purpur - OBFHELPER
|
||||
protected abstract boolean f();
|
||||
|
||||
protected void a(GeneratorAccess generatoraccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection, Fluid fluid) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
index b362a728b5d17256768847ab09e2505a9cc1918b..86f2e969d98c833700f0f48baf7610ad95b3f8a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
@@ -163,6 +163,18 @@ public abstract class FluidTypeLava extends FluidTypeFlowing {
|
||||
generatoraccess.triggerEffect(1501, blockposition, 0);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ protected boolean infinite(IWorldReader iworldreader) {
|
||||
+ return iworldreader.getWorldBorder().world.purpurConfig.lavaInfinite;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected int getRequiredSources(IWorldReader iworldreader) {
|
||||
+ return iworldreader.getWorldBorder().world.purpurConfig.lavaInfiniteRequiredSources;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected boolean f() {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index f3c9a06be653a0fbd462677866134b634b8611b6..95605436c7d2d8e8b30217dc59d28ce2658d0e26 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -192,6 +192,13 @@ public class PurpurWorldConfig {
|
||||
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
||||
}
|
||||
|
||||
+ public boolean lavaInfinite = false;
|
||||
+ public int lavaInfiniteRequiredSources = 2;
|
||||
+ private void lavaSettings() {
|
||||
+ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite);
|
||||
+ lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources);
|
||||
+ }
|
||||
+
|
||||
public boolean signAllowColors = false;
|
||||
public boolean signRightClickEdit = false;
|
||||
private void signSettings() {
|
||||
@@ -5,20 +5,20 @@ Subject: [PATCH] Implement configurable search radius for villagers to spawn
|
||||
iron golems
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
index 007e5c7ef9b5eaf5cbf262197f3d73d2a33741ea..aaf8d2cd3089adba69c873c4ea62b0e8837b21d6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/EntityVillager.java
|
||||
@@ -975,6 +975,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 20cb368076017e6dfc28ef4c2af778c0971e8462..88d6b1596463d86f6e4e67da54f16da14b8563bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -1018,6 +1018,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
@Nullable
|
||||
private EntityIronGolem d(WorldServer worldserver) {
|
||||
+ if (world.purpurConfig.villagerSpawnIronGolemRadius > 0 && world.a(EntityIronGolem.class, getBoundingBox().grow(world.purpurConfig.villagerSpawnIronGolemRadius)).size() > world.purpurConfig.villagerSpawnIronGolemLimit) return null; // Purpur
|
||||
BlockPosition blockposition = this.getChunkCoordinates();
|
||||
private IronGolem trySpawnGolem(ServerLevel world) {
|
||||
+ if (world.purpurConfig.villagerSpawnIronGolemRadius > 0 && world.getEntitiesOfClass(IronGolem.class, getBoundingBox().inflate(world.purpurConfig.villagerSpawnIronGolemRadius)).size() > world.purpurConfig.villagerSpawnIronGolemLimit) return null; // Purpur
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 9922ca6bd7d856eea182b8dd3c210e5f726ef180..f3c9a06be653a0fbd462677866134b634b8611b6 100644
|
||||
index b6b362befd94e4cca156296058019c8a26c7b2f4..da5a59e87db5374b7113a8515cbe134fca7a2917 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -322,12 +322,16 @@ public class PurpurWorldConfig {
|
||||
77
patches/server/0063-Implement-infinite-lava.patch
Normal file
77
patches/server/0063-Implement-infinite-lava.patch
Normal file
@@ -0,0 +1,77 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 23 Nov 2019 17:55:42 -0600
|
||||
Subject: [PATCH] Implement infinite lava
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
index 6e3e873efa1f50f53cb6503bde8a981f9cefd006..cf396fb5d68f22917ed990f6c4ed18f9b0b3012f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
@@ -217,7 +217,7 @@ public abstract class FlowingFluid extends Fluid {
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.canConvertToSource() && j >= 2) {
|
||||
+ if (this.canConvertToSource(world) && j >= getRequiredSources(world)) {
|
||||
BlockState iblockdata2 = world.getBlockState(pos.below());
|
||||
FluidState fluid1 = iblockdata2.getFluidState();
|
||||
|
||||
@@ -288,6 +288,16 @@ public abstract class FlowingFluid extends Fluid {
|
||||
return (FluidState) this.getSource().defaultFluidState().setValue(FlowingFluid.FALLING, falling);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ protected boolean canConvertToSource(LevelReader world) {
|
||||
+ return canConvertToSource();
|
||||
+ }
|
||||
+
|
||||
+ protected int getRequiredSources(LevelReader world) {
|
||||
+ return 2;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
protected abstract boolean canConvertToSource();
|
||||
|
||||
protected void spreadTo(LevelAccessor world, BlockPos pos, BlockState state, Direction direction, FluidState fluidState) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
index 695783e64564b1d2a178d57a89737d2a97ab9014..cd1a33a1f10d04a91358f51d736bda34110324c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
@@ -199,6 +199,18 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
world.levelEvent(1501, pos, 0);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ protected boolean canConvertToSource(LevelReader world) {
|
||||
+ return world.getWorldBorder().world.purpurConfig.lavaInfinite;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected int getRequiredSources(LevelReader world) {
|
||||
+ return world.getWorldBorder().world.purpurConfig.lavaInfiniteRequiredSources;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected boolean canConvertToSource() {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index da5a59e87db5374b7113a8515cbe134fca7a2917..a961d47c7db79c02fb58a258ab2367e621231886 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -192,6 +192,13 @@ public class PurpurWorldConfig {
|
||||
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
||||
}
|
||||
|
||||
+ public boolean lavaInfinite = false;
|
||||
+ public int lavaInfiniteRequiredSources = 2;
|
||||
+ private void lavaSettings() {
|
||||
+ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite);
|
||||
+ lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources);
|
||||
+ }
|
||||
+
|
||||
public boolean signAllowColors = false;
|
||||
public boolean signRightClickEdit = false;
|
||||
private void signSettings() {
|
||||
@@ -1,24 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 2 Jan 2020 11:31:36 -0600
|
||||
Subject: [PATCH] Make lava flow speed configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
index 86f2e969d98c833700f0f48baf7610ad95b3f8a1..e706695d42d7557f818595aa30fb3cfc35ba9f6b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
@@ -145,7 +145,7 @@ public abstract class FluidTypeLava extends FluidTypeFlowing {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
index cd1a33a1f10d04a91358f51d736bda34110324c4..b0d671ba015d1ad37fdf600b8e70def2d7a0fa2e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java
|
||||
@@ -181,7 +181,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
|
||||
@Override
|
||||
public int a(IWorldReader iworldreader) {
|
||||
- return iworldreader.getDimensionManager().isNether() ? 10 : 30;
|
||||
+ return iworldreader.getDimensionManager().isNether() ? iworldreader.getWorldBorder().world.purpurConfig.lavaSpeedNether : iworldreader.getWorldBorder().world.purpurConfig.lavaSpeedNotNether; // Purpur
|
||||
public int getTickDelay(LevelReader world) {
|
||||
- return world.dimensionType().ultraWarm() ? 10 : 30;
|
||||
+ return world.dimensionType().ultraWarm() ? world.getWorldBorder().world.purpurConfig.lavaSpeedNether : world.getWorldBorder().world.purpurConfig.lavaSpeedNotNether; // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 95605436c7d2d8e8b30217dc59d28ce2658d0e26..21ecfc0a1ee6d39e0b824aa3ce146a8833bd20ce 100644
|
||||
index a961d47c7db79c02fb58a258ab2367e621231886..be27a1c47d17992cfc7927fc5f0e5df23a225d96 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -194,9 +194,13 @@ public class PurpurWorldConfig {
|
||||
@@ -1,46 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 26 Dec 2019 22:08:37 -0600
|
||||
Subject: [PATCH] Add player death exp control options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
index 1d4021049bba4b8b23cf40d252ba2dd0b55c15ae..98a27249164be967512e7e745c20e80c80d3c5c8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java
|
||||
@@ -182,6 +182,8 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 1cc9291f14a4d655cb1b91479b954d76cc1fcf7f..ea613f494c9c6fbf1aea40eed5164217072ffdc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -194,6 +194,8 @@ public abstract class Player extends LivingEntity {
|
||||
// CraftBukkit end
|
||||
|
||||
// Purpur start
|
||||
+ private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino");
|
||||
+
|
||||
public void setAfk(boolean setAfk){
|
||||
public void setAfk(boolean afk) {
|
||||
}
|
||||
|
||||
@@ -1819,9 +1821,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -1888,9 +1890,18 @@ public abstract class Player extends LivingEntity {
|
||||
@Override
|
||||
protected int getExpValue(EntityHuman entityhuman) {
|
||||
if (!this.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && !this.isSpectator()) {
|
||||
- int i = this.expLevel * 7;
|
||||
protected int getExperienceReward(Player player) {
|
||||
if (!this.level.getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) && !this.isSpectator()) {
|
||||
- int i = this.experienceLevel * 7;
|
||||
-
|
||||
- return i > 100 ? 100 : i;
|
||||
+ // Purpur start
|
||||
+ int toDrop;
|
||||
+ try {
|
||||
+ scriptEngine.eval("expLevel = " + expLevel);
|
||||
+ scriptEngine.eval("expTotal = " + expTotal);
|
||||
+ scriptEngine.eval("exp = " + exp);
|
||||
+ toDrop = (int) Math.round((Double) scriptEngine.eval(world.purpurConfig.playerDeathExpDropEquation));
|
||||
+ scriptEngine.eval("expLevel = " + experienceLevel);
|
||||
+ scriptEngine.eval("expTotal = " + totalExperience);
|
||||
+ scriptEngine.eval("exp = " + experienceProgress);
|
||||
+ toDrop = (int) Math.round((Double) scriptEngine.eval(level.purpurConfig.playerDeathExpDropEquation));
|
||||
+ } catch (Exception ignore) {
|
||||
+ toDrop = expLevel * 7;
|
||||
+ toDrop = experienceLevel * 7;
|
||||
+ }
|
||||
+ return Math.min(toDrop, world.purpurConfig.playerDeathExpDropMax);
|
||||
+ return Math.min(toDrop, level.purpurConfig.playerDeathExpDropMax);
|
||||
+ // Purpur end
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 21ecfc0a1ee6d39e0b824aa3ce146a8833bd20ce..32087bcc02c20448988c76e04dbc0dcc3db48641 100644
|
||||
index be27a1c47d17992cfc7927fc5f0e5df23a225d96..d993ddd69022f4d9d9ceb3c449fde504419d1709 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -157,6 +157,13 @@ public class PurpurWorldConfig {
|
||||
@@ -1,37 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 27 Feb 2020 21:42:19 -0600
|
||||
Subject: [PATCH] Configurable void damage height and damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0bb2b362f257801d3ec8d232f2970d88b32f2748..9b739a7ed9761c045ba23b065bd8548ef0b81130 100644
|
||||
index 0583989b98d9a674a4feba30fbbb93e20724d375..e33f4a5d0eb44974818ca532dd42cc3488e1de81 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -691,7 +691,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
||||
@@ -698,7 +698,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
||||
// Paper start
|
||||
protected void performVoidDamage() {
|
||||
- if (this.locY() < -64.0D || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
||||
+ if (this.locY() < world.purpurConfig.voidDamageHeight || (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER // Purpur
|
||||
&& world.paperConfig.doNetherTopVoidDamage()
|
||||
&& this.locY() >= world.paperConfig.netherVoidTopDamageHeight)) {
|
||||
this.doVoidDamage();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
index 928ba00369d9f863e9de3294844faae282804df3..2b8e1843ed01542f9fc0ce400b772d44eed305fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||
@@ -2113,7 +2113,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public void checkOutOfWorld() {
|
||||
// Paper start - Configurable nether ceiling damage
|
||||
- if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
||||
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - level.purpurConfig.voidDamageHeight) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER // Purpur
|
||||
&& level.paperConfig.doNetherTopVoidDamage()
|
||||
&& this.getY() >= this.level.paperConfig.netherVoidTopDamageHeight)) {
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 05e66973f19dacdf0609703b8a7c7c302b90e50f..2f7caed2506045c95c7f1dac1fa0c981695b3171 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2380,7 +2380,7 @@ public abstract class LivingEntity extends Entity {
|
||||
|
||||
@Override
|
||||
protected void an() {
|
||||
- this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F);
|
||||
+ this.damageEntity(DamageSource.OUT_OF_WORLD, (float) world.purpurConfig.voidDamageDealt);
|
||||
protected void outOfWorld() {
|
||||
- this.hurt(DamageSource.OUT_OF_WORLD, 4.0F);
|
||||
+ this.hurt(DamageSource.OUT_OF_WORLD, (float) level.purpurConfig.voidDamageDealt); // Purpur
|
||||
}
|
||||
|
||||
protected void dA() {
|
||||
protected void updateSwingTime() {
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 32087bcc02c20448988c76e04dbc0dcc3db48641..0e715362fcfb3d26825b51f4fd96d8cba810bf55 100644
|
||||
index d993ddd69022f4d9d9ceb3c449fde504419d1709..035883538cb4b4ad60b3b872c1348e95d5ebf2be 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -150,11 +150,15 @@ public class PurpurWorldConfig {
|
||||
Reference in New Issue
Block a user