Skip to content
Permalink
Browse files

Refactoring to species entity classes

  • Loading branch information...
Ri5ux committed Mar 15, 2019
1 parent a3dee88 commit 5ae9b20c22dfd5723975066578d75922b43eede9
Showing with 187 additions and 142 deletions.
  1. +4 −4 src/main/java/org/avp/api/parasitoidic/IParasitoid.java
  2. +2 −2 src/main/java/org/avp/client/model/entities/living/ModelBelugamorph.java
  3. +2 −2 src/main/java/org/avp/client/model/entities/living/ModelEngineer.java
  4. +2 −2 src/main/java/org/avp/client/model/entities/living/ModelUltramorph.java
  5. +5 −5 src/main/java/org/avp/client/model/entities/living/ModelYautja.java
  6. +3 −3 src/main/java/org/avp/client/render/PressureHUDRenderEvent.java
  7. +4 −4 src/main/java/org/avp/client/render/VisionMode.java
  8. +4 −4 src/main/java/org/avp/client/render/entities/living/RenderEngineer.java
  9. +3 −3 src/main/java/org/avp/client/render/entities/living/RenderXenomorph.java
  10. +3 −3 src/main/java/org/avp/client/render/entities/living/RenderYautja.java
  11. +3 −3 src/main/java/org/avp/client/render/transforms/CryostasisTubeRenderers.java
  12. +2 −2 src/main/java/org/avp/client/render/transforms/FaceLocationTransforms.java
  13. +2 −2 src/main/java/org/avp/client/render/transforms/MedpodTransforms.java
  14. +2 −2 src/main/java/org/avp/entities/EntityAcidPool.java
  15. +2 −2 src/main/java/org/avp/entities/EntityGrenade.java
  16. +2 −2 src/main/java/org/avp/entities/EntityMedpod.java
  17. +3 −3 src/main/java/org/avp/entities/ai/alien/EntityAIClimb.java
  18. +9 −9 src/main/java/org/avp/entities/ai/alien/EntitySelectorXenomorph.java
  19. +4 −2 src/main/java/org/avp/entities/living/EntityAqua.java
  20. +2 −1 src/main/java/org/avp/entities/living/EntityBabyhead.java
  21. +3 −1 src/main/java/org/avp/entities/living/EntityBatXeno.java
  22. +2 −1 src/main/java/org/avp/entities/living/EntityBelugamorph.java
  23. +2 −1 src/main/java/org/avp/entities/living/EntityBoiler.java
  24. +3 −2 src/main/java/org/avp/entities/living/EntityChestburster.java
  25. +6 −3 src/main/java/org/avp/entities/living/EntityCombatSynthetic.java
  26. +2 −1 src/main/java/org/avp/entities/living/EntityDeacon.java
  27. +2 −1 src/main/java/org/avp/entities/living/EntityDeaconAdult.java
  28. +2 −1 src/main/java/org/avp/entities/living/EntityDeaconShark.java
  29. +3 −2 src/main/java/org/avp/entities/living/EntityDracomorph.java
  30. +2 −1 src/main/java/org/avp/entities/living/EntityDrone.java
  31. +2 −1 src/main/java/org/avp/entities/living/EntityEngineer.java
  32. +2 −1 src/main/java/org/avp/entities/living/EntityGooMutant.java
  33. +3 −2 src/main/java/org/avp/entities/living/EntityHammerpede.java
  34. +4 −2 src/main/java/org/avp/entities/living/EntityMarine.java
  35. +5 −3 src/main/java/org/avp/entities/living/EntityMatriarch.java
  36. +3 −1 src/main/java/org/avp/entities/living/EntityMyceliomorph.java
  37. +2 −1 src/main/java/org/avp/entities/living/EntityOvamorph.java
  38. +3 −1 src/main/java/org/avp/entities/living/EntityPantheramorph.java
  39. +2 −1 src/main/java/org/avp/entities/living/EntityParasitoid.java
  40. +2 −1 src/main/java/org/avp/entities/living/EntityPraetorian.java
  41. +2 −1 src/main/java/org/avp/entities/living/EntityPredalien.java
  42. +2 −1 src/main/java/org/avp/entities/living/EntitySpaceJockey.java
  43. +2 −1 src/main/java/org/avp/entities/living/EntitySpitter.java
  44. +2 −1 src/main/java/org/avp/entities/living/EntityTrilobite.java
  45. +2 −1 src/main/java/org/avp/entities/living/EntityUltramorph.java
  46. +2 −1 src/main/java/org/avp/entities/living/EntityWarrior.java
  47. +2 −1 src/main/java/org/avp/entities/living/EntityYautjaBerserker.java
  48. +2 −1 src/main/java/org/avp/entities/living/EntityYautjaMutant.java
  49. +3 −1 src/main/java/org/avp/entities/living/EntityYautjaWarrior.java
  50. +3 −3 src/main/java/org/avp/entities/living/{EntitySpecies223ODe.java → species/Species223ODe.java}
  51. +7 −5 src/main/java/org/avp/entities/living/{EntitySpeciesAlien.java → species/SpeciesAlien.java}
  52. +8 −7 src/main/java/org/avp/entities/living/{EntitySpeciesEngineer.java → species/SpeciesEngineer.java}
  53. +10 −9 src/main/java/org/avp/entities/living/{EntityXenomorph.java → species/SpeciesXenomorph.java}
  54. +8 −7 src/main/java/org/avp/entities/living/{EntitySpeciesYautja.java → species/SpeciesYautja.java}
  55. +2 −2 src/main/java/org/avp/world/EntityImpregnationHandler.java
  56. +2 −2 src/main/java/org/avp/world/capabilities/IOrganism.java
  57. +3 −3 src/main/java/org/avp/world/hives/HiveHandler.java
  58. +7 −7 src/main/java/org/avp/world/hives/XenomorphHive.java
