mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
recipes and sound loop fixes
This commit is contained in:
parent
ea9b41fce8
commit
e4e4e00c30
@ -11,7 +11,6 @@ import com.hbm.inventory.fluid.types.FluidTypeCombustible.FuelGrade;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -73,32 +72,32 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock, IToo
|
||||
|
||||
//
|
||||
DummyBlockTurbofan.safeBreak = true;
|
||||
world.setBlock(x + 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y + 1, z + 1);
|
||||
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y + 1, z - 1);
|
||||
world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z - 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y + 1, z - 1);
|
||||
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x, y, z - 1);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y + 1, z + 1);
|
||||
world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z + 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
@ -118,32 +117,32 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock, IToo
|
||||
|
||||
//
|
||||
DummyBlockTurbofan.safeBreak = true;
|
||||
world.setBlock(x + 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y + 1, z + 1);
|
||||
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y + 1, z - 1);
|
||||
world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z - 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y + 1, z - 1);
|
||||
world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y, z - 1);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y + 1, z + 1);
|
||||
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
@ -163,32 +162,32 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock, IToo
|
||||
|
||||
//
|
||||
DummyBlockTurbofan.safeBreak = true;
|
||||
world.setBlock(x + 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y + 1, z + 1);
|
||||
world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y + 1, z - 1);
|
||||
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y + 1, z - 1);
|
||||
world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y, z - 1);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y + 1, z + 1);
|
||||
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x, y, z + 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
@ -208,32 +207,32 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock, IToo
|
||||
|
||||
//
|
||||
DummyBlockTurbofan.safeBreak = true;
|
||||
world.setBlock(x + 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y + 1, z + 1);
|
||||
world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y + 1, z - 1);
|
||||
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y + 1, z - 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y + 1, z - 1);
|
||||
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y, z);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y + 1, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y + 1, z + 1);
|
||||
world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_turbofan);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z + 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
|
||||
@ -101,6 +101,10 @@ public class ArmorRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_plate, 1), new Object[] { "C C", "DXD", "CFC", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_plate, 'F', ModItems.tank_steel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_legs, 1), new Object[] { "CCC", "DXD", "C C", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_legs });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.steamsuit_boots, 1), new Object[] { "C C", "DXD", 'D', DESH.ingot(), 'C', CU.plate(), 'X', ModItems.steel_boots });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_helmet, 1), new Object[] { "W W", "W W", "SCS", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot(), 'C', ModItems.circuit_targeting_tier3 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_plate, 1), new Object[] { "W W", "CDC", "SWS", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot(), 'C', ModItems.circuit_targeting_tier3, 'D', ModBlocks.machine_diesel });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_legs, 1), new Object[] { "M M", "S S", "W W", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot(), 'M', ModItems.motor });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.dieselsuit_boots, 1), new Object[] { "W W", "S S", 'W', new ItemStack(Blocks.wool, 1, 14), 'S', STEEL.ingot() });
|
||||
|
||||
//Bismuth fursui- I mean armor
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.bismuth_helmet, 1), new Object[] { "GPP", "P ", "FPP", 'G', Items.gold_ingot, 'P', ModItems.plate_bismuth, 'F', ModItems.rag });
|
||||
|
||||
@ -63,10 +63,10 @@ public class MultiblockHandler {
|
||||
public static final int[] pumpjackDimensionEast = new int[] { 0, 6, 4, 0, 1, 1 };
|
||||
public static final int[] pumpjackDimensionSouth = new int[] { 1, 1, 4, 0, 0, 6 };
|
||||
public static final int[] pumpjackDimensionWest = new int[] { 6, 0, 4, 0, 1, 1 };
|
||||
public static final int[] turbofanDimensionNorth = new int[] { 1, 1, 2, 0, 4, 4 };
|
||||
public static final int[] turbofanDimensionEast = new int[] { 4, 4, 2, 0, 1, 1 };
|
||||
public static final int[] turbofanDimensionSouth = new int[] { 1, 1, 2, 0, 4, 4 };
|
||||
public static final int[] turbofanDimensionWest = new int[] { 4, 4, 2, 0, 1, 1 };
|
||||
public static final int[] turbofanDimensionNorth = new int[] { 1, 1, 2, 0, 3, 3 };
|
||||
public static final int[] turbofanDimensionEast = new int[] { 3, 3, 2, 0, 1, 1 };
|
||||
public static final int[] turbofanDimensionSouth = new int[] { 1, 1, 2, 0, 3, 3 };
|
||||
public static final int[] turbofanDimensionWest = new int[] { 3, 3, 2, 0, 1, 1 };
|
||||
public static final int[] AMSLimiterDimensionNorth = new int[] { 0, 0, 5, 0, 2, 2 };
|
||||
public static final int[] AMSLimiterDimensionEast = new int[] { 2, 2, 5, 0, 0, 0 };
|
||||
public static final int[] AMSLimiterDimensionSouth = new int[] { 0, 0, 5, 0, 2, 2 };
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.gui.GUIMachineAssembler;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
@ -35,7 +36,7 @@ public class AssemblerRecipeHandler extends TemplateRecipeHandler {
|
||||
input = new ArrayList();
|
||||
|
||||
ComparableStack comp = new ComparableStack(result);
|
||||
ItemStack template = new ItemStack(ModItems.assembly_template, 1, AssemblerRecipes.recipeList.indexOf(comp));
|
||||
ItemStack template = ItemAssemblyTemplate.writeType(new ItemStack(ModItems.assembly_template), comp);
|
||||
|
||||
for(int i = 0; i < Math.min(in.size(), 12); i++) {
|
||||
input.add(new PositionedStack(in.get(i), 30 + (i % 4) * 18, 6 + (i / 4) * 18));
|
||||
|
||||
@ -179,12 +179,12 @@ public class FluidType {
|
||||
if(traits.contains(FluidTrait.NO_CONTAINER)) info.add(EnumChatFormatting.RED + "Cannot be stored in any universal tank");
|
||||
if(traits.contains(FluidTrait.LEAD_CONTAINER)) info.add(EnumChatFormatting.YELLOW + "Requires hazardous material tank to hold");
|
||||
|
||||
info.add("");
|
||||
/*info.add("");
|
||||
info.add(EnumChatFormatting.RED + "[DEBUG]");
|
||||
|
||||
for(FluidTrait trait : traits) {
|
||||
info.add(EnumChatFormatting.RED + "-" + trait.name());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -788,6 +788,18 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.circuit_aluminium, 2)
|
||||
}, 100);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_assemfac, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 48),
|
||||
new OreDictStack(TCALLOY.ingot(), 8),
|
||||
new OreDictStack(B.ingot(), 4),
|
||||
new OreDictStack(RUBBER.ingot(), 16),
|
||||
new OreDictStack(KEY_ANYPANE, 64),
|
||||
new ComparableStack(ModItems.motor, 18),
|
||||
new ComparableStack(ModItems.bolt_tungsten, 12),
|
||||
new ComparableStack(ModItems.pipes_steel, 1),
|
||||
new ComparableStack(ModItems.circuit_gold, 3)
|
||||
}, 400);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.machine_chemfac, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 48),
|
||||
new OreDictStack(TCALLOY.ingot(), 8),
|
||||
|
||||
@ -56,7 +56,7 @@ public class ArmorDiesel extends ArmorFSBFueled {
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
|
||||
super.onArmorTick(world, player, stack);
|
||||
|
||||
if(this == ModItems.dieselsuit_legs && this.hasFSBArmor(player) && world.getTotalWorldTime() % 3 == 0) {
|
||||
if(!world.isRemote && this == ModItems.dieselsuit_legs && this.hasFSBArmor(player) && world.getTotalWorldTime() % 3 == 0) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "bnuuy");
|
||||
data.setInteger("player", player.getEntityId());
|
||||
|
||||
@ -103,11 +103,21 @@ public class ItemGunGauss extends ItemGunBase {
|
||||
super.updateClient(stack, world, player, slot, isCurrentItem);
|
||||
|
||||
if(chargeLoop != null) {
|
||||
if(!chargeLoop.isPlaying()) {
|
||||
chargeLoop = rebootAudio(chargeLoop, player);
|
||||
}
|
||||
chargeLoop.updatePosition((float)player.posX, (float)player.posY, (float)player.posZ);
|
||||
chargeLoop.updatePitch(chargeLoop.getPitch() + 0.01F);
|
||||
}
|
||||
}
|
||||
|
||||
public AudioWrapper rebootAudio(AudioWrapper wrapper, EntityPlayer player) {
|
||||
wrapper.stopSound();
|
||||
AudioWrapper audio = MainRegistry.proxy.getLoopedSound("hbm:weapon.tauChargeLoop2", (float)player.posX, (float)player.posY, (float)player.posZ, wrapper.getVolume(), wrapper.getPitch());
|
||||
audio.startSound();
|
||||
return audio;
|
||||
}
|
||||
|
||||
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
|
||||
|
||||
super.spawnProjectile(world, player, stack, config);
|
||||
|
||||
@ -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 (4228)";
|
||||
public static final String VERSION = "1.0.27 BETA (4242)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -35,7 +35,7 @@ public class RenderTurbofan extends TileEntitySpecialRenderer {
|
||||
ResourceManager.turbofan.renderPart("Body");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.5, 0);
|
||||
GL11.glRotated(((TileEntityMachineTurbofan) tileEntity).spin, 0, 0, 1);
|
||||
GL11.glRotated(((TileEntityMachineTurbofan) tileEntity).spin, 0, 0, -1);
|
||||
GL11.glTranslated(0, -1.5, 0);
|
||||
ResourceManager.turbofan.renderPart("Blades");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -13,10 +13,6 @@ import com.hbm.items.machine.ItemAssemblyTemplate;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEAssemblerPacket;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateIron;
|
||||
@ -24,20 +20,15 @@ import com.hbm.tileentity.machine.storage.TileEntityCrateSteel;
|
||||
|
||||
import api.hbm.energy.IBatteryItem;
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.tileentity.TileEntityHopper;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineAssembler extends TileEntityMachineBase implements IEnergyUser {
|
||||
|
||||
@ -231,8 +222,12 @@ public class TileEntityMachineAssembler extends TileEntityMachineBase implements
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.assemblerOperate", xCoord, yCoord, zCoord, volume, 1.0F);
|
||||
audio = this.createAudioLoop();
|
||||
audio.updateVolume(volume);
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
audio.updateVolume(volume);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -245,6 +240,11 @@ public class TileEntityMachineAssembler extends TileEntityMachineBase implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.assemblerOperate", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
this.getBlockMetadata();
|
||||
|
||||
|
||||
@ -155,8 +155,12 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
if(isProgressing && volume > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.chemplantOperate", xCoord, yCoord, zCoord, volume, 1.0F);
|
||||
audio = this.createAudioLoop();
|
||||
audio.updateVolume(volume);
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
audio.updateVolume(volume);
|
||||
}
|
||||
|
||||
} else {
|
||||
@ -168,6 +172,11 @@ public class TileEntityMachineChemplant extends TileEntityMachineBase implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.chemplantOperate", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
|
||||
@ -12,7 +12,6 @@ import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
@ -32,6 +31,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@Spaghetti("a")
|
||||
public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements ISidedInventory, IEnergyGenerator, IFluidContainer, IFluidAcceptor {
|
||||
@ -203,6 +203,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
return (power * i) / maxPower;
|
||||
}
|
||||
|
||||
@Spaghetti("HOOOOUUUGH")
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
@ -230,14 +231,22 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
|
||||
this.sendPower(worldObj, this.xCoord + 2, this.yCoord + 1, this.zCoord - 1, Library.POS_X);
|
||||
/*this.sendPower(worldObj, this.xCoord + 2, this.yCoord + 1, this.zCoord - 1, Library.POS_X);
|
||||
this.sendPower(worldObj, this.xCoord + 2, this.yCoord + 1, this.zCoord + 1, Library.POS_X);
|
||||
this.sendPower(worldObj, this.xCoord + 1, this.yCoord + 1, this.zCoord + 2, Library.POS_Z);
|
||||
this.sendPower(worldObj, this.xCoord - 1, this.yCoord + 1, this.zCoord + 2, Library.POS_Z);
|
||||
this.sendPower(worldObj, this.xCoord - 2, this.yCoord + 1, this.zCoord + 1, Library.NEG_X);
|
||||
this.sendPower(worldObj, this.xCoord - 2, this.yCoord + 1, this.zCoord - 1, Library.NEG_X);
|
||||
this.sendPower(worldObj, this.xCoord - 1, this.yCoord + 1, this.zCoord - 2, Library.NEG_Z);
|
||||
this.sendPower(worldObj, this.xCoord + 1, this.yCoord + 1, this.zCoord - 2, Library.NEG_Z);
|
||||
this.sendPower(worldObj, this.xCoord + 1, this.yCoord + 1, this.zCoord - 2, Library.NEG_Z);*/
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.sendPower(worldObj, this.xCoord + rot.offsetX * 2, this.yCoord, this.zCoord + rot.offsetZ * 2, rot);
|
||||
this.sendPower(worldObj, this.xCoord + rot.offsetX * 2 - dir.offsetX, this.yCoord, this.zCoord + rot.offsetZ * 2 - dir.offsetZ, rot);
|
||||
this.sendPower(worldObj, this.xCoord - rot.offsetX * 2, this.yCoord, this.zCoord - rot.offsetZ * 2, rot.getOpposite());
|
||||
this.sendPower(worldObj, this.xCoord - rot.offsetX * 2 - dir.offsetX, this.yCoord, this.zCoord - rot.offsetZ * 2 - dir.offsetZ, rot.getOpposite());
|
||||
|
||||
//Tank Management
|
||||
tank.loadTank(0, 1, slots);
|
||||
@ -251,7 +260,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
isRunning = true;
|
||||
|
||||
spin += 3;
|
||||
spin += 20;
|
||||
spin = spin % 360;
|
||||
|
||||
if(power > maxPower)
|
||||
@ -268,7 +277,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
EntityTSmokeFX smoke = new EntityTSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 4.25;
|
||||
smoke.posZ = zCoord + 3.25;
|
||||
smoke.motionX = rand.nextGaussian() * 0.3;
|
||||
smoke.motionY = rand.nextGaussian() * 0.3;
|
||||
smoke.motionZ = 2.5 + (rand.nextFloat() * 3.5);
|
||||
@ -281,7 +290,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
EntitySSmokeFX smoke = new EntitySSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 4.25;
|
||||
smoke.posZ = zCoord + 3.25;
|
||||
smoke.motionX = rand.nextGaussian() * 0.3;
|
||||
smoke.motionY = rand.nextGaussian() * 0.3;
|
||||
smoke.motionZ = 2.5 + (rand.nextFloat() * 3.5);
|
||||
@ -291,7 +300,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Exhaust push
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 4.5, posX + 1.5, posY + 3, posZ + 12));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 3.5, posX + 1.5, posY + 3, posZ + 12));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionZ += 0.5;
|
||||
@ -301,7 +310,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake pull
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 12, posX + 1.5, posY + 3, posZ - 4.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 12, posX + 1.5, posY + 3, posZ - 3.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionZ += 0.5;
|
||||
@ -309,7 +318,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake kill
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 5.5, posX + 1.5, posY + 3, posZ - 4.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 4.5, posX + 1.5, posY + 3, posZ - 3.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.turbofan, 1000);
|
||||
@ -320,7 +329,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
EntityTSmokeFX smoke = new EntityTSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord - 4.25;
|
||||
smoke.posZ = zCoord - 3.25;
|
||||
smoke.motionX = rand.nextGaussian() * 0.3;
|
||||
smoke.motionY = rand.nextGaussian() * 0.3;
|
||||
smoke.motionZ = -2.5 - (rand.nextFloat() * 3.5);
|
||||
@ -333,7 +342,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
EntitySSmokeFX smoke = new EntitySSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord - 4.25;
|
||||
smoke.posZ = zCoord - 3.25;
|
||||
smoke.motionX = rand.nextGaussian() * 0.3;
|
||||
smoke.motionY = rand.nextGaussian() * 0.3;
|
||||
smoke.motionZ = -2.5 - (rand.nextFloat() * 3.5);
|
||||
@ -343,7 +352,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Exhaust push
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 12, posX + 1.5, posY + 3, posZ - 4.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ - 12, posX + 1.5, posY + 3, posZ - 3.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionZ -= 0.5;
|
||||
@ -353,7 +362,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake pull
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 4.5, posX + 1.5, posY + 3, posZ + 12));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 3.5, posX + 1.5, posY + 3, posZ + 12));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionZ -= 0.5;
|
||||
@ -361,7 +370,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake kill
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 4.5, posX + 1.5, posY + 3, posZ + 5.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 1.5, posY, posZ + 3.5, posX + 1.5, posY + 3, posZ + 4.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.turbofan, 1000);
|
||||
@ -370,7 +379,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
if(meta == 4) {
|
||||
if(afterburner == 0 && rand.nextInt(3) == 0) {
|
||||
EntityTSmokeFX smoke = new EntityTSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 4.25;
|
||||
smoke.posX = xCoord + 3.25;
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.motionX = 2.5 + (rand.nextFloat() * 3.5);
|
||||
@ -383,7 +392,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
for(int i = 0; i < afterburner * 5; i++)
|
||||
if(afterburner > 0 && rand.nextInt(2) == 0) {
|
||||
EntitySSmokeFX smoke = new EntitySSmokeFX(worldObj);
|
||||
smoke.posX = xCoord + 4.25;
|
||||
smoke.posX = xCoord + 3.25;
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.motionX = 2.5 + (rand.nextFloat() * 3.5);
|
||||
@ -395,7 +404,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Exhaust push
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX + 4.5, posY, posZ - 1.5, posX + 12, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX + 3.5, posY, posZ - 1.5, posX + 12, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionX += 0.5;
|
||||
@ -405,7 +414,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake pull
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 12, posY, posZ - 1.5, posX - 4.5, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 12, posY, posZ - 1.5, posX - 3.5, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionX += 0.5;
|
||||
@ -413,7 +422,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake kill
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 5.5, posY, posZ - 1.5, posX - 4.5, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 4.5, posY, posZ - 1.5, posX - 3.5, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.turbofan, 1000);
|
||||
@ -422,7 +431,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
if(meta == 5) {
|
||||
if(afterburner == 0 && rand.nextInt(3) == 0) {
|
||||
EntityTSmokeFX smoke = new EntityTSmokeFX(worldObj);
|
||||
smoke.posX = xCoord - 4.25;
|
||||
smoke.posX = xCoord - 3.25;
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.motionX = -2.5 - (rand.nextFloat() * 3.5);
|
||||
@ -435,7 +444,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
for(int i = 0; i < afterburner * 5; i++)
|
||||
if(afterburner > 0 && rand.nextInt(2) == 0) {
|
||||
EntitySSmokeFX smoke = new EntitySSmokeFX(worldObj);
|
||||
smoke.posX = xCoord - 4.25;
|
||||
smoke.posX = xCoord - 3.25;
|
||||
smoke.posY = yCoord + 1.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.posZ = zCoord + 0.5 + (rand.nextGaussian() * 0.5);
|
||||
smoke.motionX = -2.5 - (rand.nextFloat() * 3.5);
|
||||
@ -447,7 +456,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Exhaust push
|
||||
List<Entity> list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX - 12, posY, posZ - 1.5, posX - 4.5, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX - 12, posY, posZ - 1.5, posX - 3.5, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionX -= 0.5;
|
||||
@ -457,7 +466,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake pull
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX + 4.5, posY, posZ - 1.5, posX + 12, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX + 3.5, posY, posZ - 1.5, posX + 12, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.motionX -= 0.5;
|
||||
@ -465,7 +474,7 @@ public class TileEntityMachineTurbofan extends TileEntityLoadedBase implements I
|
||||
|
||||
//Intake kill
|
||||
list = (List<Entity>)worldObj.getEntitiesWithinAABBExcludingEntity(null,
|
||||
AxisAlignedBB.getBoundingBox(posX + 4.5, posY, posZ - 1.5, posX + 5.5, posY + 3, posZ + 1.5));
|
||||
AxisAlignedBB.getBoundingBox(posX + 3.5, posY, posZ - 1.5, posX + 4.5, posY + 3, posZ + 1.5));
|
||||
|
||||
for(Entity e : list) {
|
||||
e.attackEntityFrom(ModDamageSource.turbofan, 1000);
|
||||
|
||||
@ -106,9 +106,11 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
} else if(countdown > 0) {
|
||||
|
||||
if(audio == null) {
|
||||
audio = MainRegistry.proxy.getLoopedSound("hbm:block.soyuzReady", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
audio = this.createAudioLoop();
|
||||
audio.updateVolume(100);
|
||||
audio.startSound();
|
||||
} else if(!audio.isPlaying()) {
|
||||
audio = rebootAudio(audio);
|
||||
}
|
||||
|
||||
countdown--;
|
||||
@ -132,6 +134,11 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AudioWrapper createAudioLoop() {
|
||||
return MainRegistry.proxy.getLoopedSound("hbm:block.soyuzReady", xCoord, yCoord, zCoord, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
public void onChunkUnload() {
|
||||
|
||||
if(audio != null) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 407 B |
Binary file not shown.
|
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 477 B |
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4228",
|
||||
"version":"1.0.27_X4242",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user