From ed77f096c217eba092cee65e5743b62c396c5c85 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Tue, 21 Jan 2014 02:13:25 -0500 Subject: [PATCH] Enderman start out hostile --- .../StevenDimDoors/mod_pocketDim/core/DDTeleporter.java | 2 -- .../mod_pocketDim/tileentities/TileEntityRift.java | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java index 012c5372..f0193269 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java @@ -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; diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java b/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java index 7a1b38af..491cfbc7 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/tileentities/TileEntityRift.java @@ -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); + } } } }