enhanced lung diseases, coughing fits

This commit is contained in:
Bob 2021-09-09 22:58:58 +02:00
parent 7bcbfd4599
commit f5ad04fcfa
31 changed files with 221 additions and 57 deletions

View File

@ -23,9 +23,7 @@ public class BlockGasCoal extends BlockGasBase {
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
if(world.rand.nextInt(5) == 0)
world.spawnParticle("smoke", x + rand.nextFloat(), y + rand.nextFloat(), z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
world.spawnParticle("smoke", x + rand.nextFloat(), y + rand.nextFloat(), z + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
}
@Override
@ -36,7 +34,7 @@ public class BlockGasCoal extends BlockGasBase {
EntityLivingBase living = (EntityLivingBase) entity;
if(!ArmorRegistry.hasProtection(living, 3, HazardClass.PARTICLE_COARSE))
HbmLivingProps.incrementBlackLung(living, 1);
HbmLivingProps.incrementBlackLung(living, 10);
}
}
@ -57,7 +55,7 @@ public class BlockGasCoal extends BlockGasBase {
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(!world.isRemote && rand.nextInt(30) == 0) {
if(!world.isRemote && rand.nextInt(20) == 0) {
world.setBlockToAir(x, y, z);
return;
}

View File

@ -1,5 +1,6 @@
package com.hbm.entity.mob.siege;
import net.minecraft.entity.IEntityLivingData;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
@ -68,12 +69,22 @@ public class EntitySiegeZombie extends EntityMob {
protected void entityInit() {
super.entityInit();
this.getDataWatcher().addObject(12, (int) 0);
this.getDataWatcher().addObject(13, (byte) 0);
}
@Override
protected void applyEntityAttributes() {
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.23D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D);
}
public void setTier(SiegeTier tier) {
this.getDataWatcher().updateObject(12, tier.id);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).applyModifier(new AttributeModifier("Tier Speed Mod", tier.speedMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).applyModifier(new AttributeModifier("Tier Damage Mod", tier.damageMod, 1));
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(tier.health);
this.setHealth(this.getMaxHealth());
}
@ -113,6 +124,15 @@ public class EntitySiegeZombie extends EntityMob {
}
}
@Override
public void onUpdate() {
super.onUpdate();
if(!worldObj.isRemote) {
this.dataWatcher.updateObject(13, (byte)(this.getAttackTarget() != null ? 1 : 0));
}
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
@ -124,4 +144,10 @@ public class EntitySiegeZombie extends EntityMob {
super.readEntityFromNBT(nbt);
this.setTier(SiegeTier.tiers[nbt.getInteger("siegeTier")]);
}
@Override
public IEntityLivingData onSpawnWithEgg(IEntityLivingData data) {
this.setTier(SiegeTier.tiers[rand.nextInt(SiegeTier.getLength())]);
return super.onSpawnWithEgg(data);
}
}

View File

@ -23,8 +23,8 @@ public class SiegeTier {
public static SiegeTier DEFAULT_BUFF;
public static SiegeTier CLAY;
public static SiegeTier IRON;
public static SiegeTier STONE;
public static SiegeTier IRON;
public static SiegeTier SILVER;
public static SiegeTier GOLD;
public static SiegeTier DESH;
@ -36,11 +36,11 @@ public class SiegeTier {
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(1.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(1.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(1.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(2F) .setFF();
DNT = new SiegeTier(500, "dnt") .addDrop(new ItemStack(ModItems.coin_siege, 1, 8)) .setDR(0.9F) .setDT(20F) .setNF() .setFP() .setDMG(100F) .setSP(2F) .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();
}
public int id;
@ -49,7 +49,7 @@ public class SiegeTier {
public float health = 20F;
public String name = "";
public float damageMod = 1F;
public float speedMod = 1F;
public float speedMod = 0F;
public boolean fireProof = false;
public boolean noFall = false;
public boolean noFriendlyFire = false;

View File

@ -32,7 +32,9 @@ public class HbmLivingProps implements IExtendedEntityProperties {
private float radiation;
private float digamma;
private int asbestos;
public static final int maxAsbestos = 60 * 60 * 20;
private int blacklung;
public static final int maxBlacklung = 60 * 60 * 20;
private float radEnv;
private float radBuf;
private int bombTimer;
@ -175,7 +177,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
public static void setAsbestos(EntityLivingBase entity, int asbestos) {
getData(entity).asbestos = asbestos;
if(asbestos >= 60 * 60 * 20) {
if(asbestos >= maxAsbestos) {
getData(entity).asbestos = 0;
entity.attackEntityFrom(ModDamageSource.asbestos, 1000);
}
@ -194,7 +196,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
public static void setBlackLung(EntityLivingBase entity, int blacklung) {
getData(entity).blacklung = blacklung;
if(blacklung >= 60 * 60 * 20) {
if(blacklung >= maxBlacklung) {
getData(entity).asbestos = 0;
entity.attackEntityFrom(ModDamageSource.asbestos, 1000);
}
@ -235,6 +237,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
props.setInteger("hfr_asbestos", asbestos);
props.setInteger("hfr_bomb", bombTimer);
props.setInteger("hfr_contagion", contagion);
props.setInteger("hfr_blacklung", blacklung);
props.setInteger("hfr_cont_count", this.contamination.size());
@ -256,6 +259,7 @@ public class HbmLivingProps implements IExtendedEntityProperties {
asbestos = props.getInteger("hfr_asbestos");
bombTimer = props.getInteger("hfr_bomb");
contagion = props.getInteger("hfr_contagion");
blacklung = props.getInteger("hfr_blacklung");
int cont = props.getInteger("hfr_cont_count");

View File

@ -62,16 +62,17 @@ public class EntityEffectHandler {
ExplosionNukeSmall.explode(entity.worldObj, entity.posX, entity.posY, entity.posZ, ExplosionNukeSmall.medium);
}
}
if(GeneralConfig.enable528 && entity instanceof EntityLivingBase && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
entity.setFire(5);
}
}
handleContamination(entity);
handleContagion(entity);
handleRadiation(entity);
handleDigamma(entity);
if(GeneralConfig.enable528 && entity instanceof EntityLivingBase && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) {
entity.setFire(5);
}
handleLungDisease(entity);
}
private static void handleContamination(EntityLivingBase entity) {
@ -133,12 +134,14 @@ public class EntityEffectHandler {
if((world.getTotalWorldTime() + r600) % 600 < 20) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "bloodvomit");
nbt.setString("type", "vomit");
nbt.setString("mode", "blood");
nbt.setInteger("count", 25);
nbt.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
if((world.getTotalWorldTime() + r600) % 600 == 1) {
world.playSoundEffect(ix, iy, iz, "hbm:entity.vomit", 1.0F, 1.0F);
world.playSoundEffect(ix, iy, iz, "hbm:player.vomit", 1.0F, 1.0F);
entity.addPotionEffect(new PotionEffect(Potion.hunger.id, 60, 19));
}
}
@ -147,11 +150,13 @@ public class EntityEffectHandler {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vomit");
nbt.setString("mode", "normal");
nbt.setInteger("count", 15);
nbt.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
if((world.getTotalWorldTime() + r1200) % 1200 == 1) {
world.playSoundEffect(ix, iy, iz, "hbm:entity.vomit", 1.0F, 1.0F);
world.playSoundEffect(ix, iy, iz, "hbm:player.vomit", 1.0F, 1.0F);
entity.addPotionEffect(new PotionEffect(Potion.hunger.id, 60, 19));
}
@ -297,12 +302,14 @@ public class EntityEffectHandler {
if(contagion < 30 * minute && (contagion + entity.getEntityId()) % 200 < 20) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "bloodvomit");
nbt.setString("type", "vomit");
nbt.setString("mode", "blood");
nbt.setInteger("count", 25);
nbt.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
if((contagion + entity.getEntityId()) % 200 == 19)
world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:entity.vomit", 1.0F, 1.0F);
world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:player.vomit", 1.0F, 1.0F);
}
//end of contagion, drop dead
@ -312,4 +319,61 @@ public class EntityEffectHandler {
}
}
}
private static void handleLungDisease(EntityLivingBase entity) {
if(entity.worldObj.isRemote)
return;
double blacklung = Math.min(HbmLivingProps.getBlackLung(entity), HbmLivingProps.maxBlacklung);
double asbestos = Math.min(HbmLivingProps.getAsbestos(entity), HbmLivingProps.maxAsbestos);
boolean coughs = blacklung / HbmLivingProps.maxBlacklung > 0.25D || asbestos / HbmLivingProps.maxAsbestos > 0.25D;
if(!coughs)
return;
boolean coughsCoal = blacklung / HbmLivingProps.maxBlacklung > 0.5D;
boolean coughsALotOfCoal = blacklung / HbmLivingProps.maxBlacklung > 0.8D;
boolean coughsBlood = asbestos / HbmLivingProps.maxAsbestos > 0.75D || blacklung / HbmLivingProps.maxBlacklung > 0.75D;
double blacklungDelta = 1D - (blacklung / (double)HbmLivingProps.maxBlacklung);
double asbestosDelta = 1D - (asbestos / (double)HbmLivingProps.maxAsbestos);
double total = 1 - (blacklungDelta * asbestosDelta);
int freq = Math.max((int) (1000 - 950 * total), 20);
World world = entity.worldObj;
if(total > 0.75D) {
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 100, 2));
}
if(total > 0.95D) {
entity.addPotionEffect(new PotionEffect(Potion.confusion.id, 100, 0));
}
if(world.getTotalWorldTime() % freq == entity.getEntityId() % freq) {
world.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:player.cough", 1.0F, 1.0F);
if(coughsBlood) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vomit");
nbt.setString("mode", "blood");
nbt.setInteger("count", 5);
nbt.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
}
if(coughsCoal) {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "vomit");
nbt.setString("mode", "smoke");
nbt.setInteger("count", coughsALotOfCoal ? 50 : 10);
nbt.setInteger("entity", entity.getEntityId());
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(nbt, 0, 0, 0), new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 25));
}
}
}
}

View File

@ -3286,7 +3286,7 @@ public class ModItems {
coin_maskman = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_maskman").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_maskman");
coin_worm = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_worm").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_worm");
coin_ufo = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("coin_ufo").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_ufo");
coin_siege = new ItemSiegeCoin().setUnlocalizedName("coin_siege").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":coin_siege");
coin_siege = new ItemSiegeCoin().setUnlocalizedName("coin_siege").setCreativeTab(MainRegistry.consumableTab);
recycled_ground = new Item().setUnlocalizedName("recycled_ground").setCreativeTab(null).setTextureName(RefStrings.MODID + ":recycled_ground");
recycled_rock = new Item().setUnlocalizedName("recycled_rock").setCreativeTab(null).setTextureName(RefStrings.MODID + ":recycled_rock");

