Fix empty prisms allowing warped bursts to transfer mana

This commit is contained in:
Hubry committed 2020-02-02 22:51:29 +01:00
1 parent 04ebd8c077
commit 10ac3c3067
2 files changed
+5 -1

No files matched your search

@@ -58,6 +58,7 @@ import vazkii.botania.common.Botania;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.helper.Vector3;
import vazkii.botania.common.item.equipment.bauble.ItemTinyPlanet;
import vazkii.botania.common.item.lens.LensWarp;
import vazkii.botania.common.lib.LibMisc;
import javax.annotation.Nonnull;
@@ -570,6 +571,9 @@ public class EntityManaBurst extends ThrowableEntity implements IManaBurst {
}
private void onRecieverImpact(IManaReceiver tile, BlockPos pos) {
if (getPersistentData().getBoolean(LensWarp.TAG_WARPED))
return;
ILensEffect lens = getLensInstance();
int mana = getMana();
@@ -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 entity.getPersistentData().getBoolean(LensWarp.TAG_WARPED) ? 0 : burst.getMana();
return burst.getMana();
}
}