save stuff here

This commit is contained in:
Ben Kerllenevich
2023-06-09 00:01:03 -04:00
parent 0b3c94c72d
commit 8768f54932
159 changed files with 4276 additions and 3663 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add player death exp control options
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 7b39cb5346925c14f3f144d622ca7e5855420aa6..f67bd221a239d98151e055f444795dea28a07269 100644
index 7b39cb5346925c14f3f144d622ca7e5855420aa6..fa2a0cc24bbe31abd49ce0f3f41bab2aa5d9c81f 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1998,9 +1998,19 @@ public abstract class Player extends LivingEntity {
@@ -21,18 +21,18 @@ index 7b39cb5346925c14f3f144d622ca7e5855420aa6..f67bd221a239d98151e055f444795dea
+ toDrop = Math.round(((Number) scriptEngine.eval("let expLevel = " + experienceLevel + "; " +
+ "let expTotal = " + totalExperience + "; " +
+ "let exp = " + experienceProgress + "; " +
+ level.purpurConfig.playerDeathExpDropEquation)).floatValue());
+ level().purpurConfig.playerDeathExpDropEquation)).floatValue());
+ } catch (javax.script.ScriptException e) {
+ e.printStackTrace();
+ toDrop = experienceLevel * 7;
+ }
+ return Math.min(toDrop, level.purpurConfig.playerDeathExpDropMax);
+ return Math.min(toDrop, level().purpurConfig.playerDeathExpDropMax);
+ // Purpur end
} else {
return 0;
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index e92879a7e0458eeee9b8006bdc64228808cc9e08..b0e70dd59fd488f4c094326aae2647e08a2ee758 100644
index 17ba29e1538d3007e7befbe3b44d4ef291c1af05..4c73bd5aae5587e1d196a7b63fe84319cad0853d 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -175,6 +175,8 @@ public class PurpurWorldConfig {