diff --git a/changelog b/changelog index 191a7880f..5d4eaf7ab 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,14 @@ +## Added +* N I 4 N I + * It's that one gun from that one game, you throw coins and your shots bounce around + * Needs no introduction + * Can be upgraded with nickels or gold doubloons for more pocket change to yeet + * Found in airdrop supply crates, about 10x rarer than a double barrel shotgun +* More structures + * I haven't even looked at them so it's a surprise for everyone +* PWR printer + * Using it on a PWR controller will cause the game to generate images of each layer of the reactor + ## Changed * Updated ukrainian, chinese and russian localization, including QMAW * Some previously hardcoded lang strings are now affected by translations diff --git a/gradle.properties b/gradle.properties index 03457ea9b..cb0e42305 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=5426 +mod_build_number=5439 credits=HbMinecraft,\ \ rodolphito (explosion algorithms),\ diff --git a/src/main/java/com/hbm/blocks/machine/MachinePWRController.java b/src/main/java/com/hbm/blocks/machine/MachinePWRController.java index 68007db4d..61b9930dc 100644 --- a/src/main/java/com/hbm/blocks/machine/MachinePWRController.java +++ b/src/main/java/com/hbm/blocks/machine/MachinePWRController.java @@ -56,7 +56,7 @@ public class MachinePWRController extends BlockContainer implements ITooltipProv @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata) { - return metadata == 0 && side != 0 && side != 1 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); + return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : this.blockIcon); } @Override diff --git a/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java b/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java index b14a5f80b..c72958aa0 100644 --- a/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java +++ b/src/main/java/com/hbm/entity/projectile/EntityBulletBeamBase.java @@ -266,13 +266,13 @@ public class EntityBulletBeamBase extends Entity implements IEntityAdditionalSpa newBeam.setPosition(coinHit.hitVec.xCoord, coinHit.hitVec.yCoord, coinHit.hitVec.zCoord); Vec3 delta = Vec3.createVectorHelper(target.posX - newBeam.posX, (target.posY + target.height / 2D) - newBeam.posY, target.posZ - newBeam.posZ); newBeam.setRotationsFromVector(delta); - newBeam.performHitscanExternal(delta.lengthVector()); + newBeam.performHitscanExternal(250D); worldObj.spawnEntityInWorld(newBeam); } else { EntityBulletBeamBase newBeam = new EntityBulletBeamBase(hitCoin.getThrower() != null ? hitCoin.getThrower() : this.thrower, this.config, this.damage * 1.25F); newBeam.setPosition(coinHit.hitVec.xCoord, coinHit.hitVec.yCoord, coinHit.hitVec.zCoord); newBeam.setRotationsFromVector(Vec3.createVectorHelper(rand.nextGaussian() * 0.5, -1, rand.nextGaussian() * 0.5)); - newBeam.performHitscanExternal(100); + newBeam.performHitscanExternal(250D); worldObj.spawnEntityInWorld(newBeam); } diff --git a/src/main/java/com/hbm/itempool/ItemPoolsC130.java b/src/main/java/com/hbm/itempool/ItemPoolsC130.java index c39fa9dbe..480a46c18 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsC130.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsC130.java @@ -33,14 +33,15 @@ public class ItemPoolsC130 { new ItemPool(POOL_WEAPONS) {{ this.pool = new WeightedRandomChestContent[] { - weighted(ModItems.gun_light_revolver, 0, 1, 1, 10), - weighted(ModItems.gun_henry, 0, 1, 1, 10), - weighted(ModItems.gun_maresleg, 0, 1, 1, 10), - weighted(ModItems.gun_greasegun, 0, 1, 1, 10), - weighted(ModItems.gun_carbine, 0, 1, 1, 5), - weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 5), - weighted(ModItems.gun_panzerschreck, 0, 1, 1, 2), - weighted(ModItems.gun_double_barrel, 0, 1, 1, 1), + weighted(ModItems.gun_light_revolver, 0, 1, 1, 100), + weighted(ModItems.gun_henry, 0, 1, 1, 100), + weighted(ModItems.gun_maresleg, 0, 1, 1, 100), + weighted(ModItems.gun_greasegun, 0, 1, 1, 100), + weighted(ModItems.gun_carbine, 0, 1, 1, 50), + weighted(ModItems.gun_heavy_revolver, 0, 1, 1, 50), + weighted(ModItems.gun_panzerschreck, 0, 1, 1, 20), + weighted(ModItems.gun_double_barrel, 0, 1, 1, 10), + weighted(ModItems.gun_n_i_4_n_i, 0, 1, 1, 1), }; }}; diff --git a/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java b/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java index e4a85d34a..ea6c81ef1 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java @@ -4,6 +4,7 @@ import static com.hbm.lib.HbmChestContents.weighted; import com.hbm.blocks.ModBlocks; import com.hbm.items.ItemEnums.EnumSecretType; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModSpecial; import com.hbm.items.ModItems; import net.minecraft.util.WeightedRandomChestContent; @@ -44,6 +45,8 @@ public class ItemPoolsRedRoom { weighted(ModItems.gun_hangman, 0, 1, 1, 1), weighted(ModItems.gun_mas36, 0, 1, 1, 1), weighted(ModItems.item_secret, EnumSecretType.FOLLY.ordinal(), 1, 1, 1), + weighted(ModItems.weapon_mod_special, EnumModSpecial.NICKEL.ordinal(), 1, 1, 1), + weighted(ModItems.weapon_mod_special, EnumModSpecial.DOUBLOONS.ordinal(), 1, 1, 1), }; }}; diff --git a/src/main/java/com/hbm/items/weapon/sedna/ItemGunBaseNT.java b/src/main/java/com/hbm/items/weapon/sedna/ItemGunBaseNT.java index f950c9590..2506d5d84 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/ItemGunBaseNT.java +++ b/src/main/java/com/hbm/items/weapon/sedna/ItemGunBaseNT.java @@ -209,7 +209,7 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I } if(Minecraft.getMinecraft().currentScreen instanceof GUIWeaponTable && !this.recognizedMods.isEmpty()) { - list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("gui.weapon.accepts" + ":")); + list.add(EnumChatFormatting.RED + I18nUtil.resolveKey("gui.weapon.accepts") + ":"); for(ComparableStack comp : this.recognizedMods) list.add(EnumChatFormatting.RED + " " + comp.toStack().getDisplayName()); } } diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java index bbf976df7..d2daf744c 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/GunFactory.java @@ -164,7 +164,8 @@ public class GunFactory { SPEEDUP, CHOKE, SPEEDLOADER, FURNITURE_GREEN, FURNITURE_BLACK, BAYONET, STACK_MAG, SKIN_SATURNITE, LAS_SHOTGUN, - LAS_CAPACITOR, LAS_AUTO + LAS_CAPACITOR, LAS_AUTO, + NICKEL, DOUBLOONS } public static enum EnumModCaliber { diff --git a/src/main/java/com/hbm/items/weapon/sedna/impl/ItemGunNI4NI.java b/src/main/java/com/hbm/items/weapon/sedna/impl/ItemGunNI4NI.java index 71619f721..3212d04a1 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/impl/ItemGunNI4NI.java +++ b/src/main/java/com/hbm/items/weapon/sedna/impl/ItemGunNI4NI.java @@ -5,6 +5,7 @@ import java.util.List; import com.hbm.items.ICustomizable; import com.hbm.items.weapon.sedna.GunConfig; import com.hbm.items.weapon.sedna.ItemGunBaseNT; +import com.hbm.items.weapon.sedna.mods.WeaponModManager; import com.hbm.util.ChatBuilder; import cpw.mods.fml.relauncher.Side; @@ -27,7 +28,12 @@ public class ItemGunNI4NI extends ItemGunBaseNT implements ICustomizable { super.onUpdate(stack, world, entity, slot, isHeld); if(!world.isRemote) { - if(this.getCoinCount(stack) < 4) { + + int maxCoin = 4; + if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NI4NI_NICKEL)) maxCoin += 2; + if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NI4NI_DOUBLOONS)) maxCoin += 2; + + if(this.getCoinCount(stack) < maxCoin) { this.setCoinCharge(stack, this.getCoinCharge(stack) + 1); if(this.getCoinCharge(stack) >= 80) { @@ -36,7 +42,7 @@ public class ItemGunNI4NI extends ItemGunBaseNT implements ICustomizable { this.setCoinCount(stack, newCount); if(isHeld) { - world.playSoundAtEntity(entity, "hbm:item.techBoop", 1.0F, 1.25F + newCount * 0.125F); + world.playSoundAtEntity(entity, "hbm:item.techBoop", 1.0F, 1F + newCount / (float) maxCoin); } } } diff --git a/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModManager.java b/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModManager.java index fbee99b2b..da52d93ab 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModManager.java +++ b/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModManager.java @@ -149,6 +149,8 @@ public class WeaponModManager { new WeaponModDefinition(EnumModSpecial.LAS_SHOTGUN).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasShotgun(ID_LAS_SHOTGUN)); new WeaponModDefinition(EnumModSpecial.LAS_CAPACITOR).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasCapacitor(ID_LAS_CAPACITOR)); new WeaponModDefinition(EnumModSpecial.LAS_AUTO).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasAuto(ID_LAS_AUTO)); + new WeaponModDefinition(EnumModSpecial.NICKEL).addMod(new Item[] {ModItems.gun_n_i_4_n_i}, new WeaponModNickel(ID_NI4NI_NICKEL, "COIN1")); + new WeaponModDefinition(EnumModSpecial.DOUBLOONS).addMod(new Item[] {ModItems.gun_n_i_4_n_i}, new WeaponModNickel(ID_NI4NI_DOUBLOONS, "COIN2")); BulletConfig[] p9 = new BulletConfig[] {XFactory9mm.p9_sp, XFactory9mm.p9_fmj, XFactory9mm.p9_jhp, XFactory9mm.p9_ap}; BulletConfig[] p45 = new BulletConfig[] {XFactory45.p45_sp, XFactory45.p45_fmj, XFactory45.p45_jhp, XFactory45.p45_ap, XFactory45.p45_du}; @@ -202,6 +204,8 @@ public class WeaponModManager { public static final int ID_LAS_CAPACITOR = 217; public static final int ID_LAS_AUTO = 218; public static final int ID_CARBINE_BAYONET = 219; + public static final int ID_NI4NI_NICKEL = 220; + public static final int ID_NI4NI_DOUBLOONS = 221; public static ItemStack[] getUpgradeItems(ItemStack stack, int cfg) { if(!stack.hasTagCompound()) return new ItemStack[0]; diff --git a/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModNickel.java b/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModNickel.java new file mode 100644 index 000000000..b41ef3f6c --- /dev/null +++ b/src/main/java/com/hbm/items/weapon/sedna/mods/WeaponModNickel.java @@ -0,0 +1,13 @@ +package com.hbm.items.weapon.sedna.mods; + +import net.minecraft.item.ItemStack; + +public class WeaponModNickel extends WeaponModBase { + + public WeaponModNickel(int id, String name) { + super(id, name); + this.setPriority(PRIORITY_SET); + } + + @Override public T eval(T base, ItemStack gun, String key, Object parent) { return base; } +} diff --git a/src/main/java/com/hbm/lib/RefStrings.java b/src/main/java/com/hbm/lib/RefStrings.java index b5f8b7af2..2a5cc3b4c 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 (5426)"; + public static final String VERSION = "1.0.27 BETA (5439)"; //HBM's Beta Naming Convention: //V T (X) //V -> next release version diff --git a/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderNI4NI.java b/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderNI4NI.java index ce4f8a846..c38aefa5f 100644 --- a/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderNI4NI.java +++ b/src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderNI4NI.java @@ -94,12 +94,12 @@ public class ItemRenderNI4NI extends ItemRenderWeaponBase { ResourceManager.n_i_4_n_i.renderPart("Barrel"); GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glColor3f(0F, 1F, 0F); int coinCount = ItemGunNI4NI.getCoinCount(stack); - if(coinCount > 3) ResourceManager.n_i_4_n_i.renderPart("Coin1"); - if(coinCount > 2) ResourceManager.n_i_4_n_i.renderPart("Coin2"); - if(coinCount > 1) ResourceManager.n_i_4_n_i.renderPart("Coin3"); - if(coinCount > 0) ResourceManager.n_i_4_n_i.renderPart("Coin4"); + if(coinCount > 3) { GL11.glColor3f(coinCount > 7 ? 1F : 0F, 1F, 0F); ResourceManager.n_i_4_n_i.renderPart("Coin1"); } + if(coinCount > 2) { GL11.glColor3f(coinCount > 6 ? 1F : 0F, 1F, 0F); ResourceManager.n_i_4_n_i.renderPart("Coin2"); } + if(coinCount > 1) { GL11.glColor3f(coinCount > 5 ? 1F : 0F, 1F, 0F); ResourceManager.n_i_4_n_i.renderPart("Coin3"); } + if(coinCount > 0) { GL11.glColor3f(coinCount > 4 ? 1F : 0F, 1F, 0F); ResourceManager.n_i_4_n_i.renderPart("Coin4"); } + GL11.glEnable(GL11.GL_TEXTURE_2D); RenderArcFurnace.fullbright(false); diff --git a/src/main/java/com/hbm/render/tileentity/RenderBobble.java b/src/main/java/com/hbm/render/tileentity/RenderBobble.java index 58e8ee850..fe3c9142f 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderBobble.java +++ b/src/main/java/com/hbm/render/tileentity/RenderBobble.java @@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL12; import com.hbm.blocks.generic.BlockBobble.BobbleType; import com.hbm.blocks.generic.BlockBobble.TileEntityBobble; import com.hbm.items.ModItems; +import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModSpecial; import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; @@ -201,6 +202,8 @@ public class RenderBobble extends TileEntitySpecialRenderer { case FRIZZLE: rotLeftArm = new double[]{0, 15, 45}; rotRightArm = new double[]{0, 0, 80}; + rotLeftLeg = new double[]{0, 0, 2}; + rotRightLeg = new double[]{0, 0, -2}; break; case ADAM29: rotRightArm = new double[]{0, 0, 60}; @@ -410,19 +413,24 @@ public class RenderBobble extends TileEntitySpecialRenderer { break; case FRIZZLE: GL11.glPushMatrix(); - GL11.glTranslated(0.7, 1.7, 0.4); - GL11.glScaled(0.5, 0.5, 0.5); - GL11.glRotated(-90, 0, 1, 0); - GL11.glRotated(-10, 1, 0, 0); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_gun_dark); ResourceManager.ff_nightmare.renderPart("Grip"); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_gun_normal); ResourceManager.ff_nightmare.renderPart("Dark"); - Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.ff_gun_bright); ResourceManager.ff_nightmare.renderPart("Light"); + GL11.glTranslated(0.8, 1.6, 0.4); + GL11.glScaled(0.125, 0.125, 0.125); + GL11.glRotated(90, 0, 1, 0); + GL11.glRotated(10, 1, 0, 0); + this.bindTexture(ResourceManager.n_i_4_n_i_tex); + GL11.glShadeModel(GL11.GL_SMOOTH); + ResourceManager.n_i_4_n_i.renderPart("FrameDark"); + ResourceManager.n_i_4_n_i.renderPart("Grip"); + ResourceManager.n_i_4_n_i.renderPart("FrameLight"); + ResourceManager.n_i_4_n_i.renderPart("Cylinder"); + ResourceManager.n_i_4_n_i.renderPart("Barrel"); + GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); GL11.glTranslated(0.3, 1.4, -0.2); GL11.glRotated(-100, 1, 0, 0); GL11.glScaled(0.5, 0.5, 0.5); - renderItem(new ItemStack(ModItems.coin_maskman, 1, 5)); + renderItem(new ItemStack(ModItems.weapon_mod_special, 1, EnumModSpecial.DOUBLOONS.ordinal())); break; case ADAM29: GL11.glTranslated(0.4, 1.15, 0.4); diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index b59ad8b12..7599e7e9e 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -3647,12 +3647,14 @@ item.weapon_mod_generic.wsteel_damage.name=Optimierter Waffenstahl-Verschluss item.weapon_mod_generic.wsteel_dura.name=Langlebige Waffenstahl-Teile item.weapon_mod_special.bayonet.name=Bayonet item.weapon_mod_special.choke.name=Choke +item.weapon_mod_special.doubloons.name=Zwei Golddublonen item.weapon_mod_special.furniture_black.name=Polymergriff (Schwarz) item.weapon_mod_special.furniture_green.name=Polymergriff (Grün) item.weapon_mod_special.greasegun.name=Grease Gun Modernisierungskit item.weapon_mod_special.las_auto.name=Lasergewehr - Autommatischer Verschluss item.weapon_mod_special.las_capacitor.name=Lasergewehr - Erweiterter Kondensator item.weapon_mod_special.las_shotgun.name=Lasergewehr - Strahlteiler +item.weapon_mod_special.nickel.name=10 Cent item.weapon_mod_special.saw.name=Bügelsäge item.weapon_mod_special.scope.name=Ziehlvorrichtung item.weapon_mod_special.silencer.name=Schalldämpfer diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 76c36d64d..b3448d753 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -4791,12 +4791,14 @@ item.weapon_mod_generic.wsteel_damage.name=Optimized Weapon Steel Receiver item.weapon_mod_generic.wsteel_dura.name=High-Durability Weapon Steel Parts item.weapon_mod_special.bayonet.name=Bayonet item.weapon_mod_special.choke.name=Choke +item.weapon_mod_special.doubloons.name=Two Gold Doubloons item.weapon_mod_special.furniture_black.name=Polymer Furniture (Black) item.weapon_mod_special.furniture_green.name=Polymer Furniture (Green) item.weapon_mod_special.greasegun.name=Grease Gun Modernization Kit item.weapon_mod_special.las_auto.name=Laser Rifle Automatic Receiver item.weapon_mod_special.las_capacitor.name=Laser Rifle Extended Capacitor item.weapon_mod_special.las_shotgun.name=Laser Rifle Beam Splitter +item.weapon_mod_special.nickel.name=Two Nickels item.weapon_mod_special.saw.name=Hacksaw item.weapon_mod_special.scope.name=Scope item.weapon_mod_special.silencer.name=Silencer diff --git a/src/main/resources/assets/hbm/textures/items/weapon_mod_sheet.png b/src/main/resources/assets/hbm/textures/items/weapon_mod_sheet.png index 20774b196..3bad2cfda 100644 Binary files a/src/main/resources/assets/hbm/textures/items/weapon_mod_sheet.png and b/src/main/resources/assets/hbm/textures/items/weapon_mod_sheet.png differ diff --git a/src/main/resources/assets/hbm/textures/items/weapon_mod_special.doubloons.png b/src/main/resources/assets/hbm/textures/items/weapon_mod_special.doubloons.png new file mode 100644 index 000000000..f7300bd1d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/weapon_mod_special.doubloons.png differ diff --git a/src/main/resources/assets/hbm/textures/items/weapon_mod_special.nickel.png b/src/main/resources/assets/hbm/textures/items/weapon_mod_special.nickel.png new file mode 100644 index 000000000..c6d53d141 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/weapon_mod_special.nickel.png differ diff --git a/src/main/resources/assets/hbm/textures/models/trinkets/frizzle.png b/src/main/resources/assets/hbm/textures/models/trinkets/frizzle.png index 0e82cf285..4b28a5208 100644 Binary files a/src/main/resources/assets/hbm/textures/models/trinkets/frizzle.png and b/src/main/resources/assets/hbm/textures/models/trinkets/frizzle.png differ