Fix for server/client setup
This commit is contained in:
parent
2872543c93
commit
ca018a63b3
1 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import com.seodisparate.TurnBasedMinecraft.common.networking.PacketBattleInfo;
|
import com.seodisparate.TurnBasedMinecraft.common.networking.PacketBattleInfo;
|
||||||
import com.seodisparate.TurnBasedMinecraft.common.networking.PacketBattleMessage;
|
import com.seodisparate.TurnBasedMinecraft.common.networking.PacketBattleMessage;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -590,7 +589,7 @@ public class Battle
|
||||||
// have player look at attack target
|
// have player look at attack target
|
||||||
final Entity nextEntity = next.entity;
|
final Entity nextEntity = next.entity;
|
||||||
final Entity targetEntity = target.entity;
|
final Entity targetEntity = target.entity;
|
||||||
Minecraft.getMinecraft().addScheduledTask(() -> {
|
next.entity.getServer().addScheduledTask(() -> {
|
||||||
((EntityPlayerMP)nextEntity).connection.setPlayerLocation(nextEntity.posX, nextEntity.posY, nextEntity.posZ, Utility.yawDirection(nextEntity.posX, nextEntity.posZ, targetEntity.posX, targetEntity.posZ), Utility.pitchDirection(nextEntity.posX, nextEntity.posY, nextEntity.posZ, targetEntity.posX, targetEntity.posY, targetEntity.posZ));
|
((EntityPlayerMP)nextEntity).connection.setPlayerLocation(nextEntity.posX, nextEntity.posY, nextEntity.posZ, Utility.yawDirection(nextEntity.posX, nextEntity.posZ, targetEntity.posX, targetEntity.posZ), Utility.pitchDirection(nextEntity.posX, nextEntity.posY, nextEntity.posZ, targetEntity.posX, targetEntity.posY, targetEntity.posZ));
|
||||||
});
|
});
|
||||||
TurnBasedMinecraftMod.attackingEntity = next.entity;
|
TurnBasedMinecraftMod.attackingEntity = next.entity;
|
||||||
|
|
Loading…
Reference in a new issue