the full CIWS experience

This commit is contained in:
Bob 2021-03-21 21:42:52 +01:00
parent 243c6a9cd6
commit 3ae4c3757a
49 changed files with 4762 additions and 229 deletions

View File

@ -820,6 +820,8 @@ public class ModBlocks {
public static final int guiID_tauon = 106;
public static Block turret_richard;
public static final int guiID_richard = 108;
public static Block turret_howard;
public static final int guiID_howard = 112;
public static Block book_guide;
@ -1098,7 +1100,7 @@ public class ModBlocks {
gravel_obsidian = new BlockFalling(Material.iron).setBlockName("gravel_obsidian").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(5.0F).setResistance(600.0F).setBlockTextureName(RefStrings.MODID + ":gravel_obsidian");
gravel_diamond = new BlockFalling(Material.sand).setBlockName("gravel_diamond").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeGravel).setHardness(0.6F).setBlockTextureName(RefStrings.MODID + ":gravel_diamond");
asphalt = new BlockGeneric(Material.rock).setBlockName("asphalt").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":asphalt");
asphalt = new BlockSpeedy(Material.rock, 1.15).setBlockName("asphalt").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":asphalt");
reinforced_brick = new BlockGeneric(Material.rock).setBlockName("reinforced_brick").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(8000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_brick");
reinforced_glass = new BlockNTMGlass(0, RefStrings.MODID + ":reinforced_glass", Material.rock).setBlockName("reinforced_glass").setCreativeTab(MainRegistry.blockTab).setLightOpacity(0).setHardness(15.0F).setResistance(200.0F);
@ -1494,13 +1496,13 @@ public class ModBlocks {
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
turret_light = new TurretLight(Material.iron).setBlockName("turret_light").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_light");
turret_heavy = new TurretHeavy(Material.iron).setBlockName("turret_heavy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_heavy");
turret_rocket = new TurretRocket(Material.iron).setBlockName("turret_rocket").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_rocket");
turret_flamer = new TurretFlamer(Material.iron).setBlockName("turret_flamer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_flamer");
turret_tau = new TurretTau(Material.iron).setBlockName("turret_tau").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_tau");
turret_light = new TurretLight(Material.iron).setBlockName("turret_light").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_light");
turret_heavy = new TurretHeavy(Material.iron).setBlockName("turret_heavy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_heavy");
turret_rocket = new TurretRocket(Material.iron).setBlockName("turret_rocket").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_rocket");
turret_flamer = new TurretFlamer(Material.iron).setBlockName("turret_flamer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_flamer");
turret_tau = new TurretTau(Material.iron).setBlockName("turret_tau").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_tau");
turret_spitfire = new TurretSpitfire(Material.iron).setBlockName("turret_spitfire").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":code");
turret_cwis = new TurretCIWS(Material.iron).setBlockName("turret_cwis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_cwis");
turret_cwis = new TurretCIWS(Material.iron).setBlockName("turret_cwis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":turret_cwis");
turret_cheapo = new TurretCheapo(Material.iron).setBlockName("turret_cheapo").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":turret_cheapo");
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
@ -1508,6 +1510,7 @@ public class ModBlocks {
turret_jeremy = new TurretJeremy(Material.iron).setBlockName("turret_jeremy").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_tauon = new TurretTauon(Material.iron).setBlockName("turret_tauon").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_richard = new TurretRichard(Material.iron).setBlockName("turret_richard").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
turret_howard = new TurretHoward(Material.iron).setBlockName("turret_howard").setHardness(5.0F).setResistance(600.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
@ -2009,6 +2012,7 @@ public class ModBlocks {
GameRegistry.registerBlock(turret_jeremy, turret_jeremy.getUnlocalizedName());
GameRegistry.registerBlock(turret_tauon, turret_tauon.getUnlocalizedName());
GameRegistry.registerBlock(turret_richard, turret_richard.getUnlocalizedName());
GameRegistry.registerBlock(turret_howard, turret_howard.getUnlocalizedName());
//Mines
GameRegistry.registerBlock(mine_ap, mine_ap.getUnlocalizedName());

View File

@ -0,0 +1,27 @@
package com.hbm.blocks.generic;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.world.World;
public class BlockSpeedy extends Block {
double speed;
public BlockSpeedy(Material mat, double speed) {
super(mat);
this.speed = speed;
}
@Override
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
if(entity instanceof EntityLivingBase) { //prevents vehicles from going mach 5
double tan = Math.atan2(entity.motionX, entity.motionZ);
entity.motionX += Math.sin(tan) * speed;
entity.motionZ += Math.cos(tan) * speed;
}
}
}

View File

@ -22,6 +22,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class WasteDrum extends BlockContainer {
@ -56,6 +57,34 @@ public class WasteDrum extends BlockContainer {
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityWasteDrum();
}
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
super.randomDisplayTick(world, x, y, z, rand);
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if(dir == ForgeDirection.DOWN)
continue;
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.water) {
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D;
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D;
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D;
if(dir.offsetX != 0)
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.125 * dir.offsetX;
if(dir.offsetY != 0)
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * 0.125 * dir.offsetY;
if(dir.offsetZ != 0)
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.125 * dir.offsetZ;
world.spawnParticle("bubble", ix, iy, iz, 0.0, 0.2, 0.0);
}
}
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {

View File

@ -0,0 +1,68 @@
package com.hbm.blocks.turret;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.main.MainRegistry;
import com.hbm.tileentity.TileEntityProxyCombo;
import com.hbm.tileentity.turret.TileEntityTurretHoward;
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class TurretHoward extends BlockDummyable {
public TurretHoward(Material mat) {
super(mat);
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
if(meta >= 12)
return new TileEntityTurretHoward();
return new TileEntityProxyCombo(true, true, false);
}
@Override
public int[] getDimensions() {
return new int[] { 0, 0, 1, 0, 1, 0 };
}
@Override
public int getOffset() {
return 0;
}
@Override
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
if(world.isRemote) {
return true;
} else if(!player.isSneaking()) {
int[] pos = this.findCore(world, x, y, z);
if(pos == null)
return false;
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_howard, world, pos[0], pos[1], pos[2]);
return true;
} else {
return false;
}
}
}

View File

@ -315,15 +315,23 @@ public class WeaponRecipes {
//240mm Shells
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell, 4), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell, 6), new Object[] { " T ", "GHG", "CCC", 'T', Blocks.tnt, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_explosive, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModItems.ingot_semtex, 'G', Items.gunpowder, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_explosive, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModItems.ingot_semtex, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_explosive, 4), new Object[] { " T ", "GHG", "CCC", 'T', ModItems.ingot_semtex, 'G', ModItems.ballistite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_explosive, 6), new Object[] { " T ", "GHG", "CCC", 'T', ModItems.ingot_semtex, 'G', ModItems.cordite, 'H', ModItems.hull_small_steel, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_t, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotTungsten", 'G', Items.gunpowder, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_t, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotTungsten", 'G', ModItems.cordite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_t, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotTungsten", 'G', ModItems.ballistite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_t, 6), new Object[] { " I ", "GIG", "CCC", 'I', "ingotTungsten", 'G', ModItems.cordite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_du, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotUranium238", 'G', Items.gunpowder, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_du, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotUranium238", 'G', ModItems.cordite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_du, 4), new Object[] { " I ", "GIG", "CCC", 'I', "ingotUranium238", 'G', ModItems.ballistite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_apfsds_du, 6), new Object[] { " I ", "GIG", "CCC", 'I', "ingotUranium238", 'G', ModItems.cordite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_shell_w9, 1), new Object[] { " P ", "NSN", " P ", 'P', "nuggetPlutonium239", 'N', "plateDenseLead", 'S', ModItems.ammo_shell_explosive }));
//DGK Belts
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_dgk, 1), new Object[] { "LLL", "GGG", "CCC", 'L', "plateLead", 'G', ModItems.ballistite, 'C', "ingotCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_dgk, 1), new Object[] { "LLL", "GGG", "CCC", 'L', "plateLead", 'G', ModItems.cordite, 'C', "ingotCopper" }));
//Mini Nuke
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke, 1), new Object[] { "P", "S", "P", 'P', ModItems.nugget_pu239, 'S', ModItems.assembly_nuke });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_nuke_low, 1), new Object[] { "P", "S", 'P', ModItems.nugget_pu239, 'S', ModItems.assembly_nuke });
@ -373,13 +381,13 @@ public class WeaponRecipes {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.primer_buckshot, 1), new Object[] { "R", "P", 'P', "plateCopper", 'R', "dustRedstone" }));
//Turrets
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_light_ammo, 1), new Object[] { " L ", "IGI", "ICI", 'L', "plateLead", 'I', "plateIron", 'C', "plateCopper", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_heavy_ammo, 1), new Object[] { "LGC", "LGC", "LGC", 'L', "plateLead", 'C', "plateCopper", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_rocket_ammo, 1), new Object[] { "TS ", "SGS", " SR", 'T', Blocks.tnt, 'S', "plateSteel", 'G', Items.gunpowder, 'R', "dustRedstone" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_flamer_ammo, 1), new Object[] { "FSF", "FPF", "FPF", 'F', ModItems.gun_immolator_ammo, 'S', ModItems.pipes_steel, 'P', "plateCopper" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_tau_ammo, 1), new Object[] { "AAA", "AUA", "AAA", 'A', ModItems.gun_xvl1456_ammo, 'U', "blockUranium238" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_light_ammo, 1), new Object[] { " L ", "IGI", "ICI", 'L', "plateLead", 'I', "plateIron", 'C', "plateCopper", 'G', Items.gunpowder }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_heavy_ammo, 1), new Object[] { "LGC", "LGC", "LGC", 'L', "plateLead", 'C', "plateCopper", 'G', Items.gunpowder }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_rocket_ammo, 1), new Object[] { "TS ", "SGS", " SR", 'T', Blocks.tnt, 'S', "plateSteel", 'G', Items.gunpowder, 'R', "dustRedstone" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_flamer_ammo, 1), new Object[] { "FSF", "FPF", "FPF", 'F', ModItems.gun_immolator_ammo, 'S', ModItems.pipes_steel, 'P', "plateCopper" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_tau_ammo, 1), new Object[] { "AAA", "AUA", "AAA", 'A', ModItems.gun_xvl1456_ammo, 'U', "blockUranium238" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_spitfire_ammo, 1), new Object[] { "CP ", "PTP", " PR", 'P', "plateSteel", 'C', ModItems.circuit_copper, 'T', Blocks.tnt, 'R', "dustRedstone" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_cwis_ammo, 1), new Object[] { "LLL", "GGG", "IGI", 'L', "plateLead", 'I', "plateIron", 'G', Items.gunpowder }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_cwis_ammo, 1), new Object[] { "LLL", "GGG", "IGI", 'L', "plateLead", 'I', "plateIron", 'G', Items.gunpowder }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.turret_cheapo_ammo, 1), new Object[] { "ILI", "IGI", "ICI", 'L', "plateLead", 'I', "plateSteel", 'C', "plateCopper", 'G', Items.gunpowder }));
//Grenades

