diff --git a/changelog b/changelog index 31bdeeb83..9bd0efd23 100644 --- a/changelog +++ b/changelog @@ -1,10 +1,28 @@ +## The new power network +The entire energy transfer system has been rewritten which should hopefully fix a few things +* Energy should no longer be voided (at least voiding is minimized due to timeouts for unloaded receivers) +* Transfers should be way less resource intensive, as the expected iteration count is now `max(providers, receivers)` instead of `providers * receivers` +The new system should respect priorities and diodes just like the old system did. Batteries still have their original three priority settings, diodes got two additional modes: LOWEST and HIGHEST. +A bunch of tests have been done using the most important machines, however not all machines that had to be changed for the new system have been fully tested. Expect some things to not work, in which case please file a bug report on the issues board. +Just like with the old system, grids going though unloaded chunks should still work so long as the endpoints are loaded. Grids should be less janky when changing while having unloaded parts, wwhich is likely the main cause for energy voiding. +The system can potentially support saving to the world, i.e. keeping unloaded grids functional even after the entire world is unloaded, although the functionality hasn't been implemented yet. + ## Added * New medium sized electricity pylons * Come in wood and steel flavor * The regular ones don't connect to cable blocks, the variants with transformers do (i.e. they act like substations for huge pylons) ## Changed +* Updated russian localization * Condensers now need cast plates instead of welded plates * Tweaked the substation recipe, it now yields two substations +* There is now a config option for steam clouds from cooling towers +* Nuclear explosions no longer play thunder and explosion sounds in a loop, instead they play one singular sound once the shockwave passes the player + * The HUD shake is now also synced up with the shockwave + * In addition to the hud shake, there is one brief screen shake, the same used for mini nukes (although it ends up being more subtle because your screen is most likely covered in shockwave dust) + * The HUD shake is now 3x more intense, but also only 1.5s long (instead of 5) making it snappier -## Fixed \ No newline at end of file +## Fixed +* Changed the translation keys for bolts, pipes and shells to avoid naming conflicts +* Fixed glpyhid scout rampant mode spawning not working correctly +* Fixed nuclear explosions petrifying fallout layers, turning them into full sellafite blocks \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 305737cdc..f9a8ca1d9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod_version=1.0.27 # Empty build number makes a release type -mod_build_number=4921 +mod_build_number=4935 credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\ \ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\ @@ -18,4 +18,4 @@ credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion al \ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\ \ 70k (textures, glyphid AI, strand caster), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks),\ \ 245tt (anvil GUI improvements), MellowArpeggiation (new animation system, turbine sounds, sound fixes,\ - \ industrial lights, better particle diodes), FOlkvangrField (custom machine parts) + \ industrial lights, better particle diodes), FOlkvangrField (custom machine parts), KoblizekXD (doors) diff --git a/src/main/java/com/hbm/blocks/bomb/BlockCrashedBomb.java b/src/main/java/com/hbm/blocks/bomb/BlockCrashedBomb.java index 730cac10b..93683f0d2 100644 --- a/src/main/java/com/hbm/blocks/bomb/BlockCrashedBomb.java +++ b/src/main/java/com/hbm/blocks/bomb/BlockCrashedBomb.java @@ -98,7 +98,7 @@ public class BlockCrashedBomb extends BlockContainer implements IBomb { if(!world.isRemote) { world.setBlockToAir(x, y, z); - EntityBalefire bf = new EntityBalefire(world).mute(); + EntityBalefire bf = new EntityBalefire(world); bf.posX = x; bf.posY = y; bf.posZ = z; diff --git a/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java b/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java index df36d3276..0647627b4 100644 --- a/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java +++ b/src/main/java/com/hbm/entity/effect/EntityFalloutRain.java @@ -169,7 +169,7 @@ public class EntityFalloutRain extends Entity { Block b = worldObj.getBlock(x, y, z); - if(b.getMaterial() == Material.air) continue; + if(b.getMaterial() == Material.air || b == ModBlocks.fallout) continue; if(b == Blocks.bedrock) return; if(b == ModBlocks.volcano_core) { diff --git a/src/main/java/com/hbm/entity/effect/EntityNukeTorex.java b/src/main/java/com/hbm/entity/effect/EntityNukeTorex.java index 2995732e3..bc6eafaec 100644 --- a/src/main/java/com/hbm/entity/effect/EntityNukeTorex.java +++ b/src/main/java/com/hbm/entity/effect/EntityNukeTorex.java @@ -3,6 +3,7 @@ package com.hbm.entity.effect; import java.awt.Color; import java.util.ArrayList; +import com.hbm.main.MainRegistry; import com.hbm.util.BobMathUtil; import com.hbm.util.TrackerUtil; @@ -29,6 +30,9 @@ public class EntityNukeTorex extends Entity { public ArrayList cloudlets = new ArrayList(); //public static int cloudletLife = 200; + public boolean didPlaySound = false; + public boolean didShake = false; + public EntityNukeTorex(World world) { super(world); this.ignoreFrustumCheck = true; @@ -104,6 +108,13 @@ public class EntityNukeTorex extends Entity { .setScale(7F, 2F) .setMotion(ticksExisted > 15 ? 0.75 : 0)); } + + if(!didPlaySound) { + if(MainRegistry.proxy.me() != null && MainRegistry.proxy.me().getDistanceToEntity(this) < (ticksExisted * 1.5 + 1) * 1.5) { + MainRegistry.proxy.playSoundClient(posX, posY, posZ, "hbm:weapon.nuclearExplosion", 10_000F, 1F); + didPlaySound = true; + } + } } // spawn ring clouds diff --git a/src/main/java/com/hbm/entity/logic/EntityBalefire.java b/src/main/java/com/hbm/entity/logic/EntityBalefire.java index 73c8e51b2..b368e171d 100644 --- a/src/main/java/com/hbm/entity/logic/EntityBalefire.java +++ b/src/main/java/com/hbm/entity/logic/EntityBalefire.java @@ -17,7 +17,6 @@ public class EntityBalefire extends EntityExplosionChunkloading { public ExplosionBalefire exp; public int speed = 1; public boolean did = false; - public boolean mute = false; @Override protected void readEntityFromNBT(NBTTagCompound nbt) { @@ -25,7 +24,6 @@ public class EntityBalefire extends EntityExplosionChunkloading { destructionRange = nbt.getInteger("destructionRange"); speed = nbt.getInteger("speed"); did = nbt.getBoolean("did"); - mute = nbt.getBoolean("mute"); exp = new ExplosionBalefire((int)this.posX, (int)this.posY, (int)this.posZ, this.worldObj, this.destructionRange); @@ -41,7 +39,6 @@ public class EntityBalefire extends EntityExplosionChunkloading { nbt.setInteger("destructionRange", destructionRange); nbt.setInteger("speed", speed); nbt.setBoolean("did", did); - nbt.setBoolean("mute", mute); if(exp != null) exp.saveToNbt(nbt, "exp_"); @@ -79,22 +76,10 @@ public class EntityBalefire extends EntityExplosionChunkloading { } } - if(!mute && rand.nextInt(5) == 0) - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); - if(!flag) { - - if(!mute) - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); - ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.destructionRange * 2); } age++; } - - public EntityBalefire mute() { - this.mute = true; - return this; - } } diff --git a/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java b/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java index c4ffd67f3..75fea35f7 100644 --- a/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java +++ b/src/main/java/com/hbm/entity/logic/EntityDeathBlast.java @@ -37,7 +37,7 @@ public class EntityDeathBlast extends Entity { if(this.ticksExisted >= maxAge && !worldObj.isRemote) { this.setDead(); - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(worldObj, 40, posX, posY, posZ).mute()); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFacNoRad(worldObj, 40, posX, posY, posZ)); int count = 100; for(int i = 0; i < count; i++) { diff --git a/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK5.java b/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK5.java index 90596a9af..918594e0c 100644 --- a/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK5.java +++ b/src/main/java/com/hbm/entity/logic/EntityNukeExplosionMK5.java @@ -29,8 +29,6 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading { public int speed; public int length; - public boolean mute = false; - public boolean fallout = true; private int falloutAdd = 0; @@ -66,12 +64,6 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading { radiate(2_500_000F / (this.ticksExisted * 5 + 1), this.length * 2); } - if(!mute) { - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); - if(rand.nextInt(5) == 0) - this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "random.explode", 10000.0F, 0.8F + this.rand.nextFloat() * 0.2F); - } - ExplosionNukeGeneric.dealDamage(this.worldObj, this.posX, this.posY, this.posZ, this.length * 2); if(explosion == null) { @@ -177,9 +169,4 @@ public class EntityNukeExplosionMK5 extends EntityExplosionChunkloading { falloutAdd = fallout; return this; } - - public EntityNukeExplosionMK5 mute() { - this.mute = true; - return this; - } } diff --git a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java index 3be14d073..1051c9222 100644 --- a/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java +++ b/src/main/java/com/hbm/entity/mob/EntityCreeperNuclear.java @@ -120,7 +120,7 @@ public class EntityCreeperNuclear extends EntityCreeper { worldObj.playSoundEffect(posX, posY + 0.5, posZ, "hbm:weapon.mukeExplosion", 15.0F, 1.0F); if(flag) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, 50, posX, posY, posZ).mute()); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, 50, posX, posY, posZ)); } else { ExplosionNukeGeneric.dealDamage(worldObj, posX, posY + 0.5, posZ, 100); } diff --git a/src/main/java/com/hbm/entity/projectile/EntityBombletZeta.java b/src/main/java/com/hbm/entity/projectile/EntityBombletZeta.java index 1571ff841..1a21d96c2 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBombletZeta.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBombletZeta.java @@ -63,7 +63,7 @@ public class EntityBombletZeta extends EntityThrowable { ExplosionChaos.spawnChlorine(worldObj, this.posX + 0.5F - motionX, this.posY + 0.5F - motionY, this.posZ + 0.5F - motionZ, 75, 2, 0); } if(type == 4) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int) (BombConfig.fatmanRadius * 1.5), posX, posY, posZ).mute()); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int) (BombConfig.fatmanRadius * 1.5), posX, posY, posZ)); NBTTagCompound data = new NBTTagCompound(); data.setString("type", "muke"); diff --git a/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java b/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java index f7a9f5758..20bff21ba 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBulletBaseNT.java @@ -465,7 +465,7 @@ public class EntityBulletBaseNT extends EntityThrowableInterp implements IBullet } if(config.nuke > 0 && !worldObj.isRemote) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, config.nuke, posX, posY, posZ).mute()); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, config.nuke, posX, posY, posZ)); NBTTagCompound data = new NBTTagCompound(); data.setString("type", "muke"); if(MainRegistry.polaroidID == 11 || rand.nextInt(100) == 0) data.setBoolean("balefire", true); diff --git a/src/main/java/com/hbm/explosion/ExplosionNukeSmall.java b/src/main/java/com/hbm/explosion/ExplosionNukeSmall.java index f9cbfec62..0734db2e5 100644 --- a/src/main/java/com/hbm/explosion/ExplosionNukeSmall.java +++ b/src/main/java/com/hbm/explosion/ExplosionNukeSmall.java @@ -32,7 +32,7 @@ public class ExplosionNukeSmall { if(params.shrapnelCount > 0) ExplosionLarge.spawnShrapnels(world, posX, posY, posZ, params.shrapnelCount); if(params.miniNuke && !params.safe) new ExplosionNT(world, null, posX, posY, posZ, params.blastRadius).addAllAttrib(params.explosionAttribs).overrideResolution(params.resolution).explode(); if(params.killRadius > 0) ExplosionNukeGeneric.dealDamage(world, posX, posY, posZ, params.killRadius); - if(!params.miniNuke) world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, (int) params.blastRadius, posX, posY, posZ).mute()); + if(!params.miniNuke) world.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(world, (int) params.blastRadius, posX, posY, posZ)); if(params.miniNuke) { float radMod = params.radiationLevel / 3F; diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachineBattery.java b/src/main/java/com/hbm/inventory/gui/GUIMachineBattery.java index 5b2e00658..f350f477d 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachineBattery.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachineBattery.java @@ -110,6 +110,6 @@ public class GUIMachineBattery extends GuiInfoContainer { int j = battery.redHigh; drawTexturedModalRect(guiLeft + 133, guiTop + 52, 176, 52 + j * 18, 18, 18); - drawTexturedModalRect(guiLeft + 152, guiTop + 35, 194, 52 + battery.priority.ordinal() * 16, 16, 16); + drawTexturedModalRect(guiLeft + 152, guiTop + 35, 194, 52 + battery.priority.ordinal() * 16 - 16, 16, 16); } } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 655721323..fbae0fe16 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -2590,7 +2590,7 @@ public class ModItems { drill_titanium = new Item().setUnlocalizedName("drill_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":drill_titanium"); plate_dalekanium = new Item().setUnlocalizedName("plate_dalekanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_dalekanium"); plate_euphemium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("plate_euphemium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_euphemium"); - bolt = new ItemAutogen(MaterialShapes.BOLT).setUnlocalizedName("bolt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt"); + bolt = new ItemAutogen(MaterialShapes.BOLT).oun("boltntm").setUnlocalizedName("bolt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt"); bolt_spike = new ItemCustomLore().setUnlocalizedName("bolt_spike").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":bolt_spike"); plate_polymer = new Item().setUnlocalizedName("plate_polymer").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_polymer"); plate_kevlar = new Item().setUnlocalizedName("plate_kevlar").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_kevlar"); @@ -3009,8 +3009,8 @@ public class ModItems { gear_large = new ItemGear().setUnlocalizedName("gear_large").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":gear_large"); sawblade = new Item().setUnlocalizedName("sawblade").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":sawblade"); - shell = new ItemAutogen(MaterialShapes.SHELL).setUnlocalizedName("shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":shell"); - pipe = new ItemAutogen(MaterialShapes.PIPE).setUnlocalizedName("pipe").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pipe"); + shell = new ItemAutogen(MaterialShapes.SHELL).oun("shellntm").setUnlocalizedName("shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":shell"); + pipe = new ItemAutogen(MaterialShapes.PIPE).oun("pipentm").setUnlocalizedName("pipe").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":pipe"); fins_flat = new Item().setUnlocalizedName("fins_flat").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fins_flat"); fins_small_steel = new Item().setUnlocalizedName("fins_small_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fins_small_steel"); fins_big_steel = new Item().setUnlocalizedName("fins_big_steel").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":fins_big_steel"); diff --git a/src/main/java/com/hbm/items/special/ItemAutogen.java b/src/main/java/com/hbm/items/special/ItemAutogen.java index 7e91dd37f..ea2be4db1 100644 --- a/src/main/java/com/hbm/items/special/ItemAutogen.java +++ b/src/main/java/com/hbm/items/special/ItemAutogen.java @@ -27,6 +27,7 @@ public class ItemAutogen extends Item { private HashMap textureOverrides = new HashMap(); private HashMap iconMap = new HashMap(); + private String overrideUnlocalizedName = null; public ItemAutogen(MaterialShapes shape) { this.setHasSubtypes(true); @@ -38,6 +39,10 @@ public class ItemAutogen extends Item { textureOverrides.put(mat, tex); return this; } + public ItemAutogen oun(String overrideUnlocalizedName) { + this.overrideUnlocalizedName = overrideUnlocalizedName; + return this; + } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister reg) { @@ -117,4 +122,9 @@ public class ItemAutogen extends Item { String matName = StatCollector.translateToLocal(mat.getUnlocalizedName()); return StatCollector.translateToLocalFormatted(this.getUnlocalizedNameInefficiently(stack) + ".name", matName); } + + @Override + public String getUnlocalizedName(ItemStack stack) { + return overrideUnlocalizedName != null ? "item." + overrideUnlocalizedName : super.getUnlocalizedName(stack); + } } diff --git a/src/main/java/com/hbm/items/tool/ItemDrone.java b/src/main/java/com/hbm/items/tool/ItemDrone.java index 73e43ba14..f63f44fd6 100644 --- a/src/main/java/com/hbm/items/tool/ItemDrone.java +++ b/src/main/java/com/hbm/items/tool/ItemDrone.java @@ -53,6 +53,8 @@ public class ItemDrone extends ItemEnumMulti { world.spawnEntityInWorld(toSpawn); } + stack.stackSize--; + return false; } diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index d4ba6dc9a..3b02435f2 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 (4921)"; + public static final String VERSION = "1.0.27 BETA (4935)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index 281a1d9d0..899a3b118 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -150,6 +150,8 @@ public class ModEventHandlerClient { public static final int flashDuration = 5_000; public static long flashTimestamp; + public static final int shakeDuration = 1_500; + public static long shakeTimestamp; @SubscribeEvent public void onOverlayRender(RenderGameOverlayEvent.Pre event) { diff --git a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java index fd5bf7d78..7fb0fc35b 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java +++ b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java @@ -401,10 +401,10 @@ public class ModEventHandlerRenderer { @SubscribeEvent public void onRenderHUD(RenderGameOverlayEvent.Pre event) { - if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.flashTimestamp + ModEventHandlerClient.flashDuration - System.currentTimeMillis()) > 0) { - double mult = (ModEventHandlerClient.flashTimestamp + ModEventHandlerClient.flashDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.flashDuration * 2; - double horizontal = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.02), -0.7, 0.7) * 5; - double vertical = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.01 + 2), -0.7, 0.7) * 1; + if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0) { + double mult = (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.shakeDuration * 2; + double horizontal = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.02), -0.7, 0.7) * 15; + double vertical = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.01 + 2), -0.7, 0.7) * 3; GL11.glTranslated(horizontal * mult, vertical * mult, 0); } } diff --git a/src/main/java/com/hbm/render/entity/effect/RenderTorex.java b/src/main/java/com/hbm/render/entity/effect/RenderTorex.java index 809f403f4..674eb8818 100644 --- a/src/main/java/com/hbm/render/entity/effect/RenderTorex.java +++ b/src/main/java/com/hbm/render/entity/effect/RenderTorex.java @@ -38,6 +38,14 @@ public class RenderTorex extends Render { cloudletWrapper(cloud, interp); if(cloud.ticksExisted < 101) flashWrapper(cloud, interp); if(cloud.ticksExisted < 10 && System.currentTimeMillis() - ModEventHandlerClient.flashTimestamp > 1_000) ModEventHandlerClient.flashTimestamp = System.currentTimeMillis(); + if(cloud.didPlaySound && !cloud.didShake && System.currentTimeMillis() - ModEventHandlerClient.shakeTimestamp > 1_000) { + ModEventHandlerClient.shakeTimestamp = System.currentTimeMillis(); + cloud.didShake = true; + EntityPlayer player = MainRegistry.proxy.me(); + player.hurtTime = 15; + player.maxHurtTime = 15; + player.attackedAtYaw = 0F; + } if(fog) GL11.glEnable(GL11.GL_FOG); GL11.glPopMatrix(); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCyclotron.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCyclotron.java index 2b5d15c08..87660cb63 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCyclotron.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineCyclotron.java @@ -224,7 +224,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements if(rand < 2) { - worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int)(BombConfig.fatmanRadius * 1.5), xCoord + 0.5, yCoord + 1.5, zCoord + 0.5).mute()); + worldObj.spawnEntityInWorld(EntityNukeExplosionMK5.statFac(worldObj, (int)(BombConfig.fatmanRadius * 1.5), xCoord + 0.5, yCoord + 1.5, zCoord + 0.5)); NBTTagCompound data = new NBTTagCompound(); data.setString("type", "muke"); @@ -233,7 +233,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements } else if(rand < 4) { - EntityBalefire bf = new EntityBalefire(worldObj).mute(); + EntityBalefire bf = new EntityBalefire(worldObj); bf.posX = xCoord + 0.5; bf.posY = yCoord + 1.5; bf.posZ = zCoord + 0.5; diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 2c3be2817..fe3f47e99 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -1306,7 +1306,7 @@ item.bobmazon_machines.name=Bobmazon: Blöcke und Maschinen item.bobmazon_materials.name=Bobmazon: Ressourcen item.bobmazon_tools.name=Bobmazon: Werkzeuge item.bobmazon_weapons.name=Bobmazon: Waffen und Sprengstoffe -item.bolt.name=%sbolzen +item.boltntm.name=%sbolzen item.bolt_compound.name=Verstärkte Turbinenwelle item.bolt_spike.name=Gleisnagel item.boltgun.name=Pneumatische Nietenpistole @@ -2713,7 +2713,7 @@ item.pill_iodine.name=Iodpille item.pill_herbal.name=Kräuterpaste item.pill_red.name=Rote Pille item.pin.name=Haarklammer -item.pipe.name=%srohr +item.pipentm.name=%srohr item.pipes_steel.name=Stahlrohre item.pipes_steel.desc=Auf Recycling-Rezepte wurden wegen$Steuerhinterziehung verzichtet. item.piston_selenium.name=Motorkolben @@ -3165,7 +3165,7 @@ item.serum.name=Serum item.servo_set.name=Servo-Set item.servo_set_desh.name=Deshservo-Set item.shackles.name=Fußschellen -item.shell.name=%smantel +item.shellntm.name=%smantel item.shimmer_axe.name=Shimmer Axe item.shimmer_axe_head.name=Schwerer Axtkopf item.shimmer_handle.name=Verstärketer Polymergriff diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 32a776667..d742e6715 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -2009,7 +2009,7 @@ item.bobmazon_machines.name=Bobmazon: Blocks and Machines item.bobmazon_materials.name=Bobmazon: Materials item.bobmazon_tools.name=Bobmazon: Tools item.bobmazon_weapons.name=Bobmazon: Weapons and Explosives -item.bolt.name=%s Bolt +item.boltntm.name=%s Bolt item.bolt_compound.name=Reinforced Turbine Shaft item.bolt_spike.name=Railroad Spike item.bolt_spike.desc=Radiates a threatening aura, somehow @@ -3555,7 +3555,7 @@ item.pill_herbal.desc=Effective treatment against lung disease and mild radiatio item.pill_red.name=Red Pill item.pin.name=Bobby Pin item.pin.desc=Standard success rate of picking a regular lock is ~10%%. -item.pipe.name=%s Pipe +item.pipentm.name=%s Pipe item.pipes_steel.name=Steel Pipes item.pipes_steel.desc=Uncrafting was omitted due to tax evasion. item.piston_selenium.name=Combustion Engine Piston @@ -4130,7 +4130,7 @@ item.serum.name=Serum item.servo_set.name=Servo Set item.servo_set_desh.name=Desh Servo Set item.shackles.name=Shackles -item.shell.name=%s Shell +item.shellntm.name=%s Shell item.shimmer_axe.name=Shimmer Axe item.shimmer_axe_head.name=Heavy Axe Head item.shimmer_handle.name=Reinforced Polymer Handle diff --git a/src/main/resources/assets/hbm/lang/ru_RU.lang b/src/main/resources/assets/hbm/lang/ru_RU.lang index 581d87635..effe333e3 100644 --- a/src/main/resources/assets/hbm/lang/ru_RU.lang +++ b/src/main/resources/assets/hbm/lang/ru_RU.lang @@ -2845,11 +2845,11 @@ item.ingot_polymer.name=Полимер item.ingot_rubber.name=Резина item.ingot_biorubber.name=Брусок латекса item.ingot_polonium.name=Слиток полония-210 -item.pipe.name=%s трубы +item.pipentm.name=%s трубы item.pipes_steel.name=Стальные трубы item.pipes_steel.desc=Раскрафт был исключен из-за уклонения от уплаты налогов item.drill_titanium.name=Титановый бур -item.bolt.name=Стержень из %s +item.boltntm.name=Стержень из %s item.bolt_spike.name=Железнодорожный гвоздь item.bolt_spike.desc=Излучает угрожающую ауру, как-то item.bolt_compound.name=Укрепленный вал турбины @@ -4966,7 +4966,7 @@ eye.speakTo=Вы говорите Оку: §o%s item.plastic_bag.name=Пластиковый пакетик item.cap_aluminium.name=Алюминиевый колпачок -item.shell.name=%s оболочка +item.shellntm.name=%s оболочка item.hull_small_steel.name=Небольшая стальная оболочка item.hull_small_aluminium.name=Небольшая алюминиевая оболочка item.hull_small_aluminium.desc=Может быть вставлен в просверленный графит diff --git a/src/main/resources/assets/hbm/lang/zh_CN.lang b/src/main/resources/assets/hbm/lang/zh_CN.lang index 555afa11d..1dae36e7c 100644 --- a/src/main/resources/assets/hbm/lang/zh_CN.lang +++ b/src/main/resources/assets/hbm/lang/zh_CN.lang @@ -1907,7 +1907,7 @@ item.bobmazon_machines.name=Bobmazon: 方块和机器 item.bobmazon_materials.name=Bobmazon: 材料 item.bobmazon_tools.name=Bobmazon: 工具 item.bobmazon_weapons.name=Bobmazon: 武器和爆炸物 -item.bolt.name=%s螺栓 +item.boltntm.name=%s螺栓 item.bolt_compound.name=加强涡轮机轴 item.bolt_dura_steel.name=高速钢螺栓 item.bolt_tungsten.name=钨螺栓 diff --git a/src/main/resources/assets/hbm/sounds.json b/src/main/resources/assets/hbm/sounds.json index 220cd1fdf..d2eb9f458 100644 --- a/src/main/resources/assets/hbm/sounds.json +++ b/src/main/resources/assets/hbm/sounds.json @@ -209,6 +209,7 @@ "weapon.glShoot": {"category": "player", "sounds": [{"name": "weapon/glShoot", "stream": false}]}, "weapon.44Shoot": {"category": "player", "sounds": [{"name": "weapon/44Shoot", "stream": false}]}, "weapon.trainImpact": {"category": "player", "sounds": [{"name": "weapon/trainImpact", "stream": false}]}, + "weapon.nuclearExplosion": {"category": "player", "sounds": [{"name": "weapon/nuclearExplosion", "stream": true}]}, "weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]}, diff --git a/src/main/resources/assets/hbm/sounds/weapon/nuclearExplosion.ogg b/src/main/resources/assets/hbm/sounds/weapon/nuclearExplosion.ogg new file mode 100644 index 000000000..6dddc621b Binary files /dev/null and b/src/main/resources/assets/hbm/sounds/weapon/nuclearExplosion.ogg differ