mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge remote-tracking branch 'HbmMods/master' into structure-2
This commit is contained in:
commit
1f559e656e
24
changelog
24
changelog
@ -1,20 +1,10 @@
|
||||
## Added
|
||||
* Silo hatch
|
||||
* The final missing door from 1.12, remade from scratch
|
||||
* Comes with a brand-new model that fits perfectly over 3x3 missile launch tubes
|
||||
* Has a 5x5 frame
|
||||
|
||||
## Changed
|
||||
* Simplified door recipes
|
||||
* Muffler
|
||||
* An upgrade-like item that replaces the old muffler block
|
||||
* Creates 16 when crafted, however it is not returned when the muffled machine is broken
|
||||
* Should work with pretty much all machines that use looped sounds, as well as a few other noisy ones (compressors, diesel generators, presses)
|
||||
* Simply right-click to install, doesn't need to be inserted into an upgrade slot, in fact it works on a few machines that have no GUI at all
|
||||
|
||||
## Fixed
|
||||
* Fixed sellafite emerald ore being oredicted as emerald dust
|
||||
* Fixed fire replacing petrified wood, creating tons of dead trees with holes in them
|
||||
* Fixed inconsistent scaling with nuclear missiles
|
||||
* Fixed BFB rods being called ZFB in hot and depleted variants
|
||||
* Fixed infinite water barrels voiding water completely after the chemplant's input buffer runs full, infinite barrels can no longer void water in chemplants
|
||||
* Fixed fallout affecting things on Y:0 like bedrock ores and oil
|
||||
* Fixed projectiles not being able to pass through open doors
|
||||
* Fixed material dupe caused by strand caster overflowing
|
||||
* Fixed rampant mode glyphid scout spawn ignoring light level
|
||||
* Fixed glyphid diggers' debris attack being able to break concrete
|
||||
* Fixed basalt ores dropping their items with invalid metadata
|
||||
* Fixed creative infinite fluid tanks not being able to fill fluid gauges at >0PU
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=4845
|
||||
mod_build_number=4851
|
||||
|
||||
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
|
||||
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
|
||||
|
||||
@ -36,7 +36,7 @@ public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
for(int i = 0; i < icons.length; i++) {
|
||||
Enum num = enums[i];
|
||||
this.icons[i] = reg.registerIcon(this.getTextureName() + "." + num.name().toLowerCase(Locale.US));
|
||||
this.icons[i] = reg.registerIcon(this.getTextureMultiName(num));
|
||||
}
|
||||
} else {
|
||||
this.blockIcon = reg.registerIcon(this.getTextureName());
|
||||
@ -47,12 +47,20 @@ public class BlockEnumMulti extends BlockMulti {
|
||||
|
||||
if(this.multiName) {
|
||||
Enum num = EnumUtil.grabEnumSafely(this.theEnum, stack.getItemDamage());
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase(Locale.US);
|
||||
return getUnlocalizedMultiName(num);
|
||||
}
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
public String getTextureMultiName(Enum num) {
|
||||
return this.getTextureName() + "." + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public String getUnlocalizedMultiName(Enum num) {
|
||||
return super.getUnlocalizedName() + "." + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
|
||||
@ -3,10 +3,12 @@ package com.hbm.blocks;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
@ -21,12 +23,16 @@ public class BlockRemap extends Block implements ILookOverlay {
|
||||
this.remapMeta = meta;
|
||||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int meta, int side) {
|
||||
return this.remapBlock.getIcon(meta, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block setBlockName(String name) {
|
||||
super.setBlockName(name);
|
||||
this.setBlockTextureName(RefStrings.MODID + ":" + name);
|
||||
return this;
|
||||
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||
return this.remapBlock.getItemDropped(meta, rand, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -152,10 +152,11 @@ public class ModBlocks {
|
||||
public static Block depth_dnt;
|
||||
|
||||
public static Block basalt;
|
||||
public static Block basalt_sulfur;
|
||||
public static Block basalt_fluorite;
|
||||
public static Block basalt_asbestos;
|
||||
public static Block basalt_gem;
|
||||
public static Block ore_basalt;
|
||||
@Deprecated public static Block basalt_sulfur;
|
||||
@Deprecated public static Block basalt_fluorite;
|
||||
@Deprecated public static Block basalt_asbestos;
|
||||
@Deprecated public static Block basalt_gem;
|
||||
public static Block basalt_smooth;
|
||||
public static Block basalt_brick;
|
||||
public static Block basalt_polished;
|
||||
@ -538,6 +539,7 @@ public class ModBlocks {
|
||||
public static Block ore_sellafield_emerald;
|
||||
public static Block ore_sellafield_uranium_scorched;
|
||||
public static Block ore_sellafield_schrabidium;
|
||||
public static Block ore_sellafield_radgem;
|
||||
|
||||
public static Block geysir_water;
|
||||
public static Block geysir_chlorine;
|
||||
@ -630,8 +632,6 @@ public class ModBlocks {
|
||||
|
||||
public static Block tesla;
|
||||
|
||||
public static Block muffler;
|
||||
|
||||
public static Block sat_mapper;
|
||||
public static Block sat_scanner;
|
||||
public static Block sat_radar;
|
||||
@ -1233,7 +1233,8 @@ public class ModBlocks {
|
||||
|
||||
public static Block volcanic_lava_block;
|
||||
public static Fluid volcanic_lava_fluid;
|
||||
public static final Material fluidvolcanic = (new MaterialLiquid(MapColor.redColor));
|
||||
public static Block rad_lava_block;
|
||||
public static Fluid rad_lava_fluid;
|
||||
|
||||
public static Block sulfuric_acid_block;
|
||||
public static Fluid sulfuric_acid_fluid;
|
||||
@ -1241,6 +1242,7 @@ public class ModBlocks {
|
||||
public static Block concrete_liquid;
|
||||
|
||||
public static Block volcano_core;
|
||||
public static Block volcano_rad_core;
|
||||
|
||||
public static Block dummy_block_ams_limiter;
|
||||
public static Block dummy_port_ams_limiter;
|
||||
@ -1377,10 +1379,11 @@ public class ModBlocks {
|
||||
stone_deep_cobble = new BlockDeepCobble().setBlockName("stone_deep_cobble").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(30.0F);
|
||||
|
||||
basalt = new BlockGeneric(Material.rock).setBlockName("basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt");
|
||||
basalt_sulfur = new BlockOre(Material.rock).setBlockName("basalt_sulfur").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_sulfur");
|
||||
basalt_fluorite = new BlockOre(Material.rock).setBlockName("basalt_fluorite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_fluorite");
|
||||
basalt_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("basalt_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_asbestos");
|
||||
basalt_gem = new BlockCluster(Material.rock).setBlockName("basalt_gem").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_gem");
|
||||
ore_basalt = new BlockOreBasalt().setBlockName("ore_basalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_basalt");
|
||||
basalt_sulfur = new BlockRemap(ore_basalt, 0).setBlockName("basalt_sulfur");
|
||||
basalt_fluorite = new BlockRemap(ore_basalt, 1).setBlockName("basalt_fluorite");
|
||||
basalt_asbestos = new BlockRemap(ore_basalt, 2).setBlockName("basalt_asbestos");
|
||||
basalt_gem = new BlockRemap(ore_basalt, 3).setBlockName("basalt_gem");
|
||||
basalt_smooth = new BlockGeneric(Material.rock).setBlockName("basalt_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_smooth");
|
||||
basalt_brick = new BlockGeneric(Material.rock).setBlockName("basalt_brick").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_brick");
|
||||
basalt_polished = new BlockGeneric(Material.rock).setBlockName("basalt_polished").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":basalt_polished");
|
||||
@ -1760,6 +1763,7 @@ public class ModBlocks {
|
||||
ore_sellafield_emerald = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_emerald").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_emerald");
|
||||
ore_sellafield_uranium_scorched = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_uranium_scorched").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_uranium_scorched");
|
||||
ore_sellafield_schrabidium = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_schrabidium").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_schrabidium");
|
||||
ore_sellafield_radgem = new BlockSellafieldOre(Material.rock).setBlockName("ore_sellafield_radgem").setStepSound(Block.soundTypeStone).setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setBlockTextureName(RefStrings.MODID + ":ore_overlay_radgem");
|
||||
|
||||
geysir_water = new BlockGeysir(Material.rock).setBlockName("geysir_water").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
||||
geysir_chlorine = new BlockGeysir(Material.rock).setBlockName("geysir_chlorine").setStepSound(Block.soundTypeStone).setHardness(5.0F);
|
||||
@ -2142,8 +2146,6 @@ public class ModBlocks {
|
||||
|
||||
tesla = new MachineTesla(Material.iron).setBlockName("tesla").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":tesla");
|
||||
|
||||
muffler = new BlockGeneric(Material.cloth).setBlockName("muffler").setHardness(0.8F).setStepSound(Block.soundTypeCloth).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":muffler");
|
||||
|
||||
launch_pad = new LaunchPad(Material.iron).setBlockName("launch_pad").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_pad");
|
||||
machine_radar = new MachineRadar(Material.iron).setBlockName("machine_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":machine_radar");
|
||||
machine_radar_large = new MachineRadarLarge(Material.iron).setBlockName("machine_radar_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -2369,6 +2371,7 @@ public class ModBlocks {
|
||||
transission_hatch = new BlockTransission(Material.iron).setBlockName("transission_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":transission_hatch");
|
||||
|
||||
volcano_core = new BlockVolcano().setBlockName("volcano_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_core");
|
||||
volcano_rad_core = new BlockVolcano().setBlockName("volcano_rad_core").setBlockUnbreakable().setResistance(10000.0F).setCreativeTab(MainRegistry.nukeTab).setBlockTextureName(RefStrings.MODID + ":volcano_rad_core");
|
||||
|
||||
statue_elb = new DecoBlockAlt(Material.iron).setBlockName("#null").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
statue_elb_g = new DecoBlockAlt(Material.iron).setBlockName("#void").setHardness(Float.POSITIVE_INFINITY).setResistance(Float.POSITIVE_INFINITY);
|
||||
@ -2399,6 +2402,10 @@ public class ModBlocks {
|
||||
FluidRegistry.registerFluid(volcanic_lava_fluid);
|
||||
volcanic_lava_block = new VolcanicBlock(volcanic_lava_fluid, Material.lava).setBlockName("volcanic_lava_block").setResistance(500F);
|
||||
|
||||
rad_lava_fluid = new RadFluid().setLuminosity(15).setDensity(3000).setViscosity(3000).setTemperature(1300).setUnlocalizedName("rad_lava_fluid");
|
||||
FluidRegistry.registerFluid(rad_lava_fluid);
|
||||
rad_lava_block = new RadBlock(rad_lava_fluid, Material.lava).setBlockName("rad_lava_block").setResistance(500F);
|
||||
|
||||
sulfuric_acid_fluid = new GenericFluid("sulfuric_acid_fluid").setDensity(1840).setViscosity(1000).setTemperature(273);
|
||||
FluidRegistry.registerFluid(sulfuric_acid_fluid);
|
||||
sulfuric_acid_block = new GenericFluidBlock(sulfuric_acid_fluid, Material.water, "sulfuric_acid_still", "sulfuric_acid_flowing").setDamage(ModDamageSource.acid, 5F).setBlockName("sulfuric_acid_block").setResistance(500F);
|
||||
@ -2543,6 +2550,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(ore_depth_nether_neodymium, ItemBlockBase.class, ore_depth_nether_neodymium.getUnlocalizedName());
|
||||
|
||||
//Basalt ores
|
||||
register(ore_basalt);
|
||||
GameRegistry.registerBlock(basalt_sulfur, basalt_sulfur.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(basalt_fluorite, basalt_fluorite.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(basalt_asbestos, basalt_asbestos.getUnlocalizedName());
|
||||
@ -2936,6 +2944,7 @@ public class ModBlocks {
|
||||
register(ore_sellafield_emerald);
|
||||
register(ore_sellafield_uranium_scorched);
|
||||
register(ore_sellafield_schrabidium);
|
||||
register(ore_sellafield_radgem);
|
||||
GameRegistry.registerBlock(sellafield, ItemBlockNamedMeta.class, sellafield.getUnlocalizedName());
|
||||
|
||||
//Geysirs
|
||||
@ -3376,9 +3385,6 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(radiorec, radiorec.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(radiobox, radiobox.getUnlocalizedName());
|
||||
|
||||
//The muffler
|
||||
GameRegistry.registerBlock(muffler, muffler.getUnlocalizedName());
|
||||
|
||||
//Multiblock Parts
|
||||
GameRegistry.registerBlock(struct_launcher, struct_launcher.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(struct_scaffold, struct_scaffold.getUnlocalizedName());
|
||||
@ -3459,6 +3465,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(fire_digamma, fire_digamma.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(digamma_matter, digamma_matter.getUnlocalizedName());
|
||||
register(volcano_core);
|
||||
register(volcano_rad_core);
|
||||
|
||||
//AMS
|
||||
GameRegistry.registerBlock(ams_base, ams_base.getUnlocalizedName());
|
||||
@ -3535,6 +3542,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(schrabidic_block, schrabidic_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(corium_block, corium_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(volcanic_lava_block, volcanic_lava_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(rad_lava_block, rad_lava_block.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(sulfuric_acid_block, sulfuric_acid_block.getUnlocalizedName());
|
||||
//GameRegistry.registerBlock(concrete_liquid, concrete_liquid.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -81,8 +81,9 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
}
|
||||
|
||||
public static class TileEntityVolcanoCore extends TileEntity {
|
||||
|
||||
|
||||
private static List<ExAttrib> volcanoExplosion = Arrays.asList(new ExAttrib[] {ExAttrib.NODROP, ExAttrib.LAVA_V, ExAttrib.NOSOUND, ExAttrib.ALLMOD, ExAttrib.NOHURT});
|
||||
private static List<ExAttrib> volcanoRadExplosion = Arrays.asList(new ExAttrib[] {ExAttrib.NODROP, ExAttrib.LAVA_R, ExAttrib.NOSOUND, ExAttrib.ALLMOD, ExAttrib.NOHURT});
|
||||
|
||||
public int volcanoTimer;
|
||||
|
||||
@ -118,15 +119,28 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
|
||||
if(this.shouldGrow()) {
|
||||
worldObj.setBlock(xCoord, yCoord + 1, zCoord, this.getBlockType(), this.getBlockMetadata(), 3);
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block);
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, getLava());
|
||||
return;
|
||||
} else if(this.isExtinguishing()) {
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.volcanic_lava_block);
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, getLava());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isRadioacitve() {
|
||||
return this.getBlockType() == ModBlocks.volcano_rad_core;
|
||||
}
|
||||
|
||||
protected Block getLava() {
|
||||
if(isRadioacitve()) return ModBlocks.rad_lava_block;
|
||||
return ModBlocks.volcanic_lava_block;
|
||||
}
|
||||
|
||||
protected List<ExAttrib> getExpAttrb() {
|
||||
return this.isRadioacitve() ? this.volcanoRadExplosion : this.volcanoExplosion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
@ -185,20 +199,15 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
private boolean doesPyroclastic() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private double getPyroclasticRange() {
|
||||
return 0D;
|
||||
}
|
||||
private boolean doesPyroclastic() { return false; }
|
||||
private double getPyroclasticRange() { return 0D; }
|
||||
|
||||
/** Causes two magma explosions, one from bedrock to the core and one from the core to 15 blocks above. */
|
||||
private void blastMagmaChannel() {
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, null, xCoord + 0.5, yCoord + worldObj.rand.nextInt(15) + 1.5, zCoord + 0.5, 7);
|
||||
explosion.addAllAttrib(volcanoExplosion).explode();
|
||||
explosion.addAllAttrib(getExpAttrb()).explode();
|
||||
ExplosionNT explosion2 = new ExplosionNT(worldObj, null, xCoord + 0.5 + worldObj.rand.nextGaussian() * 3, worldObj.rand.nextInt(yCoord + 1), zCoord + 0.5 + worldObj.rand.nextGaussian() * 3, 10);
|
||||
explosion2.addAllAttrib(volcanoExplosion).explode();
|
||||
explosion2.addAllAttrib(getExpAttrb()).explode();
|
||||
}
|
||||
|
||||
/** Causes two magma explosions at a random position around the core, one at normal and one at half range. */
|
||||
@ -207,7 +216,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
for(int i = 0; i < 2; i++) {
|
||||
double dist = size / (double) (i + 1);
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, null, xCoord + 0.5 + worldObj.rand.nextGaussian() * dist, yCoord + 0.5 + worldObj.rand.nextGaussian() * dist, zCoord + 0.5 + worldObj.rand.nextGaussian() * dist, 7);
|
||||
explosion.addAllAttrib(volcanoExplosion).explode();
|
||||
explosion.addAllAttrib(getExpAttrb()).explode();
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,7 +233,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
|
||||
if(!b.isAir(worldObj, x, y, z) && b.getExplosionResistance(null) < Blocks.obsidian.getExplosionResistance(null)) {
|
||||
//turn into lava if solid block, otherwise just break
|
||||
worldObj.setBlock(x, y, z, b.isNormalCube() ? ModBlocks.volcanic_lava_block : Blocks.air);
|
||||
worldObj.setBlock(x, y, z, b.isNormalCube() ? this.getLava() : Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -236,8 +245,8 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
int rY = yCoord + worldObj.rand.nextInt(11);
|
||||
int rZ = zCoord - 10 + worldObj.rand.nextInt(21);
|
||||
|
||||
if(worldObj.getBlock(rX, rY, rZ) == Blocks.air && worldObj.getBlock(rX, rY - 1, rZ) == ModBlocks.volcanic_lava_block)
|
||||
worldObj.setBlock(rX, rY, rZ, ModBlocks.volcanic_lava_block);
|
||||
if(worldObj.getBlock(rX, rY, rZ) == Blocks.air && worldObj.getBlock(rX, rY - 1, rZ) == this.getLava())
|
||||
worldObj.setBlock(rX, rY, rZ, this.getLava());
|
||||
}
|
||||
|
||||
/** Creates a 3x3x3 lava sphere around the core. */
|
||||
@ -248,7 +257,7 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
for(int k = -1; k <= 1; k++) {
|
||||
|
||||
if(i != 0 || j != 0 || k != 0) {
|
||||
worldObj.setBlock(xCoord + i, yCoord + j, zCoord + k, ModBlocks.volcanic_lava_block);
|
||||
worldObj.setBlock(xCoord + i, yCoord + j, zCoord + k, this.getLava());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -264,7 +273,11 @@ public class BlockVolcano extends BlockContainer implements ITooltipProvider, IB
|
||||
frag.motionY = 1D + worldObj.rand.nextDouble();
|
||||
frag.motionX = worldObj.rand.nextGaussian() * 0.2D;
|
||||
frag.motionZ = worldObj.rand.nextGaussian() * 0.2D;
|
||||
frag.setVolcano(true);
|
||||
if(this.isRadioacitve()) {
|
||||
frag.setRadVolcano(true);
|
||||
} else {
|
||||
frag.setVolcano(true);
|
||||
}
|
||||
worldObj.spawnEntityInWorld(frag);
|
||||
}
|
||||
}
|
||||
|
||||
81
src/main/java/com/hbm/blocks/fluid/RadBlock.java
Normal file
81
src/main/java/com/hbm/blocks/fluid/RadBlock.java
Normal file
@ -0,0 +1,81 @@
|
||||
package com.hbm.blocks.fluid;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class RadBlock extends VolcanicBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) public static IIcon stillIconRad;
|
||||
@SideOnly(Side.CLIENT) public static IIcon flowingIconRad;
|
||||
|
||||
public RadBlock(Fluid fluid, Material material) {
|
||||
super(fluid, material);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
stillIconRad = register.registerIcon(RefStrings.MODID + ":rad_lava_still");
|
||||
flowingIconRad = register.registerIcon(RefStrings.MODID + ":rad_lava_flowing");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return (side == 0 || side == 1) ? stillIconRad : flowingIconRad;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {
|
||||
if(entity instanceof EntityLivingBase) ContaminationUtil.contaminate((EntityLivingBase) entity, HazardType.RADIATION, ContaminationType.CREATIVE, 5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSolidify(World world, int x, int y, int z, int lavaCount, int basaltCount, Random rand) {
|
||||
int r = rand.nextInt(400);
|
||||
|
||||
Block above = world.getBlock(x, y + 10, z);
|
||||
boolean canMakeGem = lavaCount + basaltCount == 6 && lavaCount < 3 && (above == ModBlocks.sellafield_slaked || above == ModBlocks.rad_lava_block);
|
||||
int meta = 5 + rand.nextInt(3);
|
||||
|
||||
if(r < 2) world.setBlock(x, y, z, ModBlocks.ore_sellafield_diamond, meta, 3);
|
||||
else if(r == 2) world.setBlock(x, y, z, ModBlocks.ore_sellafield_emerald, meta, 3);
|
||||
else if(r < 20 && canMakeGem) world.setBlock(x, y, z, ModBlocks.ore_sellafield_radgem, meta, 3);
|
||||
else world.setBlock(x, y, z, ModBlocks.sellafield_slaked, meta, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getBasaltForCheck() {
|
||||
return ModBlocks.sellafield_slaked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block getReaction(World world, int x, int y, int z) {
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
if(b.getMaterial() == Material.water) return Blocks.stone;
|
||||
if(b == Blocks.log || b == Blocks.log2) return ModBlocks.waste_log;
|
||||
if(b == Blocks.planks) return ModBlocks.waste_planks;
|
||||
if(b == Blocks.leaves || b == Blocks.leaves2) return Blocks.fire;
|
||||
if(b == Blocks.diamond_ore) return ModBlocks.ore_sellafield_radgem;
|
||||
if(b == ModBlocks.ore_uranium || b == ModBlocks.ore_gneiss_uranium) return world.rand.nextInt(5) == 0 ? ModBlocks.ore_sellafield_schrabidium : ModBlocks.ore_sellafield_uranium_scorched;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
31
src/main/java/com/hbm/blocks/fluid/RadFluid.java
Normal file
31
src/main/java/com/hbm/blocks/fluid/RadFluid.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.hbm.blocks.fluid;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class RadFluid extends Fluid {
|
||||
|
||||
public RadFluid() {
|
||||
super("rad_lava_fluid");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon() {
|
||||
return getStillIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getStillIcon() {
|
||||
return RadBlock.stillIconRad;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getFlowingIcon() {
|
||||
return RadBlock.flowingIconRad;
|
||||
}
|
||||
}
|
||||
@ -51,26 +51,18 @@ public class VolcanicBlock extends BlockFluidClassic {
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
Block b = getReaction(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||
|
||||
if(b != null)
|
||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, b);
|
||||
if(b != null) world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, b, b == ModBlocks.ore_basalt ? 3 : 0, 3);
|
||||
}
|
||||
}
|
||||
|
||||
public Block getReaction(World world, int x, int y, int z) {
|
||||
|
||||
Block b = world.getBlock(x, y, z);
|
||||
if(b.getMaterial() == Material.water) {
|
||||
return Blocks.stone;
|
||||
}
|
||||
if(b == Blocks.log || b == Blocks.log2) {
|
||||
return ModBlocks.waste_log;
|
||||
}
|
||||
if(b == Blocks.planks) {
|
||||
return ModBlocks.waste_planks;
|
||||
}
|
||||
if(b == Blocks.leaves || b == Blocks.leaves2) {
|
||||
return Blocks.fire;
|
||||
}
|
||||
if(b.getMaterial() == Material.water) return Blocks.stone;
|
||||
if(b == Blocks.log || b == Blocks.log2) return ModBlocks.waste_log;
|
||||
if(b == Blocks.planks) return ModBlocks.waste_planks;
|
||||
if(b == Blocks.leaves || b == Blocks.leaves2) return Blocks.fire;
|
||||
if(b == Blocks.diamond_ore) return ModBlocks.ore_basalt;
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -87,30 +79,33 @@ public class VolcanicBlock extends BlockFluidClassic {
|
||||
|
||||
if(b == this)
|
||||
lavaCount++;
|
||||
if(b == ModBlocks.basalt) {
|
||||
if(b == getBasaltForCheck()) {
|
||||
basaltCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if(!world.isRemote && ((!this.isSourceBlock(world, x, y, z) && lavaCount < 2) || (rand.nextInt(5) == 0) && lavaCount < 5) && world.getBlock(x, y - 1, z) != this) {
|
||||
|
||||
int r = rand.nextInt(200);
|
||||
|
||||
Block above = world.getBlock(x, y + 10, z);
|
||||
boolean canMakeGem = lavaCount + basaltCount == 6 && lavaCount < 3 && (above == ModBlocks.basalt || above == ModBlocks.volcanic_lava_block);
|
||||
|
||||
if(r < 2)
|
||||
world.setBlock(x, y, z, ModBlocks.basalt_sulfur);
|
||||
else if(r == 2)
|
||||
world.setBlock(x, y, z, ModBlocks.basalt_asbestos);
|
||||
else if(r == 3)
|
||||
world.setBlock(x, y, z, ModBlocks.basalt_fluorite);
|
||||
else if(r < 14 && canMakeGem)
|
||||
world.setBlock(x, y, z, ModBlocks.basalt_gem);
|
||||
else
|
||||
world.setBlock(x, y, z, ModBlocks.basalt);
|
||||
this.onSolidify(world, x, y, z, lavaCount, basaltCount, rand);
|
||||
}
|
||||
}
|
||||
|
||||
public Block getBasaltForCheck() {
|
||||
return ModBlocks.basalt;
|
||||
}
|
||||
|
||||
public void onSolidify(World world, int x, int y, int z, int lavaCount, int basaltCount, Random rand) {
|
||||
int r = rand.nextInt(200);
|
||||
|
||||
Block above = world.getBlock(x, y + 10, z);
|
||||
boolean canMakeGem = lavaCount + basaltCount == 6 && lavaCount < 3 && (above == ModBlocks.basalt || above == ModBlocks.volcanic_lava_block);
|
||||
|
||||
if(r < 2) world.setBlock(x, y, z, ModBlocks.ore_basalt, 0, 3);
|
||||
else if(r == 2) world.setBlock(x, y, z, ModBlocks.ore_basalt, 1, 3);
|
||||
else if(r == 3) world.setBlock(x, y, z, ModBlocks.ore_basalt, 2, 3);
|
||||
else if(r == 4) world.setBlock(x, y, z, ModBlocks.ore_basalt, 4, 3);
|
||||
else if(r < 15 && canMakeGem) world.setBlock(x, y, z, ModBlocks.ore_basalt, 3, 3);
|
||||
else world.setBlock(x, y, z, ModBlocks.basalt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDisplace(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
@ -40,7 +40,7 @@ public class BlockGasClorine extends BlockGasBase {
|
||||
|
||||
EntityLivingBase entityLiving = (EntityLivingBase) entity;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.GAS_CHLORINE)) {
|
||||
if(ArmorRegistry.hasAllProtection(entityLiving, 3, HazardClass.GAS_LUNG)) {
|
||||
ArmorUtil.damageGasMaskFilter(entityLiving, 1);
|
||||
|
||||
} else {
|
||||
|
||||
@ -3,7 +3,9 @@ package com.hbm.blocks.generic;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.special.ItemDoorSkin;
|
||||
import com.hbm.items.tool.ItemLock;
|
||||
import com.hbm.tileentity.DoorDecl;
|
||||
import com.hbm.tileentity.TileEntityDoorGeneric;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
@ -20,7 +22,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockDoorGeneric extends BlockDummyable {
|
||||
public class BlockDoorGeneric extends BlockDummyable implements IBomb {
|
||||
|
||||
public DoorDecl type;
|
||||
|
||||
@ -45,6 +47,22 @@ public class BlockDoorGeneric extends BlockDummyable {
|
||||
public int getOffset(){
|
||||
return type.getBlockOffset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BombReturnCode explode(World world, int x, int y, int z) {
|
||||
int[] pos1 = findCore(world, x, y, z);
|
||||
if(pos1 == null) return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
TileEntityDoorGeneric door = (TileEntityDoorGeneric) world.getTileEntity(pos1[0], pos1[1], pos1[2]);
|
||||
if(door != null) {
|
||||
DoorDecl decl = door.getDoorType();
|
||||
if(!decl.remoteControllable()) return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
if(door.tryToggle(null)) {
|
||||
return BombReturnCode.TRIGGERED;
|
||||
}
|
||||
}
|
||||
|
||||
return BombReturnCode.ERROR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer playerIn, int side, float hitX, float hitY, float hitZ){
|
||||
@ -148,5 +166,4 @@ public class BlockDoorGeneric extends BlockDummyable {
|
||||
}
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
|
||||
@ -11,6 +14,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockFissure extends Block implements IBlockMultiPass {
|
||||
|
||||
@ -21,6 +25,7 @@ public class BlockFissure extends Block implements IBlockMultiPass {
|
||||
this.setBlockTextureName("bedrock");
|
||||
this.setBlockUnbreakable();
|
||||
this.setResistance(1_000_000);
|
||||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -41,6 +46,16 @@ public class BlockFissure extends Block implements IBlockMultiPass {
|
||||
return this.overlay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, ModBlocks.volcanic_lava_block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRenderItemMulti() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPasses() {
|
||||
return 2;
|
||||
|
||||
@ -100,7 +100,8 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
if(!worldObj.isRemote && this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL) {
|
||||
|
||||
if(initialSpawn || worldObj.getTotalWorldTime() % MobConfig.swarmCooldown == 0) {
|
||||
|
||||
|
||||
initialSpawn = false;
|
||||
int count = 0;
|
||||
|
||||
for(Object e : worldObj.loadedEntityList) {
|
||||
@ -126,8 +127,6 @@ public class BlockGlyphidSpawner extends BlockContainer implements IBlockMulti {
|
||||
if(this.getBlockMetadata() == 1) scout.getDataWatcher().updateObject(EntityGlyphid.DW_SUBTYPE, (byte) EntityGlyphid.TYPE_INFECTED);
|
||||
trySpawnEntity(scout);
|
||||
}
|
||||
|
||||
initialSpawn = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,6 +232,8 @@ public class BlockKeyhole extends BlockStone {
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.wd40), 10));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.scrumpy), 10));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.wild_p), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.card_aos), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.card_qos), 5));
|
||||
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.starmetal_sword), 5));
|
||||
pedestalItems.add(new WeightedRandomObject(new ItemStack(ModItems.radaway_flush), 5));
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.HashSet;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.world.feature.HugeMush;
|
||||
|
||||
79
src/main/java/com/hbm/blocks/generic/BlockOreBasalt.java
Normal file
79
src/main/java/com/hbm/blocks/generic/BlockOreBasalt.java
Normal file
@ -0,0 +1,79 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockEnumMulti;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockOreBasalt extends BlockEnumMulti {
|
||||
|
||||
public BlockOreBasalt() {
|
||||
super(Material.rock, EnumBasaltOreType.class, true, true);
|
||||
}
|
||||
|
||||
public static enum EnumBasaltOreType {
|
||||
SULFUR,
|
||||
FLUORITE,
|
||||
ASBESTOS,
|
||||
GEM,
|
||||
MOLYSITE
|
||||
}
|
||||
|
||||
public String getTextureMultiName(Enum num) {
|
||||
return this.getTextureName() + "_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public String getUnlocalizedMultiName(Enum num) {
|
||||
return super.getUnlocalizedName() + "_" + num.name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||
if(meta == EnumBasaltOreType.SULFUR.ordinal()) return ModItems.sulfur;
|
||||
if(meta == EnumBasaltOreType.FLUORITE.ordinal()) return ModItems.fluorite;
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal()) return ModItems.ingot_asbestos;
|
||||
if(meta == EnumBasaltOreType.GEM.ordinal()) return ModItems.gem_volcanic;
|
||||
if(meta == EnumBasaltOreType.MOLYSITE.ordinal()) return ModItems.powder_molysite;
|
||||
return super.getItemDropped(meta, rand, fortune);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal() && world.getBlock(x, y + 1, z) == Blocks.air) {
|
||||
if(world.rand.nextInt(10) == 0) world.setBlock(x, y + 1, z, ModBlocks.gas_asbestos);
|
||||
for(int i = 0; i < 5; i++) world.spawnParticle("townaura", x + world.rand.nextFloat(), y + 1.1, z + world.rand.nextFloat(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int fortune) {
|
||||
if(meta == EnumBasaltOreType.ASBESTOS.ordinal()) world.setBlock(x, y, z, ModBlocks.gas_asbestos);
|
||||
super.dropBlockAsItemWithChance(world, x, y, z, meta, chance, fortune);
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,7 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.block.RenderBlockMultipass;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -69,6 +70,7 @@ public class BlockSellafieldOre extends BlockSellafieldSlaked implements IBlockM
|
||||
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||
if(this == ModBlocks.ore_sellafield_diamond) return Items.diamond;
|
||||
if(this == ModBlocks.ore_sellafield_emerald) return Items.emerald;
|
||||
if(this == ModBlocks.ore_sellafield_radgem) return ModItems.gem_rad;
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@ -97,6 +99,7 @@ public class BlockSellafieldOre extends BlockSellafieldSlaked implements IBlockM
|
||||
|
||||
if(this == ModBlocks.ore_sellafield_diamond) j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||
if(this == ModBlocks.ore_sellafield_emerald) j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||
if(this == ModBlocks.ore_sellafield_radgem) j1 = MathHelper.getRandomIntegerInRange(rand, 3, 7);
|
||||
|
||||
return j1;
|
||||
}
|
||||
|
||||
@ -87,6 +87,7 @@ public class FalloutConfigJSON {
|
||||
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_emerald, m, 1)) .max(i * 5).sol(true).mB(ModBlocks.ore_beryllium));
|
||||
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_schrabidium, m, 1), new Triplet(ModBlocks.ore_sellafield_uranium_scorched, m, 99)) .max(i * 5).sol(true).mB(ModBlocks.ore_uranium));
|
||||
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_schrabidium, m, 1), new Triplet(ModBlocks.ore_sellafield_uranium_scorched, m, 99)) .max(i * 5).sol(true).mB(ModBlocks.ore_gneiss_uranium));
|
||||
entries.add(new FalloutEntry().prim(new Triplet(ModBlocks.ore_sellafield_radgem, m, 1)) .max(i * 5).sol(true).mB(Blocks.diamond_ore));
|
||||
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.rock));
|
||||
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.sand));
|
||||
entries.add(new FalloutEntry() .prim(new Triplet(ModBlocks.sellafield_slaked, m, 1)).max(i * 5).sol(true).mMa(Material.ground));
|
||||
|
||||
@ -379,7 +379,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.tnt, 1), new Object[] { "DDD", "DSD", "DDD", 'D', ModItems.stick_tnt, 'S', ModItems.safety_fuse });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.semtex, 1), new Object[] { "DDD", "DSD", "DDD", 'D', ModItems.stick_semtex, 'S', ModItems.safety_fuse });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.c4, 1), new Object[] { "DDD", "DSD", "DDD", 'D', ModItems.stick_c4, 'S', ModItems.safety_fuse });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.fissure_bomb, 1), new Object[] { "SUS", "RPR", "SUS", 'S', ModBlocks.semtex, 'U', U238.block(), 'R', OreDictManager.getReflector(), 'P', PU239.billet() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.fissure_bomb, 1), new Object[] { "SUS", "RPR", "SUS", 'S', ModBlocks.semtex, 'U', U238.block(), 'R', TA.ingot(), 'P', PU239.billet() });
|
||||
|
||||
|
||||
//IF Grenades
|
||||
|
||||
@ -164,10 +164,15 @@ public class EntityFalloutRain extends Entity {
|
||||
if(b.getMaterial() == Material.air) continue;
|
||||
if(b == Blocks.bedrock) return;
|
||||
|
||||
if(b == ModBlocks.volcano_core) {
|
||||
worldObj.setBlock(x, y, z, ModBlocks.volcano_rad_core, worldObj.getBlockMetadata(x, y, z), 3);
|
||||
continue;
|
||||
}
|
||||
|
||||
Block ab = worldObj.getBlock(x, y + 1, z);
|
||||
int meta = worldObj.getBlockMetadata(x, y, z);
|
||||
|
||||
if(b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
|
||||
if(depth == 0 && b != ModBlocks.fallout && (ab == Blocks.air || (ab.isReplaceable(worldObj, x, y + 1, z) && !ab.getMaterial().isLiquid()))) {
|
||||
|
||||
double d = dist / 100;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.entity.effect;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -53,7 +54,7 @@ public class EntityNukeTorex extends Entity {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
double s = this.getScale();
|
||||
double s = 1.5; //this.getScale();
|
||||
double cs = 1.5;
|
||||
int maxAge = this.getMaxAge();
|
||||
|
||||
@ -84,61 +85,61 @@ public class EntityNukeTorex extends Entity {
|
||||
double x = posX + rand.nextGaussian() * range;
|
||||
double z = posZ + rand.nextGaussian() * range;
|
||||
Cloudlet cloud = new Cloudlet(x, lastSpawnY, z, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime);
|
||||
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) s, 5F * (float) cs);
|
||||
cloud.setScale(1F + this.ticksExisted * 0.005F * (float) cs, 5F * (float) cs);
|
||||
cloudlets.add(cloud);
|
||||
}
|
||||
|
||||
// spawn shock clouds
|
||||
if(ticksExisted < 100) {
|
||||
if(ticksExisted < 150) {
|
||||
|
||||
int cloudCount = ticksExisted * 5;
|
||||
int shockLife = Math.max(300 - ticksExisted * 20, 50);
|
||||
|
||||
for(int i = 0; i < cloudCount; i++) {
|
||||
Vec3 vec = Vec3.createVectorHelper((ticksExisted * 2 + rand.nextDouble()) * 2, 0, 0);
|
||||
Vec3 vec = Vec3.createVectorHelper((ticksExisted * 1.5 + rand.nextDouble()) * 1.5, 0, 0);
|
||||
float rot = (float) (Math.PI * 2 * rand.nextDouble());
|
||||
vec.rotateAroundY(rot);
|
||||
this.cloudlets.add(new Cloudlet(vec.xCoord + posX, worldObj.getHeightValue((int) (vec.xCoord + posX) + 1, (int) (vec.zCoord + posZ)), vec.zCoord + posZ, rot, 0, shockLife)
|
||||
.setScale(5F, 2F)
|
||||
.setMotion(0));
|
||||
this.cloudlets.add(new Cloudlet(vec.xCoord + posX, worldObj.getHeightValue((int) (vec.xCoord + posX) + 1, (int) (vec.zCoord + posZ)), vec.zCoord + posZ, rot, 0, shockLife, TorexType.SHOCK)
|
||||
.setScale(7F, 2F)
|
||||
.setMotion(ticksExisted > 15 ? 0.75 : 0));
|
||||
}
|
||||
}
|
||||
|
||||
// spawn ring clouds
|
||||
if(ticksExisted < 200) {
|
||||
if(ticksExisted < 130 * s) {
|
||||
lifetime *= s;
|
||||
for(int i = 0; i < 2; i++) {
|
||||
Cloudlet cloud = new Cloudlet(posX, posY + coreHeight, posZ, (float)(rand.nextDouble() * 2D * Math.PI), 0, lifetime, TorexType.RING);
|
||||
cloud.setScale(1F + this.ticksExisted * 0.0025F * (float) (cs * s), 3F * (float) (cs * s));
|
||||
cloud.setScale(1F + this.ticksExisted * 0.0025F * (float) (cs * cs), 3F * (float) (cs * cs));
|
||||
cloudlets.add(cloud);
|
||||
}
|
||||
}
|
||||
|
||||
// spawn condensation clouds
|
||||
if(ticksExisted > 200 && ticksExisted < 600) {
|
||||
if(ticksExisted > 130 * s && ticksExisted < 600 * s) {
|
||||
|
||||
for(int i = 0; i < 20; i++) {
|
||||
for(int j = 0; j < 4; j++) {
|
||||
float angle = (float) (Math.PI * 2 * rand.nextDouble());
|
||||
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 3, 0, 0);
|
||||
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * (3 + rand.nextDouble()), 0, 0);
|
||||
vec.rotateAroundZ((float) (Math.PI / 45 * j));
|
||||
vec.rotateAroundY(angle);
|
||||
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight - 5 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
|
||||
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
|
||||
cloud.setScale(0.125F * (float) (cs), 3F * (float) (cs));
|
||||
cloudlets.add(cloud);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ticksExisted > 300 && ticksExisted < 600) {
|
||||
if(ticksExisted > 200 * s && ticksExisted < 600 * s) {
|
||||
|
||||
for(int i = 0; i < 20; i++) {
|
||||
for(int j = 0; j < 4; j++) {
|
||||
float angle = (float) (Math.PI * 2 * rand.nextDouble());
|
||||
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * 2, 0, 0);
|
||||
Vec3 vec = Vec3.createVectorHelper(torusWidth + rollerSize * (3 + rand.nextDouble() * 0.5), 0, 0);
|
||||
vec.rotateAroundZ((float) (Math.PI / 45 * j));
|
||||
vec.rotateAroundY(angle);
|
||||
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight + 25 + j * s, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
|
||||
cloud.setScale(0.125F * (float) (cs * s), 3F * (float) (cs * s));
|
||||
Cloudlet cloud = new Cloudlet(posX + vec.xCoord, posY + coreHeight + 25 + j * cs, posZ + vec.zCoord, angle, 0, (int) ((20 + ticksExisted / 10) * (1 + rand.nextDouble() * 0.1)), TorexType.CONDENSATION);
|
||||
cloud.setScale(0.125F * (float) (cs), 3F * (float) (cs));
|
||||
cloudlets.add(cloud);
|
||||
}
|
||||
}
|
||||
@ -147,12 +148,12 @@ public class EntityNukeTorex extends Entity {
|
||||
for(Cloudlet cloud : cloudlets) {
|
||||
cloud.update();
|
||||
}
|
||||
coreHeight += 0.15/* * s*/;
|
||||
torusWidth += 0.05/* * s*/;
|
||||
coreHeight += 0.15 / s;
|
||||
torusWidth += 0.05 / s;
|
||||
rollerSize = torusWidth * 0.35;
|
||||
convectionHeight = coreHeight + rollerSize;
|
||||
|
||||
int maxHeat = (int) (50 * s);
|
||||
int maxHeat = (int) (50 * cs);
|
||||
heat = maxHeat - Math.pow((maxHeat * this.ticksExisted) / maxAge, 1);
|
||||
|
||||
cloudlets.removeIf(x -> x.isDead);
|
||||
@ -298,6 +299,14 @@ public class EntityNukeTorex extends Entity {
|
||||
this.motionX = convection.xCoord * factor + lift.xCoord * (1D - factor);
|
||||
this.motionY = convection.yCoord * factor + lift.yCoord * (1D - factor);
|
||||
this.motionZ = convection.zCoord * factor + lift.zCoord * (1D - factor);
|
||||
} else if(this.type == TorexType.SHOCK) {
|
||||
|
||||
double factor = MathHelper.clamp_double((this.posY - EntityNukeTorex.this.posY) / EntityNukeTorex.this.coreHeight, 0, 1);
|
||||
Vec3 motion = Vec3.createVectorHelper(1, 0, 0);
|
||||
motion.rotateAroundY(this.angle);
|
||||
this.motionX = motion.xCoord * factor;
|
||||
this.motionY = motion.yCoord * factor;
|
||||
this.motionZ = motion.zCoord * factor;
|
||||
} else if(this.type == TorexType.RING) {
|
||||
Vec3 motion = getRingMotion(simPosX, simPosZ);
|
||||
this.motionX = motion.xCoord;
|
||||
@ -321,30 +330,14 @@ public class EntityNukeTorex extends Entity {
|
||||
|
||||
private Vec3 getCondensationMotion() {
|
||||
Vec3 delta = Vec3.createVectorHelper(posX - EntityNukeTorex.this.posX, 0, posZ - EntityNukeTorex.this.posZ);
|
||||
double speed = 0.00002 * EntityNukeTorex.this.getScale() * EntityNukeTorex.this.ticksExisted;
|
||||
double speed = 0.00002 * EntityNukeTorex.this.ticksExisted;
|
||||
delta.xCoord *= speed;
|
||||
//delta.yCoord *= speed * 0.75 * EntityNukeTorex.this.getScale();
|
||||
delta.zCoord *= speed;
|
||||
return delta;
|
||||
}
|
||||
|
||||
private Vec3 getRingMotion(double simPosX, double simPosZ) {
|
||||
|
||||
/*Vec3 targetPos = Vec3.createVectorHelper(
|
||||
(EntityNukeTorex.this.posX + torusWidth * 1),
|
||||
(EntityNukeTorex.this.posY + coreHeight * 0.5),
|
||||
EntityNukeTorex.this.posZ);
|
||||
|
||||
Vec3 delta = Vec3.createVectorHelper(targetPos.xCoord - simPosX, targetPos.yCoord - this.posY, targetPos.zCoord - simPosZ);
|
||||
|
||||
double speed = 0.125D;
|
||||
delta.xCoord *= speed;
|
||||
delta.yCoord *= speed;
|
||||
delta.zCoord *= speed;
|
||||
|
||||
delta.rotateAroundY(this.angle);
|
||||
return delta;*/
|
||||
|
||||
if(simPosX > EntityNukeTorex.this.posX + torusWidth * 2)
|
||||
return Vec3.createVectorHelper(0, 0, 0);
|
||||
|
||||
@ -392,9 +385,6 @@ public class EntityNukeTorex extends Entity {
|
||||
/* simulated on a 2D-plane along the X/Y axis */
|
||||
private Vec3 getConvectionMotion(double simPosX, double simPosZ) {
|
||||
|
||||
if(simPosX > EntityNukeTorex.this.posX + torusWidth * 2)
|
||||
return Vec3.createVectorHelper(0, 0, 0);
|
||||
|
||||
/* the position of the torus' outer ring center */
|
||||
Vec3 torusPos = Vec3.createVectorHelper(
|
||||
(EntityNukeTorex.this.posX + torusWidth),
|
||||
@ -480,10 +470,19 @@ public class EntityNukeTorex extends Entity {
|
||||
}
|
||||
|
||||
public Vec3 getInterpPos(float interp) {
|
||||
return Vec3.createVectorHelper(
|
||||
float scale = (float) EntityNukeTorex.this.getScale();
|
||||
Vec3 base = Vec3.createVectorHelper(
|
||||
prevPosX + (posX - prevPosX) * interp,
|
||||
prevPosY + (posY - prevPosY) * interp,
|
||||
prevPosZ + (posZ - prevPosZ) * interp);
|
||||
|
||||
if(this.type != TorexType.SHOCK) { //no rescale for the shockwave as this messes with the positions
|
||||
base.xCoord = ((base.xCoord) - EntityNukeTorex.this.posX) * scale + EntityNukeTorex.this.posX;
|
||||
base.yCoord = ((base.yCoord) - EntityNukeTorex.this.posY) * scale + EntityNukeTorex.this.posY;
|
||||
base.zCoord = ((base.zCoord) - EntityNukeTorex.this.posZ) * scale + EntityNukeTorex.this.posZ;
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
|
||||
public Vec3 getInterpColor(float interp) {
|
||||
@ -514,7 +513,9 @@ public class EntityNukeTorex extends Entity {
|
||||
private float growingScale = 5F;
|
||||
|
||||
public float getScale() {
|
||||
return startingScale + ((float)age / (float)cloudletLife) * growingScale;
|
||||
float base = startingScale + ((float)age / (float)cloudletLife) * growingScale;
|
||||
if(this.type != TorexType.SHOCK) base *= (float) EntityNukeTorex.this.getScale();
|
||||
return base;
|
||||
}
|
||||
|
||||
public Cloudlet setScale(float start, float grow) {
|
||||
@ -533,6 +534,7 @@ public class EntityNukeTorex extends Entity {
|
||||
|
||||
public static enum TorexType {
|
||||
STANDARD,
|
||||
SHOCK,
|
||||
RING,
|
||||
CONDENSATION
|
||||
}
|
||||
@ -548,14 +550,14 @@ public class EntityNukeTorex extends Entity {
|
||||
}
|
||||
|
||||
public static void statFac(World world, double x, double y, double z, float scale) {
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world).setScale(MathHelper.clamp_float(scale * 0.01F, 0.5F, 5F));
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world).setScale(MathHelper.clamp_float((float) BobMathUtil.squirt(scale * 0.01) * 1.5F, 0.5F, 5F));
|
||||
torex.setPosition(x, y, z);
|
||||
world.spawnEntityInWorld(torex);
|
||||
TrackerUtil.setTrackingRange(world, torex, 1000);
|
||||
}
|
||||
|
||||
public static void statFacBale(World world, double x, double y, double z, float scale) {
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world).setScale(MathHelper.clamp_float(scale * 0.01F, 0.5F, 5F)).setType(1);
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world).setScale(MathHelper.clamp_float((float) BobMathUtil.squirt(scale * 0.01) * 1.5F, 0.5F, 5F)).setType(1);
|
||||
torex.setPosition(x, y, z);
|
||||
world.spawnEntityInWorld(torex);
|
||||
TrackerUtil.setTrackingRange(world, torex, 1000);
|
||||
|
||||
@ -52,13 +52,14 @@ public class EntityShrapnel extends EntityThrowable {
|
||||
if(!worldObj.isRemote)
|
||||
this.setDead();
|
||||
|
||||
if(this.dataWatcher.getWatchableObjectByte(16) == 2) {
|
||||
int b = this.dataWatcher.getWatchableObjectByte(16);
|
||||
if(b == 2 || b == 4) {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(motionY < -0.2D) {
|
||||
|
||||
if(worldObj.getBlock(mop.blockX, mop.blockY + 1, mop.blockZ).isReplaceable(worldObj, mop.blockX, mop.blockY + 1, mop.blockZ))
|
||||
worldObj.setBlock(mop.blockX, mop.blockY + 1, mop.blockZ, ModBlocks.volcanic_lava_block);
|
||||
worldObj.setBlock(mop.blockX, mop.blockY + 1, mop.blockZ, b == 2 ? ModBlocks.volcanic_lava_block : ModBlocks.rad_lava_block);
|
||||
|
||||
for(int x = mop.blockX - 1; x <= mop.blockX + 1; x++) {
|
||||
for(int y = mop.blockY; y <= mop.blockY + 2; y++) {
|
||||
@ -73,7 +74,7 @@ public class EntityShrapnel extends EntityThrowable {
|
||||
if(motionY > 0) {
|
||||
ExplosionNT explosion = new ExplosionNT(worldObj, null, mop.blockX + 0.5, mop.blockY + 0.5, mop.blockZ + 0.5, 7);
|
||||
explosion.addAttrib(ExAttrib.NODROP);
|
||||
explosion.addAttrib(ExAttrib.LAVA_V);
|
||||
explosion.addAttrib(b == 2 ? ExAttrib.LAVA_V : ExAttrib.LAVA_R);
|
||||
explosion.addAttrib(ExAttrib.NOSOUND);
|
||||
explosion.addAttrib(ExAttrib.ALLMOD);
|
||||
explosion.addAttrib(ExAttrib.NOHURT);
|
||||
@ -108,6 +109,10 @@ public class EntityShrapnel extends EntityThrowable {
|
||||
this.dataWatcher.updateObject(16, (byte) (b ? 3 : 0));
|
||||
}
|
||||
|
||||
public void setRadVolcano(boolean b) {
|
||||
this.dataWatcher.updateObject(16, (byte) (b ? 4 : 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean writeToNBTOptional(NBTTagCompound nbt) {
|
||||
return false;
|
||||
|
||||
@ -538,7 +538,7 @@ public class ExplosionChaos {
|
||||
if(entity.getDistance(x, y, z) > range)
|
||||
continue;
|
||||
|
||||
if(ArmorRegistry.hasAnyProtection(entity, 3, HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE)) {
|
||||
if(ArmorRegistry.hasAnyProtection(entity, 3, HazardClass.GAS_LUNG, HazardClass.GAS_BLISTERING)) {
|
||||
ArmorUtil.damageGasMaskFilter(entity, 1);
|
||||
} else {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 5 * 20, 0));
|
||||
|
||||
@ -273,6 +273,8 @@ public class ExplosionNT extends Explosion {
|
||||
}
|
||||
} else if(has(ExAttrib.LAVA_V)) {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.volcanic_lava_block);
|
||||
} else if(has(ExAttrib.LAVA_R)) {
|
||||
this.worldObj.setBlock(i, j, k, ModBlocks.rad_lava_block);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -327,7 +329,8 @@ public class ExplosionNT extends Explosion {
|
||||
DIGAMMA,
|
||||
DIGAMMA_CIRCUIT,
|
||||
LAVA, //again the same thing but lava
|
||||
LAVA_V, //again the same thing but volcaniclava
|
||||
LAVA_V, //again the same thing but volcanic lava
|
||||
LAVA_R, //again the same thing but radioactive lava
|
||||
ERRODE, //will turn select blocks into gravel or sand
|
||||
ALLMOD, //block placer attributes like fire are applied for all destroyed blocks
|
||||
ALLDROP, //miner TNT!
|
||||
|
||||
@ -528,7 +528,7 @@ public class EntityEffectHandler {
|
||||
|
||||
if(!RadiationConfig.enablePollution) return;
|
||||
|
||||
if(RadiationConfig.enablePoison && !ArmorRegistry.hasProtection(entity, 3, HazardClass.GAS_CORROSIVE) && entity.ticksExisted % 60 == 0) {
|
||||
if(RadiationConfig.enablePoison && !ArmorRegistry.hasProtection(entity, 3, HazardClass.GAS_BLISTERING) && entity.ticksExisted % 60 == 0) {
|
||||
|
||||
float poison = PollutionHandler.getPollution(entity.worldObj, (int) Math.floor(entity.posX), (int) Math.floor(entity.posY + entity.getEyeHeight()), (int) Math.floor(entity.posZ), PollutionType.POISON);
|
||||
|
||||
|
||||
@ -376,7 +376,7 @@ public class BulletConfigFactory {
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase) e;
|
||||
|
||||
if(ArmorRegistry.hasAllProtection(entity, 3, HazardClass.GAS_CHLORINE))
|
||||
if(ArmorRegistry.hasAllProtection(entity, 3, HazardClass.GAS_LUNG))
|
||||
continue;
|
||||
|
||||
PotionEffect eff0 = new PotionEffect(Potion.poison.id, duration, 2, true);
|
||||
|
||||
@ -223,6 +223,9 @@ public class HazardRegistry {
|
||||
HazardSystem.register(new ItemStack(ModBlocks.sellafield, 1, 3), makeData(RADIATION, 4F));
|
||||
HazardSystem.register(new ItemStack(ModBlocks.sellafield, 1, 4), makeData(RADIATION, 5F));
|
||||
HazardSystem.register(new ItemStack(ModBlocks.sellafield, 1, 5), makeData(RADIATION, 10F));
|
||||
|
||||
HazardSystem.register(new ItemStack(ModBlocks.ore_sellafield_radgem), makeData(RADIATION, 25F));
|
||||
HazardSystem.register(new ItemStack(ModItems.gem_rad), makeData(RADIATION, 25F));
|
||||
|
||||
registerOtherFuel(rod_zirnox, EnumZirnoxType.NATURAL_URANIUM_FUEL.ordinal(), u * rod_dual, wst * rod_dual * 11.5F, false);
|
||||
registerOtherFuel(rod_zirnox, EnumZirnoxType.URANIUM_FUEL.ordinal(), uf * rod_dual, wst * rod_dual * 10F, false);
|
||||
|
||||
@ -12,6 +12,7 @@ import static com.hbm.inventory.OreDictManager.DictFrame.*;
|
||||
import static com.hbm.inventory.OreNames.*;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockOreBasalt.EnumBasaltOreType;
|
||||
import com.hbm.blocks.BlockEnums.EnumStoneType;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.hazard.HazardData;
|
||||
@ -216,6 +217,7 @@ public class OreDictManager {
|
||||
public static final DictFrame CINNABAR = new DictFrame("Cinnabar");
|
||||
public static final DictFrame BORAX = new DictFrame("Borax");
|
||||
public static final DictFrame CHLOROCALCITE = new DictFrame("Chlorocalcite");
|
||||
public static final DictFrame MOLYSITE = new DictFrame("Molysite");
|
||||
public static final DictFrame SODALITE = new DictFrame("Sodalite");
|
||||
public static final DictFrame VOLCANIC = new DictFrame("Volcanic");
|
||||
public static final DictFrame HEMATITE = new DictFrame("Hematite");
|
||||
@ -390,15 +392,15 @@ public class OreDictManager {
|
||||
EUPH .nugget(nugget_euphemium) .ingot(ingot_euphemium) .dust(powder_euphemium) .block(block_euphemium);
|
||||
DNT .nugget(nugget_dineutronium) .ingot(ingot_dineutronium) .dust(powder_dineutronium) .block(block_dineutronium);
|
||||
FIBER .ingot(ingot_fiberglass) .block(block_fiberglass);
|
||||
ASBESTOS .asbestos(1F) .ingot(ingot_asbestos) .dust(powder_asbestos) .block(block_asbestos) .ore(ore_asbestos, ore_gneiss_asbestos, basalt_asbestos, DictFrame.fromOne(stone_resource, EnumStoneType.ASBESTOS));
|
||||
ASBESTOS .asbestos(1F) .ingot(ingot_asbestos) .dust(powder_asbestos) .block(block_asbestos) .ore(ore_asbestos, ore_gneiss_asbestos, basalt_asbestos, DictFrame.fromOne(ore_basalt, EnumBasaltOreType.ASBESTOS), DictFrame.fromOne(stone_resource, EnumStoneType.ASBESTOS));
|
||||
OSMIRIDIUM .nugget(nugget_osmiridium) .ingot(ingot_osmiridium);
|
||||
|
||||
/*
|
||||
* DUST AND GEM ORES
|
||||
*/
|
||||
S .dust(sulfur) .block(block_sulfur) .ore(ore_sulfur, ore_nether_sulfur, basalt_sulfur, ore_meteor_sulfur, DictFrame.fromOne(stone_resource, EnumStoneType.SULFUR)) .oreNether(ore_nether_sulfur);
|
||||
S .dust(sulfur) .block(block_sulfur) .ore(ore_sulfur, ore_nether_sulfur, basalt_sulfur, DictFrame.fromOne(ore_basalt, EnumBasaltOreType.SULFUR), ore_meteor_sulfur, DictFrame.fromOne(stone_resource, EnumStoneType.SULFUR)) .oreNether(ore_nether_sulfur);
|
||||
KNO .dust(niter) .block(block_niter) .ore(ore_niter);
|
||||
F .dust(fluorite) .block(block_fluorite) .ore(ore_fluorite, basalt_fluorite);
|
||||
F .dust(fluorite) .block(block_fluorite) .ore(ore_fluorite, basalt_fluorite, DictFrame.fromOne(ore_basalt, EnumBasaltOreType.FLUORITE));
|
||||
LIGNITE .gem(lignite) .dust(powder_lignite) .ore(ore_lignite);
|
||||
COALCOKE .gem(fromOne(coke, EnumCokeType.COAL)) .block(fromOne(block_coke, EnumCokeType.COAL));
|
||||
PETCOKE .gem(fromOne(coke, EnumCokeType.PETROLEUM)) .block(fromOne(block_coke, EnumCokeType.PETROLEUM));
|
||||
@ -406,8 +408,9 @@ public class OreDictManager {
|
||||
CINNABAR .crystal(cinnebar) .gem(cinnebar) .ore(ore_cinnebar, ore_depth_cinnebar);
|
||||
BORAX .dust(powder_borax) .ore(ore_depth_borax);
|
||||
CHLOROCALCITE .dust(powder_chlorocalcite);
|
||||
MOLYSITE .dust(powder_molysite) .ore(DictFrame.fromOne(ore_basalt, EnumBasaltOreType.MOLYSITE));
|
||||
SODALITE .gem(gem_sodalite);
|
||||
VOLCANIC .gem(gem_volcanic) .ore(basalt_gem);
|
||||
VOLCANIC .gem(gem_volcanic) .ore(basalt_gem, DictFrame.fromOne(ore_basalt, EnumBasaltOreType.GEM));
|
||||
HEMATITE .ore(fromOne(stone_resource, EnumStoneType.HEMATITE));
|
||||
MALACHITE .ore(fromOne(stone_resource, EnumStoneType.MALACHITE));
|
||||
SLAG .block(block_slag);
|
||||
|
||||
@ -496,12 +496,12 @@ public class Fluids {
|
||||
metaOrder.add(PHEROMONE_M);
|
||||
for(FluidType custom : customFluids) metaOrder.add(custom);
|
||||
|
||||
CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_CHLORINE, false)));
|
||||
PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_CHLORINE, false)));
|
||||
MUSTARDGAS.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 10, HazardClass.GAS_CORROSIVE, false))
|
||||
.addEntry(new ToxinEffects(HazardClass.GAS_CORROSIVE, true).add(new PotionEffect(Potion.wither.id, 100, 1), new PotionEffect(Potion.confusion.id, 100, 0))));
|
||||
CHLORINE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 2F, 20, HazardClass.GAS_LUNG, false)));
|
||||
PHOSGENE.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 20, HazardClass.GAS_LUNG, false)));
|
||||
MUSTARDGAS.addTraits(new FT_Toxin().addEntry(new ToxinDirectDamage(ModDamageSource.cloud, 4F, 10, HazardClass.GAS_BLISTERING, false))
|
||||
.addEntry(new ToxinEffects(HazardClass.GAS_BLISTERING, true).add(new PotionEffect(Potion.wither.id, 100, 1), new PotionEffect(Potion.confusion.id, 100, 0))));
|
||||
ESTRADIOL.addTraits(new FT_Toxin().addEntry(new ToxinEffects(HazardClass.PARTICLE_FINE, false).add(new PotionEffect(HbmPotion.death.id, 60 * 60 * 20, 0))));
|
||||
REDMUD.addTraits(new FT_Toxin().addEntry(new ToxinEffects(HazardClass.GAS_CORROSIVE, false).add(new PotionEffect(Potion.wither.id, 30 * 20, 2))));
|
||||
REDMUD.addTraits(new FT_Toxin().addEntry(new ToxinEffects(HazardClass.GAS_BLISTERING, false).add(new PotionEffect(Potion.wither.id, 30 * 20, 2))));
|
||||
|
||||
double eff_steam_boil = 1.0D;
|
||||
double eff_steam_heatex = 0.25D;
|
||||
|
||||
@ -16,6 +16,8 @@ public class FluidLoaderFillableItem extends FluidLoadingHandler {
|
||||
|
||||
public boolean fill(ItemStack stack, FluidTank tank) {
|
||||
|
||||
if(tank.pressure != 0) return false;
|
||||
|
||||
if(stack == null)
|
||||
return false;
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ public class FluidLoaderInfinite extends FluidLoadingHandler {
|
||||
|
||||
ItemInfiniteFluid item = (ItemInfiniteFluid) slots[in].getItem();
|
||||
|
||||
if(!item.allowPressure(tank.pressure)) return false;
|
||||
if(item.getType() != null && tank.type != item.getType()) return false;
|
||||
|
||||
if(item.getChance() <= 1 || rand.nextInt(item.getChance()) == 0) {
|
||||
|
||||
@ -10,6 +10,8 @@ public class FluidLoaderStandard extends FluidLoadingHandler {
|
||||
@Override
|
||||
public boolean fillItem(ItemStack[] slots, int in, int out, FluidTank tank) {
|
||||
|
||||
if(tank.pressure != 0) return false;
|
||||
|
||||
if(slots[in] == null)
|
||||
return true;
|
||||
|
||||
|
||||
@ -126,8 +126,6 @@ public class FluidTank {
|
||||
if(slots[in] == null)
|
||||
return false;
|
||||
|
||||
if(this.pressure != 0) return false; //for now, canisters can only be loaded from high-pressure tanks, not unloaded
|
||||
|
||||
int prev = this.getFill();
|
||||
|
||||
for(FluidLoadingHandler handler : loadingHandlers) {
|
||||
|
||||
@ -45,6 +45,7 @@ public class CombinationRecipes extends SerializableRecipe {
|
||||
recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.briquette, EnumBriquetteType.LIGNITE)), new Pair(DictFrame.fromOne(ModItems.coke, EnumCokeType.LIGNITE), new FluidStack(Fluids.COALCREOSOTE, 100)));
|
||||
|
||||
//recipes.put(CHLOROCALCITE.dust(), new Pair(new ItemStack(ModItems.powder_calcium), new FluidStack(Fluids.CHLORINE, 250)));
|
||||
recipes.put(MOLYSITE.dust(), new Pair(new ItemStack(Items.iron_ingot), new FluidStack(Fluids.CHLORINE, 250)));
|
||||
recipes.put(CINNABAR.crystal(), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.MERCURY, 100)));
|
||||
recipes.put(new ComparableStack(Items.glowstone_dust), new Pair(new ItemStack(ModItems.sulfur), new FluidStack(Fluids.CHLORINE, 100)));
|
||||
recipes.put(SODALITE.gem(), new Pair(new ItemStack(ModItems.powder_sodium), new FluidStack(Fluids.CHLORINE, 100)));
|
||||
|
||||
@ -425,6 +425,7 @@ public class ModItems {
|
||||
public static Item gem_sodalite;
|
||||
public static Item gem_tantalium;
|
||||
public static Item gem_volcanic;
|
||||
public static Item gem_rad;
|
||||
public static Item gem_alexandrite;
|
||||
|
||||
public static Item powder_lead;
|
||||
@ -523,6 +524,7 @@ public class ModItems {
|
||||
public static Item powder_impure_osmiridium;
|
||||
public static Item powder_borax;
|
||||
public static Item powder_chlorocalcite;
|
||||
public static Item powder_molysite;
|
||||
|
||||
public static Item powder_lanthanium;
|
||||
public static Item powder_actinium;
|
||||
@ -1853,6 +1855,8 @@ public class ModItems {
|
||||
/*public static Item factory_core_titanium;
|
||||
public static Item factory_core_advanced;*/
|
||||
|
||||
public static Item upgrade_muffler;
|
||||
|
||||
public static Item upgrade_template;
|
||||
public static Item upgrade_speed_1;
|
||||
public static Item upgrade_speed_2;
|
||||
@ -2205,6 +2209,8 @@ public class ModItems {
|
||||
public static Item defuser_gold;
|
||||
public static Item ballistic_gauntlet;
|
||||
public static Item night_vision;
|
||||
public static Item card_aos;
|
||||
public static Item card_qos;
|
||||
|
||||
public static Item hazmat_helmet;
|
||||
public static Item hazmat_plate;
|
||||
@ -2859,6 +2865,7 @@ public class ModItems {
|
||||
gem_sodalite = new ItemCustomLore().setUnlocalizedName("gem_sodalite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gem_sodalite");
|
||||
gem_tantalium = new ItemCustomLore().setUnlocalizedName("gem_tantalium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gem_tantalium");
|
||||
gem_volcanic = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gem_volcanic").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gem_volcanic");
|
||||
gem_rad = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("gem_rad").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gem_rad");
|
||||
gem_alexandrite = new ItemAlexandrite().setUnlocalizedName("gem_alexandrite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gem_alexandrite");
|
||||
|
||||
powder_lead = new Item().setUnlocalizedName("powder_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_lead");
|
||||
@ -2965,6 +2972,7 @@ public class ModItems {
|
||||
powder_impure_osmiridium = new Item().setUnlocalizedName("powder_impure_osmiridium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_impure_osmiridium");
|
||||
powder_borax = new Item().setUnlocalizedName("powder_borax").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_borax");
|
||||
powder_chlorocalcite = new Item().setUnlocalizedName("powder_chlorocalcite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_chlorocalcite");
|
||||
powder_molysite = new Item().setUnlocalizedName("powder_molysite").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_molysite");
|
||||
|
||||
fragment_neodymium = new Item().setUnlocalizedName("fragment_neodymium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_neodymium");
|
||||
fragment_cobalt = new Item().setUnlocalizedName("fragment_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fragment_cobalt");
|
||||
@ -3448,6 +3456,8 @@ public class ModItems {
|
||||
defuser_gold = new ItemModDefuser().setUnlocalizedName("defuser_gold").setTextureName(RefStrings.MODID + ":defuser_gold");
|
||||
ballistic_gauntlet = new ItemModTwoKick().setUnlocalizedName("ballistic_gauntlet").setTextureName(RefStrings.MODID + ":ballistic_gauntlet");
|
||||
night_vision = new ItemModNightVision().setUnlocalizedName("night_vision").setTextureName(RefStrings.MODID + ":night_vision");
|
||||
card_aos = new ItemModCard().setUnlocalizedName("card_aos").setTextureName(RefStrings.MODID + ":card_aos");
|
||||
card_qos = new ItemModCard().setUnlocalizedName("card_qos").setTextureName(RefStrings.MODID + ":card_qos");
|
||||
|
||||
cap_nuka = new Item().setUnlocalizedName("cap_nuka").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_nuka");
|
||||
cap_quantum = new Item().setUnlocalizedName("cap_quantum").setCreativeTab(MainRegistry.consumableTab).setTextureName(RefStrings.MODID + ":cap_quantum");
|
||||
@ -4480,6 +4490,8 @@ public class ModItems {
|
||||
fusion_shield_chlorophyte = new ItemFusionShield(60 * 60 * 60 * 15, 9000).setUnlocalizedName("fusion_shield_chlorophyte").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_chlorophyte");
|
||||
fusion_shield_vaporwave = new ItemFusionShield(60 * 60 * 60 * 10, 1916169).setUnlocalizedName("fusion_shield_vaporwave").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_shield_vaporwave");
|
||||
|
||||
upgrade_muffler = new ItemMuffler().setUnlocalizedName("upgrade_muffler").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":upgrade_muffler");
|
||||
|
||||
upgrade_template = new ItemCustomLore().setUnlocalizedName("upgrade_template").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":upgrade_template");
|
||||
upgrade_speed_1 = new ItemMachineUpgrade(UpgradeType.SPEED, 1).setUnlocalizedName("upgrade_speed_1").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_1");
|
||||
upgrade_speed_2 = new ItemMachineUpgrade(UpgradeType.SPEED, 2).setUnlocalizedName("upgrade_speed_2").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_speed_2");
|
||||
@ -5819,6 +5831,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_impure_osmiridium, powder_impure_osmiridium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_borax, powder_borax.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_chlorocalcite, powder_chlorocalcite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_molysite, powder_molysite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_yellowcake, powder_yellowcake.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_beryllium, powder_beryllium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_dura_steel, powder_dura_steel.getUnlocalizedName());
|
||||
@ -5944,6 +5957,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gem_sodalite, gem_sodalite.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gem_tantalium, gem_tantalium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gem_volcanic, gem_volcanic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gem_rad, gem_rad.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gem_alexandrite, gem_alexandrite.getUnlocalizedName());
|
||||
|
||||
//Fragments
|
||||
@ -6507,6 +6521,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(scraps, scraps.getUnlocalizedName());
|
||||
|
||||
//Machine Upgrades
|
||||
GameRegistry.registerItem(upgrade_muffler, upgrade_muffler.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_template, upgrade_template.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_speed_1, upgrade_speed_1.getUnlocalizedName());
|
||||
GameRegistry.registerItem(upgrade_speed_2, upgrade_speed_2.getUnlocalizedName());
|
||||
@ -7720,6 +7735,8 @@ public class ModItems {
|
||||
GameRegistry.registerItem(defuser_gold, defuser_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ballistic_gauntlet, ballistic_gauntlet.getUnlocalizedName());
|
||||
GameRegistry.registerItem(night_vision, night_vision.getUnlocalizedName());
|
||||
GameRegistry.registerItem(card_aos, card_aos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(card_qos, card_qos.getUnlocalizedName());
|
||||
|
||||
//Chaos
|
||||
GameRegistry.registerItem(chocolate_milk, chocolate_milk.getUnlocalizedName());
|
||||
|
||||
@ -148,9 +148,9 @@ public class ArmorGasMask extends ItemArmor implements IGasMask {
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
if(this == ModItems.gas_mask_mono) {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT, HazardClass.BACTERIA}));
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_LUNG, HazardClass.GAS_BLISTERING, HazardClass.BACTERIA}));
|
||||
} else {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT}));
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_BLISTERING}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.armor;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.model.ModelArmorHEV;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@ -45,7 +46,7 @@ public class ArmorHEV extends ArmorFSBPowered {
|
||||
@Override
|
||||
public void handleOverlay(RenderGameOverlayEvent.Pre event, EntityPlayer player) {
|
||||
|
||||
if(this.hasFSBArmorIgnoreCharge(player)) {
|
||||
if(this.hasFSBArmorIgnoreCharge(player) && player.inventory.armorInventory[2].getItem() == ModItems.hev_plate) {
|
||||
|
||||
if(event.type == ElementType.ARMOR) {
|
||||
event.setCanceled(true);
|
||||
|
||||
49
src/main/java/com/hbm/items/armor/ItemModCard.java
Normal file
49
src/main/java/com/hbm/items/armor/ItemModCard.java
Normal file
@ -0,0 +1,49 @@
|
||||
package com.hbm.items.armor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
public class ItemModCard extends ItemArmorMod {
|
||||
|
||||
public ItemModCard() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
if(this == ModItems.card_aos) {
|
||||
list.add(EnumChatFormatting.RED + "Top of the line!");
|
||||
list.add(EnumChatFormatting.RED + "Guns now have a 33% chance to not consume ammo.");
|
||||
}
|
||||
if(this == ModItems.card_qos) {
|
||||
list.add(EnumChatFormatting.RED + "Power!");
|
||||
list.add(EnumChatFormatting.RED + "Adds a 33% chance to tank damage with no cap.");
|
||||
}
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + I18n.format("item.night_vision.description.in_armor", stack.getDisplayName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modDamage(LivingHurtEvent event, ItemStack armor) {
|
||||
if(this == ModItems.card_qos && event.entityLiving.getRNG().nextInt(3) == 0 && event.entityLiving instanceof EntityPlayer) {
|
||||
HbmPlayerProps.plink((EntityPlayer) event.entityLiving, "random.break", 0.5F, 1.0F + event.entityLiving.getRNG().nextFloat() * 0.5F);
|
||||
event.ammount = 0;
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -99,9 +99,9 @@ public class ItemModGasmask extends ItemArmorMod implements IGasMask {
|
||||
public ArrayList<HazardClass> getBlacklist(ItemStack stack, EntityLivingBase entity) {
|
||||
|
||||
if(this == ModItems.attachment_mask_mono) {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CHLORINE, HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT, HazardClass.BACTERIA}));
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_LUNG, HazardClass.GAS_BLISTERING, HazardClass.BACTERIA}));
|
||||
} else {
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_CORROSIVE, HazardClass.NERVE_AGENT}));
|
||||
return new ArrayList<HazardClass>(Arrays.asList(new HazardClass[] {HazardClass.GAS_BLISTERING}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,30 +12,30 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemModNightVision extends ItemArmorMod {
|
||||
public ItemModNightVision() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
}
|
||||
public ItemModNightVision() {
|
||||
super(ArmorModHandler.helmet_only, true, false, false, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.AQUA + I18n.format("item.night_vision.description.item"));
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(EnumChatFormatting.AQUA + I18n.format("item.night_vision.description.item"));
|
||||
list.add("");
|
||||
super.addInformation(itemstack, player, list, bool);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + I18n.format("item.night_vision.description.in_armor", stack.getDisplayName()));
|
||||
}
|
||||
@Override
|
||||
public void addDesc(List list, ItemStack stack, ItemStack armor) {
|
||||
list.add(EnumChatFormatting.YELLOW + I18n.format("item.night_vision.description.in_armor", stack.getDisplayName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
|
||||
if(!entity.worldObj.isRemote && entity instanceof EntityPlayer && armor.getItem() instanceof ArmorFSBPowered && ArmorFSBPowered.hasFSBArmor((EntityPlayer)entity)) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0));
|
||||
@Override
|
||||
public void modUpdate(EntityLivingBase entity, ItemStack armor) {
|
||||
if(!entity.worldObj.isRemote && entity instanceof EntityPlayer && armor.getItem() instanceof ArmorFSBPowered && ArmorFSBPowered.hasFSBArmor((EntityPlayer) entity)) {
|
||||
entity.addPotionEffect(new PotionEffect(Potion.nightVision.id, 15 * 20, 0));
|
||||
|
||||
if(entity.getRNG().nextInt(50) == 0) {
|
||||
armor.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getRNG().nextInt(50) == 0) {
|
||||
armor.damageItem(1, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
@ -23,4 +24,5 @@ public class ItemInfiniteFluid extends Item {
|
||||
public FluidType getType() { return this.type; }
|
||||
public int getAmount() { return this.amount; }
|
||||
public int getChance() { return this.chance; }
|
||||
public boolean allowPressure(int pressure) { return this == ModItems.fluid_barrel_infinite || pressure == 0; }
|
||||
}
|
||||
|
||||
31
src/main/java/com/hbm/items/machine/ItemMuffler.java
Normal file
31
src/main/java/com/hbm/items/machine/ItemMuffler.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.hbm.items.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.CompatExternal;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemMuffler extends Item {
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
||||
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
||||
|
||||
if(te != null && te instanceof TileEntityMachineBase) {
|
||||
TileEntityMachineBase tile = (TileEntityMachineBase) te;
|
||||
if(!tile.muffled) {
|
||||
tile.muffled = true;
|
||||
world.playSoundAtEntity(player, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
stack.stackSize--;
|
||||
tile.markDirty();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package com.hbm.items.tool;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityLockableBase;
|
||||
import com.hbm.util.CompatExternal;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -17,51 +17,29 @@ public class ItemLock extends ItemKeyPin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2)
|
||||
{
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
||||
|
||||
if(this.getPins(stack) != 0) {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
||||
|
||||
if(te != null && te instanceof TileEntityLockableBase) {
|
||||
TileEntityLockableBase tile = (TileEntityLockableBase)te;
|
||||
|
||||
TileEntityLockableBase tile = (TileEntityLockableBase) te;
|
||||
|
||||
if(tile.isLocked())
|
||||
return false;
|
||||
|
||||
|
||||
tile.setPins(this.getPins(stack));
|
||||
tile.lock();
|
||||
tile.setMod(lockMod);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockHang", 1.0F, 1.0F);
|
||||
world.playSoundAtEntity(player, "hbm:block.lockHang", 1.0F, 1.0F);
|
||||
stack.stackSize--;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
TileEntity target = world.getTileEntity(dummy.targetX, dummy.targetY, dummy.targetZ);
|
||||
|
||||
if(target != null && target instanceof TileEntityLockableBase) {
|
||||
TileEntityLockableBase tile = (TileEntityLockableBase)target;
|
||||
|
||||
if(tile.isLocked())
|
||||
return false;
|
||||
|
||||
tile.setPins(this.getPins(stack));
|
||||
tile.lock();
|
||||
tile.setMod(lockMod);
|
||||
|
||||
world.playSoundAtEntity(player, "hbm:block.lockHang", 1.0F, 1.0F);
|
||||
stack.stackSize--;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -4,11 +4,13 @@ import java.util.List;
|
||||
|
||||
import com.hbm.entity.effect.EntityNukeTorex;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -78,11 +80,17 @@ public class ItemWandD extends Item {
|
||||
tom.destructionRange = 600;
|
||||
world.spawnEntityInWorld(tom);*/
|
||||
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
||||
torex.setScale(1.5F);
|
||||
world.spawnEntityInWorld(torex);
|
||||
TrackerUtil.setTrackingRange(world, torex, 1000);
|
||||
List<EntityNukeTorex> del = world.getEntitiesWithinAABB(EntityNukeTorex.class, AxisAlignedBB.getBoundingBox(pos.blockX, pos.blockY + 1, pos.blockZ, pos.blockX, pos.blockY + 1, pos.blockZ).expand(50, 50, 50));
|
||||
|
||||
if(!del.isEmpty()) {
|
||||
for(EntityNukeTorex torex : del) torex.setDead();
|
||||
} else {
|
||||
EntityNukeTorex torex = new EntityNukeTorex(world);
|
||||
torex.setPositionAndRotation(pos.blockX, pos.blockY + 1, pos.blockZ, 0, 0);
|
||||
torex.setScale((float) BobMathUtil.squirt( 1.5 ) * 1.5F);
|
||||
world.spawnEntityInWorld(torex);
|
||||
TrackerUtil.setTrackingRange(world, torex, 1000);
|
||||
}
|
||||
|
||||
/*EntityTracker entitytracker = ((WorldServer) world).getEntityTracker();
|
||||
IntHashMap map = ReflectionHelper.getPrivateValue(EntityTracker.class, entitytracker, "trackedEntityIDs", "field_72794_c");
|
||||
|
||||
@ -6,6 +6,7 @@ import org.lwjgl.input.Mouse;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseNT;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||
import com.hbm.handler.BulletConfiguration;
|
||||
import com.hbm.handler.CasingEjector;
|
||||
@ -580,6 +581,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
|
||||
if(hasInfinity(stack, config)) return;
|
||||
if(isTrenchMaster(player) && player.getRNG().nextInt(3) == 0) return;
|
||||
if(hasAoS(player) && player.getRNG().nextInt(3) == 0) return;
|
||||
|
||||
if(config.reloadType != GunConfiguration.RELOAD_NONE) {
|
||||
setMag(stack, getMag(stack) - 1);
|
||||
@ -831,4 +833,13 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
public static boolean isTrenchMaster(EntityPlayer player) {
|
||||
return player.inventory.armorInventory[2] != null && player.inventory.armorInventory[2].getItem() == ModItems.trenchmaster_plate && ArmorFSB.hasFSBArmor(player);
|
||||
}
|
||||
|
||||
public static boolean hasAoS(EntityPlayer player) {
|
||||
if(player.inventory.armorInventory[3] != null) {
|
||||
ItemStack[] mods = ArmorModHandler.pryMods(player.inventory.armorInventory[3]);
|
||||
ItemStack helmet = mods[ArmorModHandler.helmet_only];
|
||||
return helmet != null && helmet.getItem() == ModItems.card_aos;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 (4845)";
|
||||
public static final String VERSION = "1.0.27 BETA (4851)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -329,7 +329,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fan), new Object[] { "BPB", "PRP", "BPB", 'B', STEEL.bolt(), 'P', IRON.plate(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.piston_inserter), new Object[] { "ITI", "TPT", "ITI", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', IRON.plate(), 'T', STEEL.bolt() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ANY_RUBBER.ingot(), 'W', Blocks.wool });
|
||||
addRecipeAuto(new ItemStack(ModItems.upgrade_muffler, 16), new Object[] { "III", "IWI", "III", 'I', ANY_RUBBER.ingot(), 'W', Blocks.wool });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 8), new Object[] { "PIP", "I I", "PIP", 'P', TI.plate(), 'I', TI.ingot() });
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_advanced_hull), 8), new Object[] { "PIP", "I I", "PIP", 'P', ALLOY.plate(), 'I', ALLOY.ingot() });
|
||||
@ -988,7 +988,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.field_disturber), new Object[] { "ICI", "CAC", "ICI", 'I', STAR.ingot(), 'C', KEY_CIRCUIT_BISMUTH, 'A', ModItems.gem_alexandrite });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_RESTORED.ordinal()), new Object[] { new ItemStack(ModItems.holotape_image, 1, EnumHoloImage.HOLO_DIGAMMA.ordinal()), KEY_TOOL_SCREWDRIVER, ModItems.ducttape, ModItems.armor_polish });
|
||||
addShapelessAuto(new ItemStack(ModItems.holotape_damaged), new Object[] { DictFrame.fromOne(ModItems.holotape_image, EnumHoloImage.HOLO_RESTORED), ModBlocks.muffler, ModItems.crt_display, ModItems.gem_alexandrite /* placeholder for amplifier */ });
|
||||
addShapelessAuto(new ItemStack(ModItems.holotape_damaged), new Object[] { DictFrame.fromOne(ModItems.holotape_image, EnumHoloImage.HOLO_RESTORED), ModItems.upgrade_muffler, ModItems.crt_display, ModItems.gem_alexandrite /* placeholder for amplifier */ });
|
||||
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC, 4), new Object[] { " I ", "CPC", " I ", 'I', IRON.ingot(), 'C', CU.ingot(), 'P', IRON.plate() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_HYDRAULIC, 4), new Object[] { " I ", "CPC", " I ", 'I', STEEL.ingot(), 'C', TI.ingot(), 'P', Fluids.LUBRICANT.getDict(1000) });
|
||||
|
||||
@ -1210,6 +1210,7 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:tile.reactor_conductor");
|
||||
ignoreMappings.add("hbm:tile.reactor_computer");
|
||||
ignoreMappings.add("hbm:tile.ff");
|
||||
ignoreMappings.add("hbm:tile.muffler");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -77,7 +77,10 @@ public class RenderTorex extends Render {
|
||||
|
||||
for(Cloudlet cloudlet : cloudlets) {
|
||||
Vec3 vec = cloudlet.getInterpPos(interp);
|
||||
tessellateCloudlet(tess, vec.xCoord - cloud.posX, vec.yCoord - cloud.posY, vec.zCoord - cloud.posZ, cloudlet, interp);
|
||||
double x = vec.xCoord - cloud.posX;
|
||||
double y = vec.yCoord - cloud.posY;
|
||||
double z = vec.zCoord - cloud.posZ;
|
||||
tessellateCloudlet(tess, x, y, z, cloudlet, interp);
|
||||
}
|
||||
|
||||
tess.draw();
|
||||
@ -114,7 +117,7 @@ public class RenderTorex extends Render {
|
||||
float x = (float) (rand.nextGaussian() * 0.5F * cloud.rollerSize);
|
||||
float y = (float) (rand.nextGaussian() * 0.5F * cloud.rollerSize);
|
||||
float z = (float) (rand.nextGaussian() * 0.5F * cloud.rollerSize);
|
||||
tessellateFlash(tess, x, y + cloud.coreHeight, z, (float) (10 * cloud.rollerSize), alpha, interp);
|
||||
tessellateFlash(tess, x, y + cloud.coreHeight, z, (float) (25 * cloud.rollerSize), alpha, interp);
|
||||
}
|
||||
|
||||
tess.draw();
|
||||
|
||||
@ -62,7 +62,7 @@ public class AudioDynamic extends MovingSound {
|
||||
}
|
||||
|
||||
public void setVolume(float volume) {
|
||||
this.volume = volume;
|
||||
this.maxVolume = volume;
|
||||
}
|
||||
|
||||
public void setRange(float range) {
|
||||
|
||||
@ -870,6 +870,7 @@ public abstract class DoorDecl {
|
||||
@Override public String getCloseSoundStart() { return null; };
|
||||
@Override public String getCloseSoundEnd() { return "hbm:door.wgh_big_stop"; };
|
||||
@Override public float getSoundVolume() { return 2; }
|
||||
@Override public boolean remoteControllable() { return true; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -1012,6 +1013,10 @@ public abstract class DoorDecl {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean remoteControllable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public float getDoorRangeOpenTime(int ticks, int idx) {
|
||||
return getNormTime(ticks);
|
||||
}
|
||||
|
||||
@ -175,6 +175,8 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase implements IAn
|
||||
|
||||
public boolean tryToggle(EntityPlayer player){
|
||||
|
||||
if(this.isLocked() && player == null) return false;
|
||||
|
||||
if(state == 0 && redstonePower > 0){
|
||||
//Redstone "power locks" doors, just like minecraft iron doors
|
||||
return false;
|
||||
|
||||
@ -3,11 +3,13 @@ package com.hbm.tileentity;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
|
||||
import api.hbm.energy.ILoadedTile;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityLoadedBase extends TileEntity implements ILoadedTile {
|
||||
|
||||
public boolean isLoaded = true;
|
||||
public boolean muffled = false;
|
||||
|
||||
@Override
|
||||
public boolean isLoaded() {
|
||||
@ -28,4 +30,20 @@ public class TileEntityLoadedBase extends TileEntity implements ILoadedTile {
|
||||
audio.startSound();
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setBoolean("muffled", muffled);
|
||||
}
|
||||
|
||||
public float getVolume(float baseVolume) {
|
||||
return muffled ? baseVolume * 0.1F : baseVolume;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.BufPacket;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
@ -157,17 +156,28 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
@Deprecated public void processGauge(int val, int id) { }
|
||||
|
||||
@Deprecated public void networkPack(NBTTagCompound nbt, int range) {
|
||||
nbt.setBoolean("muffled", muffled);
|
||||
if(!worldObj.isRemote) PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(nbt, xCoord, yCoord, zCoord), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
|
||||
}
|
||||
@Deprecated public void networkUnpack(NBTTagCompound nbt) { }
|
||||
|
||||
@Deprecated
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
}
|
||||
|
||||
/** Sends a sync packet that uses ByteBuf for efficient information-cramming */
|
||||
public void networkPackNT(int range) {
|
||||
if(!worldObj.isRemote) PacketDispatcher.wrapper.sendToAllAround(new BufPacket(xCoord, yCoord, zCoord, this), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, range));
|
||||
}
|
||||
|
||||
@Override public void serialize(ByteBuf buf) { }
|
||||
@Override public void deserialize(ByteBuf buf) { }
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
buf.writeBoolean(muffled);
|
||||
}
|
||||
|
||||
@Override public void deserialize(ByteBuf buf) {
|
||||
this.muffled = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void handleButtonPacket(int value, int meta) { }
|
||||
@ -206,24 +216,6 @@ public abstract class TileEntityMachineBase extends TileEntityLoadedBase impleme
|
||||
nbt.setTag("items", list);
|
||||
}
|
||||
|
||||
public int countMufflers() {
|
||||
|
||||
int count = 0;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
if(worldObj.getBlock(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ) == ModBlocks.muffler)
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public float getVolume(int toSilence) {
|
||||
|
||||
float volume = 1 - (countMufflers() / (float)toSilence);
|
||||
|
||||
return Math.max(volume, 0);
|
||||
}
|
||||
|
||||
public void updateRedstoneConnection(DirPos pos) {
|
||||
|
||||
int x = pos.getX();
|
||||
|
||||
@ -261,7 +261,7 @@ public class TileEntityLaunchTable extends TileEntityLoadedBase implements ISide
|
||||
|
||||
public boolean canLaunch() {
|
||||
|
||||
if(power >= maxPower * 0.75 && isMissileValid() && hasDesignator() && hasFuel())
|
||||
if(power >= maxPower * 0.75 && isMissileValid() && hasFuel())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
@ -64,7 +64,7 @@ public class TileEntityNukeBalefire extends TileEntityMachineBase implements IGU
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
|
||||
super.networkUnpack(data);
|
||||
timer = data.getInteger("timer");
|
||||
started = data.getBoolean("started");
|
||||
loaded = data.getBoolean("loaded");
|
||||
|
||||
@ -109,6 +109,7 @@ public class TileEntityAshpit extends TileEntityMachineBase implements IGUIProvi
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
this.playersUsing = nbt.getInteger("playersUsing");
|
||||
this.isFull = nbt.getBoolean("isFull");
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ public class TileEntityConveyorPress extends TileEntityMachineBase implements IE
|
||||
}
|
||||
}
|
||||
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", 1.5F, 1.0F);
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", getVolume(1.5F), 1.0F);
|
||||
|
||||
if(slots[0].getMaxDamage() != 0) {
|
||||
slots[0].setItemDamage(slots[0].getItemDamage() + 1);
|
||||
@ -180,6 +180,7 @@ public class TileEntityConveyorPress extends TileEntityMachineBase implements IE
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
this.power = nbt.getLong("power");
|
||||
this.syncPress = nbt.getInteger("press");
|
||||
|
||||
|
||||
@ -156,8 +156,9 @@ public class TileEntityCore extends TileEntityMachineBase implements IGUIProvide
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
tanks[0].setTankType(Fluids.fromID(data.getInteger("tank0")));
|
||||
tanks[1].setTankType(Fluids.fromID(data.getInteger("tank1")));
|
||||
|
||||
@ -177,6 +177,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
power = data.getLong("power");
|
||||
watts = data.getInteger("watts");
|
||||
|
||||
@ -110,8 +110,9 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
this.networkPack(data, 250);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
beam = data.getInteger("beam");
|
||||
}
|
||||
|
||||
|
||||
@ -78,6 +78,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
joules = data.getLong("joules");
|
||||
}
|
||||
|
||||
|
||||
@ -105,6 +105,7 @@ public class TileEntityCoreStabilizer extends TileEntityMachineBase implements I
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
power = data.getLong("power");
|
||||
watts = data.getInteger("watts");
|
||||
|
||||
@ -235,6 +235,7 @@ public class TileEntityCrucible extends TileEntityMachineBase implements IGUIPro
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.recipeStack.clear();
|
||||
this.wasteStack.clear();
|
||||
|
||||
@ -364,6 +364,8 @@ public class TileEntityCustomMachine extends TileEntityMachineBase implements IF
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.machineType = nbt.getString("type");
|
||||
if(this.config == null) this.init();
|
||||
|
||||
|
||||
@ -61,6 +61,8 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
tanks[0].readFromNBT(data, "water");
|
||||
tanks[1].readFromNBT(data, "heavyWater");
|
||||
|
||||
@ -79,6 +79,8 @@ public class TileEntityDiFurnaceRTG extends TileEntityMachineBase implements IGU
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
progress = nbt.getShort("progress");
|
||||
processSpeed = nbt.getShort("speed");
|
||||
byte[] modes = nbt.getByteArray("modes");
|
||||
|
||||
@ -242,6 +242,8 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progressFluid = nbt.getInteger("progressFluid");
|
||||
this.progressOre = nbt.getInteger("progressOre");
|
||||
|
||||
@ -202,6 +202,7 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser,
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
audio.updateVolume(getVolume(2F));
|
||||
audio.updatePitch((audioDuration - 10) / 100F + 0.5F);
|
||||
|
||||
} else {
|
||||
@ -226,6 +227,8 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser,
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.mode = EnumWavelengths.valueOf(nbt.getString("mode"));
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
|
||||
@ -109,7 +109,7 @@ public abstract class TileEntityFireboxBase extends TileEntityMachinePolluting i
|
||||
}
|
||||
this.wasOn = true;
|
||||
|
||||
if(worldObj.rand.nextInt(15) == 0) {
|
||||
if(worldObj.rand.nextInt(15) == 0 && !this.muffled) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "fire.fire", 1.0F, 0.5F + worldObj.rand.nextFloat() * 0.5F);
|
||||
}
|
||||
}
|
||||
@ -184,6 +184,8 @@ public abstract class TileEntityFireboxBase extends TileEntityMachinePolluting i
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.maxBurnTime = nbt.getInteger("maxBurnTime");
|
||||
this.burnTime = nbt.getInteger("burnTime");
|
||||
this.burnHeat = nbt.getInteger("burnHeat");
|
||||
|
||||
@ -168,6 +168,8 @@ public class TileEntityFurnaceCombination extends TileEntityMachinePolluting imp
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.wasOn = nbt.getBoolean("wasOn");
|
||||
this.heat = nbt.getInteger("heat");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
|
||||
@ -93,7 +93,7 @@ public class TileEntityFurnaceIron extends TileEntityMachineBase implements IGUI
|
||||
this.progress++;
|
||||
this.burnTime--;
|
||||
|
||||
if(this.progress % 15 == 0) {
|
||||
if(this.progress % 15 == 0 && !this.muffled) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "fire.fire", 1.0F, 0.5F + worldObj.rand.nextFloat() * 0.5F);
|
||||
}
|
||||
|
||||
@ -142,6 +142,8 @@ public class TileEntityFurnaceIron extends TileEntityMachineBase implements IGUI
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.maxBurnTime = nbt.getInteger("maxBurnTime");
|
||||
this.burnTime = nbt.getInteger("burnTime");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
|
||||
@ -123,6 +123,8 @@ public class TileEntityFurnaceSteel extends TileEntityMachineBase implements IGU
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.progress = nbt.getIntArray("progress");
|
||||
this.bonus = nbt.getIntArray("bonus");
|
||||
this.heat = nbt.getInteger("heat");
|
||||
|
||||
@ -193,6 +193,8 @@ public class TileEntityHadron extends TileEntityMachineBase implements IEnergyUs
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.isOn = data.getBoolean("isOn");
|
||||
this.power = data.getLong("power");
|
||||
this.analysisOnly = data.getBoolean("analysis");
|
||||
|
||||
@ -94,6 +94,7 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
|
||||
data.setBoolean("exploded", this.hasExploded);
|
||||
data.setBoolean("isOn", this.isOn);
|
||||
data.setBoolean("muffled", this.muffled);
|
||||
INBTPacketReceiver.networkPack(this, data, 25);
|
||||
} else {
|
||||
|
||||
@ -109,7 +110,8 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.updateVolume(getVolume(1F));
|
||||
audio.keepAlive();
|
||||
|
||||
} else {
|
||||
@ -150,6 +152,7 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.hasExploded = nbt.getBoolean("exploded");
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
this.heat = nbt.getInteger("heat");
|
||||
this.tanks[0].readFromNBT(nbt, "0");
|
||||
this.tanks[1].readFromNBT(nbt, "1");
|
||||
|
||||
@ -75,6 +75,7 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
||||
}
|
||||
|
||||
data.setBoolean("isOn", this.isOn);
|
||||
data.setBoolean("muffled", this.muffled);
|
||||
INBTPacketReceiver.networkPack(this, data, 25);
|
||||
} else {
|
||||
|
||||
@ -90,7 +91,8 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.updateVolume(getVolume(1F));
|
||||
audio.keepAlive();
|
||||
|
||||
} else {
|
||||
@ -134,6 +136,7 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
||||
this.tanks[0].readFromNBT(nbt, "0");
|
||||
this.tanks[1].readFromNBT(nbt, "1");
|
||||
this.isOn = nbt.getBoolean("isOn");
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
}
|
||||
|
||||
protected void tryPullHeat() {
|
||||
|
||||
@ -49,6 +49,7 @@ public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IH
|
||||
data.setByte("s", (byte) this.setting);
|
||||
data.setInteger("h", this.heatEnergy);
|
||||
data.setBoolean("o", isOn);
|
||||
data.setBoolean("muffled", muffled);
|
||||
INBTPacketReceiver.networkPack(this, data, 25);
|
||||
} else {
|
||||
|
||||
@ -60,7 +61,8 @@ public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IH
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.updateVolume(getVolume(1F));
|
||||
audio.keepAlive();
|
||||
|
||||
} else {
|
||||
@ -103,6 +105,7 @@ public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IH
|
||||
this.setting = nbt.getByte("s");
|
||||
this.heatEnergy = nbt.getInteger("h");
|
||||
this.isOn = nbt.getBoolean("o");
|
||||
this.muffled = nbt.getBoolean("muffled");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -108,6 +108,8 @@ public class TileEntityHeaterOilburner extends TileEntityMachinePolluting implem
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
tank.readFromNBT(nbt, "tank");
|
||||
isOn = nbt.getBoolean("isOn");
|
||||
heatEnergy = nbt.getInteger("h");
|
||||
|
||||
@ -356,6 +356,8 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.isOn = data.getBoolean("isOn");
|
||||
this.power = data.getLong("power");
|
||||
this.blanket = data.getInteger("blanket");
|
||||
|
||||
@ -68,6 +68,7 @@ public abstract class TileEntityLockableBase extends TileEntity {
|
||||
if(!isLocked) {
|
||||
return true;
|
||||
} else {
|
||||
if(player == null) return false;
|
||||
ItemStack stack = player.getHeldItem();
|
||||
|
||||
if(stack != null && stack.getItem() instanceof ItemKey &&
|
||||
|
||||
@ -197,6 +197,8 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.maxPower = nbt.getLong("maxPower");
|
||||
this.consumption = nbt.getLong("consumption");
|
||||
|
||||
@ -120,7 +120,7 @@ public class TileEntityMachineAssembler extends TileEntityMachineAssemblerBase i
|
||||
this.networkPack(data, 150);
|
||||
} else {
|
||||
|
||||
float volume = this.getVolume(2);
|
||||
float volume = this.getVolume(2F);
|
||||
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
@ -145,6 +145,8 @@ public class TileEntityMachineAssembler extends TileEntityMachineAssemblerBase i
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getIntArray("progress");
|
||||
this.maxProgress = nbt.getIntArray("maxProgress");
|
||||
@ -247,18 +249,6 @@ public class TileEntityMachineAssembler extends TileEntityMachineAssemblerBase i
|
||||
public double getMaxRenderDistanceSquared() {
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
public int countMufflers() {
|
||||
|
||||
int count = 0;
|
||||
|
||||
for(int x = xCoord - 1; x <= xCoord + 1; x++)
|
||||
for(int z = zCoord - 1; z <= zCoord + 1; z++)
|
||||
if(worldObj.getBlock(x, yCoord - 1, z) == ModBlocks.muffler)
|
||||
count++;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
|
||||
@ -117,6 +117,8 @@ public class TileEntityMachineAssemfac extends TileEntityMachineAssemblerBase im
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getIntArray("progress");
|
||||
this.maxProgress = nbt.getIntArray("maxProgress");
|
||||
|
||||
@ -207,6 +207,8 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
|
||||
modes = new String[9];
|
||||
|
||||
@ -218,7 +218,8 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.updateVolume(getVolume(1F));
|
||||
audio.updatePitch((audioDuration - 10) / 100F + 0.5F);
|
||||
|
||||
} else {
|
||||
@ -233,6 +234,8 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
this.progress = data.getInteger("progress");
|
||||
this.isProgressing = data.getBoolean("isProgressing");
|
||||
|
||||
@ -159,6 +159,8 @@ public class TileEntityMachineChemfac extends TileEntityMachineChemplantBase imp
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getIntArray("progress");
|
||||
this.maxProgress = nbt.getIntArray("maxProgress");
|
||||
|
||||
@ -183,7 +183,7 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
worldObj.spawnParticle("cloud", x, y, z, 0.0, 0.1, 0.0);
|
||||
}
|
||||
|
||||
float volume = 1;//this.getVolume(2);
|
||||
float volume = this.getVolume(1F);
|
||||
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
@ -213,6 +213,8 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
this.maxProgress = nbt.getInteger("maxProgress");
|
||||
|
||||
@ -142,8 +142,9 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
|
||||
audio.keepAlive();
|
||||
audio.updateVolume(this.getVolume(1F));
|
||||
|
||||
} else {
|
||||
|
||||
@ -203,6 +204,7 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
this.playersUsing = nbt.getInteger("playersUsing");
|
||||
this.setting = nbt.getInteger("setting");
|
||||
this.power = nbt.getLong("power");
|
||||
|
||||
@ -146,7 +146,7 @@ public class TileEntityMachineCompressor extends TileEntityMachineBase implement
|
||||
if(this.pistonDir) {
|
||||
this.piston -= randSpeed;
|
||||
if(this.piston <= 0) {
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:item.boltgun", 0.5F, 0.75F);
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:item.boltgun", this.getVolume(0.5F), 0.75F);
|
||||
this.pistonDir = !this.pistonDir;
|
||||
}
|
||||
} else {
|
||||
@ -165,6 +165,8 @@ public class TileEntityMachineCompressor extends TileEntityMachineBase implement
|
||||
private float randSpeed = 0.1F;
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.progress = nbt.getInteger("progress");
|
||||
this.processTime = nbt.getInteger("processTime");
|
||||
this.powerRequirement = nbt.getInteger("powerRequirement");
|
||||
|
||||
@ -155,6 +155,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
this.progress = data.getShort("progress");
|
||||
|
||||
@ -201,6 +201,8 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.isOn = data.getBoolean("isOn");
|
||||
this.power = data.getLong("power");
|
||||
this.progress = data.getInteger("progress");
|
||||
|
||||
@ -162,6 +162,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
power = data.getInteger("power");
|
||||
powerCap = data.getInteger("powerCap");
|
||||
@ -197,7 +198,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
|
||||
if(!shutUp) {
|
||||
if (soundCycle == 0) {
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", 0.75F * this.getVolume(3), 0.5F);
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "fireworks.blast", this.getVolume(0.75F), 0.5F);
|
||||
}
|
||||
soundCycle++;
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ public class TileEntityMachineEPress extends TileEntityMachineBase implements IE
|
||||
this.press += stampSpeed;
|
||||
|
||||
if(this.press >= this.maxPress) {
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", 1.5F, 1.0F);
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "hbm:block.pressOperate", getVolume(1.5F), 1.0F);
|
||||
ItemStack output = PressRecipes.getOutput(slots[2], slots[1]);
|
||||
if(slots[3] == null) {
|
||||
slots[3] = output.copy();
|
||||
@ -142,6 +142,8 @@ public class TileEntityMachineEPress extends TileEntityMachineBase implements IE
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.syncPress = nbt.getInteger("press");
|
||||
|
||||
|
||||
@ -236,6 +236,8 @@ public class TileEntityMachineElectricFurnace extends TileEntityMachineBase impl
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.maxProgress = nbt.getInteger("MaxProgress");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
|
||||
@ -214,6 +214,8 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.enableDrill = nbt.getBoolean("d");
|
||||
this.enableCrusher = nbt.getBoolean("c");
|
||||
this.enableWalling = nbt.getBoolean("w");
|
||||
|
||||
@ -25,6 +25,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
@ -45,6 +46,22 @@ public class TileEntityMachineExposureChamber extends TileEntityMachineBase impl
|
||||
public boolean isOn = false;
|
||||
public float rotation;
|
||||
public float prevRotation;
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.progress = nbt.getInteger("progress");
|
||||
this.power = nbt.getLong("power");
|
||||
this.savedParticles = nbt.getInteger("savedParticles");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("progress", progress);
|
||||
nbt.setLong("power", power);
|
||||
nbt.setInteger("savedParticles", savedParticles);
|
||||
}
|
||||
|
||||
public TileEntityMachineExposureChamber() {
|
||||
/*
|
||||
|
||||
@ -69,11 +69,13 @@ public class TileEntityMachineFunnel extends TileEntityMachineBase implements IG
|
||||
|
||||
@Override
|
||||
public void serialize(ByteBuf buf) {
|
||||
super.serialize(buf);
|
||||
buf.writeInt(this.mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(ByteBuf buf) {
|
||||
super.deserialize(buf);
|
||||
this.mode = buf.readInt();
|
||||
}
|
||||
|
||||
|
||||
@ -167,6 +167,8 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
this.progress = data.getInteger("progress");
|
||||
this.isProgressing = data.getBoolean("isProgressing");
|
||||
|
||||
@ -262,6 +262,8 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
super.networkUnpack(nbt);
|
||||
|
||||
this.power = nbt.getLong("power");
|
||||
this.spin = nbt.getInteger("spin");
|
||||
this.burn = nbt.getIntArray("burn");
|
||||
|
||||
@ -149,6 +149,8 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
public void networkUnpack(NBTTagCompound data) {
|
||||
super.networkUnpack(data);
|
||||
|
||||
this.power = data.getLong("power");
|
||||
this.shouldTurn = data.getBoolean("operational");
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user