more siege logic, reduced garbage
@ -5,6 +5,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockBase;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeZombie;
|
||||
import com.hbm.handler.SiegeOrchestrator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@ -31,6 +32,9 @@ public class SiegeHole extends BlockBase {
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||
|
||||
if(SiegeOrchestrator.spawnThresholdEnabled(world) && SiegeOrchestrator.siegeMobCount > SiegeOrchestrator.getSpawnThreshold(world))
|
||||
return;
|
||||
|
||||
List<EntitySiegeZombie> list = world.getEntitiesWithinAABB(EntitySiegeZombie.class, AxisAlignedBB.getBoundingBox(x - 5, y - 2, z - 5, x + 6, y + 3, z + 6));
|
||||
|
||||
if(list.size() < 2) {
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.siege;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.SiegeOrchestrator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -18,6 +19,9 @@ public class SiegeShield extends SiegeBase {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
|
||||
if(SiegeOrchestrator.siegeMobCount > SiegeOrchestrator.getExpansionThreshold(world))
|
||||
return;
|
||||
|
||||
int succ = 0;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
package com.hbm.entity.missile;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.handler.SiegeOrchestrator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySiegeDropship extends EntityThrowable {
|
||||
|
||||
public int health = 10;
|
||||
|
||||
public EntitySiegeDropship(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntitySiegeDropship(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
this.health *= (SiegeOrchestrator.level + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeCollidedWith() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource source, float amount) {
|
||||
|
||||
if(this.isEntityInvulnerable()) {
|
||||
return false;
|
||||
|
||||
} else {
|
||||
|
||||
if(!this.isDead && !this.worldObj.isRemote) {
|
||||
health -= amount;
|
||||
|
||||
if(this.health <= 0) {
|
||||
this.setDead();
|
||||
SiegeOrchestrator.levelCounter += SiegeOrchestrator.getTierAddDrop(worldObj);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
this.motionX = 0;
|
||||
this.motionY = -0.5;
|
||||
this.motionZ = 0;
|
||||
|
||||
super.onUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop) {
|
||||
|
||||
if(mop.typeOfHit == MovingObjectType.BLOCK) {
|
||||
this.setDead();
|
||||
|
||||
if(SiegeOrchestrator.enableBaseSpawning(worldObj)) {
|
||||
worldObj.setBlock(mop.blockX, mop.blockY, mop.blockZ, ModBlocks.siege_shield);
|
||||
} else if(SiegeOrchestrator.enableMobSpawning(worldObj)) {
|
||||
SiegeOrchestrator.spawnRandomMob(worldObj, mop.blockX + 0.5, mop.blockY + 1, mop.blockZ + 0.5);
|
||||
}
|
||||
|
||||
ExplosionLarge.spawnParticles(worldObj, posX, posY + 1, posZ, 15);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setInteger("health", this.health);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
|
||||
this.health = nbt.getInteger("health");
|
||||
}
|
||||
}
|
||||
@ -1,11 +1,20 @@
|
||||
package com.hbm.entity.mob.siege;
|
||||
|
||||
import api.hbm.entity.IRadiationImmune;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.IRangedAttackMob;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntitySiegeSkeleton extends EntitySkeleton {
|
||||
public class EntitySiegeSkeleton extends EntityMob implements IRangedAttackMob, IRadiationImmune {
|
||||
|
||||
public EntitySiegeSkeleton(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase p_82196_1_, float p_82196_2_) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,8 +145,8 @@ public class EntitySiegeUFO extends EntityFlying implements IMob, IRadiationImmu
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
|
||||
//if(((EntityPlayer)entity).capabilities.isCreativeMode)
|
||||
// continue;
|
||||
if(((EntityPlayer)entity).capabilities.isCreativeMode)
|
||||
continue;
|
||||
|
||||
if(((EntityPlayer)entity).isPotionActive(Potion.invisibility.id))
|
||||
continue;
|
||||
@ -199,7 +199,7 @@ public class EntitySiegeUFO extends EntityFlying implements IMob, IRadiationImmu
|
||||
double deltaZ = this.getZ() - this.posZ;
|
||||
Vec3 delta = Vec3.createVectorHelper(deltaX, deltaY, deltaZ);
|
||||
double len = delta.lengthVector();
|
||||
double speed = 0.5 + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() * 1;
|
||||
double speed = this.target == null ? 0.25D : 0.5D + this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() * 1;
|
||||
|
||||
if(len > 5) {
|
||||
if(isCourseTraversable(this.getX(), this.getY(), this.getZ(), len)) {
|
||||
|
||||
@ -32,15 +32,15 @@ public class SiegeTier {
|
||||
public static SiegeTier DNT;
|
||||
|
||||
public static void registerTiers() {
|
||||
DEFAULT_BUFF = new SiegeTier(20, "buff") .addDrop(new ItemStack(ModItems.coin_siege, 1, 0)) .setDR(0.2F) .setDMG(2F);
|
||||
CLAY = new SiegeTier(30, "clay") .addDrop(new ItemStack(ModItems.coin_siege, 1, 1)) .setDR(0.2F) .setDMG(3F);
|
||||
STONE = new SiegeTier(40, "stone") .addDrop(new ItemStack(ModItems.coin_siege, 1, 2)) .setDR(0.3F) .setDT(1F) .setFP() .setDMG(5F);
|
||||
IRON = new SiegeTier(50, "iron") .addDrop(new ItemStack(ModItems.coin_siege, 1, 3)) .setDR(0.3F) .setDT(2F) .setFP() .setDMG(7.5F) .setFF();
|
||||
SILVER = new SiegeTier(70, "silver") .addDrop(new ItemStack(ModItems.coin_siege, 1, 4)) .setDR(0.5F) .setDT(3F) .setNF() .setFP() .setDMG(10F) .setSP(0.5F) .setFF();
|
||||
GOLD = new SiegeTier(100, "gold") .addDrop(new ItemStack(ModItems.coin_siege, 1, 5)) .setDR(0.5F) .setDT(5F) .setNF() .setFP() .setDMG(15F) .setSP(0.5F) .setFF();
|
||||
DESH = new SiegeTier(150, "desh") .addDrop(new ItemStack(ModItems.coin_siege, 1, 6)) .setDR(0.7F) .setDT(7F) .setNF() .setFP() .setDMG(25F) .setSP(0.5F) .setFF();
|
||||
SCHRAB = new SiegeTier(250, "schrab") .addDrop(new ItemStack(ModItems.coin_siege, 1, 7)) .setDR(0.7F) .setDT(10F) .setNF() .setFP() .setDMG(50F) .setSP(1F) .setFF();
|
||||
DNT = new SiegeTier(500, "dnt") .addDrop(new ItemStack(ModItems.coin_siege, 1, 8)) .setDR(0.9F) .setDT(20F) .setNF() .setFP() .setDMG(100F) .setSP(1F) .setFF();
|
||||
DEFAULT_BUFF = new SiegeTier(20, "buff") .addDrop(new ItemStack(ModItems.coin_siege, 1, 0)) .setDR(0.2F) .setDMG(2F) .setLaser(0F, 0F, false);
|
||||
CLAY = new SiegeTier(30, "clay") .addDrop(new ItemStack(ModItems.coin_siege, 1, 1)) .setDR(0.2F) .setDMG(3F) .setLaser(0F, 0F, false);
|
||||
STONE = new SiegeTier(40, "stone") .addDrop(new ItemStack(ModItems.coin_siege, 1, 2)) .setDR(0.3F) .setDT(1F) .setFP() .setDMG(5F) .setLaser(0F, 0F, true);
|
||||
IRON = new SiegeTier(50, "iron") .addDrop(new ItemStack(ModItems.coin_siege, 1, 3)) .setDR(0.3F) .setDT(2F) .setFP() .setDMG(7.5F) .setFF() .setLaser(0F, 1F, true);
|
||||
SILVER = new SiegeTier(70, "silver") .addDrop(new ItemStack(ModItems.coin_siege, 1, 4)) .setDR(0.5F) .setDT(3F) .setNF() .setFP() .setDMG(10F) .setSP(0.5F) .setFF() .setLaser(0.01F, 1F, true);
|
||||
GOLD = new SiegeTier(100, "gold") .addDrop(new ItemStack(ModItems.coin_siege, 1, 5)) .setDR(0.5F) .setDT(5F) .setNF() .setFP() .setDMG(15F) .setSP(0.5F) .setFF() .setLaser(0.02F, 1.5F, true);
|
||||
DESH = new SiegeTier(150, "desh") .addDrop(new ItemStack(ModItems.coin_siege, 1, 6)) .setDR(0.7F) .setDT(7F) .setNF() .setFP() .setDMG(25F) .setSP(0.5F) .setFF() .setLaser(0.05F, 1.5F, true);
|
||||
SCHRAB = new SiegeTier(250, "schrab") .addDrop(new ItemStack(ModItems.coin_siege, 1, 7)) .setDR(0.7F) .setDT(10F) .setNF() .setFP() .setDMG(50F) .setSP(1F) .setFF() .setLaser(0.1F, 2F, true);
|
||||
DNT = new SiegeTier(500, "dnt") .addDrop(new ItemStack(ModItems.coin_siege, 1, 8)) .setDR(0.9F) .setDT(20F) .setNF() .setFP() .setDMG(100F) .setSP(1F) .setFF() .setLaser(0.2F, 2F, true);
|
||||
}
|
||||
|
||||
public int id;
|
||||
@ -54,6 +54,10 @@ public class SiegeTier {
|
||||
public boolean noFall = false;
|
||||
public boolean noFriendlyFire = false;
|
||||
public List<ItemStack> dropItem = new ArrayList();
|
||||
|
||||
public float laserBreak = 0F;
|
||||
public float laserExplosive = 0F;
|
||||
public boolean laserIncendiary = false;
|
||||
|
||||
//so this is basically delegates but in java? or like, uh, storing lambdas? i don't know what it is but i feel like playing god. i like it.
|
||||
public Consumer<EntityLivingBase> delegate;
|
||||
@ -102,6 +106,13 @@ public class SiegeTier {
|
||||
return this;
|
||||
}
|
||||
|
||||
private SiegeTier setLaser(float breaking, float explosive, boolean incendiary) {
|
||||
this.laserBreak = breaking;
|
||||
this.laserExplosive = explosive;
|
||||
this.laserIncendiary = incendiary;
|
||||
return this;
|
||||
}
|
||||
|
||||
private SiegeTier addDrop(Item drop) {
|
||||
return addDrop(new ItemStack(drop));
|
||||
}
|
||||
|
||||
@ -1,15 +1,18 @@
|
||||
package com.hbm.handler;
|
||||
|
||||
import com.hbm.entity.mob.siege.EntitySiegeSkeleton;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeUFO;
|
||||
import com.hbm.entity.mob.siege.EntitySiegeZombie;
|
||||
import com.hbm.util.ChatBuilder;
|
||||
import com.hbm.util.GameRuleHelper;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.GameRules;
|
||||
import net.minecraft.world.World;
|
||||
@ -18,10 +21,10 @@ public class SiegeOrchestrator {
|
||||
|
||||
public static boolean lastWave = false;
|
||||
|
||||
private static int level = 0;
|
||||
private static int levelCounter = 0;
|
||||
public static int level = 0;
|
||||
public static int levelCounter = 0;
|
||||
|
||||
private static int siegeMobCount = 0;
|
||||
public static int siegeMobCount = 0;
|
||||
|
||||
public static void update(World world) {
|
||||
|
||||
@ -92,12 +95,48 @@ public class SiegeOrchestrator {
|
||||
//TODO: either spawn siege mobs outright or dropships, depending on whether dropships are enabled
|
||||
}
|
||||
|
||||
public static void playerDeathHook(EntityPlayer player) {
|
||||
public static void playerDeathHook(EntityPlayer player, DamageSource source) {
|
||||
|
||||
if(!player.worldObj.isRemote) {
|
||||
if(isSiegeMob(source.getEntity())) {
|
||||
levelCounter -= getTierSubDeath(player.worldObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void mobDeathHook(EntityLivingBase entity) {
|
||||
public static void mobDeathHook(EntityLivingBase entity, DamageSource source) {
|
||||
|
||||
if(!entity.worldObj.isRemote) {
|
||||
if(isSiegeMob(entity)) {
|
||||
levelCounter += getTierAddKill(entity.worldObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnRandomMob(World world, double x, double y, double z, EntityPlayer target) {
|
||||
|
||||
if(world.isRemote)
|
||||
return;
|
||||
|
||||
EntityLiving entity;
|
||||
|
||||
float f = world.rand.nextFloat();
|
||||
|
||||
if(f < 0.1F) {
|
||||
entity = new EntitySiegeUFO(world);
|
||||
} else if(f < 0.4F) {
|
||||
entity = new EntitySiegeSkeleton(world);
|
||||
} else {
|
||||
entity = new EntitySiegeZombie(world);
|
||||
}
|
||||
|
||||
entity.setPositionAndRotation(x, y, z, (float)Math.PI * 2F, 0F);
|
||||
|
||||
if(target != null) {
|
||||
entity.setAttackTarget(target);
|
||||
}
|
||||
|
||||
world.spawnEntityInWorld(entity);
|
||||
}
|
||||
|
||||
private static void refreshMobCount(World world) {
|
||||
@ -116,6 +155,7 @@ public class SiegeOrchestrator {
|
||||
public static boolean isSiegeMob(Entity entity) {
|
||||
|
||||
if(entity instanceof EntitySiegeZombie) return true;
|
||||
if(entity instanceof EntitySiegeSkeleton) return true;
|
||||
if(entity instanceof EntitySiegeUFO) return true;
|
||||
|
||||
return false;
|
||||
@ -126,16 +166,18 @@ public class SiegeOrchestrator {
|
||||
public static final String KEY_WAVE_DURATION = "siegeWaveDuration";
|
||||
public static final String KEY_PAUSE_DURATION = "siegePauseDuration";
|
||||
public static final String KEY_ENABLE_DROPS = "siegeEnableDropships";
|
||||
public static final String KEY_ENABLE_SPAWNS = "siegeEnableGroundSpawning";
|
||||
public static final String KEY_ENABLE_SPAWNS = "siegeEnableMobSpawning";
|
||||
public static final String KEY_ENABLE_BASES = "siegeEnableBases";
|
||||
public static final String KEY_ENABLE_MISSILES = "siegeEnableMissiles";
|
||||
public static final String KEY_SPAWN_DIST = "siegeSpawnDist";
|
||||
public static final String KEY_SPAWN_DELAY = "siegeSpawnDelay";
|
||||
public static final String KEY_TIER_DELAY = "siegeTierDuration";
|
||||
public static final String KEY_TIER_ADD_KILL = "siegeTierAddKill";
|
||||
public static final String KEY_TIER_ADD_DROP = "siegeTierAddDrop";
|
||||
public static final String KEY_TIER_SUB_DEATH = "siegeTierSubDeath";
|
||||
public static final String KEY_SPAWN_THRESHOLD = "siegeEnableSpawnThreshold";
|
||||
public static final String KEY_SPAWN_THRESHOLD_COUNT = "siegeSpawnThreshold";
|
||||
public static final String KEY_EXPANSION_THRESHOLD_COUNT = "siegeExpansionThreshold";
|
||||
|
||||
public static void createGameRules(World world) {
|
||||
|
||||
@ -153,10 +195,11 @@ public class SiegeOrchestrator {
|
||||
rules.setOrCreateGameRule(KEY_SPAWN_DIST, "64");
|
||||
rules.setOrCreateGameRule(KEY_SPAWN_DELAY, "" + (10 * 20));
|
||||
rules.setOrCreateGameRule(KEY_TIER_DELAY, "" + (15 * 60 * 20));
|
||||
rules.setOrCreateGameRule(KEY_TIER_ADD_KILL, "" + (5 * 20));
|
||||
rules.setOrCreateGameRule(KEY_TIER_ADD_KILL, "" + (1 * 20));
|
||||
rules.setOrCreateGameRule(KEY_TIER_SUB_DEATH, "" + (15 * 20));
|
||||
rules.setOrCreateGameRule(KEY_SPAWN_THRESHOLD, "true");
|
||||
rules.setOrCreateGameRule(KEY_SPAWN_THRESHOLD_COUNT, "50");
|
||||
rules.setOrCreateGameRule(KEY_EXPANSION_THRESHOLD_COUNT, "20");
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +228,11 @@ public class SiegeOrchestrator {
|
||||
}
|
||||
|
||||
public static int getTierAddKill(World world) {
|
||||
return GameRuleHelper.getIntegerMinimum(world, KEY_TIER_ADD_KILL, 5 * 20, 0);
|
||||
return GameRuleHelper.getIntegerMinimum(world, KEY_TIER_ADD_KILL, 1 * 20, 0);
|
||||
}
|
||||
|
||||
public static int getTierAddDrop(World world) {
|
||||
return GameRuleHelper.getIntegerMinimum(world, KEY_TIER_ADD_DROP, 5 * 20, 0);
|
||||
}
|
||||
|
||||
public static int getTierSubDeath(World world) {
|
||||
@ -199,4 +246,16 @@ public class SiegeOrchestrator {
|
||||
public static int getSpawnThreshold(World world) {
|
||||
return GameRuleHelper.getIntegerMinimum(world, KEY_SPAWN_THRESHOLD_COUNT, 50, 1);
|
||||
}
|
||||
|
||||
public static int getExpansionThreshold(World world) {
|
||||
return GameRuleHelper.getIntegerMinimum(world, KEY_EXPANSION_THRESHOLD_COUNT, 20, 1);
|
||||
}
|
||||
|
||||
public static boolean enableBaseSpawning(World world) {
|
||||
return world.getGameRules().getGameRuleBooleanValue(KEY_ENABLE_BASES);
|
||||
}
|
||||
|
||||
public static boolean enableMobSpawning(World world) {
|
||||
return world.getGameRules().getGameRuleBooleanValue(KEY_ENABLE_SPAWNS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -457,6 +457,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFallingNuke.class, new RenderFallingNuke());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinerRocket.class, new RenderMinerRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBobmazon.class, new RenderMinerRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeDropship.class, new RenderMinerRocket());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityTom.class, new RenderTom());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityAAShell.class, new RenderMirv());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRocketHoming.class, new RenderSRocket());
|
||||
|
||||
@ -479,6 +479,7 @@ public class MainRegistry {
|
||||
EntityRegistry.registerModEntity(EntityGhost.class, "entity_ntm_ghost", 162, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntityGrenadeDynamite.class, "entity_grenade_dynamite", 163, this, 250, 1, true);
|
||||
EntityRegistry.registerModEntity(EntitySiegeLaser.class, "entity_ntm_siege_laser", 164, this, 1000, 1, true);
|
||||
EntityRegistry.registerModEntity(EntitySiegeDropship.class, "entity_ntm_siege_dropship", 165, this, 1000, 1, true);
|
||||
|
||||
EntityRegistry.registerGlobalEntityID(EntityNuclearCreeper.class, "entity_mob_nuclear_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x204131, 0x75CE00);
|
||||
EntityRegistry.registerGlobalEntityID(EntityTaintedCreeper.class, "entity_mob_tainted_creeper", EntityRegistry.findGlobalUniqueEntityId(), 0x813b9b, 0xd71fdd);
|
||||
|
||||
@ -34,6 +34,7 @@ import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.handler.HTTPHandler;
|
||||
import com.hbm.handler.ImpactWorldHandler;
|
||||
import com.hbm.handler.SiegeOrchestrator;
|
||||
import com.hbm.items.IEquipReceiver;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.ArmorFSB;
|
||||
@ -361,6 +362,11 @@ public class ModEventHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SiegeOrchestrator.playerDeathHook(player, event.source);
|
||||
|
||||
} else {
|
||||
SiegeOrchestrator.mobDeathHook(entity, event.source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -908,6 +908,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation missileBooster_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileBooster.png");
|
||||
public static final ResourceLocation minerRocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/minerRocket.png");
|
||||
public static final ResourceLocation bobmazon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bobmazon.png");
|
||||
public static final ResourceLocation siege_dropship_tex = new ResourceLocation(RefStrings.MODID, "textures/models/siege_dropship.png");
|
||||
public static final ResourceLocation missileMicroBHole_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroBHole.png");
|
||||
public static final ResourceLocation missileMicroSchrab_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroSchrab.png");
|
||||
public static final ResourceLocation missileMicroEMP_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missileMicroEMP.png");
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.entity.rocket;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.entity.missile.EntityMinerRocket;
|
||||
import com.hbm.entity.missile.EntitySiegeDropship;
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
@ -12,25 +13,27 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class RenderMinerRocket extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float p_76986_9_) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
//GL11.glRotated(180, 0, 0, 1);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(p_76986_1_ instanceof EntityMinerRocket) {
|
||||
bindTexture(ResourceManager.minerRocket_tex);
|
||||
} else {
|
||||
bindTexture(ResourceManager.bobmazon_tex);
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
//GL11.glTranslatef(0, 2, 0);
|
||||
}
|
||||
|
||||
ResourceManager.minerRocket.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
if(entity instanceof EntityMinerRocket) {
|
||||
bindTexture(ResourceManager.minerRocket_tex);
|
||||
} else {
|
||||
|
||||
if(entity instanceof EntitySiegeDropship) {
|
||||
bindTexture(ResourceManager.siege_dropship_tex);
|
||||
} else {
|
||||
bindTexture(ResourceManager.bobmazon_tex);
|
||||
}
|
||||
GL11.glRotatef(180, 1, 0, 0);
|
||||
}
|
||||
|
||||
ResourceManager.minerRocket.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 6.7 KiB |
BIN
src/main/resources/assets/hbm/textures/models/siege_dropship.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 569 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 971 B |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 329 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 879 B |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 7.5 KiB |