Fix #2877, replacement of #2962

This commit is contained in:
Vincent Lee committed 2019-12-24 11:16:59 -06:00
1 parent ddbeafa582
commit b3770a069a
2 files changed
+2 -8

No files matched your search

@@ -37,7 +37,7 @@ public class Lens {
public void onControlledSpreaderPulse(ItemStack stack, IManaSpreader spreader, boolean redstone) {}
public int getManaToTransfer(IManaBurst burst, ThrowableEntity entity, ItemStack stack, IManaReceiver receiver) {
return burst.getMana();
return entity.getPersistentData().getBoolean(LensWarp.TAG_WARPED) ? 0 : burst.getMana();
}
}
@@ -24,7 +24,7 @@ import vazkii.botania.common.block.ModBlocks;
public class LensWarp extends Lens {
private static final String TAG_WARPED = "botania:warped";
public static final String TAG_WARPED = "botania:warped";
@Override
public boolean collideBurst(IManaBurst burst, ThrowableEntity entity, RayTraceResult pos, boolean isManaBlock, boolean dead, ItemStack stack) {
@@ -48,10 +48,4 @@ public class LensWarp extends Lens {
}
return dead;
}
@Override
public int getManaToTransfer(IManaBurst burst, ThrowableEntity entity, ItemStack stack, IManaReceiver receiver) {
return entity.getPersistentData().getBoolean(TAG_WARPED) ? 0 : burst.getMana();
}
}