Merge remote-tracking branch 'upstream/master' into Optimization
17
changelog
@ -9,6 +9,15 @@
|
||||
* Explosive .50 BMG
|
||||
* Explosive 10 gauge buckshot (unlike 12 gauge which has explosive slugs)
|
||||
* Lincoln's repeater, a b-side to the lever action rifle
|
||||
* Weapon modification table
|
||||
* All weapon tiers have generic upgrades for increasing damage and durability
|
||||
* Many guns have specialized attachments. Some examples:
|
||||
* The assault rifle can use silencers, scopes, can have its stock removed and has two different polymer furnitures
|
||||
* .44 revolvers can use scopes
|
||||
* All full-length shotguns can have their barrel sawed off
|
||||
* Most shotguns can make use of a choke to decrease projectile spread (does not work with sawed-offs)
|
||||
* The grease gun has a modernization package, replacing most parts and increasing most stats
|
||||
* Some guns have special mod combos that will change the name
|
||||
|
||||
## Changed
|
||||
* Fat mines now use the standardized mini nuke code
|
||||
@ -29,6 +38,11 @@
|
||||
* Removed the crafting recipe for the small geothermal generator and ZPE generators
|
||||
* Removed the gemothermal, ZPE and ambient radiation generators from the creative menu
|
||||
* Disabled the horrid flicker on the quad rocket launcher's antenna, making steered mode look less terrible
|
||||
* All non-legendary .357 revolvers now fire a quarter of a second faster
|
||||
* Changed the detonator's recipe to be less archaic
|
||||
* Crates can now be opened when held
|
||||
* Crates will not longer show their contents when locked
|
||||
* Crates found in structures will sometimes contain things that aren't items
|
||||
|
||||
## Fixed
|
||||
* Fixed animation errors on the MAS-36
|
||||
@ -40,4 +54,5 @@
|
||||
* Potentially fixed another issue regarding NPCs firing belt-fed guns
|
||||
* Chunk-loading drones may or may not be fixed
|
||||
* Fixed disperser canisters not actually despawning on impact, endlessly spawning mist clouds
|
||||
* Fixed issues where the new packet system didn't play nice with machines that are being sent packets by other machines, like watz segments and radar screens
|
||||
* Fixed issues where the new packet system didn't play nice with machines that are being sent packets by other machines, like watz segments and radar screens
|
||||
* Fixed fat man's piston not being extended correctly in non-first person rendering when unloaded
|
||||
@ -29,9 +29,9 @@ public class BlockWeaponTable extends Block implements IGUIProvider {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_top");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_bottom");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":armor_table_side");
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_top");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_bottom");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":gun_table_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -31,6 +31,9 @@ public class WeaponRecipes {
|
||||
|
||||
public static void register() {
|
||||
|
||||
//Weapon mod table
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModBlocks.machine_weapon_table, 1), new Object[] { "PPP", "TCT", "TST", 'P', GUNMETAL.plate(), 'T', STEEL.ingot(), 'C', Blocks.crafting_table, 'S', STEEL.block() });
|
||||
|
||||
//SEDNA Parts
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.part_stock, 1, Mats.MAT_WOOD.id), new Object[] { "WWW", " W", 'W', KEY_PLANKS });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.part_grip, 1, Mats.MAT_WOOD.id), new Object[] { "W ", " W", " W", 'W', KEY_PLANKS });
|
||||
|
||||
@ -19,7 +19,6 @@ import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
|
||||
@ -85,6 +85,7 @@ public class ContainerWeaponTable extends Container {
|
||||
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||
|
||||
if(mode == 999_999) {
|
||||
if(player.worldObj.isRemote) return null;
|
||||
ItemStack stack = gun.getStackInSlot(0);
|
||||
if(stack != null && stack.getItem() instanceof ItemGunBaseNT) {
|
||||
int configs = ((ItemGunBaseNT) stack.getItem()).getConfigCount();
|
||||
|
||||
@ -422,7 +422,7 @@ public class ShredderRecipes extends SerializableRecipe {
|
||||
|
||||
//convert the map only once to save on processing power (might be more ram intensive but that can't be THAT bad, right?)
|
||||
if(neiShredderRecipes == null)
|
||||
neiShredderRecipes = new HashMap(shredderRecipes);
|
||||
neiShredderRecipes = new HashMap<>(shredderRecipes);
|
||||
|
||||
return neiShredderRecipes;
|
||||
}
|
||||
|
||||
@ -1507,6 +1507,9 @@ public class ModItems {
|
||||
public static Item ammo_secret;
|
||||
|
||||
public static Item weapon_mod_test;
|
||||
public static Item weapon_mod_generic;
|
||||
public static Item weapon_mod_special;
|
||||
public static Item weapon_mod_caliber;
|
||||
|
||||
public static Item crucible;
|
||||
|
||||
@ -6490,6 +6493,9 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ammo_secret, ammo_secret.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(weapon_mod_test, weapon_mod_test.getUnlocalizedName());
|
||||
GameRegistry.registerItem(weapon_mod_generic, weapon_mod_generic.getUnlocalizedName());
|
||||
GameRegistry.registerItem(weapon_mod_special, weapon_mod_special.getUnlocalizedName());
|
||||
GameRegistry.registerItem(weapon_mod_caliber, weapon_mod_caliber.getUnlocalizedName());
|
||||
|
||||
//Ammo
|
||||
GameRegistry.registerItem(gun_b92_ammo, gun_b92_ammo.getUnlocalizedName());
|
||||
|
||||
@ -4,7 +4,6 @@ import java.util.List;
|
||||
|
||||
import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.handler.threading.PacketThreading;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.render.model.ModelArmorBJ;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
|
||||
@ -5,21 +5,15 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.itempool.ItemPool;
|
||||
import com.hbm.itempool.ItemPoolsSingle;
|
||||
import com.hbm.lib.HbmWorldGen;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.helper.ExplosionCreator;
|
||||
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateBase;
|
||||
import com.hbm.tileentity.machine.storage.TileEntitySafe;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@ -1,13 +1,19 @@
|
||||
package com.hbm.items.weapon.sedna;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
import com.hbm.interfaces.IItemHUD;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.gui.GUIWeaponTable;
|
||||
import com.hbm.items.IEquipReceiver;
|
||||
import com.hbm.items.IKeybindReceiver;
|
||||
import com.hbm.items.weapon.sedna.hud.IHUDComponent;
|
||||
@ -37,6 +43,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
@ -49,6 +56,10 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
public double shotRand = 0D;
|
||||
|
||||
public static List<Item> secrets = new ArrayList();
|
||||
public List<ComparableStack> recognizedMods = new ArrayList();
|
||||
|
||||
public static final DecimalFormatSymbols SYMBOLS_US = new DecimalFormatSymbols(Locale.US);
|
||||
public static final DecimalFormat FORMAT_DMG = new DecimalFormat("#.##", SYMBOLS_US);
|
||||
|
||||
public static float recoilVertical = 0;
|
||||
public static float recoilHorizontal = 0;
|
||||
@ -94,6 +105,7 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
/** NEVER ACCESS DIRECTLY - USE GETTER */
|
||||
protected GunConfig[] configs_DNA;
|
||||
|
||||
public Function<ItemStack, String> LAMBDA_NAME_MUTATOR;
|
||||
public WeaponQuality quality;
|
||||
|
||||
public GunConfig getConfig(ItemStack stack, int index) {
|
||||
@ -134,6 +146,21 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
JAMMED, //forced delay due to jamming
|
||||
}
|
||||
|
||||
public ItemGunBaseNT setNameMutator(Function<ItemStack, String> lambda) {
|
||||
this.LAMBDA_NAME_MUTATOR = lambda;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
if(this.LAMBDA_NAME_MUTATOR != null) {
|
||||
String unloc = this.LAMBDA_NAME_MUTATOR.apply(stack);
|
||||
if(unloc != null) return (StatCollector.translateToLocal(unloc + ".name")).trim();
|
||||
}
|
||||
|
||||
return super.getItemStackDisplayName(stack);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
@ -144,10 +171,10 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
list.add("Ammo: " + mag.getIconForHUD(stack, player).getDisplayName() + " " + mag.reportAmmoStateForHUD(stack, player));
|
||||
float dmg = rec.getBaseDamage(stack);
|
||||
list.add("Base Damage: " + dmg);
|
||||
list.add("Base Damage: " + FORMAT_DMG.format(dmg));
|
||||
if(mag.getType(stack, player.inventory) instanceof BulletConfig) {
|
||||
BulletConfig bullet = (BulletConfig) mag.getType(stack, player.inventory);
|
||||
list.add("Damage with current ammo: " + dmg * bullet.damageMult + (bullet.projectilesMin > 1 ? (" x" + (bullet.projectilesMin != bullet.projectilesMax ? (bullet.projectilesMin + "-" + bullet.projectilesMax) : bullet.projectilesMin)) : ""));
|
||||
list.add("Damage with current ammo: " + FORMAT_DMG.format(dmg * bullet.damageMult) + (bullet.projectilesMin > 1 ? (" x" + (bullet.projectilesMin != bullet.projectilesMax ? (bullet.projectilesMin + "-" + bullet.projectilesMax) : bullet.projectilesMin)) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,6 +191,11 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
case SECRET: list.add((BobMathUtil.getBlink() ? EnumChatFormatting.DARK_RED : EnumChatFormatting.RED) + "SECRET"); break;
|
||||
case DEBUG: list.add((BobMathUtil.getBlink() ? EnumChatFormatting.YELLOW : EnumChatFormatting.GOLD) + "DEBUG"); break;
|
||||
}
|
||||
|
||||
if(Minecraft.getMinecraft().currentScreen instanceof GUIWeaponTable && !this.recognizedMods.isEmpty()) {
|
||||
list.add(EnumChatFormatting.RED + "Accepts:");
|
||||
for(ComparableStack comp : this.recognizedMods) list.add(EnumChatFormatting.RED + " " + comp.toStack().getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -23,7 +23,7 @@ public class Receiver {
|
||||
public static final String I_DELAYAFTERFIRE = "I_DELAYAFTERFIRE";
|
||||
public static final String I_DELAYAFTERDRYFIRE = "I_DELAYAFTERDRYFIRE";
|
||||
public static final String I_ROUNDSPERCYCLE = "I_ROUNDSPERCYCLE";
|
||||
public static final String F_SPRADINNATE = "F_SPRADINNATE";
|
||||
public static final String F_SPREADINNATE = "F_SPREADINNATE";
|
||||
public static final String F_SPREADAMMO = "F_SPREADAMMO";
|
||||
public static final String F_SPREADHIPFIRE = "F_SPREADHIPFIRE";
|
||||
public static final String F_SPREADDURABILITY = "F_SPREADDURABILITY";
|
||||
@ -90,7 +90,7 @@ public class Receiver {
|
||||
public int getDelayAfterFire(ItemStack stack) { return WeaponModManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this, parent.index); }
|
||||
public int getDelayAfterDryFire(ItemStack stack) { return WeaponModManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this, parent.index); }
|
||||
public int getRoundsPerCycle(ItemStack stack) { return WeaponModManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this, parent.index); }
|
||||
public float getInnateSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadInnate_DNA, stack, F_SPRADINNATE, this, parent.index); }
|
||||
public float getInnateSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadInnate_DNA, stack, F_SPREADINNATE, this, parent.index); }
|
||||
public float getAmmoSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadMultAmmo_DNA, stack, F_SPREADAMMO, this, parent.index); }
|
||||
public float getHipfireSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadPenaltyHipfire_DNA, stack, F_SPREADHIPFIRE, this, parent.index); }
|
||||
public float getDurabilitySpread(ItemStack stack) { return WeaponModManager.eval(this.spreadDurability_DNA, stack, F_SPREADDURABILITY, this, parent.index); }
|
||||
|
||||
@ -66,8 +66,12 @@ public class GunFactory {
|
||||
XFactoryTurret.init();
|
||||
XFactory10ga.init();
|
||||
XFactory35800.init();
|
||||
XFactory45.init();
|
||||
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test");
|
||||
ModItems.weapon_mod_test = new ItemEnumMulti(EnumModTest.class, true, true).setUnlocalizedName("weapon_mod_test").setMaxStackSize(1);
|
||||
ModItems.weapon_mod_generic = new ItemEnumMulti(EnumModGeneric.class, true, true).setUnlocalizedName("weapon_mod_generic").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
ModItems.weapon_mod_special = new ItemEnumMulti(EnumModSpecial.class, true, true).setUnlocalizedName("weapon_mod_special").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
ModItems.weapon_mod_caliber = new ItemEnumMulti(EnumModCaliber.class, true, true).setUnlocalizedName("weapon_mod_caliber").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab);
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
@ -93,7 +97,8 @@ public class GunFactory {
|
||||
COIL_TUNGSTEN, COIL_FERROURANIUM,
|
||||
NUKE_STANDARD, NUKE_DEMO, NUKE_HIGH, NUKE_TOTS, NUKE_HIVE,
|
||||
G10, G10_SHRAPNEL, G10_DU, G10_SLUG,
|
||||
R762_HE, BMG50_HE, G10_EXPLOSIVE
|
||||
R762_HE, BMG50_HE, G10_EXPLOSIVE,
|
||||
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
||||
|
||||
//ONLY ADD NEW ENTRIES AT THE BOTTOM TO AVOID SHIFTING!
|
||||
;
|
||||
@ -105,6 +110,7 @@ public class GunFactory {
|
||||
M44_BP, M44_SP, M44_FMJ, M44_JHP, M44_AP, M44_EXPRESS,
|
||||
P22_SP, P22_FMJ, P22_JHP, P22_AP,
|
||||
P9_SP, P9_FMJ, P9_JHP, P9_AP,
|
||||
P45_SP, P45_FMJ, P45_JHP, P45_AP, P45_DU,
|
||||
R556_SP, R556_FMJ, R556_JHP, R556_AP,
|
||||
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU, R762_HE,
|
||||
BMG50_SP, BMG50_FMJ, BMG50_JHP, BMG50_AP, BMG50_DU, BMG50_HE,
|
||||
@ -135,4 +141,27 @@ public class GunFactory {
|
||||
public static enum EnumModTest {
|
||||
FIRERATE, DAMAGE, MULTI;
|
||||
}
|
||||
|
||||
public static enum EnumModGeneric {
|
||||
IRON_DAMAGE, IRON_DURA,
|
||||
STEEL_DAMAGE, STEEL_DURA,
|
||||
DURA_DAMAGE, DURA_DURA,
|
||||
DESH_DAMAGE, DESH_DURA,
|
||||
WSTEEL_DAMAGE, WSTEEL_DURA,
|
||||
FERRO_DAMAGE, FERRO_DURA,
|
||||
TCALLOY_DAMAGE, TCALLOY_DURA,
|
||||
BIGMT_DAMAGE, BIGMT_DURA,
|
||||
BRONZE_DAMAGE, BRONZE_DURA,
|
||||
}
|
||||
|
||||
public static enum EnumModSpecial {
|
||||
SILENCER, SCOPE, SAW, GREASEGUN, SLOWDOWN,
|
||||
SPEEDUP, CHOKE, SPEEDLOADER,
|
||||
FURNITURE_GREEN, FURNITURE_BLACK, BAYONET,
|
||||
STACK_MAG,
|
||||
}
|
||||
|
||||
public static enum EnumModCaliber {
|
||||
P9, P45, P22, M357, M44, R556, R762, BMG50,
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactory357.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory35800.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory40mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory44.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory45.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory50.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory556mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory75Bolt.*;
|
||||
@ -122,6 +123,12 @@ public class GunFactoryClient {
|
||||
p9_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p9_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p9_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
|
||||
p45_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p45_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p45_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
p45_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
p45_du.setRenderer(LegoClient.RENDER_DU_BULLET);
|
||||
|
||||
r556_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunStinger;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
@ -739,8 +740,8 @@ public class Orchestras {
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack) && !WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
@ -765,8 +766,8 @@ public class Orchestras {
|
||||
if(type == AnimType.JAMMED) {
|
||||
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
if(timer == 20) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 24) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
if(timer == 28) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
if(timer == 26) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 0.9F);
|
||||
if(timer == 30) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
@ -919,10 +920,13 @@ public class Orchestras {
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 0) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, aiming ? 0.125 : 0.5, aiming ? -0.125 : -0.25, aiming ? -0.25 : -0.5D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 15F, (float)entity.getRNG().nextGaussian() * 15F, casing.getName());
|
||||
int rounds = WeaponModManager.hasUpgrade(stack, ctx.configIndex, 208) ? 2 : 1;
|
||||
for(int i = 0; i < rounds; i++) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, aiming ? 0.125 : 0.5, aiming ? -0.125 : -0.25, aiming ? -0.25 : -0.5D, 0, 0.18, -0.12, 0.01, (float)entity.getRNG().nextGaussian() * 15F, (float)entity.getRNG().nextGaussian() * 15F, casing.getName());
|
||||
}
|
||||
}
|
||||
if(timer == 1) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverSpin", 1F, 0.75F);
|
||||
if(timer == (WeaponModManager.hasUpgrade(stack, 0, 207) ? 3 : 1)) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverSpin", 1F, 0.75F);
|
||||
}
|
||||
if(type == AnimType.CYCLE_DRY) {
|
||||
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.75F);
|
||||
@ -1312,7 +1316,7 @@ public class Orchestras {
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack) && !WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE);
|
||||
|
||||
if(type == AnimType.EQUIP) {
|
||||
if(timer == 10) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.openLatch", 1F, 1F);
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.bomb.BlockDetonatable;
|
||||
@ -24,6 +25,7 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineBelt;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -296,7 +298,8 @@ public class XFactory12ga {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_MARESLEG))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_MARESLEG_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG)
|
||||
).setUnlocalizedName("gun_maresleg");
|
||||
).setNameMutator(LAMBDA_NAME_MARESLEG)
|
||||
.setUnlocalizedName("gun_maresleg");
|
||||
ModItems.gun_maresleg_akimbo = new ItemGunBaseNT(WeaponQuality.B_SIDE,
|
||||
new GunConfig().dura(600).draw(5).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
@ -382,6 +385,11 @@ public class XFactory12ga {
|
||||
).setUnlocalizedName("gun_autoshotgun_sexy");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_MARESLEG = (stack) -> {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SAWED_OFF)) return stack.getUnlocalizedName() + "_short";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_MARESLEG = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
|
||||
};
|
||||
|
||||
@ -41,7 +41,7 @@ public class XFactory357 {
|
||||
ModItems.gun_light_revolver = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(7.5F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.dmg(7.5F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_bp, m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ATLAS))
|
||||
@ -51,7 +51,7 @@ public class XFactory357 {
|
||||
ModItems.gun_light_revolver_atlas = new ItemGunBaseNT(WeaponQuality.B_SIDE, new GunConfig()
|
||||
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12.5F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.dmg(12.5F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 6).addConfigs(m357_bp, m357_sp, m357_fmj, m357_jhp, m357_ap, m357_express))
|
||||
.offset(0.75, -0.0625, -0.3125D)
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_ATLAS))
|
||||
@ -67,7 +67,7 @@ public class XFactory357 {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DANI))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI),
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI),
|
||||
new GunConfig().dura(30_000).draw(20).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).spreadHipfire(0F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.pistol", 1.0F, 0.9F)
|
||||
@ -76,7 +76,7 @@ public class XFactory357 {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_DANI))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
).setUnlocalizedName("gun_light_revolver_dani");
|
||||
}
|
||||
|
||||
@ -94,11 +94,11 @@ public class XFactory357 {
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(0, 0, 1, 200));
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 300).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 550).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(0, 0, 1, 200));
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(0, 0, 90, 300).addPos(0, 0, 90, 2000).addPos(0, 0, 0, 150))
|
||||
.addBus("FRONT", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(0, 0, 45, 150).addPos(0, 0, 45, 2000).addPos(0, 0, 0, 75))
|
||||
@ -119,19 +119,4 @@ public class XFactory357 {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DANI_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(360 * 3, 0, 0, 1000, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 300).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(0, 0, 1, 50).addPos(0, 0, 1, 200).addPos(0, 0, 0, 200))
|
||||
.addBus("DRUM", new BusAnimationSequence().addPos(0, 0, 0, 350).addPos(0, 0, 1, 200));
|
||||
}
|
||||
|
||||
return LAMBDA_ATLAS_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBoxcar;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
@ -20,6 +21,7 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -114,7 +116,8 @@ public class XFactory44 {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_NOPIP))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_NOPIP_ANIMS).orchestra(Orchestras.ORCHESTRA_NOPIP)
|
||||
).setUnlocalizedName("gun_heavy_revolver");
|
||||
).setNameMutator(LAMBDA_NAME_NOPIP)
|
||||
.setUnlocalizedName("gun_heavy_revolver");
|
||||
ModItems.gun_heavy_revolver_lilmac = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(31_000).draw(10).inspect(23).crosshair(Crosshair.L_CLASSIC).scopeTexture(scope_lilmac).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
@ -148,8 +151,14 @@ public class XFactory44 {
|
||||
).setUnlocalizedName("gun_hangman");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_NOPIP = (stack) -> {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE)) return stack.getUnlocalizedName() + "_scoped";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> SMACK_A_FUCKER = (stack, ctx) -> {
|
||||
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE || ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == AnimType.CYCLE) {
|
||||
ItemGunBaseNT.setIsAiming(stack, false);
|
||||
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack));
|
||||
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.INSPECT, ctx.configIndex);
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import com.hbm.items.ItemEnums.EnumCasingType;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
|
||||
public class XFactory45 {
|
||||
|
||||
public static BulletConfig p45_sp;
|
||||
public static BulletConfig p45_fmj;
|
||||
public static BulletConfig p45_jhp;
|
||||
public static BulletConfig p45_ap;
|
||||
public static BulletConfig p45_du;
|
||||
|
||||
public static void init() {
|
||||
SpentCasing casing9 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1F, 1F, 0.75F);
|
||||
p45_sp = new BulletConfig().setItem(EnumAmmo.P45_SP).setCasing(EnumCasingType.SMALL, 8)
|
||||
.setCasing(casing9.clone().register("p45"));
|
||||
p45_fmj = new BulletConfig().setItem(EnumAmmo.P45_FMJ).setCasing(EnumCasingType.SMALL, 8).setDamage(0.8F).setThresholdNegation(2F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing9.clone().register("p45fmj"));
|
||||
p45_jhp = new BulletConfig().setItem(EnumAmmo.P45_JHP).setCasing(EnumCasingType.SMALL, 8).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing9.clone().register("p45jhp"));
|
||||
p45_ap = new BulletConfig().setItem(EnumAmmo.P45_AP).setCasing(EnumCasingType.SMALL_STEEL, 8).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setThresholdNegation(5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing9.clone().setColor(SpentCasing.COLOR_CASE_44).register("p45ap"));
|
||||
p45_du = new BulletConfig().setItem(EnumAmmo.P45_DU).setCasing(EnumCasingType.SMALL_STEEL, 8).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setThresholdNegation(15F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing9.clone().setColor(SpentCasing.COLOR_CASE_44).register("p45du"));
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.items.ModItems;
|
||||
@ -16,6 +17,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -58,7 +60,7 @@ public class XFactory556mm {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_G3))
|
||||
.setupStandardConfiguration().ps(Lego.LAMBDA_STANDARD_CLICK_SECONDARY)
|
||||
.anim(LAMBDA_G3_ANIMS).orchestra(Orchestras.ORCHESTRA_G3)
|
||||
).setUnlocalizedName("gun_g3");
|
||||
).setNameMutator(LAMBDA_NAME_G3).setUnlocalizedName("gun_g3");
|
||||
|
||||
ModItems.gun_stg77 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(10).inspect(125).crosshair(Crosshair.CIRCLE).scopeTexture(scope_lilmac).smoke(LAMBDA_SMOKE)
|
||||
@ -73,6 +75,16 @@ public class XFactory556mm {
|
||||
).setUnlocalizedName("gun_stg77");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_G3 = (stack) -> {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER) &&
|
||||
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
|
||||
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_BLACK) &&
|
||||
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE)) return stack.getUnlocalizedName() + "_infiltrator";
|
||||
if(!WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
|
||||
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_GREEN)) return stack.getUnlocalizedName() + "_a3";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.075D, 1.1D, 0);
|
||||
};
|
||||
@ -98,30 +110,47 @@ public class XFactory556mm {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 20).addPos(0, 0, -4.5, 40).addPos(0, 0, 0, 40))
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, ItemGunBaseNT.getIsAiming(stack) ? -0.5 : -0.75, 25, IType.SIN_DOWN).addPos(0, 0, 0, 75, IType.SIN_FULL));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100))
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, 0, -0.3125, 100).hold(25).addPos(0, 0, -2.75, 130).hold(50).addPos(0, 0, -2.4375, 50).addPos(0, 0, 0, 85))
|
||||
.addBus("PLUG", new BusAnimationSequence().addPos(0, 0, 0, 250).hold(125).addPos(0, 0, -2.4375, 130).hold(100).addPos(0, 0, 0, 85))
|
||||
.addBus("HANDLE", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, 90, 0, 100).hold(25).hold(180).addPos(0, 0, 0, 50))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 400).addPos(-1, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL));
|
||||
case RELOAD:
|
||||
return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence()
|
||||
.addPos(0, -8, 0, 250, IType.SIN_UP) //250
|
||||
.addPos(0, -8, 0, 1000) //1250
|
||||
.addPos(0, 0, 0, 300)) //1550
|
||||
.addPos(0, -8, 0, 1050) //1300
|
||||
.addPos(0, 0, 0, 250)) //1550
|
||||
.addBus("BOLT", new BusAnimationSequence()
|
||||
.addPos(0, 0, 0, 250) //250
|
||||
.addPos(0, 0, -3.25, 150) //400
|
||||
.addPos(0, 0, -3.25, 1250) //1750
|
||||
.addPos(0, 0, 0, 100)) //1850
|
||||
.addPos(0, 0, 0, 200) //200
|
||||
.addPos(0, 0, -0.3125, 100) //300
|
||||
.hold(10) //310
|
||||
.addPos(0, 0, -3.25, 200) //510
|
||||
.holdUntil(1875) //1875
|
||||
.addPos(0, 0, -2.9375, 50) //1925
|
||||
.addPos(0, 0, 0, 100)) //2025
|
||||
.addBus("PLUG", new BusAnimationSequence()
|
||||
.addPos(0, 0, 0, 310) //310
|
||||
.addPos(0, 0, -2.9375, 200) //510
|
||||
.holdUntil(1925) //1925
|
||||
.addPos(0, 0, 0, 100)) //2025
|
||||
.addBus("HANDLE", new BusAnimationSequence()
|
||||
.addPos(0, 0, 0, 500) //500
|
||||
.addPos(0, 0, 45, 50) //550
|
||||
.addPos(0, 0, 45, 1150) //1700
|
||||
.addPos(0, 0, 0, 50)) //1750
|
||||
.addPos(0, 0, 0, 200) //200
|
||||
.addPos(0, 90, 0, 100) //300
|
||||
.hold(210) //510
|
||||
.addPos(0, 90, 45, 75) //685
|
||||
.holdUntil(1775) //1775
|
||||
.addPos(0, 90, 0, 100) //1875
|
||||
.addPos(0, 0, 0, 50)) //1925
|
||||
.addBus("LIFT", new BusAnimationSequence()
|
||||
.addPos(0, 0, 0, 750) //750
|
||||
.addPos(-25, 0, 0, 500, IType.SIN_FULL) //1250
|
||||
.addPos(-25, 0, 0, 750) //2000
|
||||
.holdUntil(1550) //1550
|
||||
.addPos(-26, 0, 0, 100, IType.SIN_DOWN) //1650
|
||||
.addPos(-25, 0, 0, 100, IType.SIN_FULL) //1750
|
||||
.holdUntil(2000) //2000
|
||||
.addPos(0, 0, 0, 500, IType.SIN_FULL)) //3500
|
||||
.addBus("BULLET", new BusAnimationSequence().addPos(empty ? 1 : 0, 0, 0, 0).addPos(0, 0, 0, 1000));
|
||||
case INSPECT: return new BusAnimation()
|
||||
@ -139,7 +168,8 @@ public class XFactory556mm {
|
||||
.addBus("BULLET", new BusAnimationSequence().addPos(empty ? 1 : 0, 0, 0, 0));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(-25, 0, 0, 250, IType.SIN_FULL).addPos(-25, 0, 0, 1250).addPos(0, 0, 0, 350, IType.SIN_FULL))
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100).addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100));
|
||||
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100).addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100))
|
||||
.addBus("PLUG", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100).addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -2,6 +2,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumCasingType;
|
||||
@ -15,6 +16,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
@ -53,7 +55,8 @@ public class XFactory9mm {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_GREASEGUN))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_GREASEGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_GREASEGUN)
|
||||
).setUnlocalizedName("gun_greasegun");
|
||||
).setNameMutator(LAMBDA_NAME_GREASEGUN)
|
||||
.setUnlocalizedName("gun_greasegun");
|
||||
|
||||
ModItems.gun_lag = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(1_700).draw(7).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
@ -75,7 +78,8 @@ public class XFactory9mm {
|
||||
.setupStandardFire().recoil(LAMBDA_RECOIL_UZI))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI)
|
||||
).setUnlocalizedName("gun_uzi");
|
||||
).setNameMutator(LAMBDA_NAME_UZI)
|
||||
.setUnlocalizedName("gun_uzi");
|
||||
ModItems.gun_uzi_akimbo = new ItemGunBaseNT(WeaponQuality.B_SIDE,
|
||||
new GunConfig().dura(3_000).draw(15).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
@ -98,6 +102,16 @@ public class XFactory9mm {
|
||||
).setUnlocalizedName("gun_uzi_akimbo");
|
||||
}
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_GREASEGUN = (stack) -> {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_GREASEGUN_CLEAN)) return stack.getUnlocalizedName() + "_m3";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static Function<ItemStack, String> LAMBDA_NAME_UZI = (stack) -> {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER)) return stack.getUnlocalizedName() + "_richter";
|
||||
return null;
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_GREASEGUN = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil(2, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
|
||||
};
|
||||
|
||||
@ -13,7 +13,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MagazineBelt implements IMagazine<BulletConfig> {
|
||||
|
||||
protected List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
public List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
|
||||
public MagazineBelt addConfigs(BulletConfig... cfgs) { for(BulletConfig cfg : cfgs) acceptedBullets.add(cfg); return this; }
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
public static final String KEY_MAG_PREV = "magprev";
|
||||
public static final String KEY_MAG_AFTER = "magafter";
|
||||
|
||||
protected List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
public List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
|
||||
/** A number so the gun tell multiple mags apart */
|
||||
public int index;
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory556mm;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeapnModG3SawedOff extends WeaponModBase {
|
||||
|
||||
public WeapnModG3SawedOff(int id) {
|
||||
super(id, "SHIELD");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.I_DRAWDURATION) return cast(5, base);
|
||||
if(key == GunConfig.FUN_ANIMNATIONS) return (T) LAMBDA_G3_ANIMS;
|
||||
return base;
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
}
|
||||
return XFactory556mm.LAMBDA_G3_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
@ -1,6 +1,11 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
public abstract class WeaponModBase implements IWeaponMod {
|
||||
|
||||
public static final int PRIORITY_SET = Integer.MAX_VALUE;
|
||||
public static final int PRIORITY_MULTIPLICATIVE = 1_000;
|
||||
public static final int PRIORITY_ADDITIVE = 500;
|
||||
public static final int PRIORITY_MULT_FINAL = -1;
|
||||
|
||||
public String[] slots;
|
||||
public int priority = 0;
|
||||
@ -20,5 +25,5 @@ public abstract class WeaponModBase implements IWeaponMod {
|
||||
* @param Any value with the type that should be cast to
|
||||
* @return
|
||||
*/
|
||||
public <T> T fagSlop(Object arg, T castTo) { return (T) arg; } //TODO: rename this to something more tactful
|
||||
public <T> T cast(Object arg, T castTo) { return (T) arg; }
|
||||
}
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineBelt;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModCaliber extends WeaponModBase {
|
||||
|
||||
protected static MagazineSingleReload DUMMY_SINGLE = new MagazineSingleReload(0, 0);
|
||||
protected static MagazineFullReload DUMMY_FULL = new MagazineFullReload(0, 0);
|
||||
protected static MagazineBelt DUMMY_BELT = new MagazineBelt();
|
||||
protected final List<BulletConfig> cfg = new ArrayList();
|
||||
protected final int count;
|
||||
protected final float baseDamage;
|
||||
|
||||
public WeaponModCaliber(int id, int count, float baseDamage, BulletConfig... cfg) {
|
||||
super(id, "CALIBER");
|
||||
this.setPriority(PRIORITY_SET);
|
||||
for(BulletConfig conf : cfg) this.cfg.add(conf);
|
||||
this.count = count;
|
||||
this.baseDamage = baseDamage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.O_MAGAZINE) {
|
||||
if(base instanceof MagazineSingleReload) {
|
||||
MagazineSingleReload original = (MagazineSingleReload) base;
|
||||
DUMMY_SINGLE.acceptedBullets = cfg;
|
||||
DUMMY_SINGLE.capacity = count;
|
||||
DUMMY_SINGLE.index = original.index;
|
||||
return (T) DUMMY_SINGLE;
|
||||
}
|
||||
if(base instanceof MagazineFullReload) {
|
||||
MagazineFullReload original = (MagazineFullReload) base;
|
||||
DUMMY_FULL.acceptedBullets = cfg;
|
||||
DUMMY_FULL.capacity = count;
|
||||
DUMMY_FULL.index = original.index;
|
||||
return (T) DUMMY_FULL;
|
||||
}
|
||||
if(base instanceof MagazineBelt) {
|
||||
MagazineBelt original = (MagazineBelt) base;
|
||||
DUMMY_BELT.acceptedBullets = cfg;
|
||||
return (T) DUMMY_BELT;
|
||||
}
|
||||
}
|
||||
if(key == Receiver.F_BASEDAMAGE) {
|
||||
return cast(baseDamage, base);
|
||||
}
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModChoke extends WeaponModBase {
|
||||
|
||||
public WeaponModChoke(int id) {
|
||||
super(id, "BARREL");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.F_SPREADAMMO) { return cast((Float) base * 0.5F, base); }
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModGenericDamage extends WeaponModBase {
|
||||
|
||||
public WeaponModGenericDamage(int id) {
|
||||
super(id, "GENERIC_DAMAGE");
|
||||
this.setPriority(PRIORITY_MULTIPLICATIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.F_BASEDAMAGE && base instanceof Float) {
|
||||
return cast((Float) base * 1.33F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModGenericDurability extends WeaponModBase {
|
||||
|
||||
public WeaponModGenericDurability(int id) {
|
||||
super(id, "GENERIC_DURABILITY");
|
||||
this.setPriority(PRIORITY_MULTIPLICATIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof GunConfig && key == GunConfig.F_DURABILITY && base instanceof Float) {
|
||||
return cast((Float) base * 2F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.Orchestras;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.helper.CasingCreator;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModGreasegun extends WeaponModBase {
|
||||
|
||||
public WeaponModGreasegun(int id) {
|
||||
super(id, "FURNITURE");
|
||||
this.setPriority(PRIORITY_ADDITIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.F_DURABILITY) return cast((Float) base * 3F, base);
|
||||
if(key == Receiver.F_BASEDAMAGE) return cast((Float) base + 2F, base);
|
||||
if(key == Receiver.F_SPREADINNATE) return cast(0F, base);
|
||||
if(key == Receiver.I_DELAYAFTERFIRE) return cast((Integer) base / 2, base);
|
||||
if(key == GunConfig.CON_ORCHESTRA) return (T) ORCHESTRA_GREASEGUN;
|
||||
return base;
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_GREASEGUN = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
if(timer == 1) {
|
||||
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
|
||||
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.55, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -7.5F + (float)entity.getRNG().nextGaussian() * 5F, 12F + (float)entity.getRNG().nextGaussian() * 5F, casing.getName());
|
||||
}
|
||||
return;
|
||||
}
|
||||
Orchestras.ORCHESTRA_GREASEGUN.accept(stack, ctx);
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory12ga;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModLiberatorSpeedloader extends WeaponModBase {
|
||||
|
||||
public static MagazineFullReload MAG = new MagazineFullReload(0, 4);
|
||||
|
||||
public WeaponModLiberatorSpeedloader(int id) {
|
||||
super(id, "SPEEDLOADER");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.FUN_ANIMNATIONS) { return (T) LAMBDA_LIBERATOR_ANIMS; }
|
||||
if(parent instanceof Receiver && base instanceof IMagazine && key == Receiver.O_MAGAZINE) {
|
||||
MagazineSingleReload originalMag = (MagazineSingleReload) base;
|
||||
if(MAG.acceptedBullets.isEmpty()) MAG.acceptedBullets.addAll(originalMag.acceptedBullets);
|
||||
return (T) MAG;
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(0, 0, 0, 100).addPos(60, 0, 0, 350, IType.SIN_DOWN))
|
||||
.addBus("SHELL1", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL2", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL3", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP))
|
||||
.addBus("SHELL4", new BusAnimationSequence().addPos(2, -4, -2, 0).addPos(2, -4, -2, 400).addPos(0, 0, -2, 450, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case RELOAD_END: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50).addPos(0, 0, 0, 550).addPos(15, 0, 0, 100).addPos(15, 0, 0, 600).addPos(0, 0, 0, 50))
|
||||
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP).addPos(0, 0, 0, 600).addPos(45, 0, 0, 250, IType.SIN_DOWN).addPos(45, 0, 0, 300).addPos(0, 0, 0, 150, IType.SIN_UP));
|
||||
}
|
||||
|
||||
return XFactory12ga.LAMBDA_LIBERATOR_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.Orchestras;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory44;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory762mm;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
public class WeaponModMASBayonet extends WeaponModBase {
|
||||
|
||||
public WeaponModMASBayonet(int id) {
|
||||
super(id, "BAYONET");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.FUN_ANIMNATIONS) return (T) LAMBDA_MAS36_ANIMS;
|
||||
if(key == GunConfig.I_INSPECTDURATION) return cast(30, base);
|
||||
if(key == GunConfig.CON_ONPRESSSECONDARY) return (T) XFactory44.SMACK_A_FUCKER;
|
||||
if(key == GunConfig.CON_ORCHESTRA) return (T) ORCHESTRA_MAS36;
|
||||
if(key == GunConfig.I_INSPECTCANCEL) return cast(false, base);
|
||||
return base;
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_MAS36 = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
if(entity.worldObj.isRemote) return;
|
||||
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
|
||||
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
|
||||
|
||||
if(type == AnimType.INSPECT) {
|
||||
|
||||
if(timer == 15 && ctx.getPlayer() != null) {
|
||||
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D);
|
||||
if(mop != null) {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
|
||||
float damage = 10F;
|
||||
mop.entityHit.attackEntityFrom(DamageSource.causePlayerDamage(ctx.getPlayer()), damage);
|
||||
mop.entityHit.motionX *= 2;
|
||||
mop.entityHit.motionZ *= 2;
|
||||
entity.worldObj.playSoundAtEntity(mop.entityHit, "hbm:weapon.fire.stab", 1F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
Block b = entity.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
entity.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, b.stepSound.getStepResourcePath(), 2F, 0.9F + entity.getRNG().nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Orchestras.ORCHESTRA_MAS36.accept(stack, ctx);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MAS36_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("STAB", new BusAnimationSequence().addPos(0, 1, -2, 250, IType.SIN_DOWN).hold(250).addPos(0, 1, 5, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
}
|
||||
|
||||
return XFactory762mm.LAMBDA_MAS36_ANIMS.apply(stack, type);
|
||||
};
|
||||
}
|
||||
@ -8,7 +8,20 @@ import java.util.List;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory9mm;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModCaliber;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModGeneric;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModSpecial;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumModTest;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory22lr;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory357;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory44;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory45;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory50;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory556mm;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory762mm;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -35,15 +48,139 @@ public class WeaponModManager {
|
||||
public static void init() {
|
||||
|
||||
/* ORDER MATTERS! */
|
||||
/* CTOR contains registering to the ID_LIST, avoid reordering to prevent ID shifting! */
|
||||
IWeaponMod TEST_FIRERATE = new WeaponModTestFirerate(0);
|
||||
IWeaponMod TEST_DAMAGE = new WeaponModTestDamage(1);
|
||||
IWeaponMod TEST_MULTI = new WeaponModTestMulti(2);
|
||||
/* CTOR contains registering to the idToMod, avoid reordering to prevent ID shifting! */
|
||||
/// TEST ///
|
||||
IWeaponMod TEST_FIRERATE = new WeaponModTestFirerate(0, "FIRERATE");
|
||||
IWeaponMod TEST_DAMAGE = new WeaponModTestDamage(1, "DAMAGE");
|
||||
IWeaponMod TEST_MULTI = new WeaponModTestMulti(2, "MULTI");
|
||||
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.FIRERATE.ordinal())).addDefault(TEST_FIRERATE);
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.DAMAGE.ordinal())).addDefault(TEST_DAMAGE);
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_test, 1, EnumModTest.MULTI.ordinal())).addDefault(TEST_MULTI);
|
||||
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_generic, 1, EnumModGeneric.IRON_DAMAGE.ordinal())).addMod(ModItems.gun_pepperbox, new WeaponModGenericDamage(100));
|
||||
new WeaponModDefinition(new ItemStack(ModItems.weapon_mod_generic, 1, EnumModGeneric.IRON_DURA.ordinal())).addMod(ModItems.gun_pepperbox, new WeaponModGenericDurability(101));
|
||||
|
||||
Item[] steelGuns = new Item[] {
|
||||
ModItems.gun_light_revolver, ModItems.gun_light_revolver_atlas,
|
||||
ModItems.gun_henry,
|
||||
ModItems.gun_henry_lincoln,
|
||||
ModItems.gun_greasegun,
|
||||
ModItems.gun_maresleg, ModItems.gun_maresleg_akimbo,
|
||||
ModItems.gun_flaregun };
|
||||
Item[] duraGuns = new Item[] {
|
||||
ModItems.gun_am180,
|
||||
ModItems.gun_liberator,
|
||||
ModItems.gun_congolake,
|
||||
ModItems.gun_flamer,
|
||||
ModItems.gun_flamer_topaz };
|
||||
Item[] deshGuns = new Item[] {
|
||||
ModItems.gun_heavy_revolver,
|
||||
ModItems.gun_carbine,
|
||||
ModItems.gun_uzi, ModItems.gun_uzi_akimbo,
|
||||
ModItems.gun_spas12,
|
||||
ModItems.gun_panzerschreck };
|
||||
Item[] wsteelGuns = new Item[] {
|
||||
ModItems.gun_g3,
|
||||
ModItems.gun_stinger,
|
||||
ModItems.gun_chemthrower };
|
||||
Item[] ferroGuns = new Item[] {
|
||||
ModItems.gun_m2,
|
||||
ModItems.gun_autoshotgun, ModItems.gun_autoshotgun_shredder,
|
||||
ModItems.gun_quadro };
|
||||
Item[] tcalloyGuns = new Item[] {
|
||||
ModItems.gun_lag,
|
||||
ModItems.gun_minigun,
|
||||
ModItems.gun_missile_launcher,
|
||||
ModItems.gun_tesla_cannon };
|
||||
Item[] bigmtGuns = new Item[] {
|
||||
ModItems.gun_stg77,
|
||||
ModItems.gun_fatman,
|
||||
ModItems.gun_tau };
|
||||
Item[] bronzeGuns = new Item[] {
|
||||
ModItems.gun_lasrifle };
|
||||
|
||||
new WeaponModDefinition(EnumModGeneric.STEEL_DAMAGE).addMod(steelGuns, new WeaponModGenericDamage(102));
|
||||
new WeaponModDefinition(EnumModGeneric.STEEL_DURA).addMod(steelGuns, new WeaponModGenericDurability(103));
|
||||
new WeaponModDefinition(EnumModGeneric.DURA_DAMAGE).addMod(duraGuns, new WeaponModGenericDamage(104));
|
||||
new WeaponModDefinition(EnumModGeneric.DURA_DURA).addMod(duraGuns, new WeaponModGenericDurability(105));
|
||||
new WeaponModDefinition(EnumModGeneric.DESH_DAMAGE).addMod(deshGuns, new WeaponModGenericDamage(106));
|
||||
new WeaponModDefinition(EnumModGeneric.DESH_DURA).addMod(deshGuns, new WeaponModGenericDurability(107));
|
||||
new WeaponModDefinition(EnumModGeneric.WSTEEL_DAMAGE).addMod(wsteelGuns, new WeaponModGenericDamage(108));
|
||||
new WeaponModDefinition(EnumModGeneric.WSTEEL_DURA).addMod(wsteelGuns, new WeaponModGenericDurability(109));
|
||||
new WeaponModDefinition(EnumModGeneric.FERRO_DAMAGE).addMod(ferroGuns, new WeaponModGenericDamage(110));
|
||||
new WeaponModDefinition(EnumModGeneric.FERRO_DURA).addMod(ferroGuns, new WeaponModGenericDurability(111));
|
||||
new WeaponModDefinition(EnumModGeneric.TCALLOY_DAMAGE).addMod(tcalloyGuns, new WeaponModGenericDamage(112));
|
||||
new WeaponModDefinition(EnumModGeneric.TCALLOY_DURA).addMod(tcalloyGuns, new WeaponModGenericDurability(113));
|
||||
new WeaponModDefinition(EnumModGeneric.BIGMT_DAMAGE).addMod(bigmtGuns, new WeaponModGenericDamage(114));
|
||||
new WeaponModDefinition(EnumModGeneric.BIGMT_DURA).addMod(bigmtGuns, new WeaponModGenericDurability(115));
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DAMAGE).addMod(bronzeGuns, new WeaponModGenericDamage(116));
|
||||
new WeaponModDefinition(EnumModGeneric.BRONZE_DURA).addMod(bronzeGuns, new WeaponModGenericDurability(117));
|
||||
|
||||
new WeaponModDefinition(EnumModSpecial.SPEEDLOADER).addMod(ModItems.gun_liberator, new WeaponModLiberatorSpeedloader(200));
|
||||
new WeaponModDefinition(EnumModSpecial.SILENCER).addMod(new Item[] {ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_g3}, new WeaponModSilencer(ID_SILENCER));
|
||||
new WeaponModDefinition(EnumModSpecial.SCOPE).addMod(new Item[] {ModItems.gun_heavy_revolver, ModItems.gun_g3, ModItems.gun_mas36}, new WeaponModScope(ID_SCOPE));
|
||||
new WeaponModDefinition(EnumModSpecial.SAW)
|
||||
.addMod(new Item[] {ModItems.gun_maresleg, ModItems.gun_double_barrel}, new WeaponModSawedOff(ID_SAWED_OFF))
|
||||
.addMod(ModItems.gun_panzerschreck, new WeaponModPanzerschreckSawedOff(ID_NO_SHIELD))
|
||||
.addMod(ModItems.gun_g3, new WeapnModG3SawedOff(ID_NO_STOCK));
|
||||
new WeaponModDefinition(EnumModSpecial.GREASEGUN).addMod(ModItems.gun_greasegun, new WeaponModGreasegun(ID_GREASEGUN_CLEAN));
|
||||
new WeaponModDefinition(EnumModSpecial.SLOWDOWN).addMod(ModItems.gun_minigun, new WeaponModSlowdown(207));
|
||||
new WeaponModDefinition(EnumModSpecial.SPEEDUP)
|
||||
.addMod(ModItems.gun_minigun, new WeaponModMinigunSpeedup(208))
|
||||
.addMod(new Item[] {ModItems.gun_autoshotgun, ModItems.gun_autoshotgun_shredder}, new WeaponModShredderSpeedup(209));
|
||||
new WeaponModDefinition(EnumModSpecial.CHOKE).addMod(new Item[] {ModItems.gun_pepperbox, ModItems.gun_maresleg, ModItems.gun_double_barrel, ModItems.gun_liberator, ModItems.gun_spas12}, new WeaponModChoke(210));
|
||||
new WeaponModDefinition(EnumModSpecial.FURNITURE_GREEN).addMod(ModItems.gun_g3, new WeaponModPolymerFurniture(ID_FURNITURE_GREEN));
|
||||
new WeaponModDefinition(EnumModSpecial.FURNITURE_BLACK).addMod(ModItems.gun_g3, new WeaponModPolymerFurniture(ID_FURNITURE_BLACK));
|
||||
new WeaponModDefinition(EnumModSpecial.BAYONET).addMod(ModItems.gun_mas36, new WeaponModMASBayonet(ID_MAS_BAYONET));
|
||||
new WeaponModDefinition(EnumModSpecial.STACK_MAG).addMod(new Item[] {ModItems.gun_greasegun, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_aberrator, ModItems.gun_aberrator_eott}, new WeaponModStackMag(214));
|
||||
|
||||
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};
|
||||
BulletConfig[] p22 = new BulletConfig[] {XFactory22lr.p22_sp, XFactory22lr.p22_fmj, XFactory22lr.p22_jhp, XFactory22lr.p22_ap};
|
||||
BulletConfig[] m357 = new BulletConfig[] {XFactory357.m357_sp, XFactory357.m357_fmj, XFactory357.m357_jhp, XFactory357.m357_ap, XFactory357.m357_express};
|
||||
BulletConfig[] m44 = new BulletConfig[] {XFactory44.m44_sp, XFactory44.m44_fmj, XFactory44.m44_jhp, XFactory44.m44_ap, XFactory44.m44_express};
|
||||
BulletConfig[] r556 = new BulletConfig[] {XFactory556mm.r556_sp, XFactory556mm.r556_fmj, XFactory556mm.r556_jhp, XFactory556mm.r556_ap};
|
||||
BulletConfig[] r762 = new BulletConfig[] {XFactory762mm.r762_sp, XFactory762mm.r762_fmj, XFactory762mm.r762_jhp, XFactory762mm.r762_ap, XFactory762mm.r762_du, XFactory762mm.r762_he};
|
||||
BulletConfig[] bmg50 = new BulletConfig[] {XFactory50.bmg50_sp, XFactory50.bmg50_fmj, XFactory50.bmg50_jhp, XFactory50.bmg50_ap, XFactory50.bmg50_du, XFactory50.bmg50_he};
|
||||
new WeaponModDefinition(EnumModCaliber.P9)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(300, 28, 10F, p9));
|
||||
new WeaponModDefinition(EnumModCaliber.P45)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(310, 28, 10F, p45))
|
||||
.addMod(ModItems.gun_greasegun, new WeaponModCaliber(311, 24, 3F, p45))
|
||||
.addMod(ModItems.gun_uzi, new WeaponModCaliber(312, 24, 3F, p45))
|
||||
.addMod(ModItems.gun_uzi_akimbo, new WeaponModCaliber(313, 24, 3F, p45))
|
||||
.addMod(ModItems.gun_lag, new WeaponModCaliber(314, 24, 25F, p45));
|
||||
new WeaponModDefinition(EnumModCaliber.P22)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(320, 28, 10F, p22))
|
||||
.addMod(ModItems.gun_uzi, new WeaponModCaliber(321, 40, 3F, p22))
|
||||
.addMod(ModItems.gun_uzi_akimbo, new WeaponModCaliber(322, 40, 3F, p22));
|
||||
new WeaponModDefinition(EnumModCaliber.M357)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(330, 20, 10F, m357))
|
||||
.addMod(ModItems.gun_lag, new WeaponModCaliber(331, 15, 25F, m357));
|
||||
new WeaponModDefinition(EnumModCaliber.M44)
|
||||
.addMod(ModItems.gun_lag, new WeaponModCaliber(340, 13, 25F, m44));
|
||||
new WeaponModDefinition(EnumModCaliber.R556)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(350, 10, 10F, r556))
|
||||
.addMod(ModItems.gun_carbine, new WeaponModCaliber(351, 20, 15F, r556))
|
||||
.addMod(ModItems.gun_minigun, new WeaponModCaliber(352, 0, 6F, r556));
|
||||
new WeaponModDefinition(EnumModCaliber.R762)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(360, 8, 10F, r762))
|
||||
.addMod(ModItems.gun_g3, new WeaponModCaliber(361, 24, 5F, r762));
|
||||
new WeaponModDefinition(EnumModCaliber.BMG50)
|
||||
.addMod(ModItems.gun_henry, new WeaponModCaliber(370, 5, 10F, bmg50))
|
||||
.addMod(ModItems.gun_minigun, new WeaponModCaliber(371, 0, 6F, bmg50));
|
||||
}
|
||||
|
||||
public static final int ID_SILENCER = 201;
|
||||
public static final int ID_SCOPE = 202;
|
||||
public static final int ID_SAWED_OFF = 203;
|
||||
public static final int ID_NO_SHIELD = 204;
|
||||
public static final int ID_NO_STOCK = 205;
|
||||
public static final int ID_GREASEGUN_CLEAN = 206;
|
||||
public static final int ID_FURNITURE_GREEN = 211;
|
||||
public static final int ID_FURNITURE_BLACK = 212;
|
||||
public static final int ID_MAS_BAYONET = 213;
|
||||
|
||||
public static ItemStack[] getUpgradeItems(ItemStack stack, int cfg) {
|
||||
if(!stack.hasTagCompound()) return new ItemStack[0];
|
||||
@ -60,6 +197,15 @@ public class WeaponModManager {
|
||||
return mods;
|
||||
}
|
||||
|
||||
public static boolean hasUpgrade(ItemStack stack, int cfg, int id) {
|
||||
if(!stack.hasTagCompound()) return false;
|
||||
int[] modIds = stack.stackTagCompound.getIntArray(KEY_MOD_LIST + cfg);
|
||||
for(int i = 0; i < modIds.length; i++) {
|
||||
if(modIds[i] == id) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Installs the supplied mods to the gun */
|
||||
public static void install(ItemStack stack, int cfg, ItemStack... mods) {
|
||||
List<IWeaponMod> toInstall = new ArrayList();
|
||||
@ -104,7 +250,9 @@ public class WeaponModManager {
|
||||
|
||||
if(checkMutex) for(int i : gun.stackTagCompound.getIntArray(KEY_MOD_LIST + cfg)) {
|
||||
IWeaponMod iMod = idToMod.get(i);
|
||||
if(iMod != null) for(String mutex0 : newMod.getSlots()) for(String mutex1 : iMod.getSlots()) if(mutex0.equals(mutex1)) return false; //if any of the mod's slots are already taken
|
||||
if(iMod != null) for(String mutex0 : newMod.getSlots()) for(String mutex1 : iMod.getSlots()) {
|
||||
if(mutex0.equals(mutex1)) return false; //if any of the mod's slots are already taken
|
||||
}
|
||||
}
|
||||
|
||||
return true; //yippie!
|
||||
@ -143,12 +291,30 @@ public class WeaponModManager {
|
||||
this.stack = stack;
|
||||
stackToMod.put(new ComparableStack(stack), this);
|
||||
}
|
||||
|
||||
public WeaponModDefinition(EnumModGeneric num) {
|
||||
this(new ItemStack(ModItems.weapon_mod_generic, 1, num.ordinal()));
|
||||
}
|
||||
|
||||
public WeaponModDefinition(EnumModSpecial num) {
|
||||
this(new ItemStack(ModItems.weapon_mod_special, 1, num.ordinal()));
|
||||
}
|
||||
|
||||
public WeaponModDefinition(EnumModCaliber num) {
|
||||
this(new ItemStack(ModItems.weapon_mod_caliber, 1, num.ordinal()));
|
||||
}
|
||||
|
||||
public WeaponModDefinition addMod(ItemStack gun, IWeaponMod mod) { return addMod(new ComparableStack(gun), mod); }
|
||||
public WeaponModDefinition addMod(Item gun, IWeaponMod mod) { return addMod(new ComparableStack(gun), mod); }
|
||||
public WeaponModDefinition addMod(Item[] gun, IWeaponMod mod) { for(Item item : gun) addMod(new ComparableStack(item), mod); return this; }
|
||||
public WeaponModDefinition addMod(ComparableStack gun, IWeaponMod mod) {
|
||||
modByGun.put(gun, mod);
|
||||
modToStack.put(mod, stack);
|
||||
if(gun != null) {
|
||||
ItemGunBaseNT nt = (ItemGunBaseNT) gun.item;
|
||||
ComparableStack comp = new ComparableStack(stack);
|
||||
if(!nt.recognizedMods.contains(comp)) nt.recognizedMods.add(comp);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModMinigunSpeedup extends WeaponModBase {
|
||||
|
||||
public WeaponModMinigunSpeedup(int id) {
|
||||
super(id, "SPEED");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.I_ROUNDSPERCYCLE) return cast((Integer) base * 3, base);
|
||||
if(key == Receiver.F_SPREADINNATE) return cast((Float) base * 1.5F, base);
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.items.weapon.sedna.factory.Lego;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactoryRocket;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.util.EntityDamageUtil;
|
||||
import com.hbm.util.DamageResistanceHandler.DamageClass;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModPanzerschreckSawedOff extends WeaponModBase {
|
||||
|
||||
public WeaponModPanzerschreckSawedOff(int id) {
|
||||
super(id, "SHIELD");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == GunConfig.I_DRAWDURATION) return cast(5, base);
|
||||
if(key == Receiver.CON_ONFIRE) { return (T) LAMBDA_FIRE; }
|
||||
return base;
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_DOWN));
|
||||
}
|
||||
return XFactoryRocket.LAMBDA_PANZERSCHRECK_ANIMS.apply(stack, type);
|
||||
};
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
|
||||
Lego.LAMBDA_STANDARD_FIRE.accept(stack, ctx);
|
||||
if(ctx.entity != null) {
|
||||
HbmLivingProps.getData(ctx.entity).fire += 100;
|
||||
EntityDamageUtil.attackEntityFromNT(ctx.entity, BulletConfig.getDamage(ctx.entity, ctx.entity, DamageClass.FIRE), 4F, true, false, 0F, 0F, 0F);
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModPolymerFurniture extends WeaponModBase {
|
||||
|
||||
public WeaponModPolymerFurniture(int id) {
|
||||
super(id, "FURNITURE");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.CON_ONRECOIL) return (T) LAMBDA_RECOIL_G3;
|
||||
return base;
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_G3 = (stack, ctx) -> {
|
||||
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.125), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.125));
|
||||
};
|
||||
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory12ga;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModSawedOff extends WeaponModBase {
|
||||
|
||||
public WeaponModSawedOff(int id) {
|
||||
super(id, "BARREL");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(key == Receiver.F_SPREADINNATE) { return cast(Math.max(0.025F, (Float) base), base); }
|
||||
if(key == Receiver.F_SPREADAMMO) { return cast((Float) base * 1.5F, base); }
|
||||
if(key == Receiver.F_BASEDAMAGE) { return cast((Float) base * 1.35F, base); }
|
||||
|
||||
if(gun.getItem() == ModItems.gun_maresleg) {
|
||||
if(key == GunConfig.FUN_ANIMNATIONS) return (T) XFactory12ga.LAMBDA_MARESLEG_SHORT_ANIMS;
|
||||
if(key == GunConfig.I_DRAWDURATION) return cast(5, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.factory.XFactory44;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModScope extends WeaponModBase {
|
||||
|
||||
public WeaponModScope(int id) {
|
||||
super(id, "SCOPE");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(key == GunConfig.O_SCOPETEXTURE) {
|
||||
return (T) XFactory44.scope_lilmac;
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModShredderSpeedup extends WeaponModBase {
|
||||
|
||||
public WeaponModShredderSpeedup(int id) {
|
||||
super(id, "SPEED");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.I_DELAYAFTERFIRE) return cast((Integer) base / 2, base);
|
||||
if(key == Receiver.I_DELAYAFTERDRYFIRE) return cast((Integer) base / 2, base);
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModSilencer extends WeaponModBase {
|
||||
|
||||
public WeaponModSilencer(int id) {
|
||||
super(id, "SILENCER");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(key == Receiver.S_FIRESOUND) {
|
||||
return (T) "hbm:weapon.fire.silenced";
|
||||
}
|
||||
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModSlowdown extends WeaponModBase {
|
||||
|
||||
public WeaponModSlowdown(int id) {
|
||||
super(id, "SPEED");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.I_DELAYAFTERFIRE) return cast((Integer) base * 2, base);
|
||||
if(key == Receiver.F_SPREADINNATE) return cast(0F, base);
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.hbm.items.weapon.sedna.mods;
|
||||
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class WeaponModStackMag extends WeaponModBase {
|
||||
|
||||
// we can get away with reusing and re-adjusting these single instances because magazines
|
||||
// aren't permanent objects, they are not cached anywhere, a magazine is only relevant
|
||||
// for accessing the itemstack's ammo info and for the state machine's reload operation
|
||||
protected static MagazineSingleReload DUMMY_SINGLE = new MagazineSingleReload(0, 0);
|
||||
protected static MagazineFullReload DUMMY_FULL = new MagazineFullReload(0, 0);
|
||||
|
||||
public WeaponModStackMag(int id) {
|
||||
super(id, "MAG");
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
if(key == Receiver.O_MAGAZINE) {
|
||||
if(base instanceof MagazineSingleReload) {
|
||||
MagazineSingleReload original = (MagazineSingleReload) base;
|
||||
DUMMY_SINGLE.acceptedBullets = original.acceptedBullets;
|
||||
DUMMY_SINGLE.capacity = original.capacity * 3 / 2;
|
||||
DUMMY_SINGLE.index = original.index;
|
||||
return (T) DUMMY_SINGLE;
|
||||
}
|
||||
if(base instanceof MagazineFullReload) {
|
||||
MagazineFullReload original = (MagazineFullReload) base;
|
||||
DUMMY_FULL.acceptedBullets = original.acceptedBullets;
|
||||
DUMMY_FULL.capacity = original.capacity * 3 / 2;
|
||||
DUMMY_FULL.index = original.index;
|
||||
return (T) DUMMY_FULL;
|
||||
}
|
||||
}
|
||||
return base;
|
||||
}
|
||||
}
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestDamage extends WeaponModBase {
|
||||
|
||||
public WeaponModTestDamage(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.F_BASEDAMAGE && base instanceof Float) {
|
||||
return fagSlop((Float) base * 1.5F, base);
|
||||
return cast((Float) base * 1.5F, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestFirerate extends WeaponModBase {
|
||||
|
||||
public WeaponModTestFirerate(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.I_DELAYAFTERFIRE && base instanceof Integer) {
|
||||
return fagSlop(Math.max((Integer) base / 2, 1), base);
|
||||
return cast(Math.max((Integer) base / 2, 1), base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -8,13 +8,14 @@ public class WeaponModTestMulti extends WeaponModBase {
|
||||
|
||||
public WeaponModTestMulti(int id, String... slots) {
|
||||
super(id, slots);
|
||||
this.setPriority(PRIORITY_MULT_FINAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
|
||||
|
||||
if(parent instanceof Receiver && key == Receiver.I_ROUNDSPERCYCLE && base instanceof Integer) {
|
||||
return fagSlop((Integer) base * 3, base);
|
||||
return cast((Integer) base * 3, base);
|
||||
}
|
||||
|
||||
return base;
|
||||
|
||||
@ -308,7 +308,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.arc_electrode, EnumElectrodeType.DESH), new Object[] { "C", "T", "C", 'C', DESH.ingot(), 'T', W.ingot() });
|
||||
addRecipeAuto(DictFrame.fromOne(ModItems.arc_electrode, EnumElectrodeType.SATURNITE), new Object[] { "C", "T", "C", 'C', BIGMT.ingot(), 'T', NB.ingot() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator, 1), new Object[] { " W", "SC", "CE", 'S', STEEL.plate(), 'W', MINGRADE.wireFine(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'E', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator, 1), new Object[] { "C", "S", 'S', STEEL.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), });
|
||||
addShapelessAuto(new ItemStack(ModItems.detonator_multi, 1), new Object[] { ModItems.detonator, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) });
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator_laser, 1), new Object[] { "RRD", "PIC", " P", 'P', STEEL.plate(), 'R', REDSTONE.dust(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'D', DIAMOND.gem(), 'I', STEEL.ingot() });
|
||||
addRecipeAuto(new ItemStack(ModItems.detonator_laser, 1), new Object[] { "RRD", "PIC", " P", 'P', STEEL.plate(), 'R', REDSTONE.dust(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'D', EMERALD.gem(), 'I', STEEL.ingot() });
|
||||
|
||||
@ -3,8 +3,6 @@ package com.hbm.main;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockAshes;
|
||||
import com.hbm.blocks.generic.BlockCrate;
|
||||
import com.hbm.blocks.generic.BlockStorageCrate;
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.entity.mob.EntityHunterChopper;
|
||||
@ -61,7 +59,6 @@ import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.CustomNukeEntry;
|
||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom.EnumEntryType;
|
||||
import com.hbm.tileentity.machine.TileEntityNukeFurnace;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateBase;
|
||||
import com.hbm.util.*;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.wiaj.GuiWorldInAJar;
|
||||
@ -103,7 +100,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.play.client.C03PacketPlayer;
|
||||
import net.minecraft.network.play.client.C0CPacketInput;
|
||||
@ -121,7 +117,6 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.client.event.sound.PlaySoundEvent17;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@ -942,6 +942,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation henry_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/henry.png");
|
||||
public static final ResourceLocation henry_lincoln_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/henry_lincoln.png");
|
||||
public static final ResourceLocation greasegun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/greasegun.png");
|
||||
public static final ResourceLocation greasegun_clean_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/greasegun_clean.png");
|
||||
public static final ResourceLocation maresleg_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/maresleg.png");
|
||||
public static final ResourceLocation maresleg_broken_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/maresleg_broken.png");
|
||||
public static final ResourceLocation flaregun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flaregun.png");
|
||||
@ -959,6 +960,9 @@ public class ResourceManager {
|
||||
public static final ResourceLocation uzi_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/uzi.png");
|
||||
public static final ResourceLocation panzerschreck_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/panzerschreck.png");
|
||||
public static final ResourceLocation g3_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3.png");
|
||||
public static final ResourceLocation g3_green_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_green.png");
|
||||
public static final ResourceLocation g3_black_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_polymer_black.png");
|
||||
public static final ResourceLocation g3_attachments = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/g3_attachments.png");
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder.png");
|
||||
public static final ResourceLocation shredder_orig_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder_orig.png");
|
||||
public static final ResourceLocation sexy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sexy.png");
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.hbm.packet.threading;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* Abstract class for precompiled packets.
|
||||
* Contains no content of its own; purely for distinction between precompiling and normal packets.
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -172,6 +173,6 @@ public class ItemRenderDoubleBarrel extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
public boolean isSawedOff(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_double_barrel_sacred_dragon;
|
||||
return stack.getItem() == ModItems.gun_double_barrel_sacred_dragon || WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SAWED_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,6 +121,8 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
boolean isLoaded = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null) > 0;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_tex);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
@ -128,10 +130,10 @@ public class ItemRenderFatMan extends ItemRenderWeaponBase {
|
||||
ResourceManager.fatman.renderPart("Handle");
|
||||
ResourceManager.fatman.renderPart("Gauge");
|
||||
ResourceManager.fatman.renderPart("Lid");
|
||||
if(!isLoaded) GL11.glTranslated(0, 0, 3);
|
||||
ResourceManager.fatman.renderPart("Piston");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.fatman_mininuke_tex);
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
if(gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null) > 0) ResourceManager.fatman.renderPart("MiniNuke");
|
||||
if(isLoaded) ResourceManager.fatman.renderPart("MiniNuke");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,11 +3,13 @@ package com.hbm.render.item.weapon.sedna;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
|
||||
@ -17,24 +19,28 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
public float getViewFOV(ItemStack stack, float fov) {
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
return fov * (1 - aimingProgress * 0.33F);
|
||||
return fov * (1 - aimingProgress * (isScoped(stack) ? 0.66F : 0.33F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
boolean isScoped = this.isScoped(stack);
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.25F * offset, -1F * offset, 2.75F * offset,
|
||||
0, -3.5625 / 8D, 1.75);
|
||||
0, isScoped ? (-5.53125 / 8D) : (-3.5625 / 8D), isScoped ? 1.46875 : 1.75);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
boolean isScoped = this.isScoped(stack);
|
||||
if(isScoped && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(getTexture(stack));
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
@ -44,6 +50,7 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
|
||||
double[] speen = HbmAnimations.getRelevantTransformation("SPEEN");
|
||||
double[] bolt = HbmAnimations.getRelevantTransformation("BOLT");
|
||||
double[] plug = HbmAnimations.getRelevantTransformation("PLUG");
|
||||
double[] handle = HbmAnimations.getRelevantTransformation("HANDLE");
|
||||
double[] bullet = HbmAnimations.getRelevantTransformation("BULLET");
|
||||
|
||||
@ -60,10 +67,12 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.g3.renderPart("Rifle");
|
||||
ResourceManager.g3.renderPart("Stock");
|
||||
ResourceManager.g3.renderPart("Flash_Hider");
|
||||
ResourceManager.g3.renderPart("Trigger_Rifle.002");
|
||||
if(hasStock(stack)) ResourceManager.g3.renderPart("Stock");
|
||||
boolean silenced = hasSilencer(stack);
|
||||
if(!silenced) ResourceManager.g3.renderPart("Flash_Hider");
|
||||
ResourceManager.g3.renderPart("Trigger");
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(getTexture(stack));
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(mag[0], mag[1], mag[2]);
|
||||
GL11.glTranslated(0, -1.75, -0.5);
|
||||
@ -76,10 +85,20 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, bolt[2]);
|
||||
ResourceManager.g3.renderPart("Bolt");
|
||||
GL11.glTranslated(0, 0.625, 0);
|
||||
ResourceManager.g3.renderPart("Guide_And_Bolt");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.625, plug[2]);
|
||||
GL11.glRotated(handle[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, -0.625, 0);
|
||||
ResourceManager.g3.renderPart("Plug");
|
||||
|
||||
GL11.glTranslated(0, 0.625, 5.25);
|
||||
GL11.glRotated(22.5, 0, 0, 1);
|
||||
GL11.glRotated(handle[1], 0, 1, 0);
|
||||
GL11.glRotated(-22.5, 0, 0, 1);
|
||||
GL11.glTranslated(0, -0.625, -5.25);
|
||||
ResourceManager.g3.renderPart("Handle");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -87,27 +106,35 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
GL11.glTranslated(0, -0.875, -3.5);
|
||||
GL11.glRotated(-30 * (1 - ItemGunBaseNT.getMode(stack, 0)), 1, 0, 0);
|
||||
GL11.glTranslated(0, 0.875, 3.5);
|
||||
ResourceManager.g3.renderPart("Selector_Rifle.001");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.75;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 13);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.5D);
|
||||
ResourceManager.g3.renderPart("Selector");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
if(silenced || isScoped) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_attachments);
|
||||
if(silenced) ResourceManager.g3.renderPart("Silencer");
|
||||
if(isScoped) ResourceManager.g3.renderPart("Scope");
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 12);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(-25 + gun.shotRand * 10, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 10);
|
||||
GL11.glPopMatrix();
|
||||
if(!silenced) {
|
||||
double smokeScale = 0.75;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 13);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.5D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 12);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(-25 + gun.shotRand * 10, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 10);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -122,11 +149,19 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 0.875D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5, 0.5, 0);
|
||||
if(hasStock(stack)) {
|
||||
double scale = 0.875D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(hasSilencer(stack) ? 50 : 45, 0, 1, 0);
|
||||
GL11.glTranslated(hasSilencer(stack) ? 0.75 : -0.5, 0.5, 0);
|
||||
} else {
|
||||
double scale = 1.125D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(hasSilencer(stack) ? 55 : 45, 0, 1, 0); //preserves proportions whilst limiting size
|
||||
GL11.glTranslated(2.5, 0.5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -141,22 +176,49 @@ public class ItemRenderG3 extends ItemRenderWeaponBase {
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
boolean silenced = hasSilencer(stack);
|
||||
boolean isScoped = this.isScoped(stack);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(getTexture(stack));
|
||||
ResourceManager.g3.renderPart("Rifle");
|
||||
ResourceManager.g3.renderPart("Stock");
|
||||
if(hasStock(stack)) ResourceManager.g3.renderPart("Stock");
|
||||
ResourceManager.g3.renderPart("Magazine");
|
||||
ResourceManager.g3.renderPart("Flash_Hider");
|
||||
ResourceManager.g3.renderPart("Bolt");
|
||||
if(!silenced)ResourceManager.g3.renderPart("Flash_Hider");
|
||||
ResourceManager.g3.renderPart("Guide_And_Bolt");
|
||||
ResourceManager.g3.renderPart("Handle");
|
||||
ResourceManager.g3.renderPart("Trigger_Rifle.002");
|
||||
ResourceManager.g3.renderPart("Trigger");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, -0.875, -3.5);
|
||||
GL11.glRotated(-30, 1, 0, 0);
|
||||
GL11.glTranslated(0, 0.875, 3.5);
|
||||
ResourceManager.g3.renderPart("Selector_Rifle.001");
|
||||
ResourceManager.g3.renderPart("Selector");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(silenced || isScoped) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.g3_attachments);
|
||||
if(silenced) ResourceManager.g3.renderPart("Silencer");
|
||||
if(isScoped) ResourceManager.g3.renderPart("Scope");
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean hasStock(ItemStack stack) {
|
||||
return !WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK);
|
||||
}
|
||||
|
||||
public boolean hasSilencer(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER);
|
||||
}
|
||||
|
||||
public boolean isScoped(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE);
|
||||
}
|
||||
|
||||
public ResourceLocation getTexture(ItemStack stack) {
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_GREEN)) return ResourceManager.g3_green_tex;
|
||||
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_BLACK)) return ResourceManager.g3_black_tex;
|
||||
return ResourceManager.g3_tex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.item.weapon.sedna;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -34,7 +35,7 @@ public class ItemRenderGreasegun extends ItemRenderWeaponBase {
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.greasegun_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(isRefurbished(stack) ? ResourceManager.greasegun_clean_tex : ResourceManager.greasegun_tex);
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
@ -146,8 +147,12 @@ public class ItemRenderGreasegun extends ItemRenderWeaponBase {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.greasegun_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(isRefurbished(stack) ? ResourceManager.greasegun_clean_tex : ResourceManager.greasegun_tex);
|
||||
ResourceManager.greasegun.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean isRefurbished(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_GREASEGUN_CLEAN);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -116,12 +117,6 @@ public class ItemRenderHeavyRevolver extends ItemRenderWeaponBase {
|
||||
GL11.glTranslated(0.125, 2.5, 0);
|
||||
this.renderGapFlash(gun.lastShot[0]);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-9.5, 2.5, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
//this.renderMuzzleFlash(gun.lastShot);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -181,6 +176,6 @@ public class ItemRenderHeavyRevolver extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
public boolean isScoped(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_heavy_revolver_lilmac;
|
||||
return stack.getItem() == ModItems.gun_heavy_revolver_lilmac || WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import java.nio.DoubleBuffer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -20,7 +21,7 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
public float getViewFOV(ItemStack stack, float fov) {
|
||||
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
|
||||
return fov * (1 - aimingProgress * 0.33F);
|
||||
return fov * (1 - aimingProgress * (isScoped(stack) ? 0.66F : 0.33F));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -28,18 +29,24 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
|
||||
if(isScoped(stack)) {
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1.25F * offset, 1.75F * offset,
|
||||
0, -4.6825 / 8D, 0.75);
|
||||
/*standardAimingTransform(stack,
|
||||
-1.5F * offset, -1.25F * offset, 1.75F * offset,
|
||||
-0.2, -5.875 / 8D, 1.125);*/
|
||||
-0.2, -5.875 / 8D, 1.125);
|
||||
} else {
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1.25F * offset, 1.75F * offset,
|
||||
0, -4.6825 / 8D, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
private static DoubleBuffer buf = null;
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
boolean isScoped = isScoped(stack);
|
||||
if(isScoped && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
|
||||
if(buf == null) buf = GLAllocation.createDirectByteBuffer(8*4).asDoubleBuffer();
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
@ -57,16 +64,20 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
double[] showClip = HbmAnimations.getRelevantTransformation("SHOW_CLIP");
|
||||
double[] clip = HbmAnimations.getRelevantTransformation("CLIP");
|
||||
double[] bullets = HbmAnimations.getRelevantTransformation("BULLETS");
|
||||
double[] stab = HbmAnimations.getRelevantTransformation("STAB");
|
||||
|
||||
GL11.glTranslated(0, -3, -3);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 3, 3);
|
||||
|
||||
GL11.glTranslated(stab[0], stab[1], stab[2]);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.mas36.renderPart("Gun");
|
||||
if(hasBayonet(stack)) ResourceManager.mas36.renderPart("Bayonet");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.3125, -2.125);
|
||||
@ -88,7 +99,7 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
ResourceManager.mas36.renderPart("Bullet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
//ResourceManager.mas36.renderPart("Scope");
|
||||
if(isScoped) ResourceManager.mas36.renderPart("Scope");
|
||||
|
||||
if(showClip[0] != 0) {
|
||||
GL11.glPushMatrix();
|
||||
@ -161,8 +172,8 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
ResourceManager.mas36.renderPart("Gun");
|
||||
ResourceManager.mas36.renderPart("Stock");
|
||||
ResourceManager.mas36.renderPart("Bolt");
|
||||
//ResourceManager.mas36.renderPart("Scope");
|
||||
//ResourceManager.mas36.renderPart("Bayonet");
|
||||
if(isScoped(stack)) ResourceManager.mas36.renderPart("Scope");
|
||||
if(hasBayonet(stack)) ResourceManager.mas36.renderPart("Bayonet");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@ -175,9 +186,17 @@ public class ItemRenderMAS36 extends ItemRenderWeaponBase {
|
||||
ResourceManager.mas36.renderPart("Gun");
|
||||
ResourceManager.mas36.renderPart("Stock");
|
||||
ResourceManager.mas36.renderPart("Bolt");
|
||||
//ResourceManager.mas36.renderPart("Scope");
|
||||
if(isScoped(stack)) ResourceManager.mas36.renderPart("Scope");
|
||||
GL11.glTranslated(0, -1, -6);
|
||||
//ResourceManager.mas36.renderPart("Bayonet");
|
||||
if(hasBayonet(stack)) ResourceManager.mas36.renderPart("Bayonet");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean isScoped(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE);
|
||||
}
|
||||
|
||||
public boolean hasBayonet(ItemStack stack) {
|
||||
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_MAS_BAYONET);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -170,6 +171,6 @@ public class ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
public boolean getShort(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_maresleg_broken;
|
||||
return stack.getItem() == ModItems.gun_maresleg_broken || WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SAWED_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.item.weapon.sedna;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -53,7 +54,7 @@ public class ItemRenderPanzerschreck extends ItemRenderWeaponBase {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
ResourceManager.panzerschreck.renderPart("Tube");
|
||||
ResourceManager.panzerschreck.renderPart("Shield");
|
||||
if(hasShield(stack)) ResourceManager.panzerschreck.renderPart("Shield");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(rocket[0], rocket[1], rocket[2]);
|
||||
@ -104,7 +105,11 @@ public class ItemRenderPanzerschreck extends ItemRenderWeaponBase {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.panzerschreck_tex);
|
||||
ResourceManager.panzerschreck.renderPart("Tube");
|
||||
ResourceManager.panzerschreck.renderPart("Shield");
|
||||
if(hasShield(stack)) ResourceManager.panzerschreck.renderPart("Shield");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean hasShield(ItemStack stack) {
|
||||
return !WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_SHIELD);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.item.weapon.sedna;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -65,6 +66,9 @@ public class ItemRenderUzi extends ItemRenderWeaponBase {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.uzi.renderPart("Gun");
|
||||
|
||||
boolean silenced = hasSilencer(stack, 0);
|
||||
if(silenced) ResourceManager.uzi.renderPart("Silencer");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.3125D, -5.75);
|
||||
GL11.glRotated(180 - stockFront[0], 1, 0, 0);
|
||||
@ -88,23 +92,25 @@ public class ItemRenderUzi extends ItemRenderWeaponBase {
|
||||
if(bullet[0] == 1) ResourceManager.uzi.renderPart("Bullet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.75D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
if(!silenced) {
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.75D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -133,7 +139,7 @@ public class ItemRenderUzi extends ItemRenderWeaponBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
public void renderModTable(ItemStack stack, int index) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
@ -143,6 +149,34 @@ public class ItemRenderUzi extends ItemRenderWeaponBase {
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(hasSilencer(stack, index)) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
boolean silenced = hasSilencer(stack, 0);
|
||||
|
||||
if(silenced) {
|
||||
double scale = 0.625D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 0, -4);
|
||||
}
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.uzi_tex);
|
||||
ResourceManager.uzi.renderPart("Gun");
|
||||
ResourceManager.uzi.renderPart("StockBack");
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(silenced) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean hasSilencer(ItemStack stack, int cfg) {
|
||||
return WeaponModManager.hasUpgrade(stack, cfg, WeaponModManager.ID_SILENCER);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.render.item.weapon.sedna;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -56,7 +57,7 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
double[] speen = HbmAnimations.getRelevantTransformation("SPEEN", index);
|
||||
|
||||
GL11.glTranslated(yeet[0], yeet[1], yeet[2]);
|
||||
GL11.glRotated(speen[0], 0, 0, 1);
|
||||
GL11.glRotated(speen[0], 0, 0, i);
|
||||
|
||||
GL11.glTranslated(0, -2, -4);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
@ -70,6 +71,9 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.uzi.renderPart(index == 0 ? "GunMirror" : "Gun");
|
||||
|
||||
boolean silenced = hasSilencer(stack, index);
|
||||
if(silenced) ResourceManager.uzi.renderPart("Silencer");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.3125D, -5.75);
|
||||
@ -93,24 +97,26 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(bullet[0] == 1) ResourceManager.uzi.renderPart("Bullet");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, index).smokeNodes, 0.75D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[index], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
if(!silenced) {
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, index).smokeNodes, 0.75D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.75, 8.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[index], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@ -156,6 +162,7 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(hasSilencer(stack, 1)) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@ -169,6 +176,7 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(hasSilencer(stack, 0)) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@ -178,11 +186,12 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.uzi_tex);
|
||||
ResourceManager.uzi.renderPart(index == 1 ? "GunMirror" : "Gun");
|
||||
ResourceManager.uzi.renderPart(index == 0 ? "GunMirror" : "Gun");
|
||||
ResourceManager.uzi.renderPart("StockBack");
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(hasSilencer(stack, index)) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@ -191,6 +200,10 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.uzi_tex);
|
||||
|
||||
boolean silencer0 = hasSilencer(stack, 1);
|
||||
boolean silencer1 = hasSilencer(stack, 0);
|
||||
boolean anySilenced = silencer0 || silencer1;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(225, 0, 0, 1);
|
||||
@ -198,11 +211,17 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
if(anySilenced) {
|
||||
double scale = 0.625D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 0, -4);
|
||||
}
|
||||
ResourceManager.uzi.renderPart("Gun");
|
||||
ResourceManager.uzi.renderPart("StockBack");
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(silencer0) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(0, 0, 5);
|
||||
@ -214,13 +233,23 @@ public class ItemRenderUziAkimbo extends ItemRenderWeaponBase {
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(-45, 0, 1, 0);
|
||||
GL11.glTranslated(0, 1, 0);
|
||||
if(anySilenced) {
|
||||
double scale = 0.625D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 0, -4);
|
||||
}
|
||||
ResourceManager.uzi.renderPart("GunMirror");
|
||||
ResourceManager.uzi.renderPart("StockBack");
|
||||
ResourceManager.uzi.renderPart("StockFront");
|
||||
ResourceManager.uzi.renderPart("Slide");
|
||||
ResourceManager.uzi.renderPart("Magazine");
|
||||
if(silencer1) ResourceManager.uzi.renderPart("Silencer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean hasSilencer(ItemStack stack, int cfg) {
|
||||
return WeaponModManager.hasUpgrade(stack, cfg, WeaponModManager.ID_SILENCER);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,6 @@ import com.hbm.inventory.recipes.RotaryFurnaceRecipes.RotaryFurnaceRecipe;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.module.ModuleBurnTime;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.tileentity.*;
|
||||
import com.hbm.util.CrucibleUtil;
|
||||
|
||||
@ -48,20 +48,22 @@ public class CompatRecipeRegistry {
|
||||
public static void registerPress(StampType stamp, AStack input, ItemStack output) {
|
||||
PressRecipes.recipes.put(new Pair(input, stamp), output);
|
||||
}
|
||||
|
||||
|
||||
/** Same loose rules as BlastFurnaceRecipes, valid inputs are Items, Blocks, ItemStacks, ComparableStacks, Strings (for oredict) and DictFrames */
|
||||
public static void registerBlastFurnace(Object[] inputs, ItemStack output) {
|
||||
if(inputs.length != 2) return;
|
||||
BlastFurnaceRecipes.addRecipe(inputs[0], inputs[1], output);
|
||||
}
|
||||
|
||||
|
||||
public static void registerShredder(AStack input, ItemStack output) {
|
||||
for(ItemStack allItems : input.extractForNEI()) {
|
||||
ComparableStack comp = new ComparableStack(allItems);
|
||||
ShredderRecipes.shredderRecipes.put(comp, output);
|
||||
if (ShredderRecipes.neiShredderRecipes != null)
|
||||
ShredderRecipes.neiShredderRecipes.put(comp, output);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Items should strictly be categorized as pcb, topping or solder. An item that is used as a topping in one recipe should not be a pcb in another.
|
||||
* This is because the soldering station's item IO will automatically place items based on this category, and having items in more than one category would break it. */
|
||||
public static void registerSoldering(ItemStack output, int time, long power, FluidStack fluid, AStack[] toppings, AStack[] pcb, AStack[] solder) {
|
||||
@ -77,29 +79,29 @@ public class CompatRecipeRegistry {
|
||||
if(outputFluids != null) recipe.outputFluids(copyFirst(outputFluids, 2));
|
||||
ChemplantRecipes.recipes.add(recipe);
|
||||
}
|
||||
|
||||
|
||||
/** Either solid or liquid output can be null */
|
||||
public static void registerCombination(AStack input, ItemStack output, FluidStack fluid) {
|
||||
if(output == null && fluid == null) return;
|
||||
Object o = input instanceof OreDictStack ? ((OreDictStack) input).name : input;
|
||||
CombinationRecipes.recipes.put(o, new Pair(output, fluid));
|
||||
}
|
||||
|
||||
|
||||
/** Crucible recipes need unique IDs, game will crash when an ID collision is detected! */
|
||||
public static void registerCrucible(int index, String name, int frequency, ItemStack icon, MaterialStack[] input, MaterialStack[] output) {
|
||||
CrucibleRecipe recipe = new CrucibleRecipe(index, name, frequency, icon).inputs(input).outputs(output);
|
||||
CrucibleRecipes.recipes.add(recipe);
|
||||
}
|
||||
|
||||
|
||||
public static void registerCentrifuge(AStack input, ItemStack[] outputs) {
|
||||
CentrifugeRecipes.recipes.put(input, copyFirst(outputs, 4));
|
||||
}
|
||||
|
||||
|
||||
public static void registerCrystallizer(AStack input, ItemStack output, int time, float productivity, FluidStack fluid) {
|
||||
CrystallizerRecipe recipe = new CrystallizerRecipe(output, time).prod(productivity);
|
||||
CrystallizerRecipes.registerRecipe(input instanceof OreDictStack ? ((OreDictStack) input).name : input, recipe, fluid);
|
||||
}
|
||||
|
||||
|
||||
/** Fractions always use 100mB of input fluid per operation. None of the outputs can be null. */
|
||||
public static void registerFraction(FluidType input, FluidStack[] output) {
|
||||
if(output.length != 2) return;
|
||||
@ -111,7 +113,7 @@ public class CompatRecipeRegistry {
|
||||
if(output.length != 2) return;
|
||||
CrackingRecipes.cracking.put(input, new Pair(output[0], output[1]));
|
||||
}
|
||||
|
||||
|
||||
/** Reforming always uses 100mB of input fluid per operation. None of the outputs can be null. */
|
||||
public static void registerReforming(FluidType input, FluidStack[] output) {
|
||||
output = copyFirst(output, 3);
|
||||
@ -125,87 +127,87 @@ public class CompatRecipeRegistry {
|
||||
if(output.length < 2) return;
|
||||
HydrotreatingRecipes.recipes.put(input, new Triplet(hydrogen, output[0], output[1]));
|
||||
}
|
||||
|
||||
|
||||
public static void registerLiquefaction(AStack input, FluidStack output) {
|
||||
LiquefactionRecipes.recipes.put(input instanceof OreDictStack ? ((OreDictStack) input).name : input, output);
|
||||
}
|
||||
|
||||
|
||||
public static void registerSolidifying(FluidStack input, ItemStack output) {
|
||||
SolidificationRecipes.recipes.put(input.type, new Pair(input.fill, output));
|
||||
}
|
||||
|
||||
|
||||
public static void registerCoker(FluidStack input, ItemStack output, FluidStack fluid) {
|
||||
CokerRecipes.recipes.put(input.type, new Triplet(input.fill, output, fluid));
|
||||
}
|
||||
|
||||
|
||||
/** Registers a coker recipe based on the standardized fluid to coke values */
|
||||
public static void registerCokerAuto(FluidType input, FluidType output) {
|
||||
CokerRecipes.registerAuto(input, output);
|
||||
}
|
||||
|
||||
|
||||
public static void registerPyro(FluidStack inputFluid, AStack inputItem, FluidStack outputFluid, ItemStack outputItem, int duration) {
|
||||
PyroOvenRecipes.recipes.add(new PyroOvenRecipe(duration).in(inputFluid).in(inputItem).out(outputFluid).out(outputItem));
|
||||
}
|
||||
|
||||
|
||||
/** Registers a pyro oven recipe based on the standardized fluid to solid fuel values */
|
||||
public static void registerPyroAuto(FluidType input) {
|
||||
PyroOvenRecipes.registerSFAuto(input);
|
||||
}
|
||||
|
||||
|
||||
/** Breeding reactor does not handle OreDictStacks */
|
||||
public static void registerBreeder(ComparableStack input, ItemStack output, int flux) {
|
||||
BreederRecipes.recipes.put(input, new BreederRecipe(output, flux));
|
||||
}
|
||||
|
||||
|
||||
public static void registerCyclotron(ComparableStack box, AStack target, ItemStack output, int antimatter) {
|
||||
CyclotronRecipes.recipes.put(new Pair(box, target), new Pair(output, antimatter));
|
||||
}
|
||||
|
||||
|
||||
/** Fuel pools do not handle OreDictStacks */
|
||||
public static void registerFuelPool(ComparableStack input, ItemStack output) {
|
||||
FuelPoolRecipes.recipes.put(input, output);
|
||||
}
|
||||
|
||||
|
||||
//TBI mixer
|
||||
|
||||
|
||||
public static void registerOutgasser(AStack input, ItemStack output, FluidStack fluid) {
|
||||
OutgasserRecipes.recipes.put(input, new Pair(output, fluid));
|
||||
}
|
||||
|
||||
|
||||
public static void registerCompressor(FluidStack input, FluidStack output, int time) {
|
||||
CompressorRecipes.recipes.put(new Pair(input.type, input.pressure), new CompressorRecipe(input.fill, output, time));
|
||||
}
|
||||
|
||||
|
||||
/** Byproduct array can be null, fluid output length must be 2 */
|
||||
public static void registerElectrolyzerFluid(FluidStack input, FluidStack[] output, ItemStack[] byproduct, int time) {
|
||||
output = copyFirst(output, 2);
|
||||
if(output.length < 2) return;
|
||||
if(byproduct != null) byproduct = copyFirst(byproduct, 3);
|
||||
|
||||
|
||||
ElectrolyserFluidRecipes.recipes.put(input.type, new ElectrolysisRecipe(input.fill, output[0], output[1], time, byproduct));
|
||||
}
|
||||
|
||||
|
||||
/** Output array length must be 2, outputs can be null. Byproduct array can be null. */
|
||||
public static void registerElectrolyzerMetal(AStack input, MaterialStack[] output, ItemStack[] byproduct, int time) {
|
||||
output = copyFirst(output, 2);
|
||||
if(byproduct != null) byproduct = copyFirst(byproduct, 6);
|
||||
|
||||
|
||||
ElectrolyserMetalRecipes.recipes.put(input, new ElectrolysisMetalRecipe(output[0], output[1], time, byproduct));
|
||||
}
|
||||
|
||||
|
||||
public static void registerArcWelder(ItemStack output, int time, long power, FluidStack fluid, AStack[] inputs) {
|
||||
ArcWelderRecipes.recipes.add(new ArcWelderRecipe(output, time, power, fluid, copyFirst(inputs, 3)));
|
||||
}
|
||||
|
||||
|
||||
public static void registerRotaryFurnace(MaterialStack output, int time, int steam, FluidStack fluid, AStack[] inputs) {
|
||||
RotaryFurnaceRecipes.recipes.add(new RotaryFurnaceRecipe(output, time, steam, fluid, copyFirst(inputs, 3)));
|
||||
}
|
||||
|
||||
|
||||
/** Particles will always perform 8 recipes */
|
||||
public static void registerExposureChamber(AStack particle, AStack input, ItemStack output) {
|
||||
ExposureChamberRecipes.recipes.add(new ExposureChamberRecipe(particle, input, output));
|
||||
}
|
||||
|
||||
|
||||
/** Input needs two AStacks, output can take 1-2 ItemStacks. If the same recipe with different
|
||||
* momentum should yield different results, register the lower momentum recipes first. */
|
||||
public static void registerParticleAccelerator(AStack[] input, int momentum, ItemStack[] output) {
|
||||
@ -215,47 +217,47 @@ public class CompatRecipeRegistry {
|
||||
if(output.length < 1) return;
|
||||
ParticleAcceleratorRecipes.recipes.add(new ParticleAcceleratorRecipe(input[0], input[1], momentum, output[0], output.length > 1 ? output[1] : null));
|
||||
}
|
||||
|
||||
|
||||
public static void registerAmmoPress(ItemStack output, AStack[] input) {
|
||||
if(input.length != 9) return;
|
||||
AmmoPressRecipes.recipes.add(new AmmoPressRecipe(output, input));
|
||||
}
|
||||
|
||||
|
||||
public static void registerAssembler(ItemStack output, AStack[] input, int time) {
|
||||
AssemblerRecipes.makeRecipe(new ComparableStack(output), copyFirst(input, 12), time);
|
||||
}
|
||||
|
||||
|
||||
/** Registers an assembler recipe but with the template only being obtainable via the specified folders */
|
||||
public static void registerAssembler(ItemStack output, AStack[] input, int time, Item... folder) {
|
||||
AssemblerRecipes.makeRecipe(new ComparableStack(output), copyFirst(input, 12), time, folder);
|
||||
}
|
||||
|
||||
|
||||
public static void registerAnvilConstruction(AStack[] input, AnvilOutput[] output, int tier, int overlayIndex) {
|
||||
AnvilRecipes.constructionRecipes.add(new AnvilConstructionRecipe(input, output).setTier(tier).setOverlay(EnumUtil.grabEnumSafely(OverlayType.class, overlayIndex)));
|
||||
}
|
||||
|
||||
|
||||
public static void registerAnvilConstruction(AStack[] input, AnvilOutput[] output, int tierLower, int tierUpper, int overlayIndex) {
|
||||
AnvilRecipes.constructionRecipes.add(new AnvilConstructionRecipe(input, output).setTierRange(tierLower, tierUpper).setOverlay(EnumUtil.grabEnumSafely(OverlayType.class, overlayIndex)));
|
||||
}
|
||||
|
||||
|
||||
public static void registerPedestal(ItemStack output, AStack[] input) {
|
||||
registerPedestal(output, input, 0);
|
||||
}
|
||||
|
||||
|
||||
public static void registerPedestal(ItemStack output, AStack[] input, int condition) {
|
||||
input = copyFirst(input, 9);
|
||||
if(input.length < 9) return;
|
||||
PedestalRecipes.recipes.add(new PedestalRecipe(output, input).extra(EnumUtil.grabEnumSafely(PedestalExtraCondition.class, condition)));
|
||||
}
|
||||
|
||||
|
||||
/** Either output or fluid can be null */
|
||||
public static void registerArcFurnace(AStack input, ItemStack output, MaterialStack fluid) {
|
||||
if(output == null && fluid == null) return;
|
||||
ArcFurnaceRecipes.recipeList.add(new Pair(input, new ArcFurnaceRecipe().solid(output).fluid(fluid)));
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/** If the supplied array exceeds the specified length, creates a copy and trunkates the array. Otherwise, returns the original array */
|
||||
private static <T> T[] copyFirst(T[] array, int amount) {
|
||||
if(array.length <= amount) return array;
|
||||
|
||||
@ -461,6 +461,7 @@ container.uf6_tank=UF6 Tank
|
||||
container.vacuumDistill=Vakuumraffinerie
|
||||
container.wasteDrum=Abklingbecken-Trommel
|
||||
container.watzPowerplant=Watzkraftwerk
|
||||
container.weaponsTable=Waffenmodifikationstisch
|
||||
container.zirnox=ZIRNOX Atomreaktor
|
||||
|
||||
crucible.aa=Herstellung - Fortgeschrittene Legierung
|
||||
@ -1266,6 +1267,11 @@ item.ammo_standard.p22_ap.name=.22 lfB Patrone (Panzerbrechend)
|
||||
item.ammo_standard.p22_fmj.name=.22 lfB Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.p22_jhp.name=.22 lfB Patrone (Hohlspitz)
|
||||
item.ammo_standard.p22_sp.name=.22 lfB Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.p45_ap.name=.45 Patrone (Panzerbrechend)
|
||||
item.ammo_standard.p45_du.name=.45 Patrone (Urangeschoss)
|
||||
item.ammo_standard.p45_fmj.name=.45 Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.p45_jhp.name=.45 Patrone (Hohlspitz)
|
||||
item.ammo_standard.p45_sp.name=.45 Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.p9_ap.name=9mm Patrone (Panzerbrechend)
|
||||
item.ammo_standard.p9_fmj.name=9mm Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.p9_jhp.name=9mm Patrone (Hohlspitz)
|
||||
@ -2206,162 +2212,67 @@ item.grenade_zomg.name=Negativenergie-Paarvernichtungsgranate
|
||||
item.gun_aberrator.name=Aberrator
|
||||
item.gun_aberrator_eott.name=Eyes Of The Tempest
|
||||
item.gun_am180.name=Schallgedämpfte Maschinenpistole
|
||||
item.gun_ar15.name=Josh
|
||||
item.gun_autoshotgun.name=Auto-Flinte
|
||||
item.gun_autoshotgun_sexy.name=Sexy
|
||||
item.gun_autoshotgun_shredder.name=Shredder
|
||||
item.gun_avenger.name=CZ57 Avenger-Minigun
|
||||
item.gun_b92.name=§9B92 Energiepistole§r
|
||||
item.gun_b92_ammo.name=§9B92-Energiezelle§r
|
||||
item.gun_b93.name=§cB93 Energiemod§r
|
||||
item.gun_bf.name=BEL
|
||||
item.gun_bf_ammo.name=Balefire-Geschoss
|
||||
item.gun_bio_revolver.name=Atlas
|
||||
item.gun_bolt_action.name=Dream-Repetiergewehr (Original)
|
||||
item.gun_bolt_action_ammo.name=12x74 Brenneke (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream-Repetiergewehr (Grün)
|
||||
item.gun_bolt_action_saturnite.name=Saturnitbüchse
|
||||
item.gun_bolter.name=Boltergewehr
|
||||
item.gun_bolter_digamma.name=Digammagewehr
|
||||
item.gun_calamity.name=Knochensäge
|
||||
item.gun_calamity_ammo.name=.50 BMG Patrone (LEGACY)
|
||||
item.gun_calamity_dual.name=Sattelkanone
|
||||
item.gun_carbine.name=Karabiner
|
||||
item.gun_chemthrower.name=Chemowerfer
|
||||
item.gun_coilgun.name=Gaußpistole
|
||||
item.gun_cryocannon.name=Kyro-Kanone
|
||||
item.gun_cryolator.name=Der Cryolator
|
||||
item.gun_cryolator_ammo.name=Kryozelle
|
||||
item.gun_dampfmaschine.name=Garantiert keine Scherzwaffe
|
||||
item.gun_darter.name=Dartgewehr
|
||||
item.gun_deagle.name=Großes Eisen
|
||||
item.gun_defabricator.name=Defabrikator
|
||||
item.gun_defabricator_ammo.name=Defabrikator-Energiezelle
|
||||
item.gun_detonator.name=Laserzünder
|
||||
item.gun_double_barrel.name=Ein alter Klassiker
|
||||
item.gun_double_barrel_sacred_dragon.name=Sacred Dragon
|
||||
item.gun_emp.name=EMP-Waffe
|
||||
item.gun_emp_ammo.name=Energiezelle
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_euthanasia_ammo.name=Spritze
|
||||
item.gun_fatman.name=M42 Nukleares Katapult "Fat Man"
|
||||
item.gun_fatman_ammo.name=Miniatombombe (LEGACY)
|
||||
item.gun_fatman.name=Fat Man
|
||||
item.gun_fireext.name=Feuerlöscher
|
||||
item.gun_flamer.name=Flammenwerfer
|
||||
item.gun_flamer_daybreaker.name=Daybreaker
|
||||
item.gun_flamer_topaz.name=Mister Topaz
|
||||
item.gun_flaregun.name=Signalpistole
|
||||
item.gun_flechette.name=Flechet-Gewehr
|
||||
item.gun_folly.name=Folly
|
||||
item.gun_g3.name=Sturmgewehr
|
||||
item.gun_g3_a3.name=G3A3
|
||||
item.gun_g3_infiltrator.name=Infiltrierer
|
||||
item.gun_greasegun.name=Grease Gun
|
||||
item.gun_greasegun_m3.name=M3
|
||||
item.gun_hangman.name=Hangman
|
||||
item.gun_heavy_revolver.name=Schwerer Revolver
|
||||
item.gun_heavy_revolver_lilmac.name=Little Macintosh
|
||||
item.gun_heavy_revolver_protege.name=Protège
|
||||
item.gun_heavy_revolver_scoped.name=.44er Magnum mit Zielvorrichtung
|
||||
item.gun_henry.name=Repetiergewehr
|
||||
item.gun_henry_lincoln.name=Lincolns Repetiergewehr
|
||||
item.gun_hk69.name=Granatenpistole
|
||||
item.gun_hp.name=HPP Lazerjet
|
||||
item.gun_hp_ammo.name=Tintenpatrone
|
||||
item.gun_immolator.name=Der Immolator
|
||||
item.gun_immolator_ammo.name=Immolatorkraftstoff
|
||||
item.gun_jack.name=Jackhammer
|
||||
item.gun_jack_ammo.name=Vierfache Schrotpatrone
|
||||
item.gun_karl.name=Karl
|
||||
item.gun_kit_1.name=Waffenöl
|
||||
item.gun_kit_2.name=Waffenreparatursatz
|
||||
item.gun_ks23.name=Samuel die dicke Flinte
|
||||
item.gun_lacunae.name=CZ33 Abaddon
|
||||
item.gun_lacunae_ammo.name=5mm Patrone (LEGACY)
|
||||
item.gun_lag.name=Komisch lange Pistole
|
||||
item.gun_lasrifle.name=Lasergewehr
|
||||
item.gun_lever_action.name=Mare's Leg (Original)
|
||||
item.gun_lever_action_ammo.name=12x74 Schrotmunition (LEGACY)
|
||||
item.gun_lever_action_dark.name=Mare's Leg (Dunkel)
|
||||
item.gun_lever_action_sonata.name=Verkehrter Mare's Leg
|
||||
item.gun_lever_action_sonata_2.name=§cSonatas Mikrophon§r
|
||||
item.gun_liberator.name=Liberator
|
||||
item.gun_light_revolver.name=Kipplaufrevolver
|
||||
item.gun_light_revolver_atlas.name=Atlas
|
||||
item.gun_light_revolver_dani.name=Tag und Nacht
|
||||
item.gun_lunatic_marksman.name=Lunatic-Scharfschützengewehr
|
||||
item.gun_m2.name=üsMG
|
||||
item.gun_maresleg.name=Repetierflinte
|
||||
item.gun_maresleg_akimbo.name=Repetierflinten
|
||||
item.gun_maresleg_broken.name=Broken
|
||||
item.gun_maresleg_short.name=Mare's Leg
|
||||
item.gun_mas36.name=Südstern
|
||||
item.gun_minigun.name=Minigun
|
||||
item.gun_minigun_lacunae.name=Lacunae
|
||||
item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV"
|
||||
item.gun_mirv_ammo.name=Achtfaches MIRV (LEGACY)
|
||||
item.gun_missile_launcher.name=Raketenwerfer
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_mp.name=Maschinengewehr des Pazifisten
|
||||
item.gun_mp40.name=Maschinenpistole
|
||||
item.gun_mp40_ammo.name=SMG-Patrone (LEGACY)
|
||||
item.gun_pepperbox.name=Bündelrevolver
|
||||
item.gun_pm_ammo.name=Kleine treibmittellose MG-Patrone
|
||||
item.gun_mymy.name=Nietes
|
||||
item.gun_osipr.name=Standartausrüstung für Sicherheitskräfte
|
||||
item.gun_osipr_ammo.name=Dunkler Energiepuls-Plug
|
||||
item.gun_osipr_ammo2.name=Combine Ball
|
||||
item.gun_panzerschreck.name=Panzerschreck
|
||||
item.gun_proto.name=M42 Nukleares Katapult "Proto MIRV"
|
||||
item.gun_quadro.name=Vierfachraketenwerfer
|
||||
item.gun_remington.name=バイデン ブラスト [BIDEN BLAST]
|
||||
item.gun_revolver.name=Verbesserter Revolver
|
||||
item.gun_revolver_ammo.name=Bleipatrone
|
||||
item.gun_revolver_blackjack.name=Blackjack Five-Shooter
|
||||
item.gun_revolver_cursed.name=Verfluchte Pistole
|
||||
item.gun_revolver_cursed_ammo.name=Stahlpatrone
|
||||
item.gun_revolver_gold.name=Goldener Revolver
|
||||
item.gun_revolver_gold_ammo.name=Goldene Kugel
|
||||
item.gun_revolver_inverted.name=Umgedrehter Revolver
|
||||
item.gun_revolver_iron.name=Einfacher Revolver
|
||||
item.gun_revolver_iron_ammo.name=Patrone
|
||||
item.gun_revolver_lead.name=Nuka-Revolver
|
||||
item.gun_revolver_lead_ammo.name=Mit Glas umhüllte Atompatrone
|
||||
item.gun_revolver_nightmare.name=Nightmare-Revolver (Original)
|
||||
item.gun_revolver_nightmare2.name=Nightmare-Revolver (Dunkel)
|
||||
item.gun_revolver_nightmare2_ammo.name=Laserschrot
|
||||
item.gun_revolver_nightmare_ammo.name=Nightmare-Kugel
|
||||
item.gun_revolver_nopip.name=Schwerer Revolver
|
||||
item.gun_revolver_nopip_ammo.name=.44 Magnumpatrone (LEGACY)
|
||||
item.gun_revolver_pip.name=Lil' Pipsqueak
|
||||
item.gun_revolver_pip_ammo.name=Verdorbene Patrone (LEGACY)
|
||||
item.gun_revolver_red.name=Roter Schlüssel-Revolver
|
||||
item.gun_revolver_saturnite.name=Saturnitknarre
|
||||
item.gun_revolver_schrabidium.name=Schrabidiumrevolver
|
||||
item.gun_revolver_schrabidium_ammo.name=Schrabidiumpatrone
|
||||
item.gun_revolver_silver.name=Geliehene Kanone
|
||||
item.gun_rpg.name=Carl Gustav Reaktive Panzerbüchse
|
||||
item.gun_rpg_ammo.name=Rakete
|
||||
item.gun_sauer.name=Stan Sauers Schrotflinte
|
||||
item.gun_skystinger.name=The One Sky Stinger
|
||||
item.gun_spark.name=Die Zündkerze
|
||||
item.gun_spark_ammo.name=Elektromagnetische Katusche
|
||||
item.gun_spas12.name=SPAS-12
|
||||
item.gun_stg77.name=StG 77
|
||||
item.gun_stinger.name=FIM-92 Stinger
|
||||
item.gun_stinger_ammo.name=Stinger-Rakete (LEGACY)
|
||||
item.gun_super_shotgun.name=Super Shotgun
|
||||
item.gun_supershotgun.name=Super Shotgun
|
||||
item.gun_tau.name=Taukanone
|
||||
item.gun_tesla_cannon.name=Teslakanone
|
||||
item.gun_thompson.name=Thompson Maschinenpistole
|
||||
item.gun_uac_pistol.name=UAC .45 Pistole
|
||||
item.gun_uboinik.name=Ubojnik
|
||||
item.gun_uboinik_ammo.name=12x70 Schrotmunition (LEGACY)
|
||||
item.gun_uzi.name=Uzi
|
||||
item.gun_uzi_richter.name=Richter
|
||||
item.gun_uzi_akimbo.name=Uzis
|
||||
item.gun_uzi_ammo.name=.22 lfB Patrone (LEGACY)
|
||||
item.gun_uzi_saturnite.name=Saturnit-Uzi
|
||||
item.gun_uzi_saturnite_silencer.name=Saturnit-Uzi mit Schalldämpfer
|
||||
item.gun_uzi_silencer.name=IMI Uzi mit Schalldämpfer
|
||||
item.gun_xvl1456.name=XVL1456 Tau-Kanone Prototyp
|
||||
item.gun_xvl1456_ammo.name=Kiste mit erschöpftem Uran-235
|
||||
item.gun_zomg.name=ZOMG Kanone
|
||||
item.hand_drill.name=Handbohrer
|
||||
item.hand_drill_desh.name=Desh-Handbohrer
|
||||
item.hazmat_boots.name=Strahlenschutzstiefel
|
||||
@ -3782,14 +3693,44 @@ item.watz_pellet_depleted.nqd.name=Angereichertes Naquadah-Watzpellet (Erschöpf
|
||||
item.watz_pellet_depleted.nqr.name=Naquadria-Watzpellet (Erschöpft)
|
||||
item.watz_pellet_depleted.hen.name=HEN-Watzpellet (Erschöpft)
|
||||
item.watz_pellet_depleted.schrabidium.name=Schrabidium-Watzpellet (Erschöpft)
|
||||
item.wd40.name=VT-40
|
||||
item.weapon_bat.name=Richards Standard
|
||||
item.weapon_bat_nail.name=Das Klischee
|
||||
item.weapon_golf_club.name=Schläger des russischen Mafiosos
|
||||
item.weapon_mod_generic.bigmt_damage.name=Optimierter Saturnit-Verschluss
|
||||
item.weapon_mod_generic.bigmt_dura.name=Langlebige Saturnit-Teile
|
||||
item.weapon_mod_generic.bronze_damage.name=Optimierter Bronzeverschluss
|
||||
item.weapon_mod_generic.bronze_dura.name=Langlebige Bronzeteile
|
||||
item.weapon_mod_generic.desh_damage.name=Optimierter Deshverschluss
|
||||
item.weapon_mod_generic.desh_dura.name=Langlebige Deshteile
|
||||
item.weapon_mod_generic.dura_damage.name=Optimierter HSS-Verschluss
|
||||
item.weapon_mod_generic.dura_dura.name=Langlebige HSS-Teile
|
||||
item.weapon_mod_generic.ferro_damage.name=Optimierter Ferrouranverschluss
|
||||
item.weapon_mod_generic.ferro_dura.name=Langlebige Ferrouranteile
|
||||
item.weapon_mod_generic.iron_damage.name=Optimierter Eisenverschluss
|
||||
item.weapon_mod_generic.iron_dura.name=Langlebige Eisenteile
|
||||
item.weapon_mod_generic.steel_damage.name=Optimierter Stahlverschluss
|
||||
item.weapon_mod_generic.steel_dura.name=Langlebige Stahlteile
|
||||
item.weapon_mod_generic.tcalloy_damage.name=Optimierter Legierungsverschluss
|
||||
item.weapon_mod_generic.tcalloy_dura.name=Langlebige Legierungsteile
|
||||
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.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.saw.name=Bügelsäge
|
||||
item.weapon_mod_special.scope.name=Ziehlvorrichtung
|
||||
item.weapon_mod_special.silencer.name=Schalldämpfer
|
||||
item.weapon_mod_special.slowdown.name=Rädergetriebe
|
||||
item.weapon_mod_special.speedloader.name=Schnelllader
|
||||
item.weapon_mod_special.speedup.name=Elektrischer Servomotor
|
||||
item.weapon_mod_special.stack_mag.name=Zweistapel-Magazin
|
||||
item.weapon_pipe_lead.name=Die Handüberbrückung
|
||||
item.weapon_pipe_rusty.name=Der Einstellungskorrigierer
|
||||
item.weapon_saw.name=Ärztlich autorisierter Mord
|
||||
item.weaponized_starblaster_cell.name=§cManipulierte Sternenblaster-Energiezelle§r
|
||||
item.wd40.name=VT-40
|
||||
item.wild_p.name=Wild Pegasus Trockener Whisky
|
||||
item.wings_limp.name=Schlaffe Flügel
|
||||
item.wings_murk.name=Trübe Flügel
|
||||
@ -4630,6 +4571,7 @@ tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranhexafluorid-Tank
|
||||
tile.machine_vacuum_distill.name=Vakuumraffinerie
|
||||
tile.machine_waste_drum.name=Abklingbecken-Trommel
|
||||
tile.machine_weapon_table.name=Waffenmodifikationstisch
|
||||
tile.machine_wood_burner.name=Brennholzgenerator
|
||||
tile.machine_wood_burner.desc=Erzeugt 100HE/t aus Items$Sammelt Asche$Kann 40mB/s Flüssigkeiten mit 50%% Effizienz verbrennen
|
||||
tile.machine_well.name=Ölbohrturm
|
||||
|
||||
@ -867,6 +867,7 @@ container.uf6_tank=UF6 Tank
|
||||
container.vacuumDistill=Vacuum Refinery
|
||||
container.wasteDrum=Spent Fuel Pool Drum
|
||||
container.watzPowerplant=Watz Power Plant
|
||||
container.weaponsTable=Weapon Modification Table
|
||||
container.zirnox=ZIRNOX Nuclear Reactor
|
||||
|
||||
copytool.filter=Filter
|
||||
@ -1991,6 +1992,11 @@ item.ammo_standard.p22_ap.name=.22 LR Round (Armor Piercing)
|
||||
item.ammo_standard.p22_fmj.name=.22 LR Round (Full Metal Jacket)
|
||||
item.ammo_standard.p22_jhp.name=.22 LR Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.p22_sp.name=.22 LR Round (Soft Point)
|
||||
item.ammo_standard.p45_ap.name=.45 Round (Armor Piercing)
|
||||
item.ammo_standard.p45_du.name=.45 Round (Depleted Uranium)
|
||||
item.ammo_standard.p45_fmj.name=.45 Round (Full Metal Jacket)
|
||||
item.ammo_standard.p45_jhp.name=.45 Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.p45_sp.name=.45 Round (Soft Point)
|
||||
item.ammo_standard.p9_ap.name=9mm Round (Armor Piercing)
|
||||
item.ammo_standard.p9_fmj.name=9mm Round (Full Metal Jacket)
|
||||
item.ammo_standard.p9_jhp.name=9mm Round (Jacketed Hollow Point)
|
||||
@ -3014,166 +3020,68 @@ item.glyphid_gland_empty.name= Glyphid's Fluid Gland
|
||||
item.gun_aberrator.name=Aberrator
|
||||
item.gun_aberrator_eott.name=Eyes Of The Tempest
|
||||
item.gun_am180.name=Silenced Submachine Gun
|
||||
item.gun_ar15.name=Josh
|
||||
item.gun_autoshotgun.name=Auto Shotgun
|
||||
item.gun_autoshotgun_sexy.name=Sexy
|
||||
item.gun_autoshotgun_shredder.name=Shredder
|
||||
item.gun_avenger.name=CZ57 Avenger Minigun
|
||||
item.gun_b92.name=§9B92 Energy Pistol§r
|
||||
item.gun_b92_ammo.name=§9B92 Energy Cell§r
|
||||
item.gun_b93.name=§cB93 Energy Mod§r
|
||||
item.gun_benelli.name=Benelli Autoshotgun (Drum Mod)
|
||||
item.gun_bf.name=BEL
|
||||
item.gun_bf_ammo.name=Balefire Shell
|
||||
item.gun_bio_revolver.name=Atlas
|
||||
item.gun_bolt_action.name=Dream Bolt-Action Rifle (Original)
|
||||
item.gun_bolt_action_ammo.name=12x74 Slug (LEGACY)
|
||||
item.gun_bolt_action_green.name=Dream Bolt-Action Rifle (Green)
|
||||
item.gun_bolt_action_saturnite.name=Saturnite Rifle
|
||||
item.gun_bolter.name=Bolter
|
||||
item.gun_bolter_digamma.name=Digamma Gun
|
||||
item.gun_calamity.name=Buzzsaw
|
||||
item.gun_calamity_ammo.name=.50 BMG Round (LEGACY)
|
||||
item.gun_calamity_dual.name=Saddle Gun
|
||||
item.gun_carbine.name=Carbine
|
||||
item.gun_chemthrower.name=Chemthrower
|
||||
item.gun_coilgun.name=Coilgun
|
||||
item.gun_congolake.name=Congo Lake
|
||||
item.gun_cryocannon.name=Cryo Cannon
|
||||
item.gun_cryolator.name=The Cryolator
|
||||
item.gun_cryolator_ammo.name=Cryo Cell
|
||||
item.gun_dampfmaschine.name=Totally Not a Joke Weapon
|
||||
item.gun_darter.name=Dart Gun
|
||||
item.gun_deagle.name=Big Iron
|
||||
item.gun_defabricator.name=Defabricator
|
||||
item.gun_defabricator_ammo.name=Defabricator Energy Cell
|
||||
item.gun_detonator.name=Laser Detonator
|
||||
item.gun_double_barrel.name=An Old Classic
|
||||
item.gun_double_barrel_sacred_dragon.name=Sacred Dragon
|
||||
item.gun_emp.name=EMP Gun
|
||||
item.gun_emp_ammo.name=Energy Cell
|
||||
item.gun_euthanasia.name=Euthanasia
|
||||
item.gun_euthanasia_ammo.name=Syringe
|
||||
item.gun_fatman.name=M42 Nuclear Catapult "Fat Man"
|
||||
item.gun_fatman_ammo.name=Mini Nuke (LEGACY)
|
||||
item.gun_fatman.name=Fat Man
|
||||
item.gun_fireext.name=Fire Extinguisher
|
||||
item.gun_flamer.name=Flamethrower
|
||||
item.gun_flamer_daybreaker.name=Daybreaker
|
||||
item.gun_flamer_topaz.name=Mister Topaz
|
||||
item.gun_flaregun.name=Flare Gun
|
||||
item.gun_flechette.name=Flechette Rifle
|
||||
item.gun_folly.name=Folly
|
||||
item.gun_g3.name=Assault Rifle
|
||||
item.gun_glass_cannon.name=The Glass Cannon
|
||||
item.gun_g3_a3.name=G3A3
|
||||
item.gun_g3_infiltrator.name=Infiltrator
|
||||
item.gun_greasegun.name=Grease Gun
|
||||
item.gun_greasegun_m3.name=M3
|
||||
item.gun_hangman.name=Hangman
|
||||
item.gun_heavy_revolver.name=Heavy Revolver
|
||||
item.gun_heavy_revolver_lilmac.name=Little Macintosh
|
||||
item.gun_heavy_revolver_protege.name=Protège
|
||||
item.gun_heavy_revolver_scoped.name=Scoped .44 Magnum
|
||||
item.gun_henry.name=Lever Action Rifle
|
||||
item.gun_henry_lincoln.name=Lincoln's Repeater
|
||||
item.gun_hk69.name=Grenade Pistol
|
||||
item.gun_hp.name=HPP Lazerjet
|
||||
item.gun_hp_ammo.name=Ink Cartridge
|
||||
item.gun_immolator.name=The Immolator
|
||||
item.gun_immolator_ammo.name=Immolator Fuel
|
||||
item.gun_jack.name=Jackhammer
|
||||
item.gun_jack_ammo.name=Quadruple Shotgun Shell
|
||||
item.gun_karl.name=Karl
|
||||
item.gun_kit_1.name=Gun Oil
|
||||
item.gun_kit_2.name=Gun Repair Kit
|
||||
item.gun_ks23.name=Samuel the Big Shotgun
|
||||
item.gun_lacunae.name=CZ33 Abaddon
|
||||
item.gun_lacunae_ammo.name=5mm Round (LEGACY)
|
||||
item.gun_lag.name=Comically Long Pistol
|
||||
item.gun_lasrifle.name=Laser Rifle
|
||||
item.gun_lever_action.name=Mare's Leg (Original)
|
||||
item.gun_lever_action_ammo.name=12x74 Buckshot (LEGACY)
|
||||
item.gun_lever_action_dark.name=Mare's Leg (Dark)
|
||||
item.gun_lever_action_sonata.name=Flipped Mare's Leg
|
||||
item.gun_lever_action_sonata_2.name=§cSonata's Microphone§r
|
||||
item.gun_liberator.name=Liberator
|
||||
item.gun_light_revolver.name=Break-Action Revolver
|
||||
item.gun_light_revolver_atlas.name=Atlas
|
||||
item.gun_light_revolver_dani.name=Day And Night
|
||||
item.gun_lunatic_marksman.name=Lunatic Sniper Rifle
|
||||
item.gun_m2.name=Ma Deuce
|
||||
item.gun_maresleg.name=Lever Action Shotgun
|
||||
item.gun_maresleg_akimbo.name=Lever Action Shotguns
|
||||
item.gun_maresleg_broken.name=Broken
|
||||
item.gun_maresleg_short.name=Mare's Leg
|
||||
item.gun_mas36.name=South Star
|
||||
item.gun_minigun.name=Minigun
|
||||
item.gun_minigun_lacunae.name=Lacunae
|
||||
item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV"
|
||||
item.gun_mirv_ammo.name=Eightfold MIRV (LEGACY)
|
||||
item.gun_missile_launcher.name=Missile Launcher
|
||||
item.gun_moist_nugget.name=Mosin-Nagant
|
||||
item.gun_mp.name=Pacifist's Machine Gun
|
||||
item.gun_mp40.name=Submachine Gun
|
||||
item.gun_mp40_ammo.name=Submachine Gun Round (LEGACY)
|
||||
item.gun_pepperbox.name=Pepperbox
|
||||
item.gun_pm_ammo.name=Small Propellantless Machine Gun Round
|
||||
item.gun_mymy.name=Nietes
|
||||
item.gun_osipr.name=Overwatch Standard Issue Pulse Rifle
|
||||
item.gun_osipr_ammo.name=Dark Energy Pulse Plug
|
||||
item.gun_osipr_ammo2.name=Combine Ball
|
||||
item.gun_panzerschreck.name=Panzerschreck
|
||||
item.gun_proto.name=M42 Nuclear Catapult "Proto MIRV"
|
||||
item.gun_quadro.name=Quad Rocket Launcher
|
||||
item.gun_remington.name=バイデン ブラスト [BIDEN BLAST]
|
||||
item.gun_revolver.name=Enhanced Revolver
|
||||
item.gun_revolver_ammo.name=Lead Bullet
|
||||
item.gun_revolver_blackjack.name=Blackjack Five-Shooter
|
||||
item.gun_revolver_cursed.name=Cursed Revolver
|
||||
item.gun_revolver_cursed_ammo.name=Steel Bullet
|
||||
item.gun_revolver_gold.name=Golden Revolver
|
||||
item.gun_revolver_gold_ammo.name=Golden Bullet
|
||||
item.gun_revolver_inverted.name=Flipped Revolver
|
||||
item.gun_revolver_iron.name=Simple Revolver
|
||||
item.gun_revolver_iron_ammo.name=Bullet
|
||||
item.gun_revolver_lead.name=Nuka Revolver
|
||||
item.gun_revolver_lead_ammo.name=Glass Covered Nuclear Bullet
|
||||
item.gun_revolver_nightmare.name=Nightmare Revolver (Original)
|
||||
item.gun_revolver_nightmare2.name=Nightmare Revolver (Dark)
|
||||
item.gun_revolver_nightmare2_ammo.name=Laser Buckshot
|
||||
item.gun_revolver_nightmare_ammo.name=Nightmare Bullet
|
||||
item.gun_revolver_nopip.name=Heavy Revolver
|
||||
item.gun_revolver_nopip_ammo.name=.44 Magnum Bullet (LEGACY)
|
||||
item.gun_revolver_pip.name=Lil' Pipsqueak
|
||||
item.gun_revolver_pip_ammo.name=Tainted Bullet (LEGACY)
|
||||
item.gun_revolver_red.name=Red Key Revolver
|
||||
item.gun_revolver_saturnite.name=Saturnite Shooter
|
||||
item.gun_revolver_schrabidium.name=Schrabidium Revolver
|
||||
item.gun_revolver_schrabidium_ammo.name=Schrabidium Bullet
|
||||
item.gun_revolver_silver.name=Lent Gun
|
||||
item.gun_rpg.name=Carl Gustav Recoilless Rifle
|
||||
item.gun_rpg_ammo.name=Rocket (LEGACY)
|
||||
item.gun_sauer.name=Stan Sauer's Shotgun
|
||||
item.gun_skystinger.name=The One Sky Stinger
|
||||
item.gun_spark.name=Spark Plug
|
||||
item.gun_spark_ammo.name=Electromagnetic Cartridge
|
||||
item.gun_spas12.name=SPAS-12
|
||||
item.gun_stg77.name=StG 77
|
||||
item.gun_stinger.name=FIM-92 Stinger
|
||||
item.gun_stinger_ammo.name=Stinger Rocket (LEGACY)
|
||||
item.gun_super_shotgun.name=Super Shotgun
|
||||
item.gun_super_shotgun.desc=It's super broken!
|
||||
item.gun_supershotgun.name=Super Shotgun
|
||||
item.gun_tau.name=Tau Cannon
|
||||
item.gun_tesla_cannon.name=Tesla Cannon
|
||||
item.gun_thompson.name=Thompson Submachine Gun
|
||||
item.gun_uac_pistol.name=UAC .45 Pistol
|
||||
item.gun_uboinik.name=Uboinik
|
||||
item.gun_uboinik_ammo.name=12x70 Buckshot (LEGACY)
|
||||
item.gun_uzi.name=Uzi
|
||||
item.gun_uzi_richter.name=Richter
|
||||
item.gun_uzi_akimbo.name=Uzis
|
||||
item.gun_uzi_ammo.name=.22 LR Round (LEGACY)
|
||||
item.gun_uzi_saturnite.name=Saturnite Uzi
|
||||
item.gun_uzi_saturnite_silencer.name=Saturnite Uzi with Silencer
|
||||
item.gun_uzi_silencer.name=IMI Uzi with Silencer
|
||||
item.gun_xvl1456.name=XVL1456 Tau Cannon Prototype
|
||||
item.gun_xvl1456_ammo.name=Depleted Uranium-235 Box
|
||||
item.gun_zomg.name=ZOMG Cannon
|
||||
item.hand_drill.name=Hand Drill
|
||||
item.hand_drill_desh.name=Desh Hand Drill
|
||||
item.hazmat_boots.name=Hazmat Boots
|
||||
@ -4812,14 +4720,44 @@ item.watz_pellet_depleted.nqd.name=Enriched Naquadah Watz Pellet (Depleted)
|
||||
item.watz_pellet_depleted.nqr.name=Naquadria Watz Pellet (Depleted)
|
||||
item.watz_pellet_depleted.hen.name=HEN Watz Pellet (Depleted)
|
||||
item.watz_pellet_depleted.schrabidium.name=Schrabidium Watz Pellet (Depleted)
|
||||
item.wd40.name=VT-40
|
||||
item.weapon_bat.name=Richard's Default
|
||||
item.weapon_bat_nail.name=The Cliché
|
||||
item.weapon_golf_club.name=Russian Mobster's Club
|
||||
item.weapon_mod_generic.bigmt_damage.name=Optimized Saturnite Receiver
|
||||
item.weapon_mod_generic.bigmt_dura.name=High-Durability Saturnite Parts
|
||||
item.weapon_mod_generic.bronze_damage.name=Optimized Bronze Receiver
|
||||
item.weapon_mod_generic.bronze_dura.name=High-Durability Bronze Parts
|
||||
item.weapon_mod_generic.desh_damage.name=Optimized Desh Receiver
|
||||
item.weapon_mod_generic.desh_dura.name=High-Durability Desh Parts
|
||||
item.weapon_mod_generic.dura_damage.name=Optimized HSS Receiver
|
||||
item.weapon_mod_generic.dura_dura.name=High-Durability HSS Parts
|
||||
item.weapon_mod_generic.ferro_damage.name=Optimized Ferrouranium Receiver
|
||||
item.weapon_mod_generic.ferro_dura.name=High-Durability Ferrouranium Parts
|
||||
item.weapon_mod_generic.iron_damage.name=Optimized Iron Receiver
|
||||
item.weapon_mod_generic.iron_dura.name=High-Durability Iron Parts
|
||||
item.weapon_mod_generic.steel_damage.name=Optimized Steel Receiver
|
||||
item.weapon_mod_generic.steel_dura.name=High-Durability Steel Parts
|
||||
item.weapon_mod_generic.tcalloy_damage.name=Optimized Resistant Alloy Receiver
|
||||
item.weapon_mod_generic.tcalloy_dura.name=High-Durability Resistant Alloy Parts
|
||||
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.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.saw.name=Hacksaw
|
||||
item.weapon_mod_special.scope.name=Scope
|
||||
item.weapon_mod_special.silencer.name=Silencer
|
||||
item.weapon_mod_special.slowdown.name=Gear Train
|
||||
item.weapon_mod_special.speedloader.name=Speedloader
|
||||
item.weapon_mod_special.speedup.name=Auxiliary Electric Engine
|
||||
item.weapon_mod_special.stack_mag.name=Double-Stacked Magazine
|
||||
item.weapon_pipe_lead.name=The Manual Override
|
||||
item.weapon_pipe_rusty.name=The Attitude Adjuster
|
||||
item.weapon_saw.name=Doctor Assisted Homicide
|
||||
item.weaponized_starblaster_cell.name=§cRigged Star Blaster Energy Cell§r
|
||||
item.wd40.name=VT-40
|
||||
item.wild_p.name=Wild Pegasus Dry Whiskey
|
||||
item.wings_limp.name=Limp Wings
|
||||
item.wings_murk.name=Murky Wings
|
||||
@ -5761,6 +5699,7 @@ tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranium Hexafluoride Tank
|
||||
tile.machine_vacuum_distill.name=Vacuum Refinery
|
||||
tile.machine_waste_drum.name=Spent Fuel Pool Drum
|
||||
tile.machine_weapon_table.name=Weapon Modification Table
|
||||
tile.machine_wood_burner.name=Wood-Burning Generator
|
||||
tile.machine_wood_burner.desc=Generates 100HE/t when burning items$Collects ashes$Can burn fluids at 50%% efficiency at 40mB/s
|
||||
tile.machine_well.name=Oil Derrick
|
||||
|
||||
@ -251,6 +251,7 @@
|
||||
"weapon.fire.uzi": {"category": "player", "sounds": ["weapon/fire/uzi"]},
|
||||
"weapon.fire.tesla": {"category": "player", "sounds": ["weapon/fire/tesla"]},
|
||||
"weapon.fire.aberrator": {"category": "player", "sounds": ["weapon/fire/aberrator"]},
|
||||
"weapon.fire.stab": {"category": "player", "sounds": ["weapon/fire/stab1", "weapon/fire/stab2"]},
|
||||
|
||||
"weapon.reload.boltClose": {"category": "player", "sounds": ["weapon/reload/boltClose"]},
|
||||
"weapon.reload.boltOpen": {"category": "player", "sounds": ["weapon/reload/boltOpen"]},
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/stab1.ogg
Normal file
BIN
src/main/resources/assets/hbm/sounds/weapon/fire/stab2.ogg
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gun_table_side.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
src/main/resources/assets/hbm/textures/blocks/gun_table_top.png
Normal file
|
After Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 291 B |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 251 B |
|
After Width: | Height: | Size: 293 B |
|
After Width: | Height: | Size: 290 B |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 310 B |
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 254 B |
|
After Width: | Height: | Size: 283 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 334 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 300 B |
|
After Width: | Height: | Size: 284 B |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 269 B |
|
After Width: | Height: | Size: 278 B |
|
After Width: | Height: | Size: 267 B |
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 270 B |