mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
some quackery, missing chemplant features and barrel yeet implementation
This commit is contained in:
parent
35201ed420
commit
833e028aa2
@ -6,6 +6,7 @@ import com.hbm.items.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityLeashKnot;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.boss.IBossDisplayData;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -134,7 +135,10 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
|
||||
public float getShadowSize() {
|
||||
return 7.5F;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* BOW
|
||||
*/
|
||||
@Override
|
||||
public void onLivingUpdate() {
|
||||
super.onLivingUpdate();
|
||||
@ -143,4 +147,13 @@ public class EntityQuackos extends EntityDuck implements IBossDisplayData {
|
||||
this.setPosition(this.posX + rand.nextGaussian() * 30, 256, this.posZ + rand.nextGaussian() * 30);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateLeashedState() {
|
||||
|
||||
if(this.getLeashedToEntity() instanceof EntityLeashKnot)
|
||||
this.getLeashedToEntity().setDead();
|
||||
|
||||
super.updateLeashedState();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.handler.guncfg;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.entity.projectile.EntityBulletBase;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNT;
|
||||
@ -9,6 +10,7 @@ import com.hbm.explosion.ExplosionNT.ExAttrib;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.IBulletImpactBehavior;
|
||||
import com.hbm.interfaces.IBulletUpdateBehavior;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -17,7 +19,9 @@ import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class GunFatmanFactory {
|
||||
|
||||
@ -256,6 +260,31 @@ public class GunFatmanFactory {
|
||||
posY = y + 1.5;
|
||||
posZ = z + 0.5;
|
||||
}
|
||||
|
||||
x = (int)Math.floor(posX);
|
||||
y = (int)Math.floor(posY);
|
||||
z = (int)Math.floor(posZ);
|
||||
|
||||
World worldObj = bullet.worldObj;
|
||||
|
||||
for(int ix = x - 3; ix <= x + 3; ix++) {
|
||||
for(int iy = y - 3; iy <= y + 3; iy++) {
|
||||
for(int iz = z - 3; iz <= z + 3; iz++) {
|
||||
|
||||
if(worldObj.rand.nextInt(3) == 0 && worldObj.getBlock(ix, iy, iz).isReplaceable(worldObj, ix, iy, iz) && ModBlocks.fallout.canPlaceBlockAt(worldObj, ix, iy, iz)) {
|
||||
worldObj.setBlock(ix, iy, iz, ModBlocks.fallout);
|
||||
} else if(worldObj.getBlock(ix, iy, iz) == Blocks.air) {
|
||||
|
||||
if(worldObj.rand.nextBoolean())
|
||||
worldObj.setBlock(ix, iy, iz, ModBlocks.gas_radon);
|
||||
else
|
||||
worldObj.setBlock(ix, iy, iz, ModBlocks.gas_radon_dense);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ChunkRadiationManager.proxy.incrementRad(worldObj, x, y, z, 100F);
|
||||
|
||||
ExplosionLarge.spawnParticles(bullet.worldObj, posX, posY, posZ, 45);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
@ -17,17 +16,13 @@ import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -220,6 +215,9 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
this.power -= this.consumption;
|
||||
this.progress++;
|
||||
|
||||
if(slots[0] != null && slots[0].getItem() == ModItems.meteorite_sword_machined)
|
||||
slots[0] = new ItemStack(ModItems.meteorite_sword_treated); //fisfndmoivndlmgindgifgjfdnblfm
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
this.maxProgress = recipe.getDuration() * this.speed / 100;
|
||||
@ -475,9 +473,6 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void handleButtonPacket(int value, int meta) { }
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user