mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix casting bug with player exp patch
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From b59febc90f454a5677b347cc7c27ed630ebab1ca Mon Sep 17 00:00:00 2001
|
||||
From 4dcf6d4a9e6e6202b8a2275ff8576400f9644869 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Add player death exp control options
|
||||
2 files changed, 19 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 3957daf75..6e60a1608 100644
|
||||
index 3957daf75..15e342454 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -1858,9 +1858,18 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -25,7 +25,7 @@ index 3957daf75..6e60a1608 100644
|
||||
+ scriptEngine.eval("expLevel = " + expLevel);
|
||||
+ scriptEngine.eval("expTotal = " + expTotal);
|
||||
+ scriptEngine.eval("exp = " + exp);
|
||||
+ toDrop = (int) scriptEngine.eval(world.purpurConfig.playerDeathExpDropEquation);
|
||||
+ toDrop = (int) Math.round((Double) scriptEngine.eval(world.purpurConfig.playerDeathExpDropEquation));
|
||||
+ } catch (ScriptException ignore) {
|
||||
+ toDrop = expLevel * 7;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user