mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
Update mappings to stable_29 for 1.10.2, no functional changes
This commit is contained in:
252 files changed
+1100
-1100
No files matched your search
@@ -52,7 +52,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
}
|
||||
|
||||
public EntityMagicMissile(EntityLivingBase thrower, boolean evil) {
|
||||
this(thrower.worldObj);
|
||||
this(thrower.world);
|
||||
ReflectionHelper.setPrivateValue(EntityThrowable.class, this, thrower, LibObfuscation.THROWER);
|
||||
setEvil(evil);
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
|
||||
public EntityLivingBase getTargetEntity() {
|
||||
int id = dataManager.get(TARGET);
|
||||
Entity e = worldObj.getEntityByID(id);
|
||||
Entity e = world.getEntityByID(id);
|
||||
if(e != null && e instanceof EntityLivingBase)
|
||||
return (EntityLivingBase) e;
|
||||
|
||||
@@ -92,7 +92,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
if(!worldObj.isRemote && (!getTarget() || time > 40)) {
|
||||
if(!world.isRemote && (!getTarget() || time > 40)) {
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
Botania.proxy.setSparkleFXCorrupt(evil);
|
||||
for(int i = 0; i < steps; i++) {
|
||||
Botania.proxy.sparkleFX(particlePos.x, particlePos.y, particlePos.z, 1F, evil ? 0F : 0.4F, 1F, 0.8F, 2);
|
||||
if(worldObj.rand.nextInt(steps) <= 1)
|
||||
if(world.rand.nextInt(steps) <= 1)
|
||||
Botania.proxy.sparkleFX(particlePos.x + (Math.random() - 0.5) * 0.4, particlePos.y + (Math.random() - 0.5) * 0.4, particlePos.z + (Math.random() - 0.5) * 0.4, 1F, evil ? 0F : 0.4F, 1F, 0.8F, 2);
|
||||
|
||||
particlePos = particlePos.add(step);
|
||||
@@ -132,7 +132,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
motionY = Math.abs(motionY);
|
||||
motionZ = motionVec.z;
|
||||
|
||||
List<EntityLivingBase> targetList = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5));
|
||||
List<EntityLivingBase> targetList = world.getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(posX - 0.5, posY - 0.5, posZ - 0.5, posX + 0.5, posY + 0.5, posZ + 0.5));
|
||||
if(targetList.contains(target) && target != null) {
|
||||
EntityLivingBase thrower = getThrower();
|
||||
if(thrower != null) {
|
||||
@@ -165,15 +165,15 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
|
||||
public boolean getTarget() {
|
||||
EntityLivingBase target = getTargetEntity();
|
||||
if(target != null && target.getHealth() > 0 && !target.isDead && worldObj.loadedEntityList.contains(target))
|
||||
if(target != null && target.getHealth() > 0 && !target.isDead && world.loadedEntityList.contains(target))
|
||||
return true;
|
||||
if(target != null)
|
||||
setTarget(null);
|
||||
|
||||
double range = 12;
|
||||
List entities = worldObj.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(posX - range, posY - range, posZ - range, posX + range, posY + range, posZ + range), Predicates.instanceOf(isEvil() ? EntityPlayer.class : IMob.class));
|
||||
List entities = world.getEntitiesWithinAABB(Entity.class, new AxisAlignedBB(posX - range, posY - range, posZ - range, posX + range, posY + range, posZ + range), Predicates.instanceOf(isEvil() ? EntityPlayer.class : IMob.class));
|
||||
while(entities.size() > 0) {
|
||||
Entity e = (Entity) entities.get(worldObj.rand.nextInt(entities.size()));
|
||||
Entity e = (Entity) entities.get(world.rand.nextInt(entities.size()));
|
||||
if(!(e instanceof EntityLivingBase) || e.isDead) { // Just in case...
|
||||
entities.remove(e);
|
||||
continue;
|
||||
@@ -191,7 +191,7 @@ public class EntityMagicMissile extends EntityThrowable {
|
||||
protected void onImpact(@Nonnull RayTraceResult pos) {
|
||||
switch (pos.typeOfHit) {
|
||||
case BLOCK: {
|
||||
Block block = worldObj.getBlockState(pos.getBlockPos()).getBlock();
|
||||
Block block = world.getBlockState(pos.getBlockPos()).getBlock();
|
||||
if(!(block instanceof BlockBush) && !(block instanceof BlockLeaves))
|
||||
setDead();
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user