View File

@ -3,23 +3,48 @@ package com.hbm.items.special;
import java.util.List;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
public class ItemSiegeCoin extends Item {
@SideOnly(Side.CLIENT)
private IIcon[] icons;
public ItemSiegeCoin() {
this.hasSubtypes = true;
this.setMaxDamage(0);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int meta) {
return this.icons[meta % icons.length];
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister p_94581_1_) {
this.itemIcon = Items.stick.getIconFromDamage(0);
icons = new IIcon[SiegeTier.getLength()];
for(int i = 0; i < SiegeTier.getLength(); i++) {
icons[i] = p_94581_1_.registerIcon(RefStrings.MODID + ":coin_siege_" + SiegeTier.tiers[i].name);
}
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.uncommon;

View File

@ -1286,6 +1286,7 @@ public class ClientProxy extends ServerProxy {
if("vomit".equals(type)) {
Entity e = world.getEntityByID(data.getInteger("entity"));
int count = data.getInteger("count");
if(e instanceof EntityLivingBase) {
@ -1295,30 +1296,25 @@ public class ClientProxy extends ServerProxy {
Vec3 vec = e.getLookVec();
for(int i = 0; i < 25; i++) {
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.yCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.zCoord + rand.nextGaussian() * 0.2) * 0.2, Blocks.stained_hardened_clay, (rand.nextBoolean() ? 5 : 13));
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
}
}
if("bloodvomit".equals(type)) {
Entity e = world.getEntityByID(data.getInteger("entity"));
if(e instanceof EntityLivingBase) {
double ix = e.posX;
double iy = e.posY - e.getYOffset() + e.getEyeHeight() + (e instanceof EntityPlayer ? 1 : 0);
double iz = e.posZ;
Vec3 vec = e.getLookVec();
for(int i = 0; i < 25; i++) {
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.yCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.zCoord + rand.nextGaussian() * 0.2) * 0.2, Blocks.redstone_block, 0);
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
for(int i = 0; i < count; i++) {
if("normal".equals(data.getString("mode"))) {
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.yCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.zCoord + rand.nextGaussian() * 0.2) * 0.2, Blocks.stained_hardened_clay, (rand.nextBoolean() ? 5 : 13));
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
if("blood".equals(data.getString("mode"))) {
EntityFX fx = new net.minecraft.client.particle.EntityBlockDustFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.yCoord + rand.nextGaussian() * 0.2) * 0.2, (vec.zCoord + rand.nextGaussian() * 0.2) * 0.2, Blocks.redstone_block, 0);
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 150 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
if("smoke".equals(data.getString("mode"))) {
EntityFX fx = new net.minecraft.client.particle.EntitySmokeFX(world, ix, iy, iz, (vec.xCoord + rand.nextGaussian() * 0.1) * 0.05, (vec.yCoord + rand.nextGaussian() * 0.1) * 0.05, (vec.zCoord + rand.nextGaussian() * 0.1) * 0.05, 0.2F);
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(10), "particleMaxAge", "field_70547_e");
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
}
}
}
}

