mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
🅱️alls
This commit is contained in:
parent
2690b3e96f
commit
b8325218a8
@ -58,6 +58,7 @@
|
||||
* Fallout effects now remove snow layers in the same area where they would remove things like small plants and leaves
|
||||
* Adjusted damage values to many swords and some tools
|
||||
* Unsats and aromatics can now be filled into gas canisters
|
||||
* Basalt asbestos ore no longer creates asbestos particles every block update, meaning volcanoes no longer cause massive delays with chunk rendering due to constant block changes
|
||||
|
||||
## Fixed
|
||||
* The conveyor grabber should no longer skip over items when used in long lines
|
||||
|
||||
@ -600,8 +600,9 @@ public class ModBlocks {
|
||||
public static Block sat_resonator;
|
||||
|
||||
public static Block sat_dock;
|
||||
|
||||
|
||||
public static Block soyuz_capsule;
|
||||
public static Block crate_supply;
|
||||
|
||||
public static Block crate_iron;
|
||||
public static Block crate_steel;
|
||||
@ -2064,6 +2065,7 @@ 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");
|
||||
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
||||
|
||||
turret_chekhov = new TurretChekhov(Material.iron).setBlockName("turret_chekhov").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
turret_friendly = new TurretFriendly(Material.iron).setBlockName("turret_friendly").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.weaponTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3340,6 +3342,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(soyuz_launcher, soyuz_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sat_dock, sat_dock.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(soyuz_capsule, soyuz_capsule.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crate_supply, crate_supply.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radar, machine_radar.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_radar_large, machine_radar_large.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(radar_screen, radar_screen.getUnlocalizedName());
|
||||
|
||||
@ -65,14 +65,7 @@ public class BlockOreBasalt extends BlockEnumMulti {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal()) for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ) == Blocks.air) {
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_asbestos);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { } //no more BUD outgassing for you, mister
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int fortune) {
|
||||
|
||||
126
src/main/java/com/hbm/blocks/generic/BlockSupplyCrate.java
Normal file
126
src/main/java/com/hbm/blocks/generic/BlockSupplyCrate.java
Normal file
@ -0,0 +1,126 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockSupplyCrate extends BlockContainer {
|
||||
|
||||
public BlockSupplyCrate(Material mat) {
|
||||
super(mat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntitySupplyCrate();
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return BlockCanCrate.renderID; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||
|
||||
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
|
||||
|
||||
ItemStack drop = new ItemStack(this);
|
||||
TileEntitySupplyCrate inv = (TileEntitySupplyCrate) world.getTileEntity(x, y, z);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
||||
if(inv != null) {
|
||||
for(int i = 0; i < inv.items.size(); i++) {
|
||||
ItemStack stack = inv.items.get(i);
|
||||
if(stack == null) continue;
|
||||
NBTTagCompound slot = new NBTTagCompound();
|
||||
stack.writeToNBT(slot);
|
||||
nbt.setTag("slot" + i, slot);
|
||||
}
|
||||
nbt.setInteger("amount", inv.items.size());
|
||||
}
|
||||
|
||||
if(!nbt.hasNoTags()) drop.stackTagCompound = nbt;
|
||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||
}
|
||||
return world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
|
||||
TileEntitySupplyCrate inv = (TileEntitySupplyCrate) world.getTileEntity(x, y, z);
|
||||
|
||||
if(inv != null && stack.hasTagCompound()) {
|
||||
int amount = stack.stackTagCompound.getInteger("amount");
|
||||
for(int i = 0; i < amount; i++) {
|
||||
inv.items.add(ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
|
||||
}
|
||||
}
|
||||
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem().equals(ModItems.crowbar)) {
|
||||
if(!world.isRemote) {
|
||||
dropContents(world, x, y, z);
|
||||
world.func_147480_a(x, y, z, false);
|
||||
world.playSoundEffect(x, y, z, "hbm:block.crateBreak", 0.5F, 1.0F);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void dropContents(World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileEntitySupplyCrate) {
|
||||
TileEntitySupplyCrate crate = (TileEntitySupplyCrate) tile;
|
||||
|
||||
for(ItemStack item : crate.items) {
|
||||
this.dropBlockAsItem(world, x, y, z, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TileEntitySupplyCrate extends TileEntity {
|
||||
|
||||
public List<ItemStack> items = new ArrayList();
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
items.clear();
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
items.add(ItemStack.loadItemStackFromNBT(nbt1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
NBTTagList list = new NBTTagList();
|
||||
for(int i = 0; i < items.size(); i++) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
items.get(i).writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -124,6 +124,7 @@ public class EntityMappings {
|
||||
addEntity(EntityGrenadePC.class, "entity_grenade_pink_cloud", 250);
|
||||
addEntity(EntityGrenadeCloud.class, "entity_grenade_cloud", 250);
|
||||
addEntity(EntityBomber.class, "entity_bomber", 1000);
|
||||
addEntity(EntityC130.class, "entity_c130", 1000);
|
||||
addEntity(EntityBombletZeta.class, "entity_zeta", 1000);
|
||||
addEntity(EntityOrangeFX.class, "entity_agent_orange", 1000);
|
||||
addEntity(EntityDeathBlast.class, "entity_laser_blast", 1000);
|
||||
@ -164,6 +165,7 @@ public class EntityMappings {
|
||||
addEntity(EntityBuilding.class, "entity_falling_building", 1000);
|
||||
addEntity(EntitySoyuz.class, "entity_soyuz", 1000);
|
||||
addEntity(EntitySoyuzCapsule.class, "entity_soyuz_capsule", 1000);
|
||||
addEntity(EntityParachuteCrate.class, "entity_parachute_crate", 1000);
|
||||
addEntity(EntityMovingItem.class, "entity_c_item", 1000);
|
||||
addEntity(EntityMovingPackage.class, "entity_c_package", 1000);
|
||||
addEntity(EntityDeliveryDrone.class, "entity_delivery_drone", 250, false);
|
||||
|
||||
75
src/main/java/com/hbm/entity/item/EntityParachuteCrate.java
Normal file
75
src/main/java/com/hbm/entity/item/EntityParachuteCrate.java
Normal file
@ -0,0 +1,75 @@
|
||||
package com.hbm.entity.item;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityParachuteCrate extends Entity {
|
||||
|
||||
public List<ItemStack> items = new ArrayList();
|
||||
|
||||
public EntityParachuteCrate(World world) {
|
||||
super(world);
|
||||
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);
|
||||
|
||||
if(this.motionY > -0.2) this.motionY -= 0.02;
|
||||
if(posY > 600) posY = 600;
|
||||
|
||||
if(this.worldObj.getBlock((int) Math.floor(this.posX), (int) Math.floor(this.posY), (int) Math.floor(this.posZ)) != Blocks.air) {
|
||||
|
||||
this.setDead();
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
worldObj.setBlock((int) Math.floor(this.posX), (int) Math.floor(this.posY + 1), (int) Math.floor(this.posZ), ModBlocks.crate_supply);
|
||||
TileEntitySupplyCrate crate = (TileEntitySupplyCrate) worldObj.getTileEntity((int) Math.floor(this.posX), (int) Math.floor(this.posY + 1), (int) Math.floor(this.posZ));
|
||||
if(crate != null) crate.items.addAll(this.items);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override protected void entityInit() { }
|
||||
@Override @SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { return true; }
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
items.clear();
|
||||
NBTTagList list = nbt.getTagList("items", 10);
|
||||
for(int i = 0; i < list.tagCount(); i++) {
|
||||
NBTTagCompound nbt1 = list.getCompoundTagAt(i);
|
||||
items.add(ItemStack.loadItemStackFromNBT(nbt1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
NBTTagList list = new NBTTagList();
|
||||
for(int i = 0; i < items.size(); i++) {
|
||||
NBTTagCompound nbt1 = new NBTTagCompound();
|
||||
items.get(i).writeToNBT(nbt1);
|
||||
list.appendTag(nbt1);
|
||||
}
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
}
|
||||
@ -1,516 +1,275 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.projectile.EntityBombletZeta;
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityRocketHoming;
|
||||
import com.hbm.explosion.ExplosionChaos;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.LoopedEntitySoundPacket;
|
||||
import com.hbm.util.ParticleUtil;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
|
||||
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;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public class EntityBomber extends Entity implements IChunkLoader {
|
||||
@NotableComments
|
||||
public class EntityBomber extends EntityPlaneBase {
|
||||
|
||||
int timer = 200;
|
||||
/* This was probably the dumbest fucking way that I could have handled this. Not gonna change it now, be glad I made a superclass at all. */
|
||||
int bombStart = 75;
|
||||
int bombStop = 125;
|
||||
int bombRate = 3;
|
||||
int type = 0;
|
||||
|
||||
public int health = 50;
|
||||
|
||||
public EntityBomber(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
protected AudioWrapper audio;
|
||||
|
||||
public EntityBomber(World world) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.setSize(8.0F, 4.0F);
|
||||
this.setSize(8.0F, 4.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entityInit() {
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public boolean canBeCollidedWith()
|
||||
{
|
||||
return this.health > 0;
|
||||
}
|
||||
|
||||
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
if(p_70097_1_ == ModDamageSource.nuclearBlast)
|
||||
return false;
|
||||
|
||||
if (this.isEntityInvulnerable())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!this.isDead && !this.worldObj.isRemote && this.health > 0)
|
||||
{
|
||||
health -= p_70097_2_;
|
||||
|
||||
if (this.health <= 0)
|
||||
{
|
||||
this.killBomber();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void killBomber() {
|
||||
ExplosionLarge.explode(worldObj, posX, posY, posZ, 5, true, false, true);
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.planeShotDown", 25.0F, 1.0F);
|
||||
}
|
||||
|
||||
/** This sucks balls. Too bad! */
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
//super.onUpdate();
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
|
||||
this.setPosition(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.dataWatcher.updateObject(17, health);
|
||||
|
||||
if(health > 0)
|
||||
PacketDispatcher.wrapper.sendToAllAround(new LoopedEntitySoundPacket(this.getEntityId()), new TargetPoint(worldObj.provider.dimensionId, posX, posY, posZ, 250));
|
||||
} else {
|
||||
health = this.dataWatcher.getWatchableObjectInt(17);
|
||||
}
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(this.health <= 0) {
|
||||
motionY -= 0.025;
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
ParticleUtil.spawnGasFlame(this.worldObj, this.posX + rand.nextGaussian() * 0.5 - motionX * 2, this.posY + rand.nextGaussian() * 0.5 - motionY * 2, this.posZ + rand.nextGaussian() * 0.5 - motionZ * 2, 0.0, 0.1, 0.0);
|
||||
|
||||
if(worldObj.getBlock((int)posX, (int)posY, (int)posZ).isNormalCube() && !worldObj.isRemote) {
|
||||
this.setDead();
|
||||
|
||||
/*worldObj.setBlock((int)posX, (int)posY, (int)posZ, ModBlocks.bomber);
|
||||
TileEntityBomber te = (TileEntityBomber)worldObj.getTileEntity((int)posX, (int)posY, (int)posZ);
|
||||
|
||||
if(te != null) {
|
||||
te.yaw = (int)(this.rotationYaw);
|
||||
te.pitch = (int)(this.rotationPitch);
|
||||
|
||||
te.type = this.getDataWatcher().getWatchableObjectByte(16);
|
||||
}*/
|
||||
|
||||
ExplosionLarge.explodeFire(worldObj, posX, posY, posZ, 25, true, false, true);
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.planeCrash", 10.0F, 1.0F);
|
||||
|
||||
return;
|
||||
if(worldObj.isRemote) {
|
||||
if(this.getDataWatcher().getWatchableObjectFloat(17) > 0) {
|
||||
if(audio == null || !audio.isPlaying()) {
|
||||
int bomberType = this.dataWatcher.getWatchableObjectByte(16);
|
||||
audio = MainRegistry.proxy.getLoopedSound(bomberType <= 4 ? "hbm:entity.bomberSmallLoop" : "hbm:entity.bomberLoop", (float) posX, (float) posY, (float) posZ, 2F, 250F, 1F, 20);
|
||||
audio.startSound();
|
||||
}
|
||||
audio.keepAlive();
|
||||
audio.updatePosition((float) posX, (float) posY, (float) posZ);
|
||||
} else {
|
||||
if(audio != null && audio.isPlaying()) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(this.ticksExisted > timer)
|
||||
this.setDead();
|
||||
|
||||
if(!worldObj.isRemote && this.health > 0 && this.ticksExisted > bombStart && this.ticksExisted < bombStop && this.ticksExisted % bombRate == 0) {
|
||||
|
||||
if(type == 3) {
|
||||
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
|
||||
ExplosionChaos.spawnChlorine(worldObj, this.posX, this.posY - 1F, this.posZ, 10, 0.5, 3);
|
||||
|
||||
} else if(type == 5) {
|
||||
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(worldObj);
|
||||
rocket.setIsCritical(true);
|
||||
//rocket.motionX = motionX;
|
||||
//rocket.motionZ = motionZ;
|
||||
rocket.motionY = -1;
|
||||
rocket.shootingEntity = this;
|
||||
rocket.homingRadius = 50;
|
||||
rocket.homingMod = 5;
|
||||
|
||||
rocket.posX = posX + rand.nextDouble() - 0.5;
|
||||
rocket.posY = posY - rand.nextDouble();
|
||||
rocket.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
|
||||
worldObj.spawnEntityInWorld(rocket);
|
||||
|
||||
} else if(type == 6) {
|
||||
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityBoxcar rocket = new EntityBoxcar(worldObj);
|
||||
|
||||
rocket.posX = posX + rand.nextDouble() - 0.5;
|
||||
rocket.posY = posY - rand.nextDouble();
|
||||
rocket.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
|
||||
worldObj.spawnEntityInWorld(rocket);
|
||||
|
||||
} else if(type == 7) {
|
||||
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
|
||||
ExplosionChaos.spawnChlorine(worldObj, this.posX, worldObj.getHeightValue((int)this.posX, (int)this.posZ) + 2, this.posZ, 10, 1, 2);
|
||||
|
||||
} else if(type == 5) {
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityRocketHoming rocket = new EntityRocketHoming(worldObj);
|
||||
rocket.setIsCritical(true);
|
||||
rocket.motionY = -1;
|
||||
rocket.shootingEntity = this;
|
||||
rocket.homingRadius = 50;
|
||||
rocket.homingMod = 5;
|
||||
rocket.posX = posX + rand.nextDouble() - 0.5;
|
||||
rocket.posY = posY - rand.nextDouble();
|
||||
rocket.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
worldObj.spawnEntityInWorld(rocket);
|
||||
|
||||
} else if(type == 6) {
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "hbm:weapon.missileTakeOff", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityBoxcar rocket = new EntityBoxcar(worldObj);
|
||||
rocket.posX = posX + rand.nextDouble() - 0.5;
|
||||
rocket.posY = posY - rand.nextDouble();
|
||||
rocket.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
worldObj.spawnEntityInWorld(rocket);
|
||||
|
||||
} else if(type == 7) {
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
|
||||
ExplosionChaos.spawnChlorine(worldObj, this.posX, worldObj.getHeightValue((int) this.posX, (int) this.posZ) + 2, this.posZ, 10, 1, 2);
|
||||
|
||||
} else {
|
||||
|
||||
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "hbm:entity.bombWhistle", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
|
||||
worldObj.playSoundEffect((double) (posX + 0.5F), (double) (posY + 0.5F), (double) (posZ + 0.5F), "hbm:entity.bombWhistle", 10.0F, 0.9F + rand.nextFloat() * 0.2F);
|
||||
EntityBombletZeta zeta = new EntityBombletZeta(worldObj);
|
||||
/*zeta.prevRotationYaw = zeta.rotationYaw = this.rotationYaw;
|
||||
zeta.prevRotationPitch = zeta.rotationPitch = this.rotationPitch;*/
|
||||
|
||||
zeta.rotation();
|
||||
|
||||
zeta.type = type;
|
||||
|
||||
zeta.posX = posX + rand.nextDouble() - 0.5;
|
||||
zeta.posY = posY - rand.nextDouble();
|
||||
zeta.posZ = posZ + rand.nextDouble() - 0.5;
|
||||
|
||||
if(type == 0) {
|
||||
zeta.motionX = motionX + rand.nextGaussian() * 0.15;
|
||||
zeta.motionZ = motionZ + rand.nextGaussian() * 0.15;
|
||||
zeta.motionX = motionX + rand.nextGaussian() * 0.15; zeta.motionZ = motionZ + rand.nextGaussian() * 0.15;
|
||||
} else {
|
||||
zeta.motionX = motionX;
|
||||
zeta.motionZ = motionZ;
|
||||
zeta.motionX = motionX; zeta.motionZ = motionZ;
|
||||
}
|
||||
|
||||
worldObj.spawnEntityInWorld(zeta);
|
||||
}
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
loadNeighboringChunks((int)(posX / 16), (int)(posZ / 16));
|
||||
|
||||
}
|
||||
|
||||
public void fac(World world, double x, double y, double z) {
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(world.rand.nextDouble() - 0.5, 0, world.rand.nextDouble() - 0.5);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
vector.zCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
|
||||
this.setLocationAndAngles(x - vector.xCoord * 100, y + 50, z - vector.zCoord * 100, 0.0F, 0.0F);
|
||||
this.loadNeighboringChunks((int)(x / 16), (int)(z / 16));
|
||||
|
||||
this.motionX = vector.xCoord;
|
||||
this.motionZ = vector.zCoord;
|
||||
this.motionY = 0.0D;
|
||||
|
||||
this.rotation();
|
||||
|
||||
int i = 1;
|
||||
|
||||
int rand = world.rand.nextInt(7);
|
||||
|
||||
switch(rand) {
|
||||
case 0:
|
||||
case 1: i = 1; break;
|
||||
case 2:
|
||||
case 3: i = 2; break;
|
||||
case 4: i = 5; break;
|
||||
case 5: i = 6; break;
|
||||
case 6: i = 7; break;
|
||||
}
|
||||
|
||||
if(world.rand.nextInt(100) == 0) {
|
||||
rand = world.rand.nextInt(4);
|
||||
|
||||
switch(rand) {
|
||||
case 0: i = 0; break;
|
||||
case 1: i = 3; break;
|
||||
case 2: i = 4; break;
|
||||
case 3: i = 8; break;
|
||||
}
|
||||
}
|
||||
|
||||
this.getDataWatcher().updateObject(16, (byte)i);
|
||||
this.setSize(8.0F, 4.0F);
|
||||
}
|
||||
|
||||
public static EntityBomber statFacCarpet(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 2;
|
||||
public void fac(World world, double x, double y, double z) {
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.type = 0;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacNapalm(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 5;
|
||||
Vec3 vector = Vec3.createVectorHelper(world.rand.nextDouble() - 0.5, 0, world.rand.nextDouble() - 0.5);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
vector.zCoord *= GeneralConfig.enableBomberShortMode ? 1 : 2;
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.type = 1;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacChlorine(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 4;
|
||||
this.setLocationAndAngles(x - vector.xCoord * 100, y + 50, z - vector.zCoord * 100, 0.0F, 0.0F);
|
||||
this.loadNeighboringChunks((int) (x / 16), (int) (z / 16));
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.type = 2;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacOrange(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 75;
|
||||
bomber.bombStop = 125;
|
||||
bomber.bombRate = 1;
|
||||
this.motionX = vector.xCoord;
|
||||
this.motionZ = vector.zCoord;
|
||||
this.motionY = 0.0D;
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.type = 3;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacABomb(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 60;
|
||||
bomber.bombStop = 70;
|
||||
bomber.bombRate = 65;
|
||||
this.rotation();
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
int i = 1;
|
||||
|
||||
int rand = world.rand.nextInt(3);
|
||||
|
||||
switch(rand) {
|
||||
case 0: i = 5; break;
|
||||
case 1: i = 6; break;
|
||||
case 2: i = 7; break;
|
||||
}
|
||||
|
||||
if(world.rand.nextInt(100) == 0) {
|
||||
i = 8;
|
||||
}
|
||||
|
||||
bomber.getDataWatcher().updateObject(16, (byte)i);
|
||||
|
||||
bomber.type = 4;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacStinger(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 150;
|
||||
bomber.bombRate = 10;
|
||||
int i = 1;
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.getDataWatcher().updateObject(16, (byte)4);
|
||||
|
||||
bomber.type = 5;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacBoxcar(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 150;
|
||||
bomber.bombRate = 10;
|
||||
int rand = world.rand.nextInt(7);
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.getDataWatcher().updateObject(16, (byte)6);
|
||||
|
||||
bomber.type = 6;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacPC(World world, double x, double y, double z) {
|
||||
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 75;
|
||||
bomber.bombStop = 125;
|
||||
bomber.bombRate = 1;
|
||||
switch(rand) {
|
||||
case 0: case 1: i = 1; break;
|
||||
case 2: case 3: i = 2; break;
|
||||
case 4: i = 5; break;
|
||||
case 5: i = 6; break;
|
||||
case 6: i = 7; break;
|
||||
}
|
||||
|
||||
bomber.fac(world, x, y, z);
|
||||
|
||||
bomber.getDataWatcher().updateObject(16, (byte)6);
|
||||
|
||||
bomber.type = 7;
|
||||
|
||||
return bomber;
|
||||
}
|
||||
if(world.rand.nextInt(100) == 0) {
|
||||
rand = world.rand.nextInt(4);
|
||||
switch(rand) {
|
||||
case 0: i = 0; break;
|
||||
case 1: i = 3; break;
|
||||
case 2: i = 4; break;
|
||||
case 3: i = 8; break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entityInit() {
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
|
||||
this.dataWatcher.addObject(17, Integer.valueOf((int)50));
|
||||
}
|
||||
this.getDataWatcher().updateObject(16, (byte) i);
|
||||
this.setSize(8.0F, 4.0F);
|
||||
}
|
||||
|
||||
public static EntityBomber statFacCarpet(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 2;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.type = 0;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacNapalm(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 5;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.type = 1;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacChlorine(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 100;
|
||||
bomber.bombRate = 4;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.type = 2;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacOrange(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 75;
|
||||
bomber.bombStop = 125;
|
||||
bomber.bombRate = 1;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.type = 3;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacABomb(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 60;
|
||||
bomber.bombStop = 70;
|
||||
bomber.bombRate = 65;
|
||||
bomber.fac(world, x, y, z);
|
||||
int i = 1;
|
||||
|
||||
int rand = world.rand.nextInt(3);
|
||||
|
||||
switch(rand) {
|
||||
case 0: i = 5; break;
|
||||
case 1: i = 6; break;
|
||||
case 2: i = 7; break;
|
||||
}
|
||||
if(world.rand.nextInt(100) == 0) i = 8;
|
||||
|
||||
bomber.getDataWatcher().updateObject(16, (byte) i);
|
||||
bomber.type = 4;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacStinger(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 150;
|
||||
bomber.bombRate = 10;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.getDataWatcher().updateObject(16, (byte) 4);
|
||||
bomber.type = 5;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacBoxcar(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 50;
|
||||
bomber.bombStop = 150;
|
||||
bomber.bombRate = 10;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.getDataWatcher().updateObject(16, (byte) 6);
|
||||
bomber.type = 6;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
public static EntityBomber statFacPC(World world, double x, double y, double z) {
|
||||
EntityBomber bomber = new EntityBomber(world);
|
||||
bomber.timer = 200;
|
||||
bomber.bombStart = 75;
|
||||
bomber.bombStop = 125;
|
||||
bomber.bombRate = 1;
|
||||
bomber.fac(world, x, y, z);
|
||||
bomber.getDataWatcher().updateObject(16, (byte) 6);
|
||||
bomber.type = 7;
|
||||
return bomber;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
ticksExisted = nbt.getInteger("ticksExisted");
|
||||
super.readEntityFromNBT(nbt);
|
||||
bombStart = nbt.getInteger("bombStart");
|
||||
bombStop = nbt.getInteger("bombStop");
|
||||
bombRate = nbt.getInteger("bombRate");
|
||||
type = nbt.getInteger("type");
|
||||
|
||||
this.getDataWatcher().updateObject(16, nbt.getByte("style"));
|
||||
this.getDataWatcher().updateObject(17, nbt.getInteger("health"));
|
||||
this.setSize(8.0F, 4.0F);
|
||||
this.getDataWatcher().updateObject(16, nbt.getByte("style"));
|
||||
this.setSize(8.0F, 4.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("ticksExisted", ticksExisted);
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setInteger("bombStart", bombStart);
|
||||
nbt.setInteger("bombStop", bombStop);
|
||||
nbt.setInteger("bombRate", bombRate);
|
||||
nbt.setInteger("type", type);
|
||||
nbt.setByte("style", this.getDataWatcher().getWatchableObjectByte(16));
|
||||
nbt.setInteger("health", this.getDataWatcher().getWatchableObjectInt(17));
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float)(Math.atan2(this.motionY, f2) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
|
||||
{
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
|
||||
{
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
|
||||
{
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double distance)
|
||||
{
|
||||
return distance < 500000;
|
||||
}
|
||||
|
||||
private Ticket loaderTicket;
|
||||
|
||||
public void init(Ticket ticket) {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(ticket != null) {
|
||||
|
||||
if(loaderTicket == null) {
|
||||
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
|
||||
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ)
|
||||
{
|
||||
if(!worldObj.isRemote && loaderTicket != null)
|
||||
{
|
||||
for(ChunkCoordIntPair chunk : loadedChunks)
|
||||
{
|
||||
ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ - 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ - 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX + 1, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ + 1));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX - 1, newChunkZ));
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ - 1));
|
||||
|
||||
for(ChunkCoordIntPair chunk : loadedChunks)
|
||||
{
|
||||
ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
97
src/main/java/com/hbm/entity/logic/EntityC130.java
Normal file
97
src/main/java/com/hbm/entity/logic/EntityC130.java
Normal file
@ -0,0 +1,97 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import com.hbm.entity.item.EntityParachuteCrate;
|
||||
import com.hbm.itempool.ItemPool;
|
||||
import com.hbm.itempool.ItemPoolsC130;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityC130 extends EntityPlaneBase {
|
||||
|
||||
protected AudioWrapper audio;
|
||||
public C130PayloadType payload = C130PayloadType.SUPPLIES;
|
||||
|
||||
public EntityC130(World world) {
|
||||
super(world);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.setSize(8.0F, 4.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(worldObj.isRemote) {
|
||||
if(this.getDataWatcher().getWatchableObjectFloat(17) > 0) {
|
||||
if(audio == null || !audio.isPlaying()) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:entity.bomberLoop", (float) posX, (float) posY, (float) posZ, 2F, 250F, 1F, 20);
|
||||
audio.startSound();
|
||||
}
|
||||
audio.keepAlive();
|
||||
audio.updatePosition((float) posX, (float) posY, (float) posZ);
|
||||
} else {
|
||||
if(audio != null && audio.isPlaying()) {
|
||||
audio.stopSound();
|
||||
audio = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote && this.ticksExisted == this.getLifetime() / 2 && this.health > 0) {
|
||||
EntityParachuteCrate crate = new EntityParachuteCrate(worldObj);
|
||||
crate.setPosition(posX - motionX * 7, posY - 10, posZ - motionZ * 7);
|
||||
|
||||
if(this.payload == C130PayloadType.SUPPLIES) {
|
||||
for(int i = 0; i < 5; i++) crate.items.add(ItemPool.getStack(ItemPoolsC130.POOL_SUPPLIES, this.rand));
|
||||
}
|
||||
if(this.payload == C130PayloadType.WEAPONS) {
|
||||
int amount = 1 + rand.nextInt(2);
|
||||
for(int i = 0; i < amount; i++) crate.items.add(ItemPool.getStack(ItemPoolsC130.POOL_WEAPONS, this.rand));
|
||||
}
|
||||
|
||||
worldObj.spawnEntityInWorld(crate);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
super.readEntityFromNBT(nbt);
|
||||
this.payload = EnumUtil.grabEnumSafely(C130PayloadType.class, nbt.getInteger("payload"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
super.writeEntityToNBT(nbt);
|
||||
nbt.setInteger("payload", this.payload.ordinal());
|
||||
}
|
||||
|
||||
public void fac(World world, double x, double y, double z, C130PayloadType payload) {
|
||||
|
||||
Vec3 vector = Vec3.createVectorHelper(world.rand.nextDouble() - 0.5, 0, world.rand.nextDouble() - 0.5);
|
||||
vector = vector.normalize();
|
||||
vector.xCoord *= 2;
|
||||
vector.zCoord *= 2;
|
||||
|
||||
this.payload = payload;
|
||||
|
||||
this.setLocationAndAngles(x - vector.xCoord * 100, y + 100, z - vector.zCoord * 100, 0.0F, 0.0F);
|
||||
this.loadNeighboringChunks((int) (x / 16), (int) (z / 16));
|
||||
|
||||
this.motionX = vector.xCoord;
|
||||
this.motionZ = vector.zCoord;
|
||||
this.motionY = 0.0D;
|
||||
|
||||
this.rotation();
|
||||
}
|
||||
|
||||
public static enum C130PayloadType {
|
||||
SUPPLIES,
|
||||
WEAPONS,
|
||||
A_FUCKING_FUEL_TRUCK
|
||||
}
|
||||
}
|
||||
151
src/main/java/com/hbm/entity/logic/EntityPlaneBase.java
Normal file
151
src/main/java/com/hbm/entity/logic/EntityPlaneBase.java
Normal file
@ -0,0 +1,151 @@
|
||||
package com.hbm.entity.logic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.helper.ExplosionSmallCreator;
|
||||
import com.hbm.util.ParticleUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeChunkManager;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Ticket;
|
||||
import net.minecraftforge.common.ForgeChunkManager.Type;
|
||||
|
||||
public abstract class EntityPlaneBase extends Entity implements IChunkLoader {
|
||||
|
||||
private Ticket loaderTicket;
|
||||
private List<ChunkCoordIntPair> loadedChunks = new ArrayList<ChunkCoordIntPair>();
|
||||
|
||||
public float health = getMaxHealth();
|
||||
public int timer = getLifetime();
|
||||
|
||||
public EntityPlaneBase(World world) { super(world); }
|
||||
|
||||
public float getMaxHealth() { return 50F; }
|
||||
public int getLifetime() { return 200; }
|
||||
|
||||
@Override public boolean canBeCollidedWith() { return this.health > 0; }
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource source, float amount) {
|
||||
if(source == ModDamageSource.nuclearBlast) return false;
|
||||
if(this.isEntityInvulnerable()) return false;
|
||||
if(!this.isDead && !this.worldObj.isRemote && this.health > 0) {
|
||||
health -= amount;
|
||||
if(this.health <= 0) this.killPlane();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void killPlane() {
|
||||
ExplosionSmallCreator.composeEffect(worldObj, posX, posY, posZ, 25, 3.5F, 2F);
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "hbm:entity.planeShotDown", 25.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
init(ForgeChunkManager.requestTicket(MainRegistry.instance, worldObj, Type.ENTITY));
|
||||
this.dataWatcher.addObject(17, new Float(50F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Ticket ticket) {
|
||||
if(!worldObj.isRemote && ticket != null) {
|
||||
if(loaderTicket == null) {
|
||||
loaderTicket = ticket;
|
||||
loaderTicket.bindEntity(this);
|
||||
loaderTicket.getModData();
|
||||
}
|
||||
ForgeChunkManager.forceChunk(loaderTicket, new ChunkCoordIntPair(chunkCoordX, chunkCoordZ));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
this.lastTickPosX = this.prevPosX = posX;
|
||||
this.lastTickPosY = this.prevPosY = posY;
|
||||
this.lastTickPosZ = this.prevPosZ = posZ;
|
||||
this.setPosition(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
this.dataWatcher.updateObject(17, health);
|
||||
} else {
|
||||
health = this.dataWatcher.getWatchableObjectFloat(17);
|
||||
}
|
||||
|
||||
this.rotation();
|
||||
|
||||
if(this.health <= 0) {
|
||||
motionY -= 0.025;
|
||||
|
||||
for(int i = 0; i < 10; i++) ParticleUtil.spawnGasFlame(this.worldObj, this.posX + rand.nextGaussian() * 0.5 - motionX * 2, this.posY + rand.nextGaussian() * 0.5 - motionY * 2, this.posZ + rand.nextGaussian() * 0.5 - motionZ * 2, 0.0, 0.1, 0.0);
|
||||
|
||||
if((!worldObj.getBlock((int) posX, (int) posY, (int) posZ).isAir(worldObj, (int) posX, (int) posY, (int) posZ) || posY < 0) && !worldObj.isRemote) {
|
||||
this.setDead();
|
||||
new ExplosionVNT(worldObj, posX, posY, posZ, 15F).makeStandard().explode();
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "hbm:entity.planeCrash", 25.0F, 1.0F);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.motionY = 0F;
|
||||
}
|
||||
|
||||
if(this.ticksExisted > timer) this.setDead();
|
||||
if(!worldObj.isRemote) loadNeighboringChunks((int)Math.floor(posX / 16D), (int)Math.floor(posZ / 16D));
|
||||
}
|
||||
|
||||
protected void rotation() {
|
||||
float motionHorizontal = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float) (Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
for(this.rotationPitch = (float) (Math.atan2(this.motionY, motionHorizontal) * 180.0D / Math.PI) - 90; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F);
|
||||
while(this.rotationPitch - this.prevRotationPitch >= 180.0F) this.prevRotationPitch += 360.0F;
|
||||
while(this.rotationYaw - this.prevRotationYaw < -180.0F) this.prevRotationYaw -= 360.0F;
|
||||
while(this.rotationYaw - this.prevRotationYaw >= 180.0F) this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDead() {
|
||||
super.setDead();
|
||||
this.clearChunkLoader();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||
ticksExisted = nbt.getInteger("ticksExisted");
|
||||
this.getDataWatcher().updateObject(17, nbt.getFloat("health"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||
nbt.setInteger("ticksExisted", ticksExisted);
|
||||
nbt.setFloat("health", this.getDataWatcher().getWatchableObjectFloat(17));
|
||||
}
|
||||
|
||||
public void clearChunkLoader() {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) ForgeChunkManager.unforceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
|
||||
public void loadNeighboringChunks(int newChunkX, int newChunkZ) {
|
||||
if(!worldObj.isRemote && loaderTicket != null) {
|
||||
clearChunkLoader();
|
||||
loadedChunks.clear();
|
||||
loadedChunks.add(new ChunkCoordIntPair(newChunkX, newChunkZ));
|
||||
for(ChunkCoordIntPair chunk : loadedChunks) ForgeChunkManager.forceChunk(loaderTicket, chunk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override @SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double distance) { return true; }
|
||||
}
|
||||
@ -25,6 +25,7 @@ public class ItemPool {
|
||||
ItemPoolsRedRoom.init();
|
||||
ItemPoolsSatellite.init();
|
||||
ItemPoolsPile.init();
|
||||
ItemPoolsC130.init();
|
||||
}
|
||||
|
||||
public static HashMap<String, ItemPool> pools = new HashMap();
|
||||
|
||||
43
src/main/java/com/hbm/itempool/ItemPoolsC130.java
Normal file
43
src/main/java/com/hbm/itempool/ItemPoolsC130.java
Normal file
@ -0,0 +1,43 @@
|
||||
package com.hbm.itempool;
|
||||
|
||||
import static com.hbm.lib.HbmChestContents.weighted;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
|
||||
public class ItemPoolsC130 {
|
||||
|
||||
public static final String POOL_SUPPLIES = "POOL_SUPPLIES";
|
||||
public static final String POOL_WEAPONS = "POOL_WEAPONS";
|
||||
|
||||
|
||||
public static void init() {
|
||||
|
||||
new ItemPool(POOL_SUPPLIES) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.definitelyfood, 0, 3, 10, 25),
|
||||
weighted(ModItems.syringe_metal_stimpak, 0, 1, 3, 10),
|
||||
weighted(ModItems.pill_iodine, 0, 1, 2, 2),
|
||||
weighted(ModItems.canister_full, Fluids.DIESEL.getID(), 1, 4, 5),
|
||||
weighted(ModBlocks.machine_diesel, 0, 1, 1, 1),
|
||||
weighted(ModItems.geiger_counter, 0, 1, 1, 2),
|
||||
weighted(ModItems.med_bag, 0, 1, 1, 3),
|
||||
};
|
||||
}};
|
||||
|
||||
new ItemPool(POOL_WEAPONS) {{
|
||||
this.pool = new WeightedRandomChestContent[] {
|
||||
weighted(ModItems.gun_light_revolver, 0, 1, 1, 10),
|
||||
weighted(ModItems.gun_henry, 0, 1, 1, 10),
|
||||
weighted(ModItems.gun_maresleg, 0, 1, 1, 10),
|
||||
weighted(ModItems.gun_greasegun, 0, 1, 1, 10),
|
||||
weighted(ModItems.gun_carbine, 0, 1, 1, 5),
|
||||
weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 5),
|
||||
weighted(ModItems.gun_panzerschreck, 0, 1, 1, 2),
|
||||
};
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -77,7 +77,6 @@ public class ItemPoolsComponent {
|
||||
weighted(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
||||
weighted(ModItems.battery_advanced, 0, 1, 1, 5),
|
||||
weighted(ModItems.designator, 0, 1, 1, 5),
|
||||
weighted(ModItems.crate_caller, 0, 1, 1, 1),
|
||||
weighted(ModItems.thruster_small, 0, 1, 1, 5),
|
||||
weighted(ModItems.thruster_medium, 0, 1, 1, 4),
|
||||
weighted(ModItems.fuel_tank_small, 0, 1, 1, 5),
|
||||
|
||||
@ -119,7 +119,6 @@ public class ItemPoolsLegacy {
|
||||
weighted(ModItems.battery_advanced_cell, 0, 1, 1, 2),
|
||||
weighted(ModItems.battery_schrabidium, 0, 1, 1, 1),
|
||||
weighted(ModItems.syringe_awesome, 0, 1, 1, 1),
|
||||
weighted(ModItems.crate_caller, 0, 1, 1, 3),
|
||||
weighted(ModItems.fusion_core, 0, 1, 1, 4),
|
||||
weighted(ModItems.bottle_nuka, 0, 1, 3, 6),
|
||||
weighted(ModItems.bottle_quantum, 0, 1, 1, 3),
|
||||
@ -205,7 +204,6 @@ public class ItemPoolsLegacy {
|
||||
weighted(ModItems.bottle_nuka, 0, 1, 3, 6),
|
||||
weighted(ModItems.bottle_quantum, 0, 1, 1, 3),
|
||||
weighted(ModItems.stealth_boy, 0, 1, 1, 7),
|
||||
weighted(ModItems.crate_caller, 0, 1, 1, 3),
|
||||
weighted(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
||||
weighted(ModItems.gas_mask_filter, 0, 1, 1, 5),
|
||||
weighted(ModItems.grenade_nuclear, 0, 1, 2, 2),
|
||||
|
||||
@ -2303,7 +2303,6 @@ public class ModItems {
|
||||
public static Item detonator_laser;
|
||||
public static Item detonator_deadman;
|
||||
public static Item detonator_de;
|
||||
public static Item crate_caller;
|
||||
public static Item bomb_caller;
|
||||
public static Item meteor_remote;
|
||||
public static Item anchor_remote;
|
||||
@ -4468,7 +4467,6 @@ public class ModItems {
|
||||
detonator_laser = new ItemLaserDetonator().setUnlocalizedName("detonator_laser").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator_laser");
|
||||
detonator_deadman = new ItemDrop().setUnlocalizedName("detonator_deadman").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator_deadman");
|
||||
detonator_de = new ItemDrop().setUnlocalizedName("detonator_de").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.nukeTab).setTextureName(RefStrings.MODID + ":detonator_de");
|
||||
crate_caller = new ItemCrateCaller().setUnlocalizedName("crate_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":crate_caller");
|
||||
bomb_caller = new ItemBombCaller().setUnlocalizedName("bomb_caller").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":bomb_caller");
|
||||
meteor_remote = new ItemMeteorRemote().setUnlocalizedName("meteor_remote").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":meteor_remote");
|
||||
anchor_remote = new ItemAnchorRemote().setUnlocalizedName("anchor_remote").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":anchor_remote");
|
||||
@ -7539,7 +7537,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(detonator_laser, detonator_laser.getUnlocalizedName());
|
||||
GameRegistry.registerItem(detonator_deadman, detonator_deadman.getUnlocalizedName());
|
||||
GameRegistry.registerItem(detonator_de, detonator_de.getUnlocalizedName());
|
||||
GameRegistry.registerItem(crate_caller, crate_caller.getUnlocalizedName());
|
||||
GameRegistry.registerItem(bomb_caller, bomb_caller.getUnlocalizedName());
|
||||
GameRegistry.registerItem(meteor_remote, meteor_remote.getUnlocalizedName());
|
||||
GameRegistry.registerItem(anchor_remote, anchor_remote.getUnlocalizedName());
|
||||
|
||||
@ -37,10 +37,7 @@ public class ItemBombCaller extends Item {
|
||||
case 5: list.add("Type: VT stinger rockets"); break;
|
||||
case 6: list.add("Type: PIP OH GOD"); break;
|
||||
case 7: list.add("Type: Cloud the cloud oh god the cloud"); break;
|
||||
default: list.add("Type: INVALID, Report it to mod creator");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,70 +0,0 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemCrateCaller extends Item {
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public ItemCrateCaller() {
|
||||
this.canRepair = false;
|
||||
this.setMaxDamage(4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool)
|
||||
{
|
||||
list.add("Right click to request supply drop!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
|
||||
stack.damageItem(1, player);
|
||||
|
||||
int x = rand.nextInt(31) - 15;
|
||||
int z = rand.nextInt(31) - 15;
|
||||
|
||||
Block crate = ModBlocks.crate;
|
||||
|
||||
int i = rand.nextInt(1000);
|
||||
|
||||
if(i < 350)
|
||||
crate = ModBlocks.crate_weapon;
|
||||
if(i < 100)
|
||||
crate = ModBlocks.crate_metal;
|
||||
if(i < 50)
|
||||
crate = ModBlocks.crate_lead;
|
||||
if(i == 0)
|
||||
crate = ModBlocks.crate_red;
|
||||
|
||||
if(!world.isRemote)
|
||||
{
|
||||
if(world.getBlock((int)player.posX + x, 255, (int)player.posZ + z) == Blocks.air)
|
||||
world.setBlock((int)player.posX + x, 255, (int)player.posZ + z, crate);
|
||||
}
|
||||
if(world.isRemote)
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText("Called in supply drop!"));
|
||||
}
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
|
||||
player.swingItem();
|
||||
|
||||
return stack;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,8 +2,11 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.hbm.entity.effect.EntityFireLingering;
|
||||
import com.hbm.entity.logic.EntityC130;
|
||||
import com.hbm.entity.logic.EntityC130.C130PayloadType;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
@ -30,7 +33,9 @@ import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -99,12 +104,29 @@ public class XFactory40mm {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static Consumer<Entity> LAMBDA_SPAWN_C130_SUPPLIESS = (entity) -> { spawnPlane(entity, C130PayloadType.SUPPLIES); };
|
||||
public static Consumer<Entity> LAMBDA_SPAWN_C130_WEAPONS = (entity) -> { spawnPlane(entity, C130PayloadType.WEAPONS); };
|
||||
|
||||
public static void spawnPlane(Entity entity, C130PayloadType payload) {
|
||||
if(!entity.worldObj.isRemote && entity.ticksExisted == 40) {
|
||||
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
|
||||
if(bullet.getThrower() != null) bullet.worldObj.playSoundAtEntity(bullet.getThrower(), "hbm:item.techBleep", 1.0F, 1.0F);
|
||||
EntityC130 c130 = new EntityC130(bullet.worldObj);
|
||||
int x = (int) Math.floor(bullet.posX);
|
||||
int z = (int) Math.floor(bullet.posZ);
|
||||
int y = bullet.worldObj.getHeightValue(x, z);
|
||||
c130.fac(bullet.worldObj, x, y, z, payload);
|
||||
bullet.worldObj.spawnEntityInWorld(c130);
|
||||
TrackerUtil.setTrackingRange(bullet.worldObj, c130, 250);
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
|
||||
g26_flare = new BulletConfig().setItem(EnumAmmo.G26_FLARE).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x9E1616).setScale(2F).register("g26Flare"));
|
||||
g26_flare_supply = new BulletConfig().setItem(EnumAmmo.G26_FLARE_SUPPLY).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x3C80F0).setScale(2F).register("g26FlareSupply"));
|
||||
g26_flare_weapon = new BulletConfig().setItem(EnumAmmo.G26_FLARE_WEAPON).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x278400).setScale(2F).register("g26FlareWeapon"));
|
||||
g26_flare_supply = new BulletConfig().setItem(EnumAmmo.G26_FLARE_SUPPLY).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setOnUpdate(LAMBDA_SPAWN_C130_SUPPLIESS).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x3C80F0).setScale(2F).register("g26FlareSupply"));
|
||||
g26_flare_weapon = new BulletConfig().setItem(EnumAmmo.G26_FLARE_WEAPON).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setOnUpdate(LAMBDA_SPAWN_C130_WEAPONS).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x278400).setScale(2F).register("g26FlareWeapon"));
|
||||
|
||||
BulletConfig g40_base = new BulletConfig().setLife(200).setVel(2F).setGrav(0.035D);
|
||||
g40_he = g40_base.clone().setItem(EnumAmmo.G40_HE).setOnImpact(LAMBDA_STANDARD_EXPLODE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x777777).setScale(2, 2F, 1.5F).register("g40"));
|
||||
|
||||
@ -99,7 +99,7 @@ public class XFactoryFolly {
|
||||
folly_nuke = new BulletConfig().setItem(EnumAmmoSecret.FOLLY_NUKE).setChunkloading().setLife(600).setVel(4F).setGrav(0.015D)
|
||||
.setOnImpact(LAMBDA_NUKE_IMPACT);
|
||||
|
||||
ModItems.gun_folly = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
ModItems.gun_folly = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(0).draw(40).crosshair(Crosshair.NONE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(26).dryfire(false).reload(160).jam(0).sound("hbm:weapon.fire.loudestNoiseOnEarth", 100.0F, 1.0F)
|
||||
|
||||
@ -633,6 +633,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDuchessGambit.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBuilding.class, new RenderBoxcar());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBomber.class, new RenderBomber());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityC130.class, new RenderC130());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBurningFOEQ.class, new RenderFOEQ());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityFallingNuke.class, new RenderFallingNuke());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMinerRocket.class, new RenderMinerRocket());
|
||||
@ -731,6 +732,7 @@ public class ClientProxy extends ServerProxy {
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileDoomsdayRusted.class, new RenderMissileNuclear());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySoyuz.class, new RenderSoyuz());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySoyuzCapsule.class, new RenderSoyuzCapsule());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityParachuteCrate.class, new RenderParachuteCrate());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileTaint.class, new RenderMissileTaint());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileMicro.class, new RenderMissileTaint());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityMissileBHole.class, new RenderMissileTaint());
|
||||
|
||||
@ -1458,6 +1458,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.powder_daffergon");
|
||||
ignoreMappings.add("hbm:item.powder_verticium");
|
||||
ignoreMappings.add("hbm:tile.ore_random");
|
||||
ignoreMappings.add("hbm:item.crate_caller");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -1123,6 +1123,7 @@ public class ResourceManager {
|
||||
//Bomber
|
||||
public static final IModelCustom dornier = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/dornier.obj"));
|
||||
public static final IModelCustom b29 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/b29.obj"));
|
||||
public static final IModelCustom c130 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/c130.obj")).asVBO();
|
||||
|
||||
//Missiles
|
||||
public static final IModelCustom missileV2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/missile_v2.obj")).asVBO();
|
||||
@ -1258,6 +1259,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation b29_1_tex = new ResourceLocation(RefStrings.MODID, "textures/models/b29_1.png");
|
||||
public static final ResourceLocation b29_2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/b29_2.png");
|
||||
public static final ResourceLocation b29_3_tex = new ResourceLocation(RefStrings.MODID, "textures/models/b29_3.png");
|
||||
public static final ResourceLocation c130_0_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/c130_0.png");
|
||||
|
||||
//Missiles
|
||||
public static final ResourceLocation missileV2_HE_tex = new ResourceLocation(RefStrings.MODID, "textures/models/missile_v2.png");
|
||||
@ -1332,6 +1334,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation soyuz_lander_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_lander.png");
|
||||
public static final ResourceLocation soyuz_lander_rust_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_lander_rust.png");
|
||||
public static final ResourceLocation soyuz_chute_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/soyuz_chute.png");
|
||||
public static final ResourceLocation supply_crate = new ResourceLocation(RefStrings.MODID, "textures/blocks/crate_can.png");
|
||||
|
||||
public static final ResourceLocation soyuz_module_dome_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_dome.png");
|
||||
public static final ResourceLocation soyuz_module_lander_tex = new ResourceLocation(RefStrings.MODID, "textures/models/soyuz_capsule/module_lander.png");
|
||||
|
||||
@ -38,8 +38,6 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(ParticleBurstPacket.Handler.class, ParticleBurstPacket.class, i++, Side.CLIENT);
|
||||
//Packet to send chunk radiation info to individual players
|
||||
wrapper.registerMessage(ExtPropPacket.Handler.class, ExtPropPacket.class, i++, Side.CLIENT);
|
||||
//Entity sound packet that keeps client and server separated
|
||||
wrapper.registerMessage(LoopedEntitySoundPacket.Handler.class, LoopedEntitySoundPacket.class, i++, Side.CLIENT);
|
||||
//Packet for force fields
|
||||
wrapper.registerMessage(TEFFPacket.Handler.class, TEFFPacket.class, i++, Side.CLIENT);
|
||||
//Sends button information for ItemGunBase
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
package com.hbm.packet.toclient;
|
||||
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
import com.hbm.sound.MovingSoundBomber;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class LoopedEntitySoundPacket implements IMessage {
|
||||
|
||||
int entityID;
|
||||
|
||||
public LoopedEntitySoundPacket()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public LoopedEntitySoundPacket(int entityID)
|
||||
{
|
||||
this.entityID = entityID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
entityID = buf.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(entityID);
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<LoopedEntitySoundPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
//Tamaized, I love you!
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IMessage onMessage(LoopedEntitySoundPacket m, MessageContext ctx) {
|
||||
|
||||
Entity e = Minecraft.getMinecraft().theWorld.getEntityByID(m.entityID);
|
||||
|
||||
if(e instanceof EntityBomber) {
|
||||
|
||||
int n = 1;
|
||||
int x = e.getDataWatcher().getWatchableObjectByte(16);
|
||||
|
||||
switch(x) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4: n = 2; break;
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8: n = 1; break;
|
||||
default: n = 2; break;
|
||||
}
|
||||
|
||||
boolean flag = true;
|
||||
for(int i = 0; i < MovingSoundBomber.globalSoundList.size(); i++) {
|
||||
if(MovingSoundBomber.globalSoundList.get(i).bomber == e && !MovingSoundBomber.globalSoundList.get(i).isDonePlaying())
|
||||
flag = false;
|
||||
}
|
||||
|
||||
if(flag) {
|
||||
if(n == 2)
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(new MovingSoundBomber(new ResourceLocation("hbm:entity.bomberSmallLoop"), (EntityBomber)e));
|
||||
if(n == 1)
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(new MovingSoundBomber(new ResourceLocation("hbm:entity.bomberLoop"), (EntityBomber)e));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
67
src/main/java/com/hbm/render/entity/item/RenderC130.java
Normal file
67
src/main/java/com/hbm/render/entity/item/RenderC130.java
Normal file
@ -0,0 +1,67 @@
|
||||
package com.hbm.render.entity.item;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderC130 extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double x, double y, double z, float f0, float interp) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * interp - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(90, 0F, 0F, 1F);
|
||||
GL11.glRotatef(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * interp, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.c130_0_tex);
|
||||
ResourceManager.c130.renderPart("Plane");
|
||||
|
||||
double spin = System.currentTimeMillis() * 15D % 360D;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(10, 4.2, -20.5);
|
||||
GL11.glRotated(spin, 1, 0, 0);
|
||||
GL11.glTranslated(-10, -4.2, 20.5);
|
||||
ResourceManager.c130.renderPart("Prop1");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(10, 4.2, -11.16);
|
||||
GL11.glRotated(spin, 1, 0, 0);
|
||||
GL11.glTranslated(-10, -4.2, 11.16);
|
||||
ResourceManager.c130.renderPart("Prop2");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(10, 4.2, 11.16);
|
||||
GL11.glRotated(spin, 1, 0, 0);
|
||||
GL11.glTranslated(-10, -4.2, -11.16);
|
||||
ResourceManager.c130.renderPart("Prop3");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(10, 4.2, 20.5);
|
||||
GL11.glRotated(spin, 1, 0, 0);
|
||||
GL11.glTranslated(-10, -4.2, -20.5);
|
||||
ResourceManager.c130.renderPart("Prop4");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity entity) {
|
||||
return ResourceManager.c130_0_tex;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.hbm.render.entity.item;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.main.ResourceManager;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderParachuteCrate extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double x, double y, double z, float i, float j) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
double time = (entity.worldObj.getTotalWorldTime());
|
||||
double sine = Math.sin(time * 0.05) * 5;
|
||||
double sin3 = Math.sin(time * 0.05 + Math.PI * 0.5) * 5;
|
||||
|
||||
int height = 7;
|
||||
|
||||
GL11.glTranslated(0.0F, height, 0.0F);
|
||||
GL11.glRotated(sine, 0, 0, 1);
|
||||
GL11.glRotated(sin3, 1, 0, 0);
|
||||
GL11.glTranslated(0.0F, -height, 0.0F);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
bindTexture(ResourceManager.supply_crate);
|
||||
ResourceManager.conservecrate.renderAll();
|
||||
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
|
||||
bindTexture(ResourceManager.soyuz_chute_tex);
|
||||
ResourceManager.soyuz_lander.renderPart("Chute");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
return ResourceManager.soyuz_lander_tex;
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
package com.hbm.sound;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.entity.logic.EntityBomber;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.ISound;
|
||||
import net.minecraft.client.audio.MovingSound;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class MovingSoundBomber extends MovingSound {
|
||||
|
||||
public static List<MovingSoundBomber> globalSoundList = new ArrayList<MovingSoundBomber>();
|
||||
public EntityBomber bomber;
|
||||
|
||||
public MovingSoundBomber(ResourceLocation loc, EntityBomber bomber) {
|
||||
super(loc);
|
||||
this.bomber = bomber;
|
||||
globalSoundList.add(this);
|
||||
this.repeat = true;
|
||||
this.field_147666_i = ISound.AttenuationType.NONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
float iVolume = 150;
|
||||
|
||||
if(this.bomber == null || this.bomber.isDead || this.bomber.health <= 0) {
|
||||
this.stop();
|
||||
} else {
|
||||
this.xPosF = (float)bomber.posX;
|
||||
this.yPosF = (float)bomber.posY;
|
||||
this.zPosF = (float)bomber.posZ;
|
||||
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
float f = 0;
|
||||
|
||||
if(player != null) {
|
||||
f = (float)Math.sqrt(Math.pow(xPosF - player.posX, 2) + Math.pow(yPosF - player.posY, 2) + Math.pow(zPosF - player.posZ, 2));
|
||||
volume = (f / iVolume) * -2 + 2;
|
||||
} else {
|
||||
volume = iVolume;
|
||||
}
|
||||
}
|
||||
|
||||
if(!Minecraft.getMinecraft().getSoundHandler().isSoundPlaying(this)) {
|
||||
stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
this.donePlaying = true;
|
||||
this.repeat = false;
|
||||
|
||||
globalSoundList.remove(this);
|
||||
}
|
||||
|
||||
public void setPitch(float f) {
|
||||
this.field_147663_c = f;
|
||||
}
|
||||
|
||||
public void setVolume(float f) {
|
||||
this.volume = f;
|
||||
}
|
||||
|
||||
public void setDone(boolean b) {
|
||||
this.donePlaying = b;
|
||||
}
|
||||
|
||||
}
|
||||
@ -14,6 +14,7 @@ import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal;
|
||||
import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate;
|
||||
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
|
||||
import com.hbm.blocks.machine.BlockICF.TileEntityBlockICF;
|
||||
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
|
||||
@ -150,6 +151,7 @@ public class TileMappings {
|
||||
put(TileEntityBarrel.class, "tileentity_fluid_barrel");
|
||||
put(TileEntityCyberCrab.class, "tileentity_crabs");
|
||||
put(TileEntitySoyuzCapsule.class, "tileentity_soyuz_capsule");
|
||||
put(TileEntitySupplyCrate.class, "tileentity_supply_crate");
|
||||
put(TileEntityMachineRotaryFurnace.class, "tileentity_rotary_furnace");
|
||||
put(TileEntityMachineCrystallizer.class, "tileentity_acidomatic");
|
||||
put(TileEntitySoyuzStruct.class, "tileentity_soyuz_struct");
|
||||
|
||||
@ -40,6 +40,7 @@ public class EntityDamageUtil {
|
||||
public static boolean attackEntityFromNT(EntityLivingBase living, DamageSource source, float amount, boolean ignoreIFrame, boolean allowSpecialCancel, double knockbackMultiplier, float pierceDT, float pierce) {
|
||||
DamageResistanceHandler.setup(pierceDT, pierce);
|
||||
boolean ret = attackEntityFromNTInternal(living, source, amount, ignoreIFrame, allowSpecialCancel, knockbackMultiplier);
|
||||
//boolean ret = living.attackEntityFrom(source, amount);
|
||||
DamageResistanceHandler.reset();
|
||||
return ret;
|
||||
}
|
||||
|
||||
3946
src/main/resources/assets/hbm/models/weapons/c130.obj
Normal file
3946
src/main/resources/assets/hbm/models/weapons/c130.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 895 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 KiB |
BIN
src/main/resources/assets/hbm/textures/models/weapons/c130_0.png
Normal file
BIN
src/main/resources/assets/hbm/textures/models/weapons/c130_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Loading…
x
Reference in New Issue
Block a user