mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 11:25:55 +03:00
64 lines
2.7 KiB
Diff
64 lines
2.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/monster/EntityVex.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntityVex.java
|
|
@@ -35,6 +35,7 @@
|
|
import net.minecraft.world.storage.loot.LootTableList;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
+import org.bukkit.event.entity.EntityTargetEvent;
|
|
|
|
public class EntityVex extends EntityMob
|
|
{
|
|
@@ -49,7 +50,7 @@
|
|
{
|
|
super(worldIn);
|
|
this.isImmuneToFire = true;
|
|
- this.moveHelper = new EntityVex.AIMoveControl(this);
|
|
+ this.moveHelper = new AIMoveControl(this);
|
|
this.setSize(0.4F, 0.8F);
|
|
this.experienceValue = 3;
|
|
}
|
|
@@ -78,12 +79,12 @@
|
|
{
|
|
super.initEntityAI();
|
|
this.tasks.addTask(0, new EntityAISwimming(this));
|
|
- this.tasks.addTask(4, new EntityVex.AIChargeAttack());
|
|
- this.tasks.addTask(8, new EntityVex.AIMoveRandom());
|
|
+ this.tasks.addTask(4, new AIChargeAttack());
|
|
+ this.tasks.addTask(8, new AIMoveRandom());
|
|
this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 3.0F, 1.0F));
|
|
this.tasks.addTask(10, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));
|
|
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] {EntityVex.class}));
|
|
- this.targetTasks.addTask(2, new EntityVex.AICopyOwnerTarget(this));
|
|
+ this.targetTasks.addTask(2, new AICopyOwnerTarget(this));
|
|
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
|
|
}
|
|
|
|
@@ -316,7 +317,8 @@
|
|
|
|
public void startExecuting()
|
|
{
|
|
- EntityVex.this.setAttackTarget(EntityVex.this.owner.getAttackTarget());
|
|
+ // EntityVex.this.setAttackTarget(EntityVex.this.owner.getAttackTarget());
|
|
+ EntityVex.this.setGoalTarget(EntityVex.this.owner.getAttackTarget(), EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true);
|
|
super.startExecuting();
|
|
}
|
|
}
|
|
@@ -330,7 +332,7 @@
|
|
|
|
public void onUpdateMoveHelper()
|
|
{
|
|
- if (this.action == EntityMoveHelper.Action.MOVE_TO)
|
|
+ if (this.action == Action.MOVE_TO)
|
|
{
|
|
double d0 = this.posX - EntityVex.this.posX;
|
|
double d1 = this.posY - EntityVex.this.posY;
|
|
@@ -340,7 +342,7 @@
|
|
|
|
if (d3 < EntityVex.this.getEntityBoundingBox().getAverageEdgeLength())
|
|
{
|
|
- this.action = EntityMoveHelper.Action.WAIT;
|
|
+ this.action = Action.WAIT;
|
|
EntityVex.this.motionX *= 0.5D;
|
|
EntityVex.this.motionY *= 0.5D;
|
|
EntityVex.this.motionZ *= 0.5D;
|