View File

@ -57,6 +57,7 @@ import com.hbm.entity.missile.*;
import com.hbm.entity.mob.*;
import com.hbm.entity.mob.botprime.EntityBOTPrimeBody;
import com.hbm.entity.mob.botprime.EntityBOTPrimeHead;
import com.hbm.entity.mob.siege.EntitySiegeZombie;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;
@ -468,6 +469,7 @@ public class MainRegistry {
EntityRegistry.registerGlobalEntityID(EntityQuackos.class, "entity_elder_one", EntityRegistry.findGlobalUniqueEntityId(), 0xd0d0d0, 0xFFBF00);
EntityRegistry.registerGlobalEntityID(EntityFBI.class, "entity_ntm_fbi", EntityRegistry.findGlobalUniqueEntityId(), 0x008000, 0x404040);
EntityRegistry.registerGlobalEntityID(EntityRADBeast.class, "entity_ntm_radiation_blaze", EntityRegistry.findGlobalUniqueEntityId(), 0x303030, 0x008000);
EntityRegistry.registerGlobalEntityID(EntitySiegeZombie.class, "entity_meme_zombie", EntityRegistry.findGlobalUniqueEntityId(), 0x303030, 0x008000);
ForgeChunkManager.setForcedChunkLoadingCallback(this, new LoadingCallback() {

View File

@ -105,6 +105,7 @@ import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.EntityEvent;
@ -1063,7 +1064,16 @@ public class ModEventHandler {
}
if(event.block == Blocks.coal_ore || event.block == ModBlocks.ore_lignite) {
event.world.setBlock(event.x, event.y, event.z, ModBlocks.gas_coal);
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
int x = event.x + dir.offsetX;
int y = event.y + dir.offsetY;
int z = event.z + dir.offsetZ;
if(event.world.rand.nextInt(2) == 0 && event.world.getBlock(x, y, z) == Blocks.air)
event.world.setBlock(x, y, z, ModBlocks.gas_coal);
}
}
}

View File

@ -3,11 +3,14 @@ package com.hbm.modules;
import java.util.List;
import com.hbm.config.GeneralConfig;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.inventory.BreederRecipes;
import com.hbm.items.ModItems;
import com.hbm.util.ArmorRegistry;
import com.hbm.util.ArmorUtil;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.I18nUtil;
import com.hbm.util.ArmorRegistry.HazardClass;
import com.hbm.util.ContaminationUtil.ContaminationType;
import com.hbm.util.ContaminationUtil.HazardType;
@ -95,7 +98,8 @@ public class ItemHazardModule {
entity.setFire(this.fire);
if(this.asbestos)
ContaminationUtil.applyAsbestos(entity, (int) (1 * mod));
if(!ArmorRegistry.hasProtection(entity, 3, HazardClass.PARTICLE_FINE))
HbmLivingProps.incrementAsbestos(entity, (int) (1 * mod));
if(this.hydro && currentItem) {

View File

@ -3,19 +3,17 @@ package com.hbm.render.entity.mob;
import com.hbm.entity.mob.siege.EntitySiegeZombie;
import com.hbm.entity.mob.siege.SiegeTier;
import com.hbm.lib.RefStrings;
import com.hbm.render.model.ModelSiegeZombie;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.model.ModelZombie;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.ResourceLocation;
public class RenderSiegeZombie extends RenderBiped {
public RenderSiegeZombie() {
super(new ModelZombie(), 0.5F, 1.0F);
super(new ModelSiegeZombie(0.0F), 0.5F, 1.0F);
}
@Override
@ -35,7 +33,7 @@ public class RenderSiegeZombie extends RenderBiped {
@Override
protected void func_82421_b() {
this.field_82423_g = new ModelZombie(1.0F, true); //armor slots 1, 2, 4
this.field_82425_h = new ModelZombie(0.5F, true); //armor slot 3
this.field_82423_g = new ModelSiegeZombie(1.0F); //armor slots 1, 2, 4
this.field_82425_h = new ModelSiegeZombie(0.5F); //armor slot 3
}
}

View File

@ -0,0 +1,35 @@
package com.hbm.render.model;
import com.hbm.entity.mob.siege.EntitySiegeZombie;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelSiegeZombie extends ModelBiped {
public ModelSiegeZombie(float p_i1168_1_) {
super(p_i1168_1_, 0.0F, 64, 32);
}
public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity entity) {
super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, entity);
if(entity instanceof EntitySiegeZombie && ((EntitySiegeZombie)entity).getDataWatcher().getWatchableObjectByte(13) != 0) {
float f6 = MathHelper.sin(this.onGround * (float) Math.PI);
float f7 = MathHelper.sin((1.0F - (1.0F - this.onGround) * (1.0F - this.onGround)) * (float) Math.PI);
this.bipedRightArm.rotateAngleZ = 0.0F;
this.bipedLeftArm.rotateAngleZ = 0.0F;
this.bipedRightArm.rotateAngleY = -(0.1F - f6 * 0.6F);
this.bipedLeftArm.rotateAngleY = 0.1F - f6 * 0.6F;
this.bipedRightArm.rotateAngleX = -((float) Math.PI / 2F);
this.bipedLeftArm.rotateAngleX = -((float) Math.PI / 2F);
this.bipedRightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
this.bipedLeftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
this.bipedRightArm.rotateAngleZ += MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(p_78087_3_ * 0.09F) * 0.05F + 0.05F;
this.bipedRightArm.rotateAngleX += MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
this.bipedLeftArm.rotateAngleX -= MathHelper.sin(p_78087_3_ * 0.067F) * 0.05F;
}
}
}

View File

@ -181,7 +181,6 @@
"entity.ducc": {"category": "neutral", "sounds": ["entity/ducc1", "entity/ducc2"]},
"entity.slicer": {"category": "neutral", "sounds": ["entity/slicer1", "entity/slicer2", "entity/slicer3", "entity/slicer4"]},
"entity.megaquacc": {"category": "hostile", "sounds": [{"name": "entity/megaquacc", "stream": false}]},
"entity.vomit": {"category": "player", "sounds": [{"name": "entity/vomit", "stream": false}]},
"entity.ufoBeam": {"category": "hostile", "sounds": [{"name": "entity/ufoBeamShort", "stream": false}]},
"entity.ufoBlast": {"category": "hostile", "sounds": [{"name": "entity/ufoBlast", "stream": false}]},
"entity.siegeIdle": {"category": "hostile", "sounds": ["entity/siegeIdle1", "entity/siegeIdle2"]},
@ -194,6 +193,9 @@
"step.iron": {"category": "player", "sounds": ["footsteps/iron1", "footsteps/iron2", "footsteps/iron3", "footsteps/iron4"]},
"step.metalBlock": {"category": "block", "sounds": ["footsteps/metalStep1", "footsteps/metalStep2", "footsteps/metalStep3", "footsteps/metalStep4"]},
"player.vomit": {"category": "player", "sounds": [{"name": "player/vomit", "stream": false}]},
"player.cough": {"category": "player", "sounds": ["player/cough1", "player/cough2", "player/cough3", "player/cough4"]},
"potatos.random": {"category": "player", "sounds": ["potatos/randResponse0", "potatos/randResponse1", "potatos/randResponse2", "potatos/randResponse3", "potatos/randResponse4", "potatos/randResponse5", "potatos/randResponse6", "potatos/randResponse7"]},
"fm.clap": {"category": "block", "sounds": [{"name": "clap", "stream": false}]},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B