Enderman start out hostile
This commit is contained in:
parent
357db5e34d
commit
ed77f096c2
2 changed files with 6 additions and 2 deletions
|
@ -601,10 +601,8 @@ public class DDTeleporter
|
|||
}
|
||||
|
||||
BaseItemDoor.placeDoorBlock(destWorld, link.destination().getX(), link.destination().getY()-1, link.destination().getZ(),link.getDestinationOrientation(), door);
|
||||
|
||||
TileEntity doorDestTE = ((BaseDimDoor)door).initDoorTE(destWorld, link.destination().getX(), link.destination().getY(), link.destination().getZ());
|
||||
|
||||
|
||||
if(doorDestTE instanceof TileEntityDimDoor)
|
||||
{
|
||||
TileEntityDimDoor.class.cast(doorDestTE).hasGennedPair=true;
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.DataWatcher;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
|
@ -161,6 +162,11 @@ public class TileEntityRift extends TileEntity
|
|||
EntityEnderman enderman = new EntityEnderman(worldObj);
|
||||
enderman.setLocationAndAngles(xCoord + 0.5, yCoord - 1, zCoord + 0.5, 5, 6);
|
||||
worldObj.spawnEntityInWorld(enderman);
|
||||
EntityPlayer player = this.worldObj.getClosestPlayerToEntity(enderman, 50);
|
||||
if(player!=null)
|
||||
{
|
||||
enderman.setTarget(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue