This should fix a few existing issues with Teleposers, they no longer syphon from the bound player. (#1414)
This commit is contained in:
parent
81047734a6
commit
9440d3c0b9
|
@ -1,16 +1,15 @@
|
|||
package WayofTime.bloodmagic.tile;
|
||||
|
||||
import WayofTime.bloodmagic.block.BlockTeleposer;
|
||||
import WayofTime.bloodmagic.core.data.Binding;
|
||||
import WayofTime.bloodmagic.core.data.SoulTicket;
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.event.TeleposeEvent;
|
||||
import WayofTime.bloodmagic.teleport.TeleportQueue;
|
||||
import WayofTime.bloodmagic.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.block.BlockTeleposer;
|
||||
import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
||||
import WayofTime.bloodmagic.ritual.portal.Teleports;
|
||||
import WayofTime.bloodmagic.teleport.TeleportQueue;
|
||||
import WayofTime.bloodmagic.util.Constants;
|
||||
import WayofTime.bloodmagic.util.Utils;
|
||||
import WayofTime.bloodmagic.util.helper.NetworkHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -77,7 +76,7 @@ public class TileTeleposer extends TileInventory implements ITickable {
|
|||
final int focusLevel = (getStackInSlot(0).getItemDamage() + 1);
|
||||
final int lpToBeDrained = (int) (0.5F * Math.sqrt((pos.getX() - focusPos.getX()) * (pos.getX() - focusPos.getX()) + (pos.getY() - focusPos.getY() + 1) * (pos.getY() - focusPos.getY() + 1) + (pos.getZ() - focusPos.getZ()) * (pos.getZ() - focusPos.getZ())));
|
||||
|
||||
if (NetworkHelper.getSoulNetwork(binding).syphonAndDamage(PlayerHelper.getPlayerFromUUID(binding.getOwnerId()), SoulTicket.block(world, pos, lpToBeDrained * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1))).isSuccess()) {
|
||||
if (NetworkHelper.syphonFromContainer(focusStack, SoulTicket.block(world, pos, lpToBeDrained * (focusLevel * 2 - 1) * (focusLevel * 2 - 1) * (focusLevel * 2 - 1)))) {
|
||||
int blocksTransported = 0;
|
||||
|
||||
for (int i = -(focusLevel - 1); i <= (focusLevel - 1); i++) {
|
||||
|
|
Loading…
Reference in a new issue