v2.2.0: fixed beacon of returning not bundling its branch value

This commit is contained in:
Evan Debenham
2023-07-21 11:35:46 -04:00
parent dbb1e8b14d
commit 25d84412a4
@@ -183,12 +183,14 @@ public class BeaconOfReturning extends Spell {
}
private static final String DEPTH = "depth";
private static final String BRANCH = "branch";
private static final String POS = "pos";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( DEPTH, returnDepth );
bundle.put( BRANCH, returnBranch );
if (returnDepth != -1) {
bundle.put( POS, returnPos );
}
@@ -198,6 +200,7 @@ public class BeaconOfReturning extends Spell {
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle);
returnDepth = bundle.getInt( DEPTH );
returnBranch = bundle.getInt( BRANCH );
returnPos = bundle.getInt( POS );
}