View File

@ -1,13 +1,18 @@
package com.hbm.entity.mob;
import com.hbm.config.GeneralConfig;
import com.hbm.entity.particle.EntitySmokeFX;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.entity.projectile.EntityChopperMine;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import api.hbm.entity.IRadiationImmune;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
@ -18,13 +23,14 @@ import net.minecraft.entity.monster.IMob;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisplayData, IRadiationImmune {
public int courseChangeCooldown;
public double waypointX;
public double waypointY;
@ -53,7 +59,11 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
*/
@Override
public boolean attackEntityFrom(DamageSource source, float amount) {
if (this.isEntityInvulnerable() || !(source == ModDamageSource.nuclearBlast || source == ModDamageSource.blackhole || source.isExplosion() || ModDamageSource.getIsTau(source) || ModDamageSource.getIsSubatomic(source) || ModDamageSource.getIsDischarge(source))) {
if(!(source == ModDamageSource.shrapnel || source == ModDamageSource.nuclearBlast || source == ModDamageSource.blackhole || source.isExplosion() || ModDamageSource.getIsTau(source) || ModDamageSource.getIsSubatomic(source) || ModDamageSource.getIsDischarge(source)))
amount *= 0.1F;
if(this.isEntityInvulnerable() || source instanceof EntityDamageSource || this.getHealth() <= 0.1F) {
return false;
} else if(amount >= this.getHealth()) {
this.initDeath();
@ -61,22 +71,20 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
this.setHealth(0.1F);
return false;
}
if(rand.nextInt(15) == 0)
{
if(!worldObj.isRemote && !this.isDying)
{
if(rand.nextInt(15) == 0) {
if(!worldObj.isRemote && !this.isDying) {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5F, true);
this.dropDamageItem();
}
}
for (int j = 0; j < 3; j++) {
for(int j = 0; j < 3; j++) {
double d0 = rand.nextDouble() / 20 * rand.nextInt(2) == 0 ? -1 : 1;
double d1 = rand.nextDouble() / 20 * rand.nextInt(2) == 0 ? -1 : 1;
double d2 = rand.nextDouble() / 20 * rand.nextInt(2) == 0 ? -1 : 1;
for (int i = 0; i < 8; i++)
for(int i = 0; i < 8; i++)
if(this.worldObj.isRemote)
worldObj.spawnParticle("fireworksSpark", this.posX, this.posY, this.posZ, d0 * i * 0.25, d1 * i * 0.25, d2 * i * 0.25);
}
@ -101,11 +109,11 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
@Override
protected void updateEntityActionState() {
if (!this.worldObj.isRemote && this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL) {
if(!this.worldObj.isRemote && this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL) {
this.setDead();
}
if (!isDying) {
if(!isDying) {
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:misc.nullChopper", 10.0F, 0.5F);
this.prevAttackCounter = this.attackCounter;
@ -114,41 +122,38 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
double d2 = this.waypointZ - this.posZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
if (d3 < 1.0D || d3 > 3600.0D) {
if (this.targetedEntity != null) {
if(d3 < 1.0D || d3 > 3600.0D) {
if(this.targetedEntity != null) {
this.waypointX = targetedEntity.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointZ = targetedEntity.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10
+ rand.nextInt(15);
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10 + rand.nextInt(15);
} else {
this.waypointX = this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointZ = this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10
+ rand.nextInt(15);
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10 + rand.nextInt(15);
}
}
if (this.courseChangeCooldown-- <= 0) {
if(this.courseChangeCooldown-- <= 0) {
this.courseChangeCooldown += this.rand.nextInt(5) + 2;
d3 = MathHelper.sqrt_double(d3);
if (this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) {
if(this.isCourseTraversable(this.waypointX, this.waypointY, this.waypointZ, d3)) {
this.motionX += d0 / d3 * 0.1D;
this.motionY += d1 / d3 * 0.1D;
this.motionZ += d2 / d3 * 0.1D;
} else {
this.waypointX = this.posX + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointZ = this.posZ + (this.rand.nextFloat() * 2.0F - 1.0F) * 16.0F;
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10
+ rand.nextInt(15);
this.waypointY = this.worldObj.getHeightValue((int) waypointX, (int) waypointZ) + 10 + rand.nextInt(15);
}
}
if (this.targetedEntity != null && this.targetedEntity.isDead) {
if(this.targetedEntity != null && this.targetedEntity.isDead) {
this.targetedEntity = null;
}
if (this.targetedEntity == null || this.attackCounter <= 0) {
if(this.targetedEntity == null || this.attackCounter <= 0) {
// this.targetedEntity =
// this.worldObj.getClosestVulnerablePlayerToEntity(this,
// 100.0D);
@ -157,29 +162,27 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
double d4 = 64.0D;
if (this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) {
if(this.targetedEntity != null && this.targetedEntity.getDistanceSqToEntity(this) < d4 * d4) {
double d8 = 2.0D;
Vec3 vec3 = this.getLook(1.0F);
double xStart = this.posX + vec3.xCoord * d8;
double yStart = this.posY - 0.5;
double zStart = this.posZ + vec3.zCoord * d8;
double d5 = this.targetedEntity.posX - xStart;
double d6 = this.targetedEntity.boundingBox.minY + this.targetedEntity.height / 2.0F
- yStart;
double d6 = this.targetedEntity.boundingBox.minY + this.targetedEntity.height / 2.0F - yStart;
double d7 = this.targetedEntity.posZ - zStart;
++this.attackCounter;
if (attackCounter >= 200) {
if(attackCounter >= 200) {
attackCounter -= 200;
}
if (this.attackCounter % 2 == 0 && attackCounter >= 120) {
if(this.attackCounter % 2 == 0 && attackCounter >= 120) {
worldObj.playSoundAtEntity(this, "hbm:weapon.osiprShoot", 10.0F, 1.0F);
// EntityLargeFireball entitylargefireball = new
// EntityLargeFireball(this.worldObj, this, d5, d6, d7);
EntityBullet entityarrow = new EntityBullet(this.worldObj, this, 3.0F, 35, 45, false, "chopper");
Vec3 vec2 = Vec3.createVectorHelper(d5 - 1 + rand.nextInt(3), d6 - 1 + rand.nextInt(3),
d7 - 1 + rand.nextInt(3)).normalize();
Vec3 vec2 = Vec3.createVectorHelper(d5 - 1 + rand.nextInt(3), d6 - 1 + rand.nextInt(3), d7 - 1 + rand.nextInt(3)).normalize();
double motion = 3;
entityarrow.motionX = vec2.xCoord * motion;
entityarrow.motionY = vec2.yCoord * motion;
@ -198,19 +201,18 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
// this.worldObj.spawnEntityInWorld(entitylargefireball);
this.worldObj.spawnEntityInWorld(entityarrow);
}
if (this.attackCounter == 80) {
if(this.attackCounter == 80) {
worldObj.playSoundAtEntity(this, "hbm:entity.chopperCharge", 5.0F, 1.0F);
}
this.mineDropCounter++;
if (mineDropCounter > 100 && rand.nextInt(15) == 0) {
worldObj.playSoundAtEntity(this, "hbm:entity.chopperDrop", 15.0F, 1.0F);
if(mineDropCounter > 100 && rand.nextInt(15) == 0) {
worldObj.playSoundAtEntity(this, "hbm:entity.chopperDrop", 15.0F, 1.0F);
EntityChopperMine mine = new EntityChopperMine(worldObj, this.posX, this.posY - 0.5, this.posZ, 0, -0.3, 0, this);
this.mineDropCounter = 0;
this.worldObj.spawnEntityInWorld(mine);
if(rand.nextInt(3) == 0)
{
if(rand.nextInt(3) == 0) {
EntityChopperMine mine1 = new EntityChopperMine(worldObj, this.posX, this.posY - 0.5, this.posZ, 1, -0.3, 0, this);
EntityChopperMine mine2 = new EntityChopperMine(worldObj, this.posX, this.posY - 0.5, this.posZ, 0, -0.3, 1, this);
EntityChopperMine mine3 = new EntityChopperMine(worldObj, this.posX, this.posY - 0.5, this.posZ, -1, -0.3, 0, this);
@ -224,71 +226,75 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
} else {
if (this.attackCounter > 0) {
if(this.attackCounter > 0) {
this.attackCounter = 0;
}
}
if (!this.worldObj.isRemote) {
if(!this.worldObj.isRemote) {
byte b1 = this.dataWatcher.getWatchableObjectByte(16);
byte b0 = (byte) (this.attackCounter > 10 ? 1 : 0);
if (b1 != b0) {
if(b1 != b0) {
this.dataWatcher.updateObject(16, Byte.valueOf(b0));
}
}
} else {
motionY -= 0.08;
if(Math.sqrt(Math.pow(this.motionX, 2) + Math.pow(this.motionZ, 2)) * 1.2 < 1.8)
{
if(Math.sqrt(Math.pow(this.motionX, 2) + Math.pow(this.motionZ, 2)) * 1.2 < 1.8) {
this.motionX *= 1.2;
this.motionZ *= 1.2;
}
if(rand.nextInt(20) == 0)
{
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5F, true);
if(rand.nextInt(20) == 0) {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 5F, true);
}
this.worldObj.spawnEntityInWorld(new EntitySmokeFX(worldObj, this.posX, this.posY, this.posZ, 0, 0, 0));
if(!worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "exhaust");
data.setString("mode", "meteor");
data.setInteger("count", 10);
data.setDouble("width", 1);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, posX, posY, posZ), new TargetPoint(dimension, posX, posY, posZ, 100));
}
rotationYaw += 20;
if(this.onGround)
{
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true);
this.dropItems();
if(this.onGround) {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 15F, true);
this.dropItems();
this.setDead();
}
if (this.ticksExisted % 2 == 0)
if(this.ticksExisted % 2 == 0)
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:misc.nullCrashing", 10.0F, 0.5F);
}
if (this.targetedEntity == null) {
if(this.targetedEntity == null) {
float f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
if (this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) >= 10)
if(this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) >= 10)
this.prevRotationYaw = this.rotationYaw -= 10;
if (this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) <= -10)
if(this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) <= -10)
this.prevRotationYaw = this.rotationYaw += 10;
if (this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) < 10 && this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) > 10)
if(this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) < 10 && this.rotationYaw - (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI) > 10)
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, f3) * 180.0D / Math.PI);
} else {
float f3 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
if (this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) >= 10)
if(this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) >= 10)
this.prevRotationYaw = this.rotationYaw -= 10;
if (this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) <= -10)
if(this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) <= -10)
this.prevRotationYaw = this.rotationYaw += 10;
if (this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) < 10 && this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) > 10)
if(this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) < 10 && this.rotationYaw - (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI) > 10)
this.prevRotationYaw = this.rotationYaw = (float) (Math.atan2(this.posX - targetedEntity.posX, this.posZ - targetedEntity.posZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, f3) * 180.0D / Math.PI);
this.getLook(1.0F);
}
if(rotationPitch <= 330 && rotationPitch >= 30)
{
if(rotationPitch <= 330 && rotationPitch >= 30) {
if(rotationPitch < 180)
rotationPitch = 30;
if(rotationPitch >= 180)
@ -305,10 +311,10 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
double d6 = (this.waypointZ - this.posZ) / p_70790_7_;
AxisAlignedBB axisalignedbb = this.boundingBox.copy();
for (int i = 1; i < p_70790_7_; ++i) {
for(int i = 1; i < p_70790_7_; ++i) {
axisalignedbb.offset(d4, d5, d6);
if (!this.worldObj.getCollidingBoundingBoxes(this, axisalignedbb).isEmpty()) {
if(!this.worldObj.getCollidingBoundingBoxes(this, axisalignedbb).isEmpty()) {
return false;
}
}
@ -365,8 +371,7 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
*/
@Override
public boolean getCanSpawnHere() {
return this.rand.nextInt(20) == 0 && super.getCanSpawnHere()
&& this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL;
return this.rand.nextInt(20) == 0 && super.getCanSpawnHere() && this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL;
}
/**
@ -392,31 +397,30 @@ public class EntityHunterChopper extends EntityFlying implements IMob, IBossDisp
public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
super.readEntityFromNBT(p_70037_1_);
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 25000;
}
public void initDeath() {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10F, true);
if(!this.isDying)
worldObj.playSoundAtEntity(this, "hbm:entity.chopperDamage", 10.0F, 1.0F);
isDying = true;
}
public void dropDamageItem() {
int i = rand.nextInt(10);
if(i < 6)
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance) {
return distance < 25000;
}
public void initDeath() {
this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 10F, true);
if(!this.isDying)
worldObj.playSoundAtEntity(this, "hbm:entity.chopperDamage", 10.0F, 1.0F);
isDying = true;
}
public void dropDamageItem() {
int i = rand.nextInt(10);
if(i < 6)
this.dropItem(ModItems.combine_scrap, 1);
else if(i > 7)
else if(i > 7)
this.dropItem(ModItems.plate_combine_steel, 1);
else
else
this.dropItem(ModItems.wire_magnetized_tungsten, 1);
}
}
public void setIsDying(boolean b) {
this.dataWatcher.updateObject(23, Byte.valueOf((byte) (b ? 1 : 0)));

View File

@ -81,24 +81,6 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
return true;
} else {
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.peas) {
if(worldObj.isRemote) {
for(int i = 0; i < 150; i++) {
EntityBSmokeFX fx = new EntityBSmokeFX(worldObj);
fx.setPositionAndRotation(posX + rand.nextDouble() * width * 2 - width, posY + rand.nextDouble() * height * 1.5, posZ + rand.nextDouble() * width * 2 - width, 0, 0);
worldObj.spawnEntityInWorld(fx);
}
}
player.getHeldItem().stackSize--;
player.swingItem();
this.isDead = true;
return true;
}
if(!this.worldObj.isRemote && (this.riddenByEntity == null || this.riddenByEntity == player)) {
player.mountEntity(this);
@ -108,6 +90,22 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
return false;
}
}
/**
* BOW
*/
public void despawn() {
if(!worldObj.isRemote) {
for(int i = 0; i < 150; i++) {
EntityBSmokeFX fx = new EntityBSmokeFX(worldObj);
fx.setPositionAndRotation(posX + rand.nextDouble() * 20 - 10, posY + rand.nextDouble() * 25, posZ + rand.nextDouble() * 20 - 10, 0, 0);
worldObj.spawnEntityInWorld(fx);
}
}
this.isDead = true;
}
/**
* BOW
@ -133,4 +131,13 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
public float getShadowSize() {
return 7.5F;
}
@Override
public void onLivingUpdate() {
super.onLivingUpdate();
if(!worldObj.isRemote && this.posY < -30) {
this.setPosition(this.posX + rand.nextGaussian() * 30, 256, this.posZ + rand.nextGaussian() * 30);
}
}
}

View File

@ -20,86 +20,80 @@ public class EntityMeteor extends EntityThrowable {
this.ignoreFrustumCheck = true;
this.isImmuneToFire = true;
}
@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.prevPosX = this.posX; this.prevPosY = this.posY; this.prevPosZ =
* this.posZ;
*
* this.posX += this.motionX; this.posY += this.motionY; this.posZ +=
* this.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));
}
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
this.setDead();
}
if(GeneralConfig.enableMeteorTails && worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "exhaust");
data.setString("mode", "meteor");
data.setInteger("count", 10);
data.setDouble("width", 1);
data.setDouble("posX", posX - motionX);
data.setDouble("posY", posY - motionY);
data.setDouble("posZ", posZ - motionZ);
MainRegistry.proxy.effectNT(data);
}
}
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));
}
this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "hbm:entity.oldExplosion", 10000.0F, 0.5F + this.rand.nextFloat() * 0.1F);
this.setDead();
}
if(GeneralConfig.enableMeteorTails && worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "exhaust");
data.setString("mode", "meteor");
data.setInteger("count", 10);
data.setDouble("width", 1);
data.setDouble("posX", posX - motionX);
data.setDouble("posY", posY - motionY);
data.setDouble("posZ", posZ - motionZ);
MainRegistry.proxy.effectNT(data);
}
}
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
}
@Override
@SideOnly(Side.CLIENT)
public boolean isInRangeToRenderDist(double distance)
{
return distance < 500000;
}
@Override
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float p_70070_1_)
{
return 15728880;
}
public boolean isInRangeToRenderDist(double distance) {
return distance < 500000;
}
@Override
public float getBrightness(float p_70013_1_)
{
return 1.0F;
}
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float p_70070_1_) {
return 15728880;
}
@Override
public float getBrightness(float p_70013_1_) {
return 1.0F;
}
}

View File

@ -185,6 +185,7 @@ public class BulletConfigSyncingUtil {
public static int SHELL_AP = i++;
public static int SHELL_DU = i++;
public static int SHELL_W9 = i++;
public static int DGK_NORMAL = i++;
public static int NUKE_NORMAL = i++;
public static int NUKE_LOW = i++;
@ -404,6 +405,7 @@ public class BulletConfigSyncingUtil {
configSet.put(SHELL_AP, GunCannonFactory.getShellAPConfig());
configSet.put(SHELL_DU, GunCannonFactory.getShellDUConfig());
configSet.put(SHELL_W9, GunCannonFactory.getShellW9Config());
configSet.put(DGK_NORMAL, GunDGKFactory.getDGKConfig());
configSet.put(NUKE_NORMAL, GunFatmanFactory.getNukeConfig());
configSet.put(NUKE_LOW, GunFatmanFactory.getNukeLowConfig());

View File

@ -8,11 +8,7 @@ import com.hbm.inventory.inv.InventoryLeadBox;
import com.hbm.items.ModItems;
import com.hbm.tileentity.bomb.*;
import com.hbm.tileentity.machine.*;
import com.hbm.tileentity.turret.TileEntityTurretChekhov;
import com.hbm.tileentity.turret.TileEntityTurretFriendly;
import com.hbm.tileentity.turret.TileEntityTurretJeremy;
import com.hbm.tileentity.turret.TileEntityTurretRichard;
import com.hbm.tileentity.turret.TileEntityTurretTauon;
import com.hbm.tileentity.turret.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
@ -768,6 +764,13 @@ public class GUIHandler implements IGuiHandler {
return null;
}
case ModBlocks.guiID_howard: {
if(entity instanceof TileEntityTurretHoward) {
return new ContainerTurretBase(player.inventory, (TileEntityTurretHoward) entity);
}
return null;
}
case ModBlocks.guiID_silex: {
if(entity instanceof TileEntitySILEX) {
return new ContainerSILEX(player.inventory, (TileEntitySILEX) entity);
@ -1526,6 +1529,13 @@ public class GUIHandler implements IGuiHandler {
return null;
}
case ModBlocks.guiID_howard: {
if(entity instanceof TileEntityTurretHoward) {
return new GUITurretHoward(player.inventory, (TileEntityTurretHoward) entity);
}
return null;
}
case ModBlocks.guiID_silex: {
if(entity instanceof TileEntitySILEX) {
return new GUISILEX(player.inventory, (TileEntitySILEX) entity);

View File

@ -3,6 +3,7 @@ package com.hbm.handler;
import java.util.HashMap;
import com.hbm.items.armor.ItemModCladding;
import com.hbm.lib.Library;
import com.hbm.potion.HbmPotion;
import net.minecraft.entity.player.EntityPlayer;
@ -55,6 +56,10 @@ public class HazmatRegistry {
float res = 0.0F;
if(player.getUniqueID().toString().equals(Library.Pu_238)) {
res += 0.4F;
}
for(int i = 0; i < 4; i++) {
res += getResistance(player.inventory.armorInventory[i]);
}

View File

@ -0,0 +1,15 @@
package com.hbm.handler.guncfg;
import com.hbm.handler.BulletConfiguration;
import com.hbm.items.ModItems;
public class GunDGKFactory {
public static BulletConfiguration getDGKConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = ModItems.ammo_dgk;
return bullet;
}
}

View File

@ -8,7 +8,6 @@ import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ArmorFSB;
import com.hbm.items.weapon.ItemGunDart;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -91,6 +90,7 @@ public class GunDartFactory {
bullet.doesRicochet = true;
bullet.doesPenetrate = false;
bullet.style = bullet.STYLE_FLECHETTE;
bullet.leadChance = 0;
bullet.effects = new ArrayList();
bullet.effects.add(new PotionEffect(Potion.wither.id, 60 * 20, 2));
@ -133,6 +133,7 @@ public class GunDartFactory {
bullet.gravity = 0.04D;
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.leadChance = 0;
return bullet;
}

View File

@ -152,7 +152,7 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4), new AStack[] {new ComparableStack(ModItems.ingot_asbestos, 2), new ComparableStack(Items.string, 6), new ComparableStack(Blocks.wool, 1), },50);
makeRecipe(new ComparableStack(ModItems.filter_coal, 1), new AStack[] {new OreDictStack("dustCoal", 4), new ComparableStack(Items.string, 6), new ComparableStack(Items.paper, 1), },50);
makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.coil_tungsten, 2), new ComparableStack(ModItems.wire_red_copper, 6), new ComparableStack(ModItems.motor, 1), },200);
makeRecipe(new ComparableStack(ModItems.centrifuge_tower, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack("plateSteel", 4), new ComparableStack(ModItems.wire_red_copper, 6), new OreDictStack("dustLapis", 2), new ComparableStack(ModItems.ingot_polymer, 2), },150);
makeRecipe(new ComparableStack(ModItems.centrifuge_tower, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack("plateSteel", 4), new ComparableStack(ModItems.wire_red_copper, 6), new ComparableStack(ModItems.ingot_polymer, 2), },150);
//makeRecipe(new ComparableStack(ModItems.magnet_dee, 1), new AStack[] {new ComparableStack(ModBlocks.fusion_conductor, 6), new OreDictStack("ingotSteel", 3), new ComparableStack(ModItems.coil_advanced_torus, 1), },100);
makeRecipe(new ComparableStack(ModItems.magnet_circular, 1), new AStack[] {new ComparableStack(ModBlocks.fusion_conductor, 5), new OreDictStack("ingotSteel", 4), new ComparableStack(ModItems.plate_advanced_alloy, 6), },150);
makeRecipe(new ComparableStack(ModItems.cyclotron_tower, 1), new AStack[] {new ComparableStack(ModItems.magnet_circular, 6), new ComparableStack(ModItems.magnet_dee, 3), new OreDictStack("plateSteel", 12), new ComparableStack(ModItems.wire_advanced_alloy, 8), new ComparableStack(ModItems.plate_polymer, 24), },300);
@ -326,13 +326,13 @@ public class AssemblerRecipes {
makeRecipe(new ComparableStack(ModBlocks.therm_exo, 1), new AStack[] {new OreDictStack("plateTitanium", 12), new ComparableStack(ModItems.thermo_unit_exo, 1), new ComparableStack(ModItems.circuit_gold, 2), new ComparableStack(ModItems.wire_gold, 6), },250);
makeRecipe(new ComparableStack(ModBlocks.launch_pad, 1), new AStack[] {new OreDictStack("ingotSteel", 4), new ComparableStack(ModItems.ingot_polymer, 2), new OreDictStack("plateSteel", 12), new ComparableStack(ModBlocks.machine_battery, 1), new ComparableStack(ModItems.circuit_gold, 2), },250);
makeRecipe(new ComparableStack(ModItems.spawn_chopper, 1), new AStack[] {new ComparableStack(ModItems.chopper_blades, 5), new ComparableStack(ModItems.chopper_gun, 1), new ComparableStack(ModItems.chopper_head, 1), new ComparableStack(ModItems.chopper_tail, 1), new ComparableStack(ModItems.chopper_torso, 1), new ComparableStack(ModItems.chopper_wing, 2), },300);
makeRecipe(new ComparableStack(ModBlocks.turret_light, 1), new AStack[] {new OreDictStack("ingotSteel", 6), new ComparableStack(ModItems.pipes_steel, 2), new OreDictStack("ingotRedCopperAlloy", 2), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 2), },200);
makeRecipe(new ComparableStack(ModBlocks.turret_heavy, 1), new AStack[] {new OreDictStack("ingotSteel", 8), new OreDictStack("ingotAluminum", 4), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.hull_small_steel, 1), new OreDictStack("ingotRedCopperAlloy", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 3), },250);
makeRecipe(new ComparableStack(ModBlocks.turret_rocket, 1), new AStack[] {new OreDictStack("ingotSteel", 12), new OreDictStack("ingotTitanium", 4), new ComparableStack(ModItems.hull_small_steel, 8), new OreDictStack("ingotRedCopperAlloy", 6), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 2), },300);
makeRecipe(new ComparableStack(ModBlocks.turret_flamer, 1), new AStack[] {new OreDictStack("ingotSteel", 8), new OreDictStack("ingotTungsten", 2), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.tank_steel, 2), new OreDictStack("ingotRedCopperAlloy", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 2), },250);
makeRecipe(new ComparableStack(ModBlocks.turret_tau, 1), new AStack[] {new OreDictStack("ingotSteel", 16), new OreDictStack("ingotTitanium", 8), new ComparableStack(ModItems.plate_advanced_alloy, 4), new ComparableStack(ModItems.redcoil_capacitor, 3), new OreDictStack("ingotRedCopperAlloy", 12), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), },350);
//makeRecipe(new ComparableStack(ModBlocks.turret_light, 1), new AStack[] {new OreDictStack("ingotSteel", 6), new ComparableStack(ModItems.pipes_steel, 2), new OreDictStack("ingotRedCopperAlloy", 2), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 2), },200);
//makeRecipe(new ComparableStack(ModBlocks.turret_heavy, 1), new AStack[] {new OreDictStack("ingotSteel", 8), new OreDictStack("ingotAluminum", 4), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.hull_small_steel, 1), new OreDictStack("ingotRedCopperAlloy", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier2, 3), },250);
//makeRecipe(new ComparableStack(ModBlocks.turret_rocket, 1), new AStack[] {new OreDictStack("ingotSteel", 12), new OreDictStack("ingotTitanium", 4), new ComparableStack(ModItems.hull_small_steel, 8), new OreDictStack("ingotRedCopperAlloy", 6), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 2), },300);
//makeRecipe(new ComparableStack(ModBlocks.turret_flamer, 1), new AStack[] {new OreDictStack("ingotSteel", 8), new OreDictStack("ingotTungsten", 2), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.tank_steel, 2), new OreDictStack("ingotRedCopperAlloy", 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier3, 2), },250);
//makeRecipe(new ComparableStack(ModBlocks.turret_tau, 1), new AStack[] {new OreDictStack("ingotSteel", 16), new OreDictStack("ingotTitanium", 8), new ComparableStack(ModItems.plate_advanced_alloy, 4), new ComparableStack(ModItems.redcoil_capacitor, 3), new OreDictStack("ingotRedCopperAlloy", 12), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit_targeting_tier4, 2), },350);
makeRecipe(new ComparableStack(ModBlocks.turret_spitfire, 1), new AStack[] {new OreDictStack("ingotSteel", 6), new OreDictStack("ingotRedCopperAlloy", 6), new OreDictStack("plateSteel", 16), new OreDictStack("plateIron", 8), new ComparableStack(ModItems.hull_small_steel, 4), new ComparableStack(ModItems.pipes_steel, 2), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_targeting_tier3, 1), },350);
makeRecipe(new ComparableStack(ModBlocks.turret_cwis, 1), new AStack[] {new OreDictStack("ingotSteel", 6), new OreDictStack("ingotRedCopperAlloy", 8), new OreDictStack("plateSteel", 10), new OreDictStack("plateTitanium", 4), new ComparableStack(ModItems.hull_small_aluminium, 2), new ComparableStack(ModItems.pipes_steel, 6), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.magnetron, 3), },400);
//makeRecipe(new ComparableStack(ModBlocks.turret_cwis, 1), new AStack[] {new OreDictStack("ingotSteel", 6), new OreDictStack("ingotRedCopperAlloy", 8), new OreDictStack("plateSteel", 10), new OreDictStack("plateTitanium", 4), new ComparableStack(ModItems.hull_small_aluminium, 2), new ComparableStack(ModItems.pipes_steel, 6), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit_targeting_tier4, 2), new ComparableStack(ModItems.magnetron, 3), },400);
makeRecipe(new ComparableStack(ModBlocks.turret_cheapo, 1), new AStack[] {new OreDictStack("ingotSteel", 4), new OreDictStack("plateIron", 4), new ComparableStack(ModItems.pipes_steel, 3), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit_targeting_tier1, 4), },200);
makeRecipe(new ComparableStack(ModItems.missile_generic, 1), new AStack[] {new ComparableStack(ModItems.warhead_generic_small, 1), new ComparableStack(ModItems.fuel_tank_small, 1), new ComparableStack(ModItems.thruster_small, 1), new OreDictStack("plateTitanium", 6), new ComparableStack(ModItems.circuit_targeting_tier1, 1), },200);
makeRecipe(new ComparableStack(ModItems.missile_incendiary, 1), new AStack[] {new ComparableStack(ModItems.warhead_incendiary_small, 1), new ComparableStack(ModItems.fuel_tank_small, 1), new ComparableStack(ModItems.thruster_small, 1), new OreDictStack("plateTitanium", 6), new ComparableStack(ModItems.circuit_targeting_tier1, 1), },200);
@ -662,6 +662,27 @@ public class AssemblerRecipes {
new ComparableStack(ModItems.mechanism_launcher_2, 1),
new ComparableStack(ModBlocks.crate_steel, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.turret_howard, 1), new AStack[] {
new ComparableStack(ModBlocks.machine_battery, 1),
new OreDictStack("ingotSteel", 24),
new ComparableStack(ModItems.ingot_dura_steel, 6),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.motor_desh, 2),
new ComparableStack(ModItems.circuit_targeting_tier3, 2),
new ComparableStack(ModItems.pipes_steel, 2),
new ComparableStack(ModItems.mechanism_rifle_2, 2),
new ComparableStack(ModBlocks.crate_steel, 1)
}, 200);
makeRecipe(new ComparableStack(ModBlocks.machine_silex, 1), new AStack[] {
new ComparableStack(Blocks.glass, 12),
new ComparableStack(ModItems.motor, 2),
new ComparableStack(ModItems.ingot_dura_steel, 4),
new OreDictStack("plateSteel", 8),
new OreDictStack("ingotDesh", 2),
new ComparableStack(ModItems.tank_steel, 1),
new ComparableStack(ModItems.pipes_steel, 1),
new ComparableStack(ModItems.crystal_diamond, 1)
}, 400);
makeRecipe(new ComparableStack(ModBlocks.block_cap_nuka, 1), new AStack[] { new ComparableStack(ModItems.cap_nuka, 128) }, 10);
makeRecipe(new ComparableStack(ModBlocks.block_cap_quantum, 1), new AStack[] { new ComparableStack(ModItems.cap_quantum, 128) }, 10);

View File

@ -198,6 +198,19 @@ public class ShredderRecipes {
ShredderRecipes.setRecipe(Blocks.anvil, new ItemStack(ModItems.powder_iron, 31));
ShredderRecipes.setRecipe(ModBlocks.chain, new ItemStack(ModItems.powder_steel_tiny, 1));
ShredderRecipes.setRecipe(ModBlocks.turret_light, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModBlocks.turret_heavy, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModBlocks.turret_flamer, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModBlocks.turret_rocket, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModBlocks.turret_cwis, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModBlocks.turret_tau, new ItemStack(ModItems.powder_steel, 16));
ShredderRecipes.setRecipe(ModItems.turret_light_ammo, new ItemStack(Items.gunpowder, 4));
ShredderRecipes.setRecipe(ModItems.turret_heavy_ammo, new ItemStack(Items.gunpowder, 4));
ShredderRecipes.setRecipe(ModItems.turret_flamer_ammo, new ItemStack(Items.gunpowder, 4));
ShredderRecipes.setRecipe(ModItems.turret_rocket_ammo, new ItemStack(Items.gunpowder, 4));
ShredderRecipes.setRecipe(ModItems.turret_cwis_ammo, new ItemStack(Items.gunpowder, 4));
ShredderRecipes.setRecipe(ModItems.turret_tau_ammo, new ItemStack(ModItems.powder_uranium, 4));
for(int i = 0; i < 16; i++) {
ShredderRecipes.setRecipe(new ItemStack(Blocks.stained_hardened_clay, 1, i), new ItemStack(Items.clay_ball, 4));
ShredderRecipes.setRecipe(new ItemStack(Blocks.wool, 1, i), new ItemStack(Items.string, 4));

View File

@ -55,7 +55,7 @@ public class GUISILEX extends GuiInfoContainer {
protected void drawGuiContainerForegroundLayer(int i, int j) {
String name = this.silex.hasCustomInventoryName() ? this.silex.getInventoryName() : I18n.format(this.silex.getInventoryName());
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 4, 4210752);
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
}

View File

@ -0,0 +1,20 @@
package com.hbm.inventory.gui;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.turret.TileEntityTurretBaseNT;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
public class GUITurretHoward extends GUITurretBase {
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/weapon/gui_turret_howard.png");
public GUITurretHoward(InventoryPlayer invPlayer, TileEntityTurretBaseNT tedf) {
super(invPlayer, tedf);
}
protected ResourceLocation getTexture() {
return texture;
}
}

View File

@ -1296,6 +1296,7 @@ public class ModItems {
public static Item ammo_shell_apfsds_t;
public static Item ammo_shell_apfsds_du;
public static Item ammo_shell_w9;
public static Item ammo_dgk;
public static Item ammo_nuke;
public static Item ammo_nuke_low;
public static Item ammo_nuke_high;
@ -3417,6 +3418,7 @@ public class ModItems {
ammo_shell_apfsds_t = new ItemAmmo().setUnlocalizedName("ammo_shell_apfsds_t").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_shell_apfsds-t");
ammo_shell_apfsds_du = new ItemAmmo().setUnlocalizedName("ammo_shell_apfsds_du").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_shell_apfsds-du");
ammo_shell_w9 = new ItemAmmo().setUnlocalizedName("ammo_shell_w9").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_shell_w9");
ammo_dgk = new ItemAmmo().setUnlocalizedName("ammo_dgk").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_dgk");
ammo_nuke = new ItemAmmo().setUnlocalizedName("ammo_nuke").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke");
ammo_nuke_low = new ItemAmmo().setUnlocalizedName("ammo_nuke_low").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_low");
ammo_nuke_high = new ItemAmmo().setUnlocalizedName("ammo_nuke_high").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":ammo_nuke_high");
@ -3628,7 +3630,7 @@ public class ModItems {
canteen_fab = new ItemCanteen(2 * 60).setUnlocalizedName("canteen_fab").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":canteen_fab");
pancake = new ItemPancake(20, 20, false).setUnlocalizedName("pancake").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":pancake");
nugget = new ItemLemon(200, 200, false).setUnlocalizedName("nugget").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":nugget");
peas = new ItemLemon(2, 4, false).setUnlocalizedName("peas").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":peas");
peas = new ItemPeas().setUnlocalizedName("peas").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":peas");
defuser = new Item().setUnlocalizedName("defuser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":defuser");
@ -3888,13 +3890,13 @@ public class ModItems {
mech_key = new ItemCustomLore().setUnlocalizedName("mech_key").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":mech_key");
turret_light_ammo = new ItemTurretAmmo(ModBlocks.turret_light, 100).setUnlocalizedName("turret_light_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_light_ammo");
turret_heavy_ammo = new ItemTurretAmmo(ModBlocks.turret_heavy, 25).setUnlocalizedName("turret_heavy_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_heavy_ammo");
turret_rocket_ammo = new ItemTurretAmmo(ModBlocks.turret_rocket, 8).setUnlocalizedName("turret_rocket_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_rocket_ammo");
turret_flamer_ammo = new ItemTurretAmmo(ModBlocks.turret_flamer, 200).setUnlocalizedName("turret_flamer_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_flamer_ammo");
turret_tau_ammo = new ItemTurretAmmo(ModBlocks.turret_tau, 100).setUnlocalizedName("turret_tau_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_tau_ammo");
turret_light_ammo = new ItemTurretAmmo(ModBlocks.turret_light, 100).setUnlocalizedName("turret_light_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_light_ammo");
turret_heavy_ammo = new ItemTurretAmmo(ModBlocks.turret_heavy, 25).setUnlocalizedName("turret_heavy_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_heavy_ammo");
turret_rocket_ammo = new ItemTurretAmmo(ModBlocks.turret_rocket, 8).setUnlocalizedName("turret_rocket_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_rocket_ammo");
turret_flamer_ammo = new ItemTurretAmmo(ModBlocks.turret_flamer, 200).setUnlocalizedName("turret_flamer_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_flamer_ammo");
turret_tau_ammo = new ItemTurretAmmo(ModBlocks.turret_tau, 100).setUnlocalizedName("turret_tau_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_tau_ammo");
turret_spitfire_ammo = new ItemTurretAmmo(ModBlocks.turret_spitfire, 2).setUnlocalizedName("turret_spitfire_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_spitfire_ammo");
turret_cwis_ammo = new ItemTurretAmmo(ModBlocks.turret_cwis, 250).setUnlocalizedName("turret_cwis_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_cwis_ammo");
turret_cwis_ammo = new ItemTurretAmmo(ModBlocks.turret_cwis, 250).setUnlocalizedName("turret_cwis_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":turret_cwis_ammo");
turret_cheapo_ammo = new ItemTurretAmmo(ModBlocks.turret_cheapo, 100).setUnlocalizedName("turret_cheapo_ammo").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":turret_cheapo_ammo");
template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":template_folder");
@ -6078,6 +6080,7 @@ public class ModItems {
GameRegistry.registerItem(ammo_shell_apfsds_t, ammo_shell_apfsds_t.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_apfsds_du, ammo_shell_apfsds_du.getUnlocalizedName());
GameRegistry.registerItem(ammo_shell_w9, ammo_shell_w9.getUnlocalizedName());
GameRegistry.registerItem(ammo_dgk, ammo_dgk.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke, ammo_nuke.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke_low, ammo_nuke_low.getUnlocalizedName());
GameRegistry.registerItem(ammo_nuke_high, ammo_nuke_high.getUnlocalizedName());

View File

@ -0,0 +1,30 @@
package com.hbm.items.tool;
import java.util.List;
import com.hbm.entity.mob.EntityQuackos;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemPeas extends Item{
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
if (!player.capabilities.isCreativeMode) {
--stack.stackSize;
}
List<EntityQuackos> quacc = world.getEntitiesWithinAABB(EntityQuackos.class, player.boundingBox.expand(50, 50, 50));
for(EntityQuackos ducc : quacc) {
ducc.despawn();
}
return stack;
}
}

View File

@ -88,7 +88,6 @@ public class ItemTurretControl extends Item {
if(mop != null) {
System.out.println(e.getCommandSenderName());
pos = mop;
pos.typeOfHit = MovingObjectType.ENTITY;
pos.entityHit = e;

View File

@ -6,6 +6,7 @@ import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.hbm.items.IEquipReceiver;
import com.hbm.items.tool.ItemSwordAbility;
import com.hbm.lib.Library;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
@ -56,7 +57,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
if(!(entityLiving instanceof EntityPlayerMP))
return false;
if(entityLiving instanceof EntityPlayer && ((EntityPlayer)entityLiving).getDisplayName().equals("Tankish")) {
if(entityLiving instanceof EntityPlayer && ((EntityPlayer)entityLiving).getUniqueID().toString().equals(Library.Tankish)) {
stack.setItemDamage(0);
}

View File

@ -16,7 +16,8 @@ public class ItemGunShotty extends ItemGunBase {
protected void updateServer(ItemStack stack, World world, EntityPlayer player, int slot, boolean isCurrentItem) {
super.updateServer(stack, world, player, slot, isCurrentItem);
if(player.getUniqueID().toString().equals(Library.Dr_Nostalgia) && this.getDelay(stack) < this.mainConfig.rateOfFire * 0.9)
if((player.getUniqueID().toString().equals(Library.Dr_Nostalgia) || player.getUniqueID().toString().equals(Library.Tankish)) &&
this.getDelay(stack) < this.mainConfig.rateOfFire * 0.9)
this.setDelay(stack, 0);
}

View File

@ -76,6 +76,7 @@ public class Library {
public static String FifeMiner = "37e5eb63-b9a2-4735-9007-1c77d703daa3";
public static String lag_add = "259785a0-20e9-4c63-9286-ac2f93ff528f";
public static String Pu_238 = "c95fdfd3-bea7-4255-a44b-d21bc3df95e3";
public static String Tankish = "609268ad-5b34-49c2-abba-a9d83229af03";
public static Set<String> contributors = Sets.newHashSet(new String[] {
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (3808)";
public static final String VERSION = "1.0.27 BETA (3815)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -128,6 +128,7 @@ public class ClientProxy extends ServerProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretJeremy.class, new RenderTurretJeremy());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretTauon.class, new RenderTurretTauon());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretRichard.class, new RenderTurretRichard());
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurretHoward.class, new RenderTurretHoward());
//mines
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLandmine.class, new RenderLandmine());
//cel prime

View File

@ -456,6 +456,7 @@ public class MainRegistry {
GameRegistry.registerTileEntity(TileEntityTurretTauon.class, "tileentity_turret_tauon");
GameRegistry.registerTileEntity(TileEntityTurretFriendly.class, "tileentity_turret_friendly");
GameRegistry.registerTileEntity(TileEntityTurretRichard.class, "tileentity_turret_richard");
GameRegistry.registerTileEntity(TileEntityTurretHoward.class, "tileentity_turret_howard");
GameRegistry.registerTileEntity(TileEntitySILEX.class, "tileentity_silex");
GameRegistry.registerTileEntity(TileEntityFEL.class, "tileentity_fel");

View File

@ -42,6 +42,7 @@ public class ResourceManager {
public static final IModelCustom turret_jeremy = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_jeremy.obj"));
public static final IModelCustom turret_tauon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_tauon.obj"));
public static final IModelCustom turret_richard = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_richard.obj"));
public static final IModelCustom turret_howard = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/turrets/turret_howard.obj"));
//Landmines
public static final IModelCustom mine_ap = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/mine_ap.obj"));
@ -269,6 +270,7 @@ public class ResourceManager {
public static final ResourceLocation turret_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/base.png");
public static final ResourceLocation turret_base_friendly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/base_friendly.png");
public static final ResourceLocation turret_carriage_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/carriage.png");
public static final ResourceLocation turret_carriage_ciws_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/carriage_ciws.png");
public static final ResourceLocation turret_carriage_friendly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/carriage_friendly.png");
public static final ResourceLocation turret_connector_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/connector.png");
public static final ResourceLocation turret_chekhov_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/chekhov.png");
@ -276,6 +278,8 @@ public class ResourceManager {
public static final ResourceLocation turret_jeremy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/jeremy.png");
public static final ResourceLocation turret_tauon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/tauon.png");
public static final ResourceLocation turret_richard_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/richard.png");
public static final ResourceLocation turret_howard_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/howard.png");
public static final ResourceLocation turret_howard_barrels_tex = new ResourceLocation(RefStrings.MODID, "textures/models/turrets/howard_barrels.png");
//Landmines
public static final ResourceLocation mine_ap_tex = new ResourceLocation(RefStrings.MODID, "textures/models/mine_ap.png");

View File

@ -887,6 +887,22 @@ public class ItemRenderLibrary {
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.turret_howard), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -4.5, 0);
GL11.glScaled(4, 4, 4);
}
public void renderCommon() {
GL11.glTranslated(-0.75, 0, 0);
GL11.glShadeModel(GL11.GL_SMOOTH);
bindTexture(ResourceManager.turret_base_tex); ResourceManager.turret_chekhov.renderPart("Base");
bindTexture(ResourceManager.turret_carriage_ciws_tex); ResourceManager.turret_howard.renderPart("Carriage");
bindTexture(ResourceManager.turret_howard_tex); ResourceManager.turret_howard.renderPart("Body");
bindTexture(ResourceManager.turret_howard_barrels_tex); ResourceManager.turret_howard.renderPart("BarrelsTop");
bindTexture(ResourceManager.turret_howard_barrels_tex); ResourceManager.turret_howard.renderPart("BarrelsBottom");
GL11.glShadeModel(GL11.GL_FLAT);
}});
renderers.put(Item.getItemFromBlock(ModBlocks.machine_silex), new ItemRenderBase() {
public void renderInventory() {
GL11.glTranslated(0, -2.5, 0);

View File

@ -0,0 +1,64 @@
package com.hbm.render.tileentity;
import org.lwjgl.opengl.GL11;
import com.hbm.handler.FluidTypeHandler.FluidType;
import com.hbm.main.ResourceManager;
import com.hbm.tileentity.turret.TileEntityTurretHoward;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
public class RenderTurretHoward extends RenderTurretBase {
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float interp) {
TileEntityTurretHoward turret = (TileEntityTurretHoward)te;
Vec3 pos = turret.getHorizontalOffset();
GL11.glPushMatrix();
GL11.glTranslated(x + pos.xCoord, y, z + pos.zCoord);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glShadeModel(GL11.GL_SMOOTH);
this.renderConnectors(turret, true, false, FluidType.NONE);
bindTexture(ResourceManager.turret_base_tex);
ResourceManager.turret_chekhov.renderPart("Base");
double yaw = -Math.toDegrees(turret.lastRotationYaw + (turret.rotationYaw - turret.lastRotationYaw) * interp) - 90D;
double pitch = Math.toDegrees(turret.lastRotationPitch + (turret.rotationPitch - turret.lastRotationPitch) * interp);
GL11.glRotated(yaw, 0, 1, 0);
bindTexture(ResourceManager.turret_carriage_ciws_tex);
ResourceManager.turret_howard.renderPart("Carriage");
GL11.glTranslated(0, 2.25, 0);
GL11.glRotated(pitch, 0, 0, 1);
GL11.glTranslated(0, -2.25, 0);
bindTexture(ResourceManager.turret_howard_tex);
ResourceManager.turret_howard.renderPart("Body");
float rot = turret.lastSpin + (turret.spin - turret.lastSpin) * interp;
bindTexture(ResourceManager.turret_howard_barrels_tex);
GL11.glPushMatrix();
GL11.glTranslated(0, 2.5, 0);
GL11.glRotated(rot, -1, 0, 0);
GL11.glTranslated(0, -2.5, 0);
ResourceManager.turret_howard.renderPart("BarrelsTop");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0, 2, 0);
GL11.glRotated(rot, 1, 0, 0);
GL11.glTranslated(0, -2, 0);
ResourceManager.turret_howard.renderPart("BarrelsBottom");
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -32,6 +32,7 @@ public class RenderAccessoryUtility {
private static ResourceLocation wiki = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeWiki.png");
private static ResourceLocation leftnugget = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeLeftNugget.png");
private static ResourceLocation rightnugget = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeRightNugget.png");
private static ResourceLocation tankish = new ResourceLocation(RefStrings.MODID + ":textures/models/capes/CapeTankish.png");
public static ResourceLocation getCloakFromPlayer(EntityPlayer player) {
@ -104,6 +105,9 @@ public class RenderAccessoryUtility {
if(uuid.equals(Library.lag_add)) {
return rightnugget;
}
if(uuid.equals(Library.Tankish)) {
return tankish;
}
if(Library.contributors.contains(uuid)) {
return wiki;
}

View File

@ -125,7 +125,7 @@ public class RenderScreenOverlay {
String cap = max == -1 ? ("") : ("" + max);
//if(renderCount)
if(renderCount)
Minecraft.getMinecraft().fontRenderer.drawString(count + " / " + cap, pX + 16, pZ + 6, 0xFFFFFF);
GL11.glDisable(GL11.GL_BLEND);

View File

@ -22,9 +22,8 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.Entity;
import net.minecraft.entity.INpc;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.passive.IAnimals;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -78,8 +77,9 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
public boolean targetAnimals = false;
public boolean targetMobs = true;
public boolean targetMachines = true;
public Entity target;
public Vec3 tPos;
//tally marks!
public int stattrak;
@ -152,13 +152,23 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
}
}
if(!worldObj.isRemote) {
if(target != null) {
this.tPos = this.getEntityPos(target);
} else {
this.tPos = null;
}
}
if(this.isOn && hasPower()) {
if(target != null)
if(tPos != null)
this.alignTurret();
} else {
this.target = null;
this.tPos = null;
}
if(!worldObj.isRemote) {
@ -188,7 +198,11 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
this.power = Library.chargeTEFromItems(slots, 10, this.power, this.getMaxPower());
NBTTagCompound data = new NBTTagCompound();
data.setInteger("target", this.target == null ? -1 : this.target.getEntityId());
if(this.tPos != null) {
data.setDouble("tX", this.tPos.xCoord);
data.setDouble("tY", this.tPos.yCoord);
data.setDouble("tZ", this.tPos.zCoord);
}
data.setLong("power", this.power);
data.setBoolean("isOn", this.isOn);
data.setBoolean("targetPlayers", this.targetPlayers);
@ -218,7 +232,6 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
@Override
public void networkUnpack(NBTTagCompound nbt) {
int t = nbt.getInteger("target");
this.power = nbt.getLong("power");
this.isOn = nbt.getBoolean("isOn");
this.targetPlayers = nbt.getBoolean("targetPlayers");
@ -227,10 +240,11 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
this.targetMachines = nbt.getBoolean("targetMachines");
this.stattrak = nbt.getInteger("stattrak");
if(t != -1)
this.target = worldObj.getEntityByID(t);
else
this.target = null;
if(nbt.hasKey("tX")) {
this.tPos = Vec3.createVectorHelper(nbt.getDouble("tX"), nbt.getDouble("tY"), nbt.getDouble("tZ"));
} else {
this.tPos = null;
}
}
@Override
@ -297,6 +311,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
return;
}
}
this.markDirty();
}
/**
@ -391,6 +407,9 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
}
this.target = target;
if(target != null)
this.tPos = this.getEntityPos(this.target);
}
/**
@ -398,7 +417,7 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
* Assumes that the target is not null
*/
protected void alignTurret() {
this.turnTowards(this.getEntityPos(target));
this.turnTowards(tPos);
}
/**

View File

@ -107,7 +107,7 @@ public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
if(worldObj.isRemote) {
if(this.target != null || manual) {
if(this.tPos != null || manual) {
this.accel = Math.min(45F, this.accel += 2);
} else {
this.accel = Math.max(0F, this.accel -= 2);
@ -124,7 +124,7 @@ public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
}
} else {
if(this.target == null && !manual) {
if(this.tPos == null && !manual) {
this.timer--;

View File

@ -0,0 +1,176 @@
package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.config.WeaponConfig;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.util.EntityDamageUtil;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.Vec3;
public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static {
configs.add(BulletConfigSyncingUtil.DGK_NORMAL);
}
@Override
protected List<Integer> getAmmoList() {
return configs;
}
@Override
public String getName() {
return "container.turretHoward";
}
@Override
public double getHeightOffset() {
return 2.25D;
}
@Override
public double getDecetorGrace() {
return 3D;
}
@Override
public double getTurretYawSpeed() {
return 12D;
}
@Override
public double getTurretPitchSpeed() {
return 8D;
}
@Override
public double getTurretElevation() {
return 90D;
}
@Override
public double getTurretDepression() {
return 50D;
}
@Override
public double getDecetorRange() {
return 250D;
}
@Override
public double getBarrelLength() {
return 3.25D;
}
@Override
public long getMaxPower() {
return 50000;
}
@Override
public long getConsumption() {
return 500;
}
int loaded;
int timer;
public float spin;
public float lastSpin;
@Override
public void updateEntity() {
if(worldObj.isRemote) {
this.lastSpin = this.spin;
if(this.tPos != null) {
this.spin += 45;
}
if(this.spin >= 360F) {
this.spin -= 360F;
this.lastSpin -= 360F;
}
} else {
if(loaded <= 0) {
BulletConfiguration conf = this.getFirstConfigLoaded();
if(conf != null) {
this.conusmeAmmo(conf.ammo);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.howard_reload", 4.0F, 1F);
loaded = 200;
}
}
}
super.updateEntity();
}
@Override
public void updateFiringTick() {
timer++;
if(loaded > 0 && this.tPos != null) {
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.howard_fire", 4.0F, 0.9F + worldObj.rand.nextFloat() * 0.3F);
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:turret.howard_fire", 4.0F, 1F + worldObj.rand.nextFloat() * 0.3F);
if(timer % 2 == 0) {
loaded--;
if(worldObj.rand.nextInt(100) + 1 <= WeaponConfig.ciwsHitrate)
EntityDamageUtil.attackEntityFromIgnoreIFrame(this.target, ModDamageSource.shrapnel, 2F + worldObj.rand.nextInt(2));
Vec3 pos = this.getTurretPos();
Vec3 vec = Vec3.createVectorHelper(this.getBarrelLength(), 0, 0);
vec.rotateAroundZ((float) -this.rotationPitch);
vec.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
Vec3 hOff = Vec3.createVectorHelper(0, 0.25, 0);
hOff.rotateAroundZ((float) -this.rotationPitch);
hOff.rotateAroundY((float) -(this.rotationYaw + Math.PI * 0.5));
for(int i = 0; i < 2; i++) {
if(i == 1) {
hOff.xCoord *= -1;
hOff.yCoord *= -1;
hOff.zCoord *= -1;
}
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "vanillaExt");
data.setString("mode", "largeexplode");
data.setFloat("size", 1.5F);
data.setByte("count", (byte)1);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord + vec.xCoord + hOff.xCoord, pos.yCoord + vec.yCoord + hOff.yCoord, pos.zCoord + vec.zCoord + hOff.zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
}
}
}
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
}
}

View File

@ -0,0 +1,28 @@
package com.hbm.util;
import java.lang.reflect.Field;
import cpw.mods.fml.relauncher.ReflectionHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.DamageSource;
public class EntityDamageUtil {
public static boolean attackEntityFromIgnoreIFrame(Entity victim, DamageSource src, float damage) {
if(!victim.attackEntityFrom(src, damage)) {
try {
Field lastDamage = ReflectionHelper.findField(EntityLivingBase.class, "lastDamage", "field_110153_bc");
float dmg = (float) damage + lastDamage.getFloat(victim);
return victim.attackEntityFrom(src, dmg);
} catch (Exception x) {
return false;
}
} else {
return true;
}
}
}

View File

@ -200,6 +200,7 @@ container.machineLargeTurbine=Industrielle Dampfturbine
container.machineRefinery=Ölraffinerie
container.machineSelenium=Hochleistungs-Sternmotor
container.machineShredder=Brecher
container.machineSILEX=SILEX
container.machineTurbine=Dampfturbine
container.machineTurbofan=Turbofan
container.machine_deuterium=Deuteriumextraktor
@ -247,6 +248,7 @@ container.teleLinker=TelLink-Gerät
container.teleporter=Teleporter
container.turretChekhov=Tschechows Gewehr
container.turretFriendly=Mister Friendly
container.turretHoward=Howard
container.turretJeremy=Jeremy
container.turretRichard=Richard
container.turretTauon=Tauon
@ -506,6 +508,7 @@ item.ammo_cell.name=Energiezelle
item.ammo_container.name=Munitionsbehälter
item.ammo_dart.name=Plastikdart (Withernd)
item.ammo_dart_nerf.name=NERF-Dart
item.ammo_dgk.name=Goalkeeper-Zwilling CIWS 200er Gürtel
item.ammo_folly.name=Silbernes Geschoss (Original)
item.ammo_folly_du.name=Silbernes Geschoss (DU, Nicht-Explosiv)
item.ammo_folly_nuclear.name=Silbernes Geschoss (Atomar)
@ -2605,6 +2608,7 @@ tile.machine_schrabidium_battery.name=Schrabidium-Energiespeicherblock
tile.machine_schrabidium_transmutator.name=Schrabidium-Transmutationsgerät
tile.machine_selenium.name=Hochleistungs-Sternmotor
tile.machine_shredder.name=Brecher
tile.machine_silex.name=Laser-Isotopentrenner
tile.machine_siren.name=Sirene
tile.machine_solar_boiler.name=Solarturmboiler
tile.machine_spp_bottom.name=NPE-Potentialgenerator (Unterteil)
@ -2797,6 +2801,7 @@ tile.turret_cwis.name=Phalanx Mk-15 CIWS
tile.turret_flamer.name=Flammenwerfergeschütz
tile.turret_friendly.name=Gatlingeschütz "Mister Friendly"
tile.turret_heavy.name=Schweres MG-Geschütz
tile.turret_howard.name=Goalkeeper-Zwilling CIWS "Howard"
tile.turret_jeremy.name=Autokanonengeschütz "Jeremy"
tile.turret_light.name=Leichtes MG-Geschütz
tile.turret_rocket.name=Raketengeschütz

View File

@ -202,6 +202,7 @@ container.machineLargeTurbine=Industrial Steam Turbine
container.machineRefinery=Oil Refinery
container.machineSelenium=Radial Performance Engine
container.machineShredder=Shredder
container.machineSILEX=SILEX
container.machineTurbine=Steam Turbine
container.machineTurbofan=Turbofan
container.machine_deuterium=Deuterium Extractor
@ -249,6 +250,7 @@ container.teleLinker=TelLink Device
container.teleporter=Teleporter
container.turretChekhov=Chekhov's Gun
container.turretFriendly=Mister Friendly
container.turretHoward=Howard
container.turretJeremy=Jeremy
container.turretRichard=Richard
container.turretTauon=Tauon
@ -508,6 +510,7 @@ item.ammo_cell.name=Energy Cell
item.ammo_container.name=Ammo Container
item.ammo_dart.name=Plastic Dart (Withering)
item.ammo_dart_nerf.name=NERF Dart
item.ammo_dgk.name=Goalkeeper Twin CIWS 200 Round Belt
item.ammo_folly.name=Silver Bullet (Original)
item.ammo_folly_du.name=Silver Bullet (DU, Non-Explosive)
item.ammo_folly_nuclear.name=Silver Bullet (Nuclear)
@ -2607,6 +2610,7 @@ tile.machine_schrabidium_battery.name=Schrabidium Energy Storage Block
tile.machine_schrabidium_transmutator.name=Schrabidium Transmutation Device
tile.machine_selenium.name=Radial Performance Engine
tile.machine_shredder.name=Shredder
tile.machine_silex.name=Laser Isotope Separation Chamber
tile.machine_siren.name=Siren
tile.machine_solar_boiler.name=Solar Tower Boiler
tile.machine_spp_bottom.name=ZPE Potential Generator (Bottom)
@ -2799,6 +2803,7 @@ tile.turret_cwis.name=Phalanx Mk-15 CIWS
tile.turret_flamer.name=Flamethrower Turret
tile.turret_friendly.name=Chaingun Turret "Mister Friendly"
tile.turret_heavy.name=Heavy Machine Gun Turret
tile.turret_howard.name=Goalkeeper Twin Chaingun CIWS "Howard"
tile.turret_jeremy.name=Autocannon Turret "Jeremy"
tile.turret_light.name=Light Machine Gun Turret
tile.turret_rocket.name=Rocket Turret

File diff suppressed because it is too large Load Diff

View File

@ -153,6 +153,8 @@
"turret.jeremy_fire": {"category": "block", "sounds": ["turret/jeremy_fire1", "turret/jeremy_fire2", "turret/jeremy_fire3", "turret/jeremy_fire4", "turret/jeremy_fire5"]},
"turret.jeremy_reload": {"category": "block", "sounds": [{"name": "turret/jeremy_reload", "stream": false}]},
"turret.richard_fire": {"category": "block", "sounds": [{"name": "turret/richard_fire", "stream": false}]},
"turret.howard_fire": {"category": "block", "sounds": [{"name": "turret/howard_fire", "stream": false}]},
"turret.howard_reload": {"category": "block", "sounds": [{"name": "turret/howard_reload", "stream": false}]},
"entity.chopperFlyingLoop": {"category": "hostile", "sounds": [{"name": "entity/chopperFlyingLoop", "stream": true}]},
"entity.chopperDrop": {"category": "hostile", "sounds": [{"name": "entity/chopperDrop", "stream": false}]},

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

View File

@ -3,7 +3,7 @@
"modid": "hbm",
"name": "Hbm's Nuclear Tech",
"description": "A mod that adds weapons, nuclear themed stuff and machines",
"version":"1.0.27-3808",
"version":"1.0.27-3815",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",