Skip to content

Commit

Permalink
Fix patching in Java 8/Nashorn
Browse files Browse the repository at this point in the history
  • Loading branch information
grompe committed Dec 24, 2016
1 parent 5377068 commit ecae121
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion patcher/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Grom PE's Better Than Wolves Total Conversion tweak mod v0.9k

[********** Change Log ************]

v0.9k (unreleased)
v0.9k

- Fixed creative tab display for Dung block and Packed Earth.

- Fixed patching in Java 8.

v0.9j

- Removed BTWTweak stumps as they are now implemented in BTW.
Expand Down
2 changes: 1 addition & 1 deletion patcher/scripts/tweaks.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function add(className, deobfName, side, description, process)
{
if (classname in classesToTweak) return ACTION_TWEAK;
var s = classname + "";
if (s.startsWith("GPE")) return ACTION_ADAPTSERVER;
if (s.toString().startsWith("GPE")) return ACTION_ADAPTSERVER;
return ACTION_COPY;
};

Expand Down
4 changes: 2 additions & 2 deletions patcher/scripts/tweaks_gamelogic.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ function(mn)
VarInsnNode(ALOAD, 0),
FieldInsnNode(GETFIELD, "sj", "ab", "Ljava/util/Random;"),
MethodInsnNode(INVOKEVIRTUAL, "java/util/Random", "nextFloat", "()F"),
LdcInsnNode(new Float("0.005")),
LdcInsnNode(Float("0.005")),
InsnNode(FCMPG),
JumpInsnNode(IFGE, label),
VarInsnNode(ALOAD, 0),
Expand All @@ -911,7 +911,7 @@ function(mn)
VarInsnNode(ALOAD, 0),
FieldInsnNode(GETFIELD, "sj", "bq", "[F"),
InsnNode(ICONST_0),
LdcInsnNode(new Float("0.99")),
LdcInsnNode(Float("0.99")),
InsnNode(FASTORE),
label,
FrameNode(F_SAME, 0, null, 0, null),
Expand Down

0 comments on commit ecae121

Please sign in to comment.