diff --git a/src/main/java/com/hbm/blocks/machine/MachineTurbofan.java b/src/main/java/com/hbm/blocks/machine/MachineTurbofan.java index fa6c9a40f..c7da8fe6c 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineTurbofan.java +++ b/src/main/java/com/hbm/blocks/machine/MachineTurbofan.java @@ -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; diff --git a/src/main/java/com/hbm/crafting/ArmorRecipes.java b/src/main/java/com/hbm/crafting/ArmorRecipes.java index 6287f6f28..0658d4f7a 100644 --- a/src/main/java/com/hbm/crafting/ArmorRecipes.java +++ b/src/main/java/com/hbm/crafting/ArmorRecipes.java @@ -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 }); diff --git a/src/main/java/com/hbm/handler/MultiblockHandler.java b/src/main/java/com/hbm/handler/MultiblockHandler.java index 1054e7030..6ea5d6636 100644 --- a/src/main/java/com/hbm/handler/MultiblockHandler.java +++ b/src/main/java/com/hbm/handler/MultiblockHandler.java @@ -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 }; diff --git a/src/main/java/com/hbm/handler/nei/AssemblerRecipeHandler.java b/src/main/java/com/hbm/handler/nei/AssemblerRecipeHandler.java index 6d781fa7f..f533fc02c 100644 --- a/src/main/java/com/hbm/handler/nei/AssemblerRecipeHandler.java +++ b/src/main/java/com/hbm/handler/nei/AssemblerRecipeHandler.java @@ -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)); diff --git a/src/main/java/com/hbm/inventory/fluid/FluidType.java b/src/main/java/com/hbm/inventory/fluid/FluidType.java index 2527ee2f6..f56402f22 100644 --- a/src/main/java/com/hbm/inventory/fluid/FluidType.java +++ b/src/main/java/com/hbm/inventory/fluid/FluidType.java @@ -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()); - } + }*/ } /** diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 5270cbf16..114a43423 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -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), diff --git a/src/main/java/com/hbm/items/armor/ArmorDiesel.java b/src/main/java/com/hbm/items/armor/ArmorDiesel.java index 63d57cfc2..d3cb53dc4 100644 --- a/src/main/java/com/hbm/items/armor/ArmorDiesel.java +++ b/src/main/java/com/hbm/items/armor/ArmorDiesel.java @@ -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()); diff --git a/src/main/java/com/hbm/items/weapon/ItemGunGauss.java b/src/main/java/com/hbm/items/weapon/ItemGunGauss.java index 08b236d01..63f347527 100644 --- a/src/main/java/com/hbm/items/weapon/ItemGunGauss.java +++ b/src/main/java/com/hbm/items/weapon/ItemGunGauss.java @@ -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); diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index 6b6c96e38..85ecc3a5f 100644 --- a/src/main/java/com/hbm/lib/RefStrings.java +++ b/src/main/java/com/hbm/lib/RefStrings.java @@ -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 diff --git a/src/main/java/com/hbm/render/tileentity/RenderTurbofan.java b/src/main/java/com/hbm/render/tileentity/RenderTurbofan.java index b66921a83..1e7b35ed2 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderTurbofan.java +++ b/src/main/java/com/hbm/render/tileentity/RenderTurbofan.java @@ -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(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java index 8bd372ce6..13f5c6f25 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAssembler.java @@ -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(); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java index 45701d1f7..fc4721ec7 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineChemplant.java @@ -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) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java index df88f1c23..feadfe218 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbofan.java @@ -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 list = (List)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)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)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 list = (List)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)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)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 list = (List)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)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)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 list = (List)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)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)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); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntitySoyuzLauncher.java b/src/main/java/com/hbm/tileentity/machine/TileEntitySoyuzLauncher.java index f8b6870a9..6407e568e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntitySoyuzLauncher.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntitySoyuzLauncher.java @@ -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) { diff --git a/src/main/resources/assets/hbm/textures/models/machines/turbofan.png b/src/main/resources/assets/hbm/textures/models/machines/turbofan.png index d51b70aca..2060b79eb 100644 Binary files a/src/main/resources/assets/hbm/textures/models/machines/turbofan.png and b/src/main/resources/assets/hbm/textures/models/machines/turbofan.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/turbofan_afterburner.png b/src/main/resources/assets/hbm/textures/models/machines/turbofan_afterburner.png new file mode 100644 index 000000000..a2be9657e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/turbofan_afterburner.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/turbofan_back.png b/src/main/resources/assets/hbm/textures/models/machines/turbofan_back.png index 9829eecde..1c9313b64 100644 Binary files a/src/main/resources/assets/hbm/textures/models/machines/turbofan_back.png and b/src/main/resources/assets/hbm/textures/models/machines/turbofan_back.png differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index b4773b2a4..5ff865767 100755 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -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": "",