@@ -3,8 +3,8 @@
import java.util.ArrayList;

import org.avp.entities.EntityLiquidPool;
import org.avp.entities.living.EntitySpecies223ODe;
import org.avp.entities.living.EntitySpeciesAlien;
import org.avp.entities.living.species.Species223ODe;
import org.avp.entities.living.species.SpeciesAlien;

import com.google.common.base.Predicate;

@@ -77,10 +77,10 @@ public static NBTTagCompound writeToNBT(IParasitoid parasitoid, NBTTagCompound n
ArrayList<Class<?>> blacklist = new ArrayList<Class<?>>();

blacklist.add(EntityArmorStand.class);
blacklist.add(EntitySpeciesAlien.class);
blacklist.add(SpeciesAlien.class);
blacklist.add(EntityLiquidPool.class);
blacklist.add(IParasitoid.class);
blacklist.add(EntitySpecies223ODe.class);
blacklist.add(Species223ODe.class);
blacklist.add(EntitySnowman.class);
blacklist.add(EntityGolem.class);
blacklist.add(EntitySkeleton.class);
@@ -1,7 +1,7 @@
package org.avp.client.model.entities.living;

import org.avp.client.render.XenomorphJawState;
import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;

import com.asx.mdx.lib.client.util.models.Model;
import com.asx.mdx.lib.util.Game;
@@ -453,7 +453,7 @@ public ModelBelugamorph() {
@Override
public void render(Object obj)
{
EntityXenomorph xenomorph = (EntityXenomorph) obj;
SpeciesXenomorph xenomorph = (SpeciesXenomorph) obj;
float swingProgress = swingProgress(obj);
float swingProgressPrev = swingProgressPrev(obj);

@@ -1,6 +1,6 @@
package org.avp.client.model.entities.living;

import org.avp.entities.living.EntitySpeciesEngineer;
import org.avp.entities.living.species.SpeciesEngineer;

import com.asx.mdx.lib.client.util.models.Model;

@@ -171,7 +171,7 @@ public void render(Object obj)
draw(lArmLower_1);
draw(neck);

EntitySpeciesEngineer engineer = (EntitySpeciesEngineer) base;
SpeciesEngineer engineer = (SpeciesEngineer) base;

if (engineer != null && engineer.isWearingMask() || engineer == null)
{
@@ -1,7 +1,7 @@
package org.avp.client.model.entities.living;

import org.avp.client.render.XenomorphJawState;
import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;

import com.asx.mdx.lib.client.util.models.Model;
import com.asx.mdx.lib.util.Game;
@@ -312,7 +312,7 @@ public ModelUltramorph()
public void render(Object obj)
{
EntityLivingBase base = (EntityLivingBase) obj;;
EntityXenomorph xenomorph = (EntityXenomorph) base;
SpeciesXenomorph xenomorph = (SpeciesXenomorph) base;

float swingProgress = swingProgress(obj);
float swingProgressPrev = swingProgressPrev(obj);
@@ -1,6 +1,6 @@
package org.avp.client.model.entities.living;

import org.avp.entities.living.EntitySpeciesYautja;
import org.avp.entities.living.species.SpeciesYautja;

import com.asx.mdx.lib.client.util.OpenGL;
import com.asx.mdx.lib.client.util.models.Model;
@@ -612,9 +612,9 @@ public void render(Object obj)
float swingProgressPrev = swingProgressPrev(obj);
float mandibleProgress = (idleProgress(obj) + (swingProgress(obj) * 75F)) * 2F;

if (base instanceof EntitySpeciesYautja)
if (base instanceof SpeciesYautja)
{
EntitySpeciesYautja y = (EntitySpeciesYautja) base;
SpeciesYautja y = (SpeciesYautja) base;

if (Math.abs(base.motionY) > 0.1F)
{
@@ -644,9 +644,9 @@ public void render(Object obj)
this.lArmLower.rotateAngleX = this.rThigh.rotateAngleX * 1.75F;
this.rArmLower.rotateAngleX = this.lThigh.rotateAngleX * 1.75F;

if (base instanceof EntitySpeciesYautja)
if (base instanceof SpeciesYautja)
{
EntitySpeciesYautja y = (EntitySpeciesYautja) base;
SpeciesYautja y = (SpeciesYautja) base;

this.biomaskMouth.isHidden = false;
this.lMandibleLower1.isHidden = true;
@@ -10,7 +10,7 @@
import org.avp.AliensVsPredator;
import org.avp.api.power.IVoltageReceiver;
import org.avp.entities.living.EntityMarine;
import org.avp.entities.living.EntitySpeciesAlien;
import org.avp.entities.living.species.SpeciesAlien;
import org.avp.tile.TileEntityPowercell;
import org.avp.tile.TileEntityStasisMechanism;
import org.avp.world.capabilities.IOrganism.Organism;
@@ -278,9 +278,9 @@ public void drawInfoBar()
// fontrenderer.drawString("Parasite Type: " + extendedLiving.getEmbryo().getResult().getSimpleName(), subMenuX + subMenuPadding, subMenuStartY + (curEntry++ * subEntrySpacing), 0x666666);
}

if (entity instanceof EntitySpeciesAlien)
if (entity instanceof SpeciesAlien)
{
fontrenderer.drawString("Jelly Level: " + ((EntitySpeciesAlien) entity).getJellyLevel(), subMenuX + subMenuPadding, subMenuStartY + (curEntry++ * subEntrySpacing), 0x666666);
fontrenderer.drawString("Jelly Level: " + ((SpeciesAlien) entity).getJellyLevel(), subMenuX + subMenuPadding, subMenuStartY + (curEntry++ * subEntrySpacing), 0x666666);
}

// if (entity instanceof EntityChestburster)
@@ -8,8 +8,8 @@
import static org.lwjgl.opengl.GL11.GL_ZERO;

import org.avp.AliensVsPredator;
import org.avp.entities.living.EntitySpeciesAlien;
import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesAlien;
import org.avp.entities.living.species.SpeciesXenomorph;

import com.asx.mdx.lib.client.util.Draw;
import com.asx.mdx.lib.client.util.OpenGL;
@@ -93,7 +93,7 @@ public void renderEntityPost(RenderLivingEvent.Post event)

public boolean isEntityTypeAllowed(Entity entity)
{
Class<?>[] allowedEntityTypes = new Class<?>[] { EntitySpeciesAlien.class, EntityEnderman.class, EntityDragon.class };
Class<?>[] allowedEntityTypes = new Class<?>[] { SpeciesAlien.class, EntityEnderman.class, EntityDragon.class };

for (Class<?> cls : allowedEntityTypes)
{
@@ -135,7 +135,7 @@ public void render(Object... data)
@Override
public void renderEntityPre(RenderLivingEvent.Pre event)
{
if (event.getEntity().getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && !(event.getEntity() instanceof EntityXenomorph))
if (event.getEntity().getCreatureAttribute() != EnumCreatureAttribute.UNDEAD && !(event.getEntity() instanceof SpeciesXenomorph))
{
OpenGL.disableLight();
OpenGL.disableLightMapping();
@@ -2,15 +2,15 @@

import org.avp.AliensVsPredator;
import org.avp.client.model.entities.living.ModelEngineer;
import org.avp.entities.living.EntitySpeciesEngineer;
import org.avp.entities.living.species.SpeciesEngineer;

import com.asx.mdx.lib.client.util.OpenGL;
import com.asx.mdx.lib.client.util.entity.RenderLivingWrapper;
import com.asx.mdx.lib.client.util.models.MapModelTexture;

import net.minecraft.client.renderer.entity.RenderManager;

public class RenderEngineer extends RenderLivingWrapper<EntitySpeciesEngineer, ModelEngineer>
public class RenderEngineer extends RenderLivingWrapper<SpeciesEngineer, ModelEngineer>
{
public RenderEngineer(RenderManager m)
{
@@ -23,13 +23,13 @@ public RenderEngineer(RenderManager m, MapModelTexture<ModelEngineer> model)
}

@Override
public void doRender(EntitySpeciesEngineer entity, double posX, double posY, double posZ, float yaw, float renderPartialTicks)
public void doRender(SpeciesEngineer entity, double posX, double posY, double posZ, float yaw, float renderPartialTicks)
{
super.doRender(entity, posX, posY, posZ, yaw, renderPartialTicks);
}

@Override
protected void preRenderCallback(EntitySpeciesEngineer entityliving, float renderPartialTicks)
protected void preRenderCallback(SpeciesEngineer entityliving, float renderPartialTicks)
{
OpenGL.scale(1.25F, 1.25F, 1.25F);
}
@@ -1,6 +1,6 @@
package org.avp.client.render.entities.living;

import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;

import com.asx.mdx.lib.client.util.OpenGL;
import com.asx.mdx.lib.client.util.entity.RenderLivingWrapper;
@@ -10,7 +10,7 @@
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;

public class RenderXenomorph<XENO extends EntityXenomorph, MODEL extends Model> extends RenderLivingWrapper<XENO, MODEL>
public class RenderXenomorph<XENO extends SpeciesXenomorph, MODEL extends Model> extends RenderLivingWrapper<XENO, MODEL>
{
private float scale;

@@ -33,7 +33,7 @@ protected void preRenderCallback(XENO xeno, float renderPartialTicks)
}

@Override
public ResourceLocation getEntityTexture(EntityXenomorph entity)
public ResourceLocation getEntityTexture(SpeciesXenomorph entity)
{
return this.getModel().getTexture();
}
@@ -1,6 +1,6 @@
package org.avp.client.render.entities.living;

import org.avp.entities.living.EntitySpeciesYautja;
import org.avp.entities.living.species.SpeciesYautja;

import com.asx.mdx.lib.client.util.OpenGL;
import com.asx.mdx.lib.client.util.entity.RenderLivingWrapper;
@@ -9,15 +9,15 @@

import net.minecraft.client.renderer.entity.RenderManager;

public class RenderYautja<T extends EntitySpeciesYautja, MODEL extends Model> extends RenderLivingWrapper<T, MODEL>
public class RenderYautja<T extends SpeciesYautja, MODEL extends Model> extends RenderLivingWrapper<T, MODEL>
{
public RenderYautja(RenderManager m, MapModelTexture<MODEL> texturedModel)
{
super(m, texturedModel);
}

@Override
protected void preRenderCallback(EntitySpeciesYautja yautja, float renderPartialTicks)
protected void preRenderCallback(SpeciesYautja yautja, float renderPartialTicks)
{
OpenGL.scale(1F, 1F, 1F);
}
@@ -13,7 +13,7 @@
import org.avp.entities.living.EntityMatriarch;
import org.avp.entities.living.EntityOvamorph;
import org.avp.entities.living.EntityPraetorian;
import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;
import org.avp.tile.TileEntityCryostasisTube;
import org.lwjgl.opengl.GL12;

@@ -87,11 +87,11 @@ public void renderEntity(RenderCryostasisTube renderer, TileEntityCryostasisTube
}
});

RenderCryostasisTube.renderers.add(new CryostasisEntityRenderer(EntityXenomorph.class) {
RenderCryostasisTube.renderers.add(new CryostasisEntityRenderer(SpeciesXenomorph.class) {
@Override
public boolean isApplicable(Entity entity)
{
return entity instanceof EntityXenomorph;
return entity instanceof SpeciesXenomorph;
}

@Override
@@ -5,7 +5,7 @@
import org.avp.entities.living.EntityCombatSynthetic;
import org.avp.entities.living.EntityEngineer;
import org.avp.entities.living.EntityMarine;
import org.avp.entities.living.EntitySpeciesYautja;
import org.avp.entities.living.species.SpeciesYautja;

import com.asx.mdx.lib.client.util.OpenGL;

@@ -69,7 +69,7 @@ public void post(Entity entity, float partialTicks)
}
});

RenderFacehuggers.transforms.add(new EntityRenderTransforms(EntitySpeciesYautja.class)
RenderFacehuggers.transforms.add(new EntityRenderTransforms(SpeciesYautja.class)
{
@Override
public void pre(Entity entity, float partialTicks)
@@ -3,7 +3,7 @@
import org.avp.client.render.tile.RenderMedpod;
import org.avp.client.render.util.EntityRenderTransforms;
import org.avp.entities.living.EntityMarine;
import org.avp.entities.living.EntitySpeciesYautja;
import org.avp.entities.living.species.SpeciesYautja;

import com.asx.mdx.lib.client.util.OpenGL;

@@ -67,7 +67,7 @@ public void post(Entity entity, float partialTicks)
}
});

RenderMedpod.transforms.add(new EntityRenderTransforms(EntitySpeciesYautja.class)
RenderMedpod.transforms.add(new EntityRenderTransforms(SpeciesYautja.class)
{
@Override
public void pre(Entity entity, float partialTicks)
@@ -4,7 +4,7 @@

import org.avp.DamageSources;
import org.avp.entities.ai.EntityAIMeltBlock;
import org.avp.entities.living.EntitySpeciesAlien;
import org.avp.entities.living.species.SpeciesAlien;

import com.google.common.base.Predicate;

@@ -41,7 +41,7 @@ public boolean apply(@Nullable EntityLivingBase living)
return false;
}

if (living instanceof EntitySpeciesAlien)
if (living instanceof SpeciesAlien)
{
return false;
}
@@ -3,7 +3,7 @@
import java.util.List;

import org.avp.AliensVsPredator;
import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;

import com.asx.mdx.lib.world.Pos;
import com.asx.mdx.lib.world.Worlds;
@@ -121,7 +121,7 @@ public void explode()
for (int idx = 0; idx < list.size(); ++idx)
{
Entity entity = list.get(idx);
float targetDamage = entity instanceof EntityXenomorph ? 8F * 2 : 8F;
float targetDamage = entity instanceof SpeciesXenomorph ? 8F * 2 : 8F;
entity.attackEntityFrom(DamageSource.causeExplosionDamage(explosion), targetDamage);
}
}
@@ -3,7 +3,7 @@
import java.util.List;
import java.util.UUID;

import org.avp.entities.living.EntitySpeciesAlien;
import org.avp.entities.living.species.SpeciesAlien;
import org.avp.tile.TileEntityMedpod;
import org.avp.world.capabilities.IOrganism.Organism;
import org.avp.world.capabilities.IOrganism.Provider;
@@ -67,7 +67,7 @@ public void onUpdate()
{
Entity entity = entities.get(0);

if (!entity.isRiding() && !entity.isSneaking() && (entity != this.lastRiddenEntity && !entity.getPersistentID().equals(this.lastRiddenEntityUUID)) && !(entity instanceof EntitySpeciesAlien))
if (!entity.isRiding() && !entity.isSneaking() && (entity != this.lastRiddenEntity && !entity.getPersistentID().equals(this.lastRiddenEntityUUID)) && !(entity instanceof SpeciesAlien))
{
lastRiddenEntity = entity;

@@ -1,15 +1,15 @@
package org.avp.entities.ai.alien;

import org.avp.entities.living.EntityXenomorph;
import org.avp.entities.living.species.SpeciesXenomorph;

import net.minecraft.entity.ai.EntityAIBase;

public class EntityAIClimb extends EntityAIBase
{
private EntityXenomorph xenomorph;
private SpeciesXenomorph xenomorph;
private float climbSpeed;

public EntityAIClimb(EntityXenomorph xenomorph, float climbSpeed)
public EntityAIClimb(SpeciesXenomorph xenomorph, float climbSpeed)
{
super();
this.xenomorph = xenomorph;
Oops, something went wrong.

0 comments on commit 5ae9b20

Please sign in to comment.
You can’t perform that action at this time.