Skip to content

Commit 6d20777

Browse files
committed
Patch for issue #3.
This doesn't fix the underlying issue of EnchantmentRevealer acting weird when used on servers with radically different enchanting systems, (I'm not sure there is a general fix for that), but it should stop the crashing at least.
1 parent 2bd7f12 commit 6d20777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/io/github/d0sboots/enchantmentrevealer/ContainerEnchantmentWrapper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public ContainerEnchantmentWrapper(
5151
@Override
5252
public boolean enchantItem(EntityPlayer playerIn, int id) {
5353
boolean val = super.enchantItem(playerIn, id);
54-
if (val) {
54+
if (val && lastObservation != null) {
5555
Observation observation = new Observation();
5656
System.arraycopy(lastObservation.levels, 0, observation.levels, 0, 3);
5757
observation.truncatedSeed = (short) id;

0 commit comments

Comments
 (0)