mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-26 03:44:37 +00:00
animationes
This commit is contained in:
parent
8283f41032
commit
7532f57f77
@ -28,7 +28,7 @@ public class MachineFusionPlasmaForge extends BlockDummyable {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||
}
|
||||
|
||||
@Override public int[] getDimensions() { return new int[] { 4, 0, 5, 5, 5, 5 }; }
|
||||
@Override public int[] getDimensions() { return new int[] { 0, 0, 5, 5, 5, 5 }; }
|
||||
@Override public int getOffset() { return 5; }
|
||||
|
||||
@Override
|
||||
|
||||
@ -1674,7 +1674,7 @@ public class Orchestras {
|
||||
//start sound
|
||||
if(runningAudio == null || !runningAudio.isPlaying()) {
|
||||
boolean electric = XWeaponModManager.hasUpgrade(stack, ctx.configIndex, XWeaponModManager.ID_ENGINE_ELECTRIC);
|
||||
AudioWrapper audio = MainRegistry.proxy.getLoopedSound(electric ? NTMSounds.TURBINE_LARGE_LOOP : NTMSounds.ELECTRIC_ENGINE_LOOP, (float) entity.posX, (float) entity.posY, (float) entity.posZ, (float) speed, 15F, (float) speed, 25);
|
||||
AudioWrapper audio = MainRegistry.proxy.getLoopedSound(electric ? NTMSounds.TURBINE_LARGE_LOOP : NTMSounds.ENGINE_LOOP, (float) entity.posX, (float) entity.posY, (float) entity.posZ, (float) speed, 15F, (float) speed, 25);
|
||||
ItemGunBaseNT.loopedSounds.put(entity, audio);
|
||||
audio.startSound();
|
||||
audio.attachTo(entity);
|
||||
|
||||
@ -110,6 +110,7 @@ public class CraftingManager {
|
||||
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), new Object[] { "G", "W", "I", 'G', KEY_ANYPANE, 'W', W.wireFine(), 'I', ModItems.plate_polymer });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), new Object[] { "G", "W", "I", 'G', KEY_ANYPANE, 'W', CARBON.wireFine(), 'I', ModItems.plate_polymer });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.NUMITRON, 3), new Object[] { "G", "W", "I", 'G', KEY_ANYPANE, 'W', ModItems.coil_tungsten, 'I', CU.plate() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), new Object[] { "I", "N", "W", 'I', ModItems.plate_polymer, 'N', NB.nugget(), 'W', AL.wireFine() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), new Object[] { "I", "N", "W", 'I', ModItems.plate_polymer, 'N', NB.nugget(), 'W', CU.wireFine() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR, 2), new Object[] { "IAI", "W W", 'I', ModItems.plate_polymer, 'A', AL.dust(), 'W', AL.wireFine() });
|
||||
@ -151,6 +152,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(Items.gold_ingot, 1), new Object[] { "###", "###", "###", '#', GOLD.wireFine() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_schrabidium, 1), new Object[] { "###", "###", "###", '#', SA326.wireFine() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_magnetized_tungsten, 1), new Object[] { "###", "###", "###", '#', MAGTUNG.wireFine() });
|
||||
addRecipeAuto(new ItemStack(ModItems.ingot_graphite, 1), new Object[] { "###", "###", "###", '#', CARBON.wireFine() });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.biomass, 4), new Object[] { Items.sugar, ModItems.powder_sawdust, ModItems.powder_sawdust, ModItems.powder_sawdust, ModItems.powder_sawdust, ModItems.powder_sawdust });
|
||||
addShapelessAuto(new ItemStack(ModItems.biomass, 4), new Object[] { Items.sugar, ModItems.powder_sawdust, ModItems.powder_sawdust, Items.apple, Items.apple, Items.apple });
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.main;
|
||||
|
||||
import com.hbm.interfaces.NotableComments;
|
||||
|
||||
/** Because having to remember or look up sound names is getting on my nerves. Who has time for this shit. */
|
||||
@NotableComments
|
||||
public class NTMSounds {
|
||||
|
||||
/// RELOADING ///
|
||||
@ -96,17 +99,39 @@ public class NTMSounds {
|
||||
public static final String BLOCK_HUNDUNS_MAGNIFICENT_HOWL = "hbm:block.hunduns_magnificent_howl"; // tragic yuri
|
||||
public static final String BLOCK_FALLOUT_3_POPUP = "hbm:block.bobble";
|
||||
|
||||
/// MACHINE SOUND LOOPS ///
|
||||
public static final String ELECTRIC_ENGINE_LOOP = "hbm:block.engine";
|
||||
/// MACHINE SOUNDS, MOSTLY LOOPS ///
|
||||
public static final String ELECTRIC_MOTOR_LOOP = "hbm:block.motor";
|
||||
public static final String ENGINE_LOOP = "hbm:block.engine"; // diesel engine
|
||||
public static final String TURBINE_LARGE_LOOP = "hbm:block.largeTurbineRunning";
|
||||
public static final String TURBINE_LEVI_LOOP = "hbm:block.chungusTurbineRunning"; // big chungus
|
||||
public static final String FEL_LOOP = "hbm:block.fel";
|
||||
public static final String ELECTRIC_HUM_LOOP = "hbm:block.electricHum";
|
||||
public static final String FUSION_REACTOR_LOOP = "hbm:block.fusionReactorRunning";
|
||||
public static final String BOILER_LOOP = "hbm:block.boiler";
|
||||
public static final String BOILER_GROAN = "hbm:block.boilerGroan";
|
||||
public static final String CENTRIFUGE_LOOP = "hbm:block.centrifugeOperate";
|
||||
public static final String TURBOFAN_LOOP = "hbm:block.turbofanOperate";
|
||||
public static final String TURBOFAN_DAMAGE = "hbm:block.damage";
|
||||
public static final String ASSEMBLER_STRIKE = "hbm:block.assemblerStrike";
|
||||
public static final String ASSEMBLER_CUT = "hbm:block.assemblerCut";
|
||||
public static final String ASSEMBLER_START = "hbm:block.assemblerStart";
|
||||
public static final String ASSEMBLER_STOP = "hbm:block.assemblerStop";
|
||||
public static final String CHEMPLANT_LOOP = "hbm:block.chemicalPlant";
|
||||
public static final String HEPHAESTUS_LOOP = "hbm:block.hephaestusRunning";
|
||||
public static final String STEAM_ENGINE_HIT = "hbm:block.steamEngineOperate";
|
||||
public static final String REACTOR_GEIGER_LOOP = "hbm:block.reactorLoop";
|
||||
|
||||
/// MISC ///
|
||||
public static final String TECH_BOOP = "hbm:item.techBoop";
|
||||
public static final String TECH_BLEEP = "hbm:item.techBleep";
|
||||
public static final String TECH_BOOP = "hbm:item.techBoop"; // boop
|
||||
public static final String TECH_BLEEP = "hbm:item.techBleep"; // blee-boo-bee-boop
|
||||
public static final String UPGRADE_PLUG = "hbm:item.upgradePlug"; // plok
|
||||
|
||||
/// VANILLA CRAP I CANNOT BE ASSED TO REMEMBER ///
|
||||
public static final String VANILLA_ORB = "random.orb"; // xp orb ping
|
||||
public static final String VANILLA_PLINK = "random.break"; // item breaks
|
||||
public static final String VANILLA_FIREWORKS_BANG = "fireworks.blast";
|
||||
public static final String VANILLA_HISS = "random.fizz"; // fire extinguishes
|
||||
public static final String VANILLA_FIRE = "fire.fire"; // fire crackles
|
||||
public static final String VANILLA_MINECART = "minecart.base"; // minecart rolling loop
|
||||
public static final String VANILLA_GIB = "mob.zombie.woodbreak"; // zombie breaks door down
|
||||
}
|
||||
|
||||
@ -39,36 +39,40 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
bindTexture(ResourceManager.fusion_plasma_forge_tex);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Body");
|
||||
|
||||
double[] striker = forge.armStriker.getPositions(interp);
|
||||
double[] jet = forge.armJet.getPositions(interp);
|
||||
double rotor = forge.prevRing + (forge.ring - forge.prevRing) * interp;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(20, 0, 1, 0);
|
||||
GL11.glRotated(rotor, 0, 1, 0);
|
||||
GL11.glPushMatrix();
|
||||
ResourceManager.fusion_plasma_forge.renderPart("SliderStriker");
|
||||
GL11.glTranslated(-2.75, 2.5, 0);
|
||||
GL11.glRotated(-20, 0, 0, 1);
|
||||
GL11.glRotated(-striker[0], 0, 0, 1);
|
||||
GL11.glTranslated(2.75, -2.5, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("ArmLowerStriker");
|
||||
GL11.glTranslated(-2.75, 3.75, 0);
|
||||
GL11.glRotated(30, 0, 0, 1);
|
||||
GL11.glRotated(-striker[1], 0, 0, 1);
|
||||
GL11.glTranslated(2.75, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("ArmUpperStriker");
|
||||
GL11.glTranslated(-1.5, 3.75, 0);
|
||||
GL11.glRotated(20, 0, 0, 1);
|
||||
GL11.glRotated(-striker[2], 0, 0, 1);
|
||||
GL11.glTranslated(1.5, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerMount");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 3.375, 0.5);
|
||||
GL11.glRotated(30, 1, 0, 0);
|
||||
GL11.glRotated(striker[3], 1, 0, 0);
|
||||
GL11.glTranslated(0, -3.375, -0.5);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerRight");
|
||||
GL11.glTranslated(0, -0.5, 0);
|
||||
GL11.glTranslated(0, -striker[4], 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("PistonRight");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 3.375, -0.5);
|
||||
GL11.glRotated(-30, 1, 0, 0);
|
||||
GL11.glRotated(-striker[3], 1, 0, 0);
|
||||
GL11.glTranslated(0, -3.375, 0.5);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("StrikerLeft");
|
||||
GL11.glTranslated(0, -0.5, 0);
|
||||
GL11.glTranslated(0, -striker[5], 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("PistonLeft");
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
@ -76,15 +80,15 @@ public class RenderFusionPlasmaForge extends TileEntitySpecialRenderer implement
|
||||
GL11.glPushMatrix();
|
||||
ResourceManager.fusion_plasma_forge.renderPart("SliderJet");
|
||||
GL11.glTranslated(2.75, 2.5, 0);
|
||||
GL11.glRotated(20, 0, 0, 1);
|
||||
GL11.glRotated(jet[0], 0, 0, 1);
|
||||
GL11.glTranslated(-2.75, -2.5, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("ArmLowerJet");
|
||||
GL11.glTranslated(2.75, 3.75, 0);
|
||||
GL11.glRotated(-20, 0, 0, 1);
|
||||
GL11.glRotated(jet[1], 0, 0, 1);
|
||||
GL11.glTranslated(-2.75, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("ArmUpperJet");
|
||||
GL11.glTranslated(1.5, 3.75, 0);
|
||||
GL11.glRotated(-30, 0, 0, 1);
|
||||
GL11.glRotated(jet[2], 0, 0, 1);
|
||||
GL11.glTranslated(-1.5, -3.75, 0);
|
||||
ResourceManager.fusion_plasma_forge.renderPart("Jet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -10,6 +10,8 @@ import api.hbm.fluid.IFluidStandardSender;
|
||||
|
||||
import com.hbm.inventory.fluid.trait.FT_Polluting;
|
||||
import com.hbm.inventory.fluid.trait.FluidTrait;
|
||||
import com.hbm.main.NTMSounds;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@ -40,7 +42,7 @@ public abstract class TileEntityMachinePolluting extends TileEntityMachineBase i
|
||||
tank.setFill(tank.getMaxFill());
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, type, overflow / 100F);
|
||||
|
||||
if(worldObj.rand.nextInt(3) == 0) worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.fizz", 0.1F, 1.5F);
|
||||
if(worldObj.rand.nextInt(3) == 0) worldObj.playSoundEffect(xCoord, yCoord, zCoord, NTMSounds.VANILLA_HISS, 0.1F, 1.5F);
|
||||
}
|
||||
}
|
||||
public void pollute(FluidType type, FluidTrait.FluidReleaseType release, float amount) {
|
||||
@ -52,19 +54,7 @@ public abstract class TileEntityMachinePolluting extends TileEntityMachineBase i
|
||||
HashMap<PollutionType, Float> map = release == FluidTrait.FluidReleaseType.BURN ? trait.burnMap : trait.releaseMap;
|
||||
|
||||
for(Map.Entry<PollutionType, Float> entry : map.entrySet()) {
|
||||
|
||||
tank = entry.getKey() == PollutionType.SOOT ? smoke : entry.getKey() == PollutionType.HEAVYMETAL ? smoke_leaded : smoke_poison;
|
||||
int fluidAmount = (int) Math.ceil(entry.getValue() * amount * 100);
|
||||
tank.setFill(tank.getFill() + fluidAmount);
|
||||
|
||||
if (tank.getFill() > tank.getMaxFill()) {
|
||||
int overflow = tank.getFill() - tank.getMaxFill();
|
||||
tank.setFill(tank.getMaxFill());
|
||||
PollutionHandler.incrementPollution(worldObj, xCoord, yCoord, zCoord, entry.getKey(), overflow / 100F);
|
||||
|
||||
if (worldObj.rand.nextInt(3) == 0)
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.fizz", 0.1F, 1.5F);
|
||||
}
|
||||
pollute(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -123,7 +124,7 @@ public class TileEntityChungus extends TileEntityTurbineBase implements SimpleCo
|
||||
}
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.chungusTurbineRunning", xCoord, yCoord, zCoord, 1.0F, 20F, 1.0F, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.TURBINE_LEVI_LOOP, xCoord, yCoord, zCoord, 1.0F, 20F, 1.0F, 20);
|
||||
audio.startSound();
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.ModuleBurnTime;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachinePolluting;
|
||||
@ -111,7 +112,7 @@ public abstract class TileEntityFireboxBase extends TileEntityMachinePolluting i
|
||||
this.wasOn = true;
|
||||
|
||||
if(worldObj.rand.nextInt(15) == 0 && !this.muffled) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "fire.fire", 1.0F, 0.5F + worldObj.rand.nextFloat() * 0.5F);
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, NTMSounds.VANILLA_FIRE, 1.0F, 0.5F + worldObj.rand.nextFloat() * 0.5F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingStep;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.saveddata.TomSaveData;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
@ -127,7 +128,7 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPa
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.boiler", xCoord, yCoord, zCoord, 0.125F, 10F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.BOILER_LOOP, xCoord, yCoord, zCoord, 0.125F, 10F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -227,7 +228,7 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IBufPa
|
||||
this.heat -= heatReq * ops;
|
||||
|
||||
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, NTMSounds.BOILER_GROAN, 0.5F, 1.0F);
|
||||
}
|
||||
|
||||
if(ops > 0) {
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingStep;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.saveddata.TomSaveData;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
@ -116,7 +117,7 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.boiler", xCoord, yCoord, zCoord, 0.125F, 10F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.BOILER_LOOP, xCoord, yCoord, zCoord, 0.125F, 10F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -213,7 +214,7 @@ public class TileEntityHeatBoilerIndustrial extends TileEntityLoadedBase impleme
|
||||
this.heat -= heatReq * ops;
|
||||
|
||||
if(ops > 0 && worldObj.rand.nextInt(400) == 0) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, "hbm:block.boilerGroan", 0.5F, 1.0F);
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 2, zCoord + 0.5, NTMSounds.BOILER_GROAN, 0.5F, 1.0F);
|
||||
}
|
||||
|
||||
if(ops > 0) {
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.ICopiable;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
@ -78,7 +79,7 @@ public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IH
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.electricHum", xCoord, yCoord, zCoord, 0.25F, 7.5F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.ELECTRIC_HUM_LOOP, xCoord, yCoord, zCoord, 0.25F, 7.5F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -23,6 +23,7 @@ import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -97,7 +98,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
super.setInventorySlotContents(i, stack);
|
||||
|
||||
if(stack != null && stack.getItem() instanceof ItemMachineUpgrade && i == 4) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, NTMSounds.UPGRADE_PLUG, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,7 +213,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl
|
||||
|
||||
if(this.isProgressing) {
|
||||
if(this.audioProgress == null || !this.audioProgress.isPlaying()) {
|
||||
this.audioProgress = MainRegistry.proxy.getLoopedSound("hbm:block.electricHum", xCoord, yCoord, zCoord, this.getVolume(1.5F), 15F, 0.75F, 5);
|
||||
this.audioProgress = MainRegistry.proxy.getLoopedSound(NTMSounds.ELECTRIC_HUM_LOOP, xCoord, yCoord, zCoord, this.getVolume(1.5F), 15F, 0.75F, 5);
|
||||
this.audioProgress.startSound();
|
||||
}
|
||||
this.audioProgress.updatePitch(0.75F);
|
||||
|
||||
@ -19,6 +19,7 @@ import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.machine.ModuleMachineAssembler;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConditionalInvAccess;
|
||||
@ -234,7 +235,7 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
||||
}
|
||||
|
||||
@Override public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.motor", xCoord, yCoord, zCoord, 0.5F, 15F, 0.75F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.ELECTRIC_MOTOR_LOOP, xCoord, yCoord, zCoord, 0.5F, 15F, 0.75F, 20);
|
||||
}
|
||||
|
||||
@Override public void onChunkUnload() {
|
||||
@ -493,7 +494,7 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
||||
if(striker.state == ArmState.WAIT && saw.state == ArmState.WAIT) { // only progress as soon as both arms are done moving
|
||||
state = YuriState.SLIDING;
|
||||
direction = !direction;
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerStart", getVolume(0.25F), 1.25F + worldObj.rand.nextFloat() * 0.25F);
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_START, getVolume(0.25F), 1.25F + worldObj.rand.nextFloat() * 0.25F);
|
||||
}
|
||||
} break;
|
||||
case SLIDING: {
|
||||
@ -590,11 +591,11 @@ public class TileEntityMachineAssemblyFactory extends TileEntityMachineBase impl
|
||||
if(saw) {
|
||||
state = ArmState.CUT;
|
||||
targetAngles[2] = -targetAngles[2];
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerCut", getVolume(0.5F), 1F + rand.nextFloat() * 0.25F);
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_CUT, getVolume(0.5F), 1F + rand.nextFloat() * 0.25F);
|
||||
} else {
|
||||
state = ArmState.RETRACT;
|
||||
targetAngles[3] = 0D;
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerStrike", getVolume(0.5F), 1F);
|
||||
if(!muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_STRIKE, getVolume(0.5F), 1F);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.machine.ModuleMachineAssembler;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -156,7 +157,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
|
||||
}
|
||||
|
||||
if(!this.muffled && arm.prevAngles[3] != arm.angles[3] && arm.angles[3] == -0.75) {
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerStrike", this.getVolume(0.5F), 1F);
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_STRIKE, this.getVolume(0.5F), 1F);
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +181,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
|
||||
if(this.ringDelay <= 0) {
|
||||
this.ringTarget += (worldObj.rand.nextDouble() * 2 - 1) * 135;
|
||||
this.ringSpeed = 10D + worldObj.rand.nextDouble() * 5D;
|
||||
if(!this.muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerStart", this.getVolume(0.25F), 1.25F + worldObj.rand.nextFloat() * 0.25F);
|
||||
if(!this.muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_START, this.getVolume(0.25F), 1.25F + worldObj.rand.nextFloat() * 0.25F);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,7 +189,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
|
||||
}
|
||||
|
||||
@Override public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.motor", xCoord, yCoord, zCoord, 0.5F, 15F, 0.75F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.ELECTRIC_MOTOR_LOOP, xCoord, yCoord, zCoord, 0.5F, 15F, 0.75F, 20);
|
||||
}
|
||||
|
||||
@Override public void onChunkUnload() {
|
||||
@ -240,7 +241,7 @@ public class TileEntityMachineAssemblyMachine extends TileEntityMachineBase impl
|
||||
this.assemblerModule.deserialize(buf);
|
||||
|
||||
if(wasProcessing && !didProcess) {
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, "hbm:block.assemblerStop", this.getVolume(0.25F), 1.5F);
|
||||
MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_STOP, this.getVolume(0.25F), 1.5F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.inventory.recipes.CentrifugeRecipes;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -277,7 +278,7 @@ public class TileEntityMachineCentrifuge extends TileEntityMachineBase implement
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.centrifugeOperate", xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.CENTRIFUGE_LOOP, xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.machine.ModuleMachineChemplant;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConditionalInvAccess;
|
||||
@ -248,7 +249,7 @@ public class TileEntityMachineChemicalFactory extends TileEntityMachineBase impl
|
||||
}
|
||||
|
||||
@Override public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.chemicalPlant", xCoord, yCoord, zCoord, 1F, 15F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.CHEMPLANT_LOOP, xCoord, yCoord, zCoord, 1F, 15F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override public void onChunkUnload() {
|
||||
|
||||
@ -17,6 +17,7 @@ import com.hbm.items.machine.ItemMachineUpgrade;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.machine.ModuleMachineChemplant;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -158,7 +159,7 @@ public class TileEntityMachineChemicalPlant extends TileEntityMachineBase implem
|
||||
}
|
||||
|
||||
@Override public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.chemicalPlant", xCoord, yCoord, zCoord, 1F, 15F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.CHEMPLANT_LOOP, xCoord, yCoord, zCoord, 1F, 15F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override public void onChunkUnload() {
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.inventory.gui.GUIMachineDiesel;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
@ -170,7 +171,7 @@ public class TileEntityMachineDiesel extends TileEntityMachinePolluting implemen
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.engine", xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F, 10);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.ENGINE_LOOP, xCoord, yCoord, zCoord, 1.0F, 10F, 1.0F, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingStep;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
@ -105,7 +106,7 @@ public class TileEntityMachineHephaestus extends TileEntityLoadedBase implements
|
||||
}
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.hephaestusRunning", xCoord, yCoord + 5F, zCoord, 0.75F, 10F, 1.0F);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.HEPHAESTUS_LOOP, xCoord, yCoord + 5F, zCoord, 0.75F, 10F, 1.0F);
|
||||
audio.startSound();
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -116,7 +117,7 @@ public class TileEntityMachineIndustrialTurbine extends TileEntityTurbineBase im
|
||||
float pitch = 0.5F + spinNum * 0.5F + this.audioDesync;
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.largeTurbineRunning", xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, volume, 20F, pitch, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.TURBINE_LARGE_LOOP, xCoord + 0.5F, yCoord + 0.5F, zCoord + 0.5F, volume, 20F, pitch, 20);
|
||||
audio.startSound();
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -97,7 +98,7 @@ public class TileEntityMachineIntake extends TileEntityLoadedBase implements IEn
|
||||
}
|
||||
|
||||
@Override public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.motor", xCoord, yCoord, zCoord, 0.25F, 10F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.ELECTRIC_MOTOR_LOOP, xCoord, yCoord, zCoord, 0.25F, 10F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override public void onChunkUnload() {
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -152,7 +153,7 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase implement
|
||||
vdat.setInteger("cDiv", 5);
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(vdat, e.posX, e.posY + e.height * 0.5, e.posZ), new TargetPoint(e.dimension, e.posX, e.posY + e.height * 0.5, e.posZ, 150));
|
||||
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, NTMSounds.VANILLA_GIB, 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.inventory.gui.GUIMachineShredder;
|
||||
import com.hbm.inventory.recipes.ShredderRecipes;
|
||||
import com.hbm.items.machine.ItemBlades;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
|
||||
@ -252,7 +253,7 @@ public class TileEntityMachineShredder extends TileEntityLoadedBase implements I
|
||||
flag1 = true;
|
||||
}
|
||||
if(soundCycle == 0)
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, "minecart.base", getVolume(1.0F), 0.75F);
|
||||
this.worldObj.playSoundEffect(this.xCoord, this.yCoord, this.zCoord, NTMSounds.VANILLA_MINECART, getVolume(1.0F), 0.75F);
|
||||
soundCycle++;
|
||||
|
||||
if(soundCycle >= 50)
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
@ -222,7 +223,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem
|
||||
}*/
|
||||
|
||||
if(this.afterburner > 90 && worldObj.rand.nextInt(30) == 0) {
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, "hbm:block.damage", 3.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
worldObj.playSoundEffect(xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, NTMSounds.TURBOFAN_DAMAGE, 3.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
|
||||
if(this.afterburner > 90) {
|
||||
@ -285,7 +286,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem
|
||||
vdat.setInteger("cDiv", 5);
|
||||
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(vdat, e.posX, e.posY + e.height * 0.5, e.posZ), new TargetPoint(e.dimension, e.posX, e.posY + e.height * 0.5, e.posZ, 150));
|
||||
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, "mob.zombie.woodbreak", 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
worldObj.playSoundEffect(e.posX, e.posY, e.posZ, NTMSounds.VANILLA_GIB, 2.0F, 0.95F + worldObj.rand.nextFloat() * 0.2F);
|
||||
|
||||
blood.setFill(blood.getFill() + 50);
|
||||
if(blood.getFill() > blood.getMaxFill()) {
|
||||
@ -417,7 +418,7 @@ public class TileEntityMachineTurbofan extends TileEntityMachinePolluting implem
|
||||
}
|
||||
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.turbofanOperate", xCoord, yCoord, zCoord, 1.0F, 50F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.TURBOFAN_LOOP, xCoord, yCoord, zCoord, 1.0F, 50F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,6 +20,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel;
|
||||
import com.hbm.items.machine.ItemPWRPrinter;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -328,7 +329,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.reactorLoop", xCoord, yCoord, zCoord, 1F, 10F, 1.0F, 20);
|
||||
return MainRegistry.proxy.getLoopedSound(NTMSounds.REACTOR_GEIGER_LOOP, xCoord, yCoord, zCoord, 1F, 10F, 1.0F, 20);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.tileentity.IBufPacketReceiver;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.IFluidCopiable;
|
||||
@ -110,7 +111,7 @@ public class TileEntitySteamEngine extends TileEntityLoadedBase implements IEner
|
||||
if(this.rotor >= 360D) {
|
||||
this.rotor -= 360D;
|
||||
|
||||
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:block.steamEngineOperate", getVolume(1.0F), 0.5F + (acceleration / 80F));
|
||||
this.worldObj.playSoundEffect(xCoord, yCoord, zCoord, NTMSounds.STEAM_ENGINE_HIT, getVolume(1.0F), 0.5F + (acceleration / 80F));
|
||||
}
|
||||
|
||||
buf.writeLong(this.powerBuffer);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.gui.GUIFusionKlystron;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -129,7 +130,7 @@ public class TileEntityFusionKlystron extends TileEntityMachineBase implements I
|
||||
float speed = this.fanSpeed / 5F;
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.fel", xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 15F, speed, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.FEL_LOOP, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 15F, speed, 20);
|
||||
audio.startSound();
|
||||
} else {
|
||||
audio.updateVolume(getVolume(speed));
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import com.hbm.inventory.recipes.FusionRecipes;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
import com.hbm.uninos.GenNode;
|
||||
@ -56,7 +57,7 @@ public class TileEntityFusionKlystronCreative extends TileEntityLoadedBase {
|
||||
float speed = this.fanSpeed / 5F;
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.fel", xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 15F, speed, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.FEL_LOOP, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 15F, speed, 20);
|
||||
audio.startSound();
|
||||
} else {
|
||||
audio.updateVolume(getVolume(speed));
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.handler.CompatHandler;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IConfigurableMachine;
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
@ -125,7 +126,7 @@ public class TileEntityFusionMHDT extends TileEntityLoadedBase implements IEnerg
|
||||
float speed = this.rotorSpeed / 15F;
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.largeTurbineRunning", xCoord + 0.5F, yCoord + 1.5F, zCoord + 0.5F, getVolume(speed), 20F, speed, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.TURBINE_LARGE_LOOP, xCoord + 0.5F, yCoord + 1.5F, zCoord + 0.5F, getVolume(speed), 20F, speed, 20);
|
||||
audio.startSound();
|
||||
} else {
|
||||
audio.updateVolume(getVolume(speed));
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package com.hbm.tileentity.machine.fusion;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.hbm.interfaces.IControlReceiver;
|
||||
import com.hbm.inventory.container.ContainerMachinePlasmaForge;
|
||||
@ -55,12 +57,24 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
|
||||
public ModuleMachinePlasma plasmaModule;
|
||||
|
||||
// animation crap
|
||||
public double prevRing;
|
||||
public double ring;
|
||||
public double ringSpeed;
|
||||
public double ringTarget;
|
||||
public int ringDelay;
|
||||
public ForgeArm armStriker;
|
||||
public ForgeArm armJet;
|
||||
|
||||
public TileEntityFusionPlasmaForge() {
|
||||
super(16);
|
||||
this.inputTank = new FluidTank(Fluids.NONE, 16_000);
|
||||
|
||||
this.plasmaModule = new ModuleMachinePlasma(0, this, slots)
|
||||
.itemInput(3).itemOutput(15).fluidInput(inputTank);
|
||||
|
||||
this.armStriker = new ForgeArm(ForgeArmType.STRIKER);
|
||||
this.armJet = new ForgeArm(ForgeArmType.JET);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,6 +143,36 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
} else {
|
||||
|
||||
if(timeOffset == -1) this.timeOffset = worldObj.rand.nextInt(30_000);
|
||||
|
||||
didProcess = true;
|
||||
|
||||
this.armStriker.updateArm();
|
||||
this.armJet.updateArm();
|
||||
|
||||
this.prevRing = this.ring;
|
||||
|
||||
if(didProcess) {
|
||||
if(this.ring != this.ringTarget) {
|
||||
double ringDelta = Math.abs(this.ringTarget - this.ring);
|
||||
if(ringDelta <= this.ringSpeed) this.ring = this.ringTarget;
|
||||
if(this.ringTarget > this.ring) this.ring += this.ringSpeed;
|
||||
if(this.ringTarget < this.ring) this.ring -= this.ringSpeed;
|
||||
if(this.ringTarget == this.ring) {
|
||||
double sub = ringTarget >= 360 ? -360D : 360D;
|
||||
this.ringTarget += sub;
|
||||
this.ring += sub;
|
||||
this.prevRing += sub;
|
||||
this.ringDelay = 100 + worldObj.rand.nextInt(41);
|
||||
}
|
||||
} else {
|
||||
if(this.ringDelay > 0) this.ringDelay--;
|
||||
if(this.ringDelay <= 0) {
|
||||
this.ringTarget += (worldObj.rand.nextDouble() + 1) * 60 * (worldObj.rand.nextBoolean() ? - 1 : 1);
|
||||
this.ringSpeed = 2.5D;
|
||||
//if(!this.muffled) MainRegistry.proxy.playSoundClient(xCoord, yCoord, zCoord, NTMSounds.ASSEMBLER_START, this.getVolume(0.25F), 1.25F + worldObj.rand.nextFloat() * 0.25F);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -265,4 +309,193 @@ public class TileEntityFusionPlasmaForge extends TileEntityMachineBase implement
|
||||
|
||||
@Override public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerMachinePlasmaForge(player.inventory, this); }
|
||||
@Override @SideOnly(Side.CLIENT) public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GUIMachinePlasmaForge(player.inventory, this); }
|
||||
|
||||
public class ForgeArm {
|
||||
|
||||
public ForgeArmType type;
|
||||
public ForgeArmState state = ForgeArmState.RETIRE;
|
||||
public double[] angles;
|
||||
public double[] prevAngles;
|
||||
public double[] targetAngles;
|
||||
public double[] speed;
|
||||
public int actionDelay = 0;
|
||||
|
||||
public ForgeArm(ForgeArmType type) {
|
||||
this.type = type;
|
||||
this.angles = new double[type.angleCount];
|
||||
this.prevAngles = new double[type.angleCount];
|
||||
this.targetAngles = new double[type.angleCount];
|
||||
this.speed = new double[type.angleCount];
|
||||
|
||||
for(int i = 0; i < speed.length; i++) {
|
||||
if(i < 3 || i == 4) speed[i] = 15;
|
||||
if(i == 3) speed[i] = 15;
|
||||
if(i > 4) speed[i] = 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
public void updateArm() {
|
||||
for(int i = 0; i < angles.length; i++) prevAngles[i] = angles[i];
|
||||
|
||||
if(this.actionDelay > 0) {
|
||||
this.actionDelay--;
|
||||
return;
|
||||
}
|
||||
|
||||
this.type.stateMachine.accept(this);
|
||||
}
|
||||
|
||||
public boolean didProcess() { return didProcess; }
|
||||
|
||||
public boolean move() {
|
||||
boolean didMove = false;
|
||||
|
||||
for(int i = 0; i < angles.length; i++) {
|
||||
if(angles[i] == targetAngles[i]) continue;
|
||||
didMove = true;
|
||||
|
||||
double angle = angles[i];
|
||||
double target = targetAngles[i];
|
||||
double turn = speed[i];
|
||||
double delta = Math.abs(angle - target);
|
||||
|
||||
if(delta <= turn) {
|
||||
angles[i] = targetAngles[i];
|
||||
continue;
|
||||
}
|
||||
if(angle < target) angles[i] += turn;
|
||||
else angles[i] -= turn;
|
||||
}
|
||||
|
||||
return !didMove;
|
||||
}
|
||||
|
||||
public double[] getPositions(float interp) {
|
||||
double[] pos = new double[this.angles.length];
|
||||
for(int i = 0; i < pos.length; i++) {
|
||||
pos[i] = BobMathUtil.interp(this.prevAngles[i], this.angles[i], interp);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
||||
public static enum ForgeArmType {
|
||||
STRIKER(STRIKER_STATE_MACHINE, 6), // pivot to lower arm, lower arm to upper arm, upper arm to mount, mount to strikers, striker 1, striker 2
|
||||
JET(JET_STATE_MACHINE, 4); // pivot to lower arm, lower arm to upper arm, upper arm to jet, jet
|
||||
|
||||
protected final int angleCount;
|
||||
protected final Consumer<ForgeArm> stateMachine;
|
||||
|
||||
private ForgeArmType(Consumer<ForgeArm> stateMachine, int angleCount) {
|
||||
this.stateMachine = stateMachine;
|
||||
this.angleCount = angleCount;
|
||||
}
|
||||
}
|
||||
|
||||
public static enum ForgeArmState {
|
||||
REPOSITION,
|
||||
EXTEND1,
|
||||
EXTEND2,
|
||||
RETRACT1,
|
||||
RETRACT2,
|
||||
RETIRE
|
||||
}
|
||||
|
||||
public static Random rand = new Random();
|
||||
|
||||
public static double[][] strikerPositions = new double[][] {
|
||||
{20, -30, -20, 30},
|
||||
{45, -80, 15, 30},
|
||||
{30, -45, -10, 30},
|
||||
{15, -20, -30, 30},
|
||||
{0, 10, -55, 30}
|
||||
};
|
||||
|
||||
public static double[][] jetPositions = new double[][] {
|
||||
{10, 45, -120},
|
||||
{20, 45, -140},
|
||||
{0, 30, -80},
|
||||
{0, 40, -100},
|
||||
{30, 50, -160}
|
||||
};
|
||||
|
||||
public static Consumer<ForgeArm> STRIKER_STATE_MACHINE = (arm) -> {
|
||||
|
||||
if(!arm.didProcess()) arm.state = ForgeArmState.RETIRE;
|
||||
|
||||
switch(arm.state) {
|
||||
case REPOSITION: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 5;
|
||||
arm.state = ForgeArmState.EXTEND1;
|
||||
arm.targetAngles[4] = 0.5D;
|
||||
}
|
||||
} break;
|
||||
case EXTEND1: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 0;
|
||||
arm.state = ForgeArmState.RETRACT1;
|
||||
arm.targetAngles[4] = 0D;
|
||||
}
|
||||
} break;
|
||||
case RETRACT1: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 0;
|
||||
arm.state = ForgeArmState.EXTEND2;
|
||||
arm.targetAngles[5] = 0.5D;
|
||||
}
|
||||
} break;
|
||||
case EXTEND2: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 0;
|
||||
arm.state = ForgeArmState.RETRACT2;
|
||||
arm.targetAngles[5] = 0D;
|
||||
}
|
||||
} break;
|
||||
case RETRACT2: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 10;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, strikerPositions);
|
||||
}
|
||||
} break;
|
||||
case RETIRE: {
|
||||
for(int i = 0; i < arm.targetAngles.length; i++) arm.targetAngles[i] = 0;
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 10;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, strikerPositions);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") // shut up
|
||||
public static Consumer<ForgeArm> JET_STATE_MACHINE = (arm) -> {
|
||||
|
||||
if(!arm.didProcess()) arm.state = ForgeArmState.RETIRE;
|
||||
|
||||
switch(arm.state) {
|
||||
case REPOSITION: {
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 40;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, jetPositions);
|
||||
}
|
||||
} break;
|
||||
case RETIRE: {
|
||||
for(int i = 0; i < arm.targetAngles.length; i++) arm.targetAngles[i] = 0;
|
||||
if(arm.move()) {
|
||||
arm.actionDelay = 10;
|
||||
arm.state = ForgeArmState.REPOSITION;
|
||||
choosePosition(arm, jetPositions);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
};
|
||||
|
||||
public static void choosePosition(ForgeArm arm, double[][] positions) {
|
||||
double[] newPos = positions[rand.nextInt(positions.length)];
|
||||
for(int i = 0; i < newPos.length; i++) arm.targetAngles[i] = newPos[i];
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.inventory.recipes.FusionRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.NTMSounds;
|
||||
import com.hbm.module.machine.ModuleMachineFusion;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
@ -231,7 +232,7 @@ public class TileEntityFusionTorus extends TileEntityCooledBase implements IGUIP
|
||||
float speed = this.magnetSpeed / 30F;
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.fusionReactorRunning", xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 30F, speed, 20);
|
||||
audio = MainRegistry.proxy.getLoopedSound(NTMSounds.FUSION_REACTOR_LOOP, xCoord + 0.5F, yCoord + 2.5F, zCoord + 0.5F, getVolume(speed), 30F, speed, 20);
|
||||
audio.startSound();
|
||||
} else {
|
||||
audio.updateVolume(getVolume(speed));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user