Enderman start out hostile

This commit is contained in:
StevenRS11 2014-01-21 02:13:25 -05:00
parent 357db5e34d
commit ed77f096c2
2 changed files with 6 additions and 2 deletions

View file

@ -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;

View file

@ -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);
}
}
}
}