this doesn't compile yet, but have something to peek at
This commit is contained in:
parent
973f1019a5
commit
5fcdd978d7
329 changed files with 3247 additions and 2953 deletions
|
@ -79,9 +79,9 @@ public class EntityAIAttackStealthMelee extends EntityAIBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
return chicken.attackStateMachine == 1 && super.continueExecuting();
|
||||
return chicken.attackStateMachine == 1 && super.shouldContinueExecuting();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,7 +114,7 @@ public class EntityAIAttackStealthMelee extends EntityAIBase
|
|||
if (this.chicken.getNavigator().getPath() != null)
|
||||
{
|
||||
net.minecraft.pathfinding.PathPoint finalPathPoint = this.chicken.getNavigator().getPath().getFinalPathPoint();
|
||||
if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
|
||||
if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.x, finalPathPoint.y, finalPathPoint.z) < 1)
|
||||
failedPathFindingPenalty = 0;
|
||||
else
|
||||
failedPathFindingPenalty += 10;
|
||||
|
|
|
@ -130,7 +130,7 @@ public class EntityAIFollowOwner extends EntityAIBase
|
|||
{
|
||||
for (int i1 = 0; i1 <= 4; ++i1)
|
||||
{
|
||||
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isFullyOpaque() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1)))
|
||||
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isTopSolid() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1)))
|
||||
{
|
||||
this.thePet.setLocationAndAngles((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.thePet.rotationYaw, this.thePet.rotationPitch);
|
||||
this.petPathfinder.clearPathEntity();
|
||||
|
|
|
@ -143,7 +143,7 @@ public class EntityAIGrabEffectsFromOwner extends EntityAIBase
|
|||
{
|
||||
for (int i1 = 0; i1 <= 4; ++i1)
|
||||
{
|
||||
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isFullyOpaque() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1)))
|
||||
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.theWorld.getBlockState(new BlockPos(i + l, k - 1, j + i1)).isTopSolid() && this.isEmptyBlock(new BlockPos(i + l, k, j + i1)) && this.isEmptyBlock(new BlockPos(i + l, k + 1, j + i1)))
|
||||
{
|
||||
this.thePet.setLocationAndAngles((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.thePet.rotationYaw, this.thePet.rotationPitch);
|
||||
this.petPathfinder.clearPathEntity();
|
||||
|
|
|
@ -34,7 +34,7 @@ public class EntityAIOwnerHurtByTarget extends EntityAITarget
|
|||
return false;
|
||||
} else
|
||||
{
|
||||
this.theOwnerAttacker = owner.getAITarget();
|
||||
this.theOwnerAttacker = owner.getRevengeTarget();
|
||||
int i = owner.getRevengeTimer();
|
||||
return i != this.timestamp && this.isSuitableTarget(this.theOwnerAttacker, false) && this.theDefendingTameable.shouldAttackEntity(this.theOwnerAttacker, owner);
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ public class EntityAIOwnerHurtTarget extends EntityAITarget
|
|||
return false;
|
||||
} else
|
||||
{
|
||||
this.theTarget = entitylivingbase.getLastAttacker();
|
||||
int i = entitylivingbase.getLastAttackerTime();
|
||||
this.theTarget = entitylivingbase.getLastAttackedEntity();
|
||||
int i = entitylivingbase.getLastAttackedEntityTime();
|
||||
return i != this.timestamp && this.isSuitableTarget(this.theTarget, false) && this.theEntityDemonBase.shouldAttackEntity(this.theTarget, entitylivingbase);
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class EntityAIOwnerHurtTarget extends EntityAITarget
|
|||
|
||||
if (entitylivingbase != null)
|
||||
{
|
||||
this.timestamp = entitylivingbase.getLastAttackerTime();
|
||||
this.timestamp = entitylivingbase.getLastAttackedEntityTime();
|
||||
}
|
||||
|
||||
super.startExecuting();
|
||||
|
|
|
@ -56,7 +56,7 @@ public class EntityAIPickUpAlly extends EntityAIBase
|
|||
return false;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5);
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).grow(5);
|
||||
List<EntityLivingBase> list = this.entity.getEntityWorld().getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType()));
|
||||
for (EntityLivingBase testEntity : list)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class EntityAIPickUpAlly extends EntityAIBase
|
|||
if (this.entity.getNavigator().getPath() != null)
|
||||
{
|
||||
net.minecraft.pathfinding.PathPoint finalPathPoint = this.entity.getNavigator().getPath().getFinalPathPoint();
|
||||
if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.xCoord, finalPathPoint.yCoord, finalPathPoint.zCoord) < 1)
|
||||
if (finalPathPoint != null && entitylivingbase.getDistanceSq(finalPathPoint.x, finalPathPoint.y, finalPathPoint.z) < 1)
|
||||
failedPathFindingPenalty = 0;
|
||||
else
|
||||
failedPathFindingPenalty += 10;
|
||||
|
|
|
@ -36,7 +36,7 @@ public class EntityAIProtectAlly extends EntityAIBase
|
|||
@Override
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5);
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).grow(5);
|
||||
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType()));
|
||||
for (EntityLivingBase testEntity : list)
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ public class EntityAIProtectAlly extends EntityAIBase
|
|||
* Returns whether an in-progress EntityAIBase should continue executing
|
||||
*/
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
return castTimer > 0;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class EntityAIProtectAlly extends EntityAIBase
|
|||
this.castTimer = Math.max(0, this.castTimer - 1);
|
||||
if (castTimer == 0)
|
||||
{
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).expandXyz(5);
|
||||
AxisAlignedBB bb = new AxisAlignedBB(entity.posX - 0.5, entity.posY - 0.5, entity.posZ - 0.5, entity.posX + 0.5, entity.posY + 0.5, entity.posZ + 0.5).grow(5);
|
||||
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, bb, new EntityAspectedDemonBase.WillTypePredicate(entity.getType()));
|
||||
for (EntityLivingBase testEntity : list)
|
||||
{
|
||||
|
|
|
@ -40,13 +40,7 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase
|
|||
|
||||
public EntityAIRetreatToHeal(EntityDemonBase theEntityIn, Class<T> classToAvoidIn, Predicate<? super T> avoidTargetSelectorIn, float avoidDistanceIn, double farSpeedIn, double nearSpeedIn)
|
||||
{
|
||||
this.canBeSeenSelector = new Predicate<Entity>()
|
||||
{
|
||||
public boolean apply(@Nullable Entity p_apply_1_)
|
||||
{
|
||||
return p_apply_1_.isEntityAlive() && EntityAIRetreatToHeal.this.theEntity.getEntitySenses().canSee(p_apply_1_);
|
||||
}
|
||||
};
|
||||
this.canBeSeenSelector = p_apply_1_ -> p_apply_1_.isEntityAlive() && EntityAIRetreatToHeal.this.theEntity.getEntitySenses().canSee(p_apply_1_);
|
||||
this.theEntity = theEntityIn;
|
||||
this.classToAvoid = classToAvoidIn;
|
||||
this.avoidTargetSelector = avoidTargetSelectorIn;
|
||||
|
@ -69,7 +63,7 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase
|
|||
}
|
||||
|
||||
//This part almost doesn't matter
|
||||
List<T> list = this.theEntity.getEntityWorld().<T>getEntitiesWithinAABB(this.classToAvoid, this.theEntity.getEntityBoundingBox().expand((double) this.avoidDistance, 3.0D, (double) this.avoidDistance), Predicates.and(new Predicate[] { EntitySelectors.CAN_AI_TARGET, this.canBeSeenSelector, this.avoidTargetSelector }));
|
||||
List<T> list = this.theEntity.getEntityWorld().getEntitiesWithinAABB(this.classToAvoid, this.theEntity.getEntityBoundingBox().expand((double) this.avoidDistance, 3.0D, (double) this.avoidDistance), Predicates.and(EntitySelectors.CAN_AI_TARGET, this.canBeSeenSelector, this.avoidTargetSelector));
|
||||
|
||||
if (list.isEmpty())
|
||||
{
|
||||
|
@ -82,12 +76,12 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase
|
|||
if (vec3d == null)
|
||||
{
|
||||
return false; //Nowhere to run, gotta fight!
|
||||
} else if (this.closestLivingEntity.getDistanceSq(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord) < this.closestLivingEntity.getDistanceSqToEntity(this.theEntity))
|
||||
} else if (this.closestLivingEntity.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < this.closestLivingEntity.getDistanceSqToEntity(this.theEntity))
|
||||
{
|
||||
return false; //I'll be headed off if I choose this direction.
|
||||
} else
|
||||
{
|
||||
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord);
|
||||
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.x, vec3d.y, vec3d.z);
|
||||
return this.entityPathEntity != null;
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +91,7 @@ public class EntityAIRetreatToHeal<T extends Entity> extends EntityAIBase
|
|||
* Returns whether an in-progress EntityAIBase should continue executing
|
||||
*/
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
return this.theEntity.shouldEmergencyHeal();//!this.entityPathNavigate.noPath();
|
||||
}
|
||||
|
|
|
@ -48,12 +48,12 @@ public class EntityAIStealthRetreat extends EntityAIBase
|
|||
if (vec3d == null)
|
||||
{
|
||||
return false;
|
||||
} else if (attacked.getDistanceSq(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord) < attacked.getDistanceSqToEntity(this.entity))
|
||||
} else if (attacked.getDistanceSq(vec3d.x, vec3d.y, vec3d.z) < attacked.getDistanceSqToEntity(this.entity))
|
||||
{
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.xCoord, vec3d.yCoord, vec3d.zCoord);
|
||||
this.entityPathEntity = this.entityPathNavigate.getPathToXYZ(vec3d.x, vec3d.y, vec3d.z);
|
||||
return this.entityPathEntity != null;
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class EntityAIStealthRetreat extends EntityAIBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
if (this.entityPathNavigate.noPath())
|
||||
{
|
||||
|
|
|
@ -48,9 +48,9 @@ public class EntityAIStealthTowardsTarget extends EntityAIBase
|
|||
} else
|
||||
{
|
||||
ticksLeft = this.entity.getEntityWorld().rand.nextInt(200) + 100;
|
||||
this.xPosition = vec3d.xCoord;
|
||||
this.yPosition = vec3d.yCoord;
|
||||
this.zPosition = vec3d.zCoord;
|
||||
this.xPosition = vec3d.x;
|
||||
this.yPosition = vec3d.y;
|
||||
this.zPosition = vec3d.z;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public class EntityAIStealthTowardsTarget extends EntityAIBase
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
ticksLeft--;
|
||||
if (ticksLeft <= 0)
|
||||
|
@ -86,9 +86,9 @@ public class EntityAIStealthTowardsTarget extends EntityAIBase
|
|||
|
||||
if (vec3d != null)
|
||||
{
|
||||
this.xPosition = vec3d.xCoord;
|
||||
this.yPosition = vec3d.yCoord;
|
||||
this.zPosition = vec3d.zCoord;
|
||||
this.xPosition = vec3d.x;
|
||||
this.yPosition = vec3d.y;
|
||||
this.zPosition = vec3d.z;
|
||||
this.entity.getNavigator().tryMoveToXYZ(this.xPosition, this.yPosition, this.zPosition, this.speed);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.Random;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IEntityLivingData;
|
||||
|
@ -53,7 +52,6 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
*/
|
||||
private int sheepTimer;
|
||||
|
||||
@Getter
|
||||
private int castTimer = 0;
|
||||
private EntityAIEatAndCorruptBlock entityAIEatGrass;
|
||||
private EntityAIProtectAlly entityAIProtectAlly;
|
||||
|
@ -66,7 +64,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
|
||||
public static float[] getDyeRgb(EnumDyeColor dyeColor)
|
||||
{
|
||||
return (float[]) DYE_TO_RGB.get(dyeColor);
|
||||
return DYE_TO_RGB.get(dyeColor);
|
||||
}
|
||||
|
||||
public EntityCorruptedSheep(World world)
|
||||
|
@ -289,7 +287,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
*/
|
||||
public EnumDyeColor getFleeceColor()
|
||||
{
|
||||
return EnumDyeColor.byMetadata(((Byte) this.dataManager.get(DYE_COLOR)).byteValue() & 15);
|
||||
return EnumDyeColor.byMetadata(this.dataManager.get(DYE_COLOR).byteValue() & 15);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -297,7 +295,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
*/
|
||||
public void setFleeceColor(EnumDyeColor color)
|
||||
{
|
||||
byte b0 = ((Byte) this.dataManager.get(DYE_COLOR)).byteValue();
|
||||
byte b0 = this.dataManager.get(DYE_COLOR).byteValue();
|
||||
this.dataManager.set(DYE_COLOR, Byte.valueOf((byte) (b0 & 240 | color.getMetadata() & 15)));
|
||||
}
|
||||
|
||||
|
@ -306,7 +304,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
*/
|
||||
public boolean getSheared()
|
||||
{
|
||||
return (((Byte) this.dataManager.get(DYE_COLOR)).byteValue() & 16) != 0;
|
||||
return (this.dataManager.get(DYE_COLOR).byteValue() & 16) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -314,7 +312,7 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
*/
|
||||
public void setSheared(boolean sheared)
|
||||
{
|
||||
byte b0 = ((Byte) this.dataManager.get(DYE_COLOR)).byteValue();
|
||||
byte b0 = this.dataManager.get(DYE_COLOR).byteValue();
|
||||
|
||||
if (sheared)
|
||||
{
|
||||
|
@ -408,4 +406,8 @@ public class EntityCorruptedSheep extends EntityAspectedDemonBase implements ISh
|
|||
this.playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1.0F, 1.0F);
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int getCastTimer() {
|
||||
return castTimer;
|
||||
}
|
||||
}
|
|
@ -207,9 +207,9 @@ public class EntityCorruptedSpider extends EntityAspectedDemonBase
|
|||
/**
|
||||
* Returns whether an in-progress EntityAIBase should continue executing
|
||||
*/
|
||||
public boolean continueExecuting()
|
||||
public boolean shouldContinueExecuting()
|
||||
{
|
||||
float f = this.attacker.getBrightness(1.0F);
|
||||
float f = this.attacker.getBrightness();
|
||||
|
||||
if (f >= 0.5F && this.attacker.getRNG().nextInt(100) == 0)
|
||||
{
|
||||
|
@ -217,7 +217,7 @@ public class EntityCorruptedSpider extends EntityAspectedDemonBase
|
|||
return false;
|
||||
} else
|
||||
{
|
||||
return super.continueExecuting();
|
||||
return super.shouldContinueExecuting();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ public class EntityCorruptedSpider extends EntityAspectedDemonBase
|
|||
*/
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
float f = this.taskOwner.getBrightness(1.0F);
|
||||
float f = this.taskOwner.getBrightness();
|
||||
return !(f >= 0.5F) && super.shouldExecute();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,10 +50,10 @@ public class EntityCorruptedZombie extends EntityAspectedDemonBase
|
|||
this.tasks.addTask(8, new EntityAILookIdle(this));
|
||||
|
||||
this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
|
||||
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, new Class[] { EntityPigZombie.class }));
|
||||
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, true));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityVillager>(this, EntityVillager.class, false));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityIronGolem>(this, EntityIronGolem.class, true));
|
||||
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true, EntityPigZombie.class));
|
||||
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityPlayer.class, true));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<>(this, EntityVillager.class, false));
|
||||
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<>(this, EntityIronGolem.class, true));
|
||||
|
||||
this.setCombatTask();
|
||||
// this.targetTasks.addTask(8, new EntityAINearestAttackableTarget<EntityMob>(this, EntityMob.class, 10, true, false, new TargetPredicate(this)));
|
||||
|
|
|
@ -37,6 +37,8 @@ import net.minecraft.world.WorldServer;
|
|||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Predicate;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class EntityDemonBase extends EntityCreature implements IEntityOwnable
|
||||
{
|
||||
protected static final DataParameter<Byte> TAMED = EntityDataManager.createKey(EntityDemonBase.class, DataSerializers.BYTE);
|
||||
|
@ -286,7 +288,12 @@ public class EntityDemonBase extends EntityCreature implements IEntityOwnable
|
|||
return SoundEvents.ENTITY_COW_AMBIENT;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
protected SoundEvent getHurtSound(DamageSource damageSourceIn) {
|
||||
return getHurtSound();
|
||||
}
|
||||
|
||||
protected SoundEvent getHurtSound()
|
||||
{
|
||||
return SoundEvents.ENTITY_COW_HURT;
|
||||
|
|
|
@ -35,7 +35,7 @@ import net.minecraft.world.EnumDifficulty;
|
|||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.block.BlockMimic;
|
||||
import WayofTime.bloodmagic.entity.ai.EntityAIMimicReform;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import WayofTime.bloodmagic.tile.TileMimic;
|
||||
|
||||
public class EntityMimic extends EntityDemonBase
|
||||
|
@ -110,7 +110,7 @@ public class EntityMimic extends EntityDemonBase
|
|||
{
|
||||
if (world.isAirBlock(pos))
|
||||
{
|
||||
IBlockState mimicState = ModBlocks.MIMIC.getStateFromMeta(BlockMimic.sentientMimicMeta);
|
||||
IBlockState mimicState = RegistrarBloodMagicBlocks.MIMIC.getStateFromMeta(BlockMimic.sentientMimicMeta);
|
||||
world.setBlockState(pos, mimicState, 3);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile instanceof TileMimic)
|
||||
|
@ -367,15 +367,6 @@ public class EntityMimic extends EntityDemonBase
|
|||
super(spider, 1.0D, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether an in-progress EntityAIBase should continue executing
|
||||
*/
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
{
|
||||
return super.continueExecuting();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected double getAttackReachSqr(EntityLivingBase attackTarget)
|
||||
{
|
||||
|
@ -389,13 +380,5 @@ public class EntityMimic extends EntityDemonBase
|
|||
{
|
||||
super(spider, classTarget, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the EntityAIBase should begin execution.
|
||||
*/
|
||||
public boolean shouldExecute()
|
||||
{
|
||||
return super.shouldExecute();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,10 +4,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -54,16 +50,11 @@ import WayofTime.bloodmagic.entity.ai.EntityAIOwnerHurtByTarget;
|
|||
import WayofTime.bloodmagic.entity.ai.EntityAIOwnerHurtTarget;
|
||||
import WayofTime.bloodmagic.entity.ai.EntityAIRetreatToHeal;
|
||||
import WayofTime.bloodmagic.item.soul.ItemSentientBow;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicItems;
|
||||
|
||||
public class EntitySentientSpecter extends EntityDemonBase
|
||||
{
|
||||
@Getter
|
||||
@Setter
|
||||
protected EnumDemonWillType type = EnumDemonWillType.DESTRUCTIVE;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
protected boolean wasGivenSentientArmour = false;
|
||||
|
||||
private final EntityAIAttackRangedBow aiArrowAttack = new EntityAIAttackRangedBow(this, 1.0D, 20, 15.0F);
|
||||
|
@ -355,7 +346,7 @@ public class EntitySentientSpecter extends EntityDemonBase
|
|||
|
||||
if (wasGivenSentientArmour)
|
||||
{
|
||||
this.entityDropItem(new ItemStack(ModItems.SENTIENT_ARMOUR_GEM), 0);
|
||||
this.entityDropItem(new ItemStack(RegistrarBloodMagicItems.SENTIENT_ARMOUR_GEM), 0);
|
||||
}
|
||||
|
||||
this.setDead();
|
||||
|
@ -479,7 +470,7 @@ public class EntitySentientSpecter extends EntityDemonBase
|
|||
public void attackEntityWithRangedAttack(EntityLivingBase target, float velocity)
|
||||
{
|
||||
ItemStack heldStack = this.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND);
|
||||
if (!heldStack.isEmpty() && heldStack.getItem() == ModItems.SENTIENT_BOW)
|
||||
if (!heldStack.isEmpty() && heldStack.getItem() == RegistrarBloodMagicItems.SENTIENT_BOW)
|
||||
{
|
||||
EntityTippedArrow arrowEntity = ((ItemSentientBow) heldStack.getItem()).getArrowEntity(getEntityWorld(), heldStack, target, this, velocity);
|
||||
if (arrowEntity != null)
|
||||
|
@ -565,4 +556,20 @@ public class EntitySentientSpecter extends EntityDemonBase
|
|||
{
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
public EnumDemonWillType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(EnumDemonWillType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public boolean isWasGivenSentientArmour() {
|
||||
return wasGivenSentientArmour;
|
||||
}
|
||||
|
||||
public void setWasGivenSentientArmour(boolean wasGivenSentientArmour) {
|
||||
this.wasGivenSentientArmour = wasGivenSentientArmour;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.bloodmagic.entity.projectile;
|
||||
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.registry.ModBlocks;
|
||||
import WayofTime.bloodmagic.registry.RegistrarBloodMagicBlocks;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -107,7 +107,7 @@ public class EntityBloodLight extends EntityThrowable implements IThrowableEntit
|
|||
|
||||
if (getEntityWorld().isAirBlock(blockPos))
|
||||
{
|
||||
getEntityWorld().setBlockState(blockPos, ModBlocks.BLOOD_LIGHT.getDefaultState());
|
||||
getEntityWorld().setBlockState(blockPos, RegistrarBloodMagicBlocks.BLOOD_LIGHT.getDefaultState());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.bloodmagic.entity.projectile;
|
||||
|
||||
import lombok.Setter;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
|
@ -24,7 +23,6 @@ public class EntityMeteor extends EntityThrowable implements IThrowableEntity
|
|||
protected double explosionModifier = 1;
|
||||
protected double fillerChance = 0;
|
||||
|
||||
@Setter
|
||||
public ItemStack meteorStack = ItemStack.EMPTY;
|
||||
|
||||
public EntityMeteor(World world)
|
||||
|
@ -150,4 +148,8 @@ public class EntityMeteor extends EntityThrowable implements IThrowableEntity
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public void setMeteorStack(ItemStack meteorStack) {
|
||||
this.meteorStack = meteorStack;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue