broadcaster mercy, siege mobs stuff, meteor clipping fix

and thus, meteors shall no longer move through roofs
This commit is contained in:
Boblet 2021-09-09 15:18:25 +02:00
parent 0a40e5ae6c
commit 7bcbfd4599
21 changed files with 256 additions and 52 deletions

View File

@ -2010,7 +2010,7 @@ public class ModBlocks {
gas_radon_tomb = new BlockGasRadonTomb().setBlockName("gas_radon_tomb").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_radon_tomb");
gas_monoxide = new BlockGasMonoxide().setBlockName("gas_monoxide").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_monoxide");
gas_asbestos = new BlockGasAsbestos().setBlockName("gas_asbestos").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_asbestos");
gas_coal = new BlockGasAsbestos().setBlockName("gas_coal").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_coal");
gas_coal = new BlockGasCoal().setBlockName("gas_coal").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_coal");
gas_flammable = new BlockGasFlammable().setBlockName("gas_flammable").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_flammable");
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
@ -2020,7 +2020,7 @@ public class ModBlocks {
absorber_pink = new BlockAbsorber(Material.iron, 10000F).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
volcano_core = new BlockVolcano().setBlockName("volcano_core").setHardness(15.0F).setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_core");
volcano_core = new BlockVolcano().setBlockName("volcano_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_core");
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);

View File

@ -38,7 +38,7 @@ public class BlockGasAsbestos extends BlockGasBase {
EntityLivingBase living = (EntityLivingBase) entity;
if(!ArmorRegistry.hasProtection(living, 3, HazardClass.PARTICLE_COARSE))
if(!ArmorRegistry.hasProtection(living, 3, HazardClass.PARTICLE_FINE))
HbmLivingProps.incrementAsbestos(living, 1);
}
}

View File

@ -0,0 +1,67 @@
package com.hbm.blocks.gas;
import java.util.Random;
import com.hbm.extprop.HbmLivingProps;
import com.hbm.util.ArmorRegistry;
import com.hbm.util.ArmorRegistry.HazardClass;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockGasCoal extends BlockGasBase {
public BlockGasCoal() {
super(0.2F, 0.2F, 0.2F);
}
@Override
@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);
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
if(entity instanceof EntityLivingBase) {
EntityLivingBase living = (EntityLivingBase) entity;
if(!ArmorRegistry.hasProtection(living, 3, HazardClass.PARTICLE_COARSE))
HbmLivingProps.incrementBlackLung(living, 1);
}
}
@Override
public ForgeDirection getFirstDirection(World world, int x, int y, int z) {
if(world.rand.nextInt(5) == 0)
return ForgeDirection.DOWN;
return ForgeDirection.getOrientation(world.rand.nextInt(6));
}
@Override
public ForgeDirection getSecondDirection(World world, int x, int y, int z) {
return this.randomHorizontal(world);
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(!world.isRemote && rand.nextInt(30) == 0) {
world.setBlockToAir(x, y, z);
return;
}
super.updateTick(world, x, y, z, rand);
}
}

View File

@ -12,7 +12,10 @@ import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.world.World;
public class EntitySiegeZombie extends EntityMob {
@ -45,6 +48,10 @@ public class EntitySiegeZombie extends EntityMob {
if(tier.noFall && source == DamageSource.fall)
return false;
//noFF can't be harmed by other mobs
if(tier.noFriendlyFire && source instanceof EntityDamageSource && !(((EntityDamageSource) source).getEntity() instanceof EntityPlayer))
return false;
damage -= tier.dt;
if(damage < 0) {
@ -95,4 +102,26 @@ public class EntitySiegeZombie extends EntityMob {
protected String getDeathSound() {
return "hbm:entity.siegeDeath";
}
@Override
protected void dropFewItems(boolean byPlayer, int fortune) {
if(byPlayer) {
for(ItemStack drop : this.getTier().dropItem) {
this.entityDropItem(drop.copy(), 0F);
}
}
}
@Override
public void writeEntityToNBT(NBTTagCompound nbt) {
super.writeEntityToNBT(nbt);
nbt.setInteger("siegeTier", this.getTier().id);
}
@Override
public void readEntityFromNBT(NBTTagCompound nbt) {
super.readEntityFromNBT(nbt);
this.setTier(SiegeTier.tiers[nbt.getInteger("siegeTier")]);
}
}

View File

@ -1,8 +1,11 @@
package com.hbm.entity.mob.siege;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import com.hbm.items.ModItems;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -14,6 +17,10 @@ public class SiegeTier {
public static SiegeTier[] tiers = new SiegeTier[100];
private static int nextID = 0;
public static int getLength() {
return nextID;
}
public static SiegeTier DEFAULT_BUFF;
public static SiegeTier CLAY;
public static SiegeTier IRON;
@ -25,36 +32,39 @@ public class SiegeTier {
public static SiegeTier DNT;
public static void registerTiers() {
DEFAULT_BUFF = new SiegeTier(20) .setDR(0.2F) .setDMG(2F);
CLAY = new SiegeTier(30) .setDR(0.2F) .setDMG(3F);
STONE = new SiegeTier(40) .setDR(0.3F) .setDT(1F) .setFP() .setDMG(5F);
IRON = new SiegeTier(50) .setDR(0.3F) .setDT(2F) .setFP() .setDMG(7.5F);
SILVER = new SiegeTier(70) .setDR(0.5F) .setDT(3F) .setNF() .setFP() .setDMG(10F) .setSP(1.5F);
GOLD = new SiegeTier(100) .setDR(0.5F) .setDT(5F) .setNF() .setFP() .setDMG(15F) .setSP(1.5F);
DESH = new SiegeTier(150) .setDR(0.7F) .setDT(7F) .setNF() .setFP() .setDMG(25F) .setSP(1.5F);
SCHRAB = new SiegeTier(250) .setDR(0.7F) .setDT(10F) .setNF() .setFP() .setDMG(50F) .setSP(2F);
DNT = new SiegeTier(500) .setDR(0.9F) .setDT(20F) .setNF() .setFP() .setDMG(100F) .setSP(2F);
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(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();
}
public int id;
public float dt = 0F;
public float dr = 0F;
public float health = 20F;
public String name = "";
public float damageMod = 1F;
public float speedMod = 1F;
public boolean fireProof = false;
public boolean noFall = false;
public ItemStack dropItem = null;
public boolean noFriendlyFire = false;
public List<ItemStack> dropItem = new ArrayList();
//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;
public SiegeTier(float baseHealth) {
public SiegeTier(float baseHealth, String name) {
this.id = nextID;
SiegeTier.tiers[this.id] = this;
nextID++;
this.health = baseHealth;
this.name = name;
}
private SiegeTier setDT(float dt) {
@ -87,13 +97,17 @@ public class SiegeTier {
return this;
}
private SiegeTier setDrop(Item drop) {
this.dropItem = new ItemStack(drop);
private SiegeTier setFF() {
this.noFriendlyFire = true;
return this;
}
private SiegeTier setDrop(ItemStack drop) {
this.dropItem = drop;
private SiegeTier addDrop(Item drop) {
return addDrop(new ItemStack(drop));
}
private SiegeTier addDrop(ItemStack drop) {
this.dropItem.add(drop);
return this;
}

View File

@ -24,37 +24,24 @@ public class EntityMeteor extends EntityThrowable {
@Override
public void onUpdate() {
this.lastTickPosX = this.prevPosX = posX;
this.lastTickPosY = this.prevPosY = posY;
this.lastTickPosZ = this.prevPosZ = posZ;
this.setPosition(posX + this.motionX, posY + this.motionY, posZ + this.motionZ);
/*
* this.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ =
* this.posZ;
*
* this.posX += this.motionX; this.posY += this.motionY; this.posZ +=
* this.motionZ;
*/
this.moveEntity(motionX, motionY, motionZ);
this.motionY -= 0.03;
if(motionY < -2.5)
motionY = -2.5;
if(this.worldObj.getBlock((int) this.posX, (int) this.posY, (int) this.posZ) != Blocks.air) {
if(!this.worldObj.isRemote) {
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5 + rand.nextFloat(), true);
if(GeneralConfig.enableMeteorTails) {
ExplosionLarge.spawnParticles(worldObj, posX, posY + 5, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX + 5, posY, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX - 5, posY, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ + 5, 75);
ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ - 5, 75);
}
(new Meteorite()).generate(worldObj, rand, (int) Math.round(this.posX - 0.5D), (int) Math.round(this.posY - 0.5D), (int) Math.round(this.posZ - 0.5D));
if(!this.worldObj.isRemote && this.onGround) {
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5 + rand.nextFloat(), true);
if(GeneralConfig.enableMeteorTails) {
ExplosionLarge.spawnParticles(worldObj, posX, posY + 5, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX + 5, posY, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX - 5, posY, posZ, 75);
ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ + 5, 75);
ExplosionLarge.spawnParticles(worldObj, posX, posY, posZ - 5, 75);
}
(new Meteorite()).generate(worldObj, rand, (int) Math.round(this.posX - 0.5D), (int) Math.round(this.posY - 0.5D), (int) Math.round(this.posZ - 0.5D));
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
this.setDead();
}
@ -95,5 +82,4 @@ public class EntityMeteor extends EntityThrowable {
public float getBrightness(float p_70013_1_) {
return 1.0F;
}
}

View File

@ -71,6 +71,7 @@ public class OreDictManager {
OreDictionary.registerOre("ingotGold198", ModItems.ingot_au198);
OreDictionary.registerOre("ingotColtan", ModItems.fragment_coltan);
OreDictionary.registerOre("ingotTantalum", ModItems.ingot_tantalium);
OreDictionary.registerOre("ingotNiobium", ModItems.ingot_niobium);
OreDictionary.registerOre("crystalCinnabar", ModItems.cinnebar);

View File

@ -235,6 +235,7 @@ public class ModItems {
public static Item nugget_bismuth;
public static Item ingot_tantalium;
public static Item nugget_tantalium;
public static Item ingot_niobium;
public static Item plate_lead;
public static Item nugget_schrabidium;
public static Item plate_schrabidium;
@ -895,6 +896,7 @@ public class ModItems {
public static Item coin_maskman;
public static Item coin_worm;
public static Item coin_ufo;
public static Item coin_siege;
public static Item rod_empty;
public static Item rod_uranium;
@ -2669,6 +2671,7 @@ public class ModItems {
nugget_bismuth = new Item().setUnlocalizedName("nugget_bismuth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_bismuth");
ingot_tantalium = new ItemCustomLore().setUnlocalizedName("ingot_tantalium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_tantalium");
nugget_tantalium = new ItemCustomLore().setUnlocalizedName("nugget_tantalium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_tantalium");
ingot_niobium = new Item().setUnlocalizedName("ingot_niobium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_niobium");
nugget_schrabidium = new ItemHazard(ItemHazard.sa326 * ItemHazard.nugget, false, true).setUnlocalizedName("nugget_schrabidium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_schrabidium");
nugget_beryllium = new Item().setUnlocalizedName("nugget_beryllium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_beryllium");
hazmat_cloth = new Item().setUnlocalizedName("hazmat_cloth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":hazmat_cloth");
@ -3283,6 +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");
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");
@ -4337,10 +4341,10 @@ public class ModItems {
battery_sc_gold = new ItemSelfcharger(2500).setUnlocalizedName("battery_sc_gold").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_gold");
battery_sc_americium = new ItemSelfcharger(10000).setUnlocalizedName("battery_sc_americium").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_sc_americium");
battery_potato = new ItemBattery(100, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
battery_potatos = new ItemPotatos(5000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
battery_su = new ItemBattery(1500, 0, 100).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su");
battery_su_l = new ItemBattery(3500, 0, 100).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l");
battery_potato = new ItemBattery(1000, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato");
battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos");
battery_su = new ItemBattery(500000, 0, 1000).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su");
battery_su_l = new ItemBattery(100000, 0, 1000).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l");
battery_steam = new ItemBattery(60000, 300, 6000).setUnlocalizedName("battery_steam").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam");
battery_steam_large = new ItemBattery(100000, 500, 10000).setUnlocalizedName("battery_steam_large").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam_large");
hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery");
@ -5383,6 +5387,7 @@ public class ModItems {
GameRegistry.registerItem(ingot_lead, ingot_lead.getUnlocalizedName());
GameRegistry.registerItem(ingot_bismuth, ingot_bismuth.getUnlocalizedName());
GameRegistry.registerItem(ingot_tantalium, ingot_tantalium.getUnlocalizedName());
GameRegistry.registerItem(ingot_niobium, ingot_niobium.getUnlocalizedName());
GameRegistry.registerItem(ingot_beryllium, ingot_beryllium.getUnlocalizedName());
GameRegistry.registerItem(ingot_cobalt, ingot_cobalt.getUnlocalizedName());
GameRegistry.registerItem(ingot_boron, ingot_boron.getUnlocalizedName());
@ -7335,6 +7340,7 @@ public class ModItems {
GameRegistry.registerItem(coin_maskman, coin_maskman.getUnlocalizedName());
GameRegistry.registerItem(coin_worm, coin_worm.getUnlocalizedName());
GameRegistry.registerItem(coin_ufo, coin_ufo.getUnlocalizedName());
GameRegistry.registerItem(coin_siege, coin_siege.getUnlocalizedName());
GameRegistry.registerItem(medal_liquidator, medal_liquidator.getUnlocalizedName());
GameRegistry.registerItem(v1, v1.getUnlocalizedName());

View File

@ -0,0 +1,44 @@
package com.hbm.items.special;
import java.util.List;
import com.hbm.entity.mob.siege.SiegeTier;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemSiegeCoin extends Item {
public ItemSiegeCoin() {
this.hasSubtypes = true;
this.setMaxDamage(0);
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.uncommon;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < SiegeTier.getLength(); i++) {
list.add(new ItemStack(item, 1, i));
}
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(EnumChatFormatting.YELLOW + "Tier " + (stack.getItemDamage() + 1));
}
}

View File

@ -43,8 +43,8 @@ import com.hbm.entity.item.EntityMovingItem;
import com.hbm.entity.logic.*;
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.botprime.*;
import com.hbm.entity.mob.siege.*;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;
import com.hbm.handler.HbmKeybinds;
@ -531,6 +531,7 @@ public class ClientProxy extends ServerProxy {
RenderingRegistry.registerEntityRenderingHandler(EntityRADBeast.class, new RenderRADBeast());
RenderingRegistry.registerEntityRenderingHandler(EntityBlockSpider.class, new RenderBlockSpider());
RenderingRegistry.registerEntityRenderingHandler(EntityUFO.class, new RenderUFO());
RenderingRegistry.registerEntityRenderingHandler(EntitySiegeZombie.class, new RenderSiegeZombie());
//"particles"
RenderingRegistry.registerEntityRenderingHandler(EntitySmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.smoke1, ModItems.smoke2, ModItems.smoke3, ModItems.smoke4, ModItems.smoke5, ModItems.smoke6, ModItems.smoke7, ModItems.smoke8 }));
RenderingRegistry.registerEntityRenderingHandler(EntityBSmokeFX.class, new MultiCloudRenderer(new Item[] { ModItems.b_smoke1, ModItems.b_smoke2, ModItems.b_smoke3, ModItems.b_smoke4, ModItems.b_smoke5, ModItems.b_smoke6, ModItems.b_smoke7, ModItems.b_smoke8 }));

View File

@ -965,6 +965,7 @@ public class CraftingManager {
GameRegistry.addSmelting(ModItems.powder_tcalloy, new ItemStack(ModItems.ingot_tcalloy), 1.0F);
GameRegistry.addSmelting(ModItems.powder_au198, new ItemStack(ModItems.ingot_au198), 1.0F);
GameRegistry.addSmelting(ModItems.powder_tantalium, new ItemStack(ModItems.ingot_tantalium), 1.0F);
GameRegistry.addSmelting(ModItems.powder_niobium, new ItemStack(ModItems.ingot_niobium), 1.0F);
GameRegistry.addSmelting(ModItems.powder_coal, new ItemStack(ModItems.coke), 1.0F);
GameRegistry.addSmelting(ModItems.briquette_lignite, new ItemStack(ModItems.coke), 1.0F);
@ -1033,6 +1034,8 @@ public class CraftingManager {
GameRegistry.addSmelting(ModItems.ingot_meteorite_forged, ItemHot.heatUp(new ItemStack(ModItems.ingot_meteorite_forged)), 1.0F);
GameRegistry.addSmelting(ModItems.blade_meteorite, ItemHot.heatUp(new ItemStack(ModItems.blade_meteorite)), 1.0F);
GameRegistry.addSmelting(ModItems.meteorite_sword, ItemHot.heatUp(new ItemStack(ModItems.meteorite_sword_seared)), 1.0F);
GameRegistry.addSmelting(ModItems.battery_steam, ItemBattery.getFullBattery(ModItems.battery_steam), 1.0F);
for(int i = 0; i < 10; i++)
GameRegistry.addSmelting(new ItemStack(ModItems.ingot_steel_dusted, 1, i), ItemHot.heatUp(new ItemStack(ModItems.ingot_steel_dusted, 1, i)), 1.0F);

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.SiegeTier;
import com.hbm.entity.particle.*;
import com.hbm.entity.projectile.*;
import com.hbm.handler.*;
@ -247,6 +248,7 @@ public class MainRegistry {
HTTPHandler.loadStats();
CraftingManager.mainRegistry();
AssemblerRecipes.preInit(PreEvent.getModConfigurationDirectory());
SiegeTier.registerTiers();
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");

View File

@ -173,6 +173,9 @@ public class ModEventHandler {
EntityPlayer player = (EntityPlayer) event.entity;
HbmPlayerProps.getData(player); //this already calls the register method if it's null so no further action required
if(event.entity == MainRegistry.proxy.me())
BlockAshes.ashes = 0;
}
if(event.entity instanceof EntityLivingBase) {
@ -1058,6 +1061,10 @@ public class ModEventHandler {
event.getPlayer().triggerAchievement(MainRegistry.achStratum);
event.setExpToDrop(500);
}
if(event.block == Blocks.coal_ore || event.block == ModBlocks.ore_lignite) {
event.world.setBlock(event.x, event.y, event.z, ModBlocks.gas_coal);
}
}
private static final String hash = "41eb77f138ce350932e33b6b26b233df9aad0c0c80c6a49cb9a54ddd8fae3f83";

View File

@ -0,0 +1,41 @@
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 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);
}
@Override
protected ResourceLocation getEntityTexture(EntityLiving entity) {
return this.getEntityTexture((EntitySiegeZombie) entity);
}
@Override
protected ResourceLocation getEntityTexture(Entity entity) {
return this.getEntityTexture((EntitySiegeZombie) entity);
}
protected ResourceLocation getEntityTexture(EntitySiegeZombie entity) {
SiegeTier tier = entity.getTier();
return new ResourceLocation(RefStrings.MODID + ":textures/entity/siege_" + tier.name + ".png");
}
@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
}
}

View File

@ -29,11 +29,14 @@ public class TileEntityBroadcaster extends TileEntity {
double d = Math.sqrt(Math.pow(e.posX - (xCoord + 0.5), 2) + Math.pow(e.posY - (yCoord + 0.5), 2) + Math.pow(e.posZ - (zCoord + 0.5), 2));
if(d <= 25) {
double t = (25 - d) / 25 * 10;
e.attackEntityFrom(ModDamageSource.broadcast, (float) t);
if(e.getActivePotionEffect(Potion.confusion) == null || e.getActivePotionEffect(Potion.confusion).getDuration() < 100)
e.addPotionEffect(new PotionEffect(Potion.confusion.id, 300, 0));
}
if(d <= 15) {
double t = (15 - d) / 15 * 10;
e.attackEntityFrom(ModDamageSource.broadcast, (float) t);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B