Terror
This commit is contained in:
parent
fba4a1195a
commit
26c8581857
3 changed files with 14 additions and 5 deletions
|
@ -145,7 +145,7 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||||
this.moveEntity(0, .1, 0);
|
this.moveEntity(0, .1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayer entityPlayer = this.worldObj.getClosestPlayerToEntity(this, 30);
|
EntityPlayer entityPlayer = this.worldObj.getClosestPlayerToEntity(this, 60);
|
||||||
|
|
||||||
if (entityPlayer != null)
|
if (entityPlayer != null)
|
||||||
{
|
{
|
||||||
|
@ -200,11 +200,11 @@ public class MobMonolith extends EntityFlying implements IMob
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(aggro>0)
|
if(aggro<this.aggroMax/2)
|
||||||
{
|
{
|
||||||
if(rand.nextInt(10)==0)
|
if(rand.nextInt(3)==0)
|
||||||
{
|
{
|
||||||
aggro--;
|
aggro++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.DataWatcher;
|
import net.minecraft.entity.DataWatcher;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.monster.EntityEnderman;
|
import net.minecraft.entity.monster.EntityEnderman;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.network.INetworkManager;
|
import net.minecraft.network.INetworkManager;
|
||||||
import net.minecraft.network.packet.Packet;
|
import net.minecraft.network.packet.Packet;
|
||||||
|
@ -161,6 +162,11 @@ public class TileEntityRift extends TileEntity
|
||||||
EntityEnderman enderman = new EntityEnderman(worldObj);
|
EntityEnderman enderman = new EntityEnderman(worldObj);
|
||||||
enderman.setLocationAndAngles(xCoord + 0.5, yCoord - 1, zCoord + 0.5, 5, 6);
|
enderman.setLocationAndAngles(xCoord + 0.5, yCoord - 1, zCoord + 0.5, 5, 6);
|
||||||
worldObj.spawnEntityInWorld(enderman);
|
worldObj.spawnEntityInWorld(enderman);
|
||||||
|
EntityPlayer player = this.worldObj.getClosestPlayerToEntity(enderman, 50);
|
||||||
|
if(player!=null)
|
||||||
|
{
|
||||||
|
enderman.setTarget(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,8 @@ public class RenderMobObelisk extends RenderLiving
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
|
GL11.glDepthMask(false);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
this.mainModel.onGround = this.renderSwingProgress(par1EntityLivingBase, par9);
|
this.mainModel.onGround = this.renderSwingProgress(par1EntityLivingBase, par9);
|
||||||
|
|
||||||
|
@ -98,7 +100,8 @@ public class RenderMobObelisk extends RenderLiving
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
GL11.glDepthMask(true);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(par1EntityLivingBase, this));
|
MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(par1EntityLivingBase, this));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue