Merge remote-tracking branch 'upstream/master' into Optimization
# Conflicts: # src/main/java/com/hbm/main/ModEventHandlerRenderer.java # src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java
@ -39,6 +39,12 @@
|
||||
* Glyphids spawned by radioactive hives are immune to fire, twice as fast and five times as strong
|
||||
* Radioactive glpyhids however are NOT immune to radiation, and typically die quickly
|
||||
* Radioactive hives are sterile, they will not spawn scouts
|
||||
* PWR core capacity is now limited to 500%, meaning the maximum amount of heatsinks usable is 80
|
||||
* Item autogen now generates ingot forms for items that are castable but don't have an ingot form, preventing cases where a material is completely uncastable
|
||||
* This change makes sodium and strontium castable
|
||||
* Ore dict recipe autogen for crucible molds now prioritizes NTM's own items over any other ore dict compatible item
|
||||
* If a cracking tower's input is set to an incorrect type, the input and steam tanks are now preserved instead of being set to NONE
|
||||
* Removed legacy wire items
|
||||
|
||||
## Fixed
|
||||
* The conveyor grabber should no longer skip over items when used in long lines
|
||||
@ -50,4 +56,5 @@
|
||||
* All NTM type explosions are no longer affected by difficulty setting, preventing them from dealing damage in peaceful mode
|
||||
* There are a few instances of vanilla explosions still being used, those will be phased out in the future
|
||||
* Fixed tutorial presentations triggering when hitting F1 not just in the inventory but also when looking at the block in question
|
||||
* Fixed a bug regarding shift clicking in the breeding reactor
|
||||
* Fixed a bug regarding shift clicking in the breeding reactor
|
||||
* Fixed empty particle capsules not being extractable from the ICF pellet maker
|
||||
|
||||
@ -1415,11 +1415,11 @@ public class ModBlocks {
|
||||
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
||||
|
||||
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_weidanium");
|
||||
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_reiium");
|
||||
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_unobtainium");
|
||||
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_daffergon");
|
||||
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_verticium");
|
||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||
|
||||
block_cap = new BlockCap().setBlockName("block_cap").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||
|
||||
|
||||
@ -5,6 +5,12 @@ import java.util.Random;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.explosion.ExplosionLarge;
|
||||
import com.hbm.explosion.ExplosionNukeSmall;
|
||||
import com.hbm.explosion.vanillant.ExplosionVNT;
|
||||
import com.hbm.explosion.vanillant.standard.BlockAllocatorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.BlockProcessorStandard;
|
||||
import com.hbm.explosion.vanillant.standard.EntityProcessorCrossSmooth;
|
||||
import com.hbm.explosion.vanillant.standard.ExplosionEffectWeapon;
|
||||
import com.hbm.explosion.vanillant.standard.PlayerProcessorStandard;
|
||||
import com.hbm.interfaces.IBomb;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.tileentity.bomb.TileEntityLandmine;
|
||||
@ -147,12 +153,26 @@ public class Landmine extends BlockContainer implements IBomb {
|
||||
Landmine.safeMode = false;
|
||||
|
||||
if(this == ModBlocks.mine_ap) {
|
||||
world.newExplosion(null, x + 0.5, y + 0.5, z + 0.5, 2.5F, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 3F);
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, 10F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
} else if(this == ModBlocks.mine_he) {
|
||||
ExplosionLarge.explode(world, x + 0.5, y + 0.5, z + 0.5, 3F, true, false, false);
|
||||
world.newExplosion(null, x + 0.5, y + 2, z + 0.5, 15F, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 4F);
|
||||
vnt.setBlockAllocator(new BlockAllocatorStandard());
|
||||
vnt.setBlockProcessor(new BlockProcessorStandard());
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(1, 35));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(15, 3.5F, 1.25F));
|
||||
vnt.explode();
|
||||
} else if(this == ModBlocks.mine_shrap) {
|
||||
ExplosionLarge.explode(world, x + 0.5, y + 0.5, z + 0.5, 1, true, false, false);
|
||||
ExplosionVNT vnt = new ExplosionVNT(world, x + 0.5, y + 0.5, z + 0.5, 3F);
|
||||
vnt.setEntityProcessor(new EntityProcessorCrossSmooth(0.5, 7.5F));
|
||||
vnt.setPlayerProcessor(new PlayerProcessorStandard());
|
||||
vnt.setSFX(new ExplosionEffectWeapon(5, 1F, 0.5F));
|
||||
vnt.explode();
|
||||
|
||||
ExplosionLarge.spawnShrapnelShower(world, x + 0.5, y + 0.5, z + 0.5, 0, 1D, 0, 45, 0.2D);
|
||||
ExplosionLarge.spawnShrapnels(world, x + 0.5, y + 0.5, z + 0.5, 5);
|
||||
} else if(this == ModBlocks.mine_fat) {
|
||||
|
||||
@ -79,9 +79,7 @@ public class BlockCrate extends BlockFalling {
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_karl, 4);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_panzerschreck, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_hk69, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_stinger, 7);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_mp40, 9);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi, 6);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uzi_silencer, 5);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_uboinik, 8);
|
||||
BlockCrate.addToListWithWeight(weaponList, ModItems.gun_lever_action, 7);
|
||||
|
||||
@ -34,6 +34,8 @@ public class ClientConfig {
|
||||
public static ConfigWrapper<Boolean> MAIN_MENU_WACKY_SPLASHES = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> DODD_RBMK_DIAGNOSTIC = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> RENDER_CABLE_HANG = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> NUKE_HUD_FLASH = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> NUKE_HUD_SHAKE = new ConfigWrapper(true);
|
||||
|
||||
private static void initDefaults() {
|
||||
configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL);
|
||||
@ -47,6 +49,8 @@ public class ClientConfig {
|
||||
configMap.put("MAIN_MENU_WACKY_SPLASHES", MAIN_MENU_WACKY_SPLASHES);
|
||||
configMap.put("DODD_RBMK_DIAGNOSTIC", DODD_RBMK_DIAGNOSTIC);
|
||||
configMap.put("RENDER_CABLE_HANG", RENDER_CABLE_HANG);
|
||||
configMap.put("NUKE_HUD_FLASH", NUKE_HUD_FLASH);
|
||||
configMap.put("NUKE_HUD_SHAKE", NUKE_HUD_SHAKE);
|
||||
}
|
||||
|
||||
/** Initializes defaults, then reads the config file if it exists, then writes the config file. */
|
||||
|
||||
@ -27,6 +27,7 @@ public class MobConfig {
|
||||
|
||||
public static boolean enableDucks = true;
|
||||
public static boolean enableMobGear = true;
|
||||
public static boolean enableMobWeapons = true;
|
||||
|
||||
public static boolean enableHives = true;
|
||||
public static int hiveSpawn = 256;
|
||||
@ -94,6 +95,7 @@ public class MobConfig {
|
||||
|
||||
enableDucks = CommonConfig.createConfigBool(config, CATEGORY, "12.D00_enableDucks", "Whether pressing O should allow the player to duck", true);
|
||||
enableMobGear = CommonConfig.createConfigBool(config, CATEGORY, "12.D01_enableMobGear", "Whether zombies and skeletons should have additional gear when spawning", true);
|
||||
enableMobWeapons = CommonConfig.createConfigBool(config, CATEGORY, "12.D02_enableMobWeapons", "Whether skeletons should have bows replaced with guns when spawning at higher soot levels", true);
|
||||
|
||||
enableHives = CommonConfig.createConfigBool(config, CATEGORY, "12.G00_enableHives", "Whether glyphid hives should spawn", true);
|
||||
hiveSpawn = CommonConfig.createConfigInt(config, CATEGORY, "12.G01_hiveSpawn", "The average amount of chunks per hive", 256);
|
||||
|
||||
@ -186,7 +186,7 @@ public class ConsumableRecipes {
|
||||
//Batteries
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery, 1), new Object[] { "PCP", "PCP", "PCP", 'P', STEEL.plate(), 'C', ModBlocks.capacitor_gold });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk2, 1), new Object[] { "PCP", "PCP", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', ModBlocks.capacitor_niobium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk3, 1), new Object[] { "PCP", "PCP", "PCP", 'P', GOLD.plate(), 'C', ModBlocks.block_tantalium });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.armor_battery_mk3, 1), new Object[] { "PCP", "PCP", "PCP", 'P', GOLD.plate(), 'C', ModBlocks.capacitor_tantalium });
|
||||
|
||||
//Special Mods
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.horseshoe_magnet, 1), new Object[] { "L L", "I I", "ILI", 'L', ModItems.lodestone, 'I', IRON.ingot() });
|
||||
|
||||
@ -97,11 +97,8 @@ public class WeaponRecipes {
|
||||
|
||||
//Guns
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_rpg, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', IRON.plate(), 'M', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_panzerschreck, 1), new Object[] { "SSS", " MW", 'S', STEEL.shell(), 'W', CU.plate(), 'M', ModItems.mechanism_launcher_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_karl, 1), new Object[] { "SSW", " MW", 'S', STEEL.shell(), 'W', ALLOY.plate(), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', STEEL.pipe(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', STEEL.shell(), 'I', IRON.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', STEEL.bolt() });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', AL.wireFine(), 'M', ModItems.mechanism_revolver_1 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_saturnite, 1), new Object[] { "SSM", " RW", 'S', BIGMT.plate(), 'W', KEY_PLANKS, 'R', W.wireFine(), 'M', ModItems.mechanism_revolver_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_gold, 1), new Object[] { "SSM", " RW", 'S', GOLD.plate(), 'W', W.ingot(), 'R', GOLD.wireFine(), 'M', ModItems.mechanism_revolver_1 });
|
||||
|
||||
136
src/main/java/com/hbm/entity/mob/ai/EntityAIFireGun.java
Normal file
@ -0,0 +1,136 @@
|
||||
package com.hbm.entity.mob.ai;
|
||||
|
||||
import com.hbm.handler.HbmKeybinds.EnumKeybind;
|
||||
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.GunState;
|
||||
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EntityAIFireGun extends EntityAIBase {
|
||||
|
||||
private final EntityLiving host;
|
||||
|
||||
private double attackMoveSpeed = 1.0D; // how fast we move while in this state
|
||||
private double maxRange = 20; // how far our target can be before we stop shooting
|
||||
private int burstTime = 10; // maximum number of ticks in a burst (for automatic weapons)
|
||||
private int minWait = 10; // minimum number of ticks to wait between bursts/shots
|
||||
private int maxWait = 40; // maximum number of ticks to wait between bursts/shots
|
||||
private float inaccuracy = 30; // how many degrees of inaccuracy does the AI have
|
||||
|
||||
// state timers
|
||||
private int attackTimer = 0;
|
||||
private FireState state = FireState.IDLE;
|
||||
private int stateTimer = 0;
|
||||
|
||||
private static enum FireState {
|
||||
IDLE,
|
||||
WAIT,
|
||||
FIRING,
|
||||
RELOADING,
|
||||
}
|
||||
|
||||
public EntityAIFireGun(EntityLiving host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldExecute() {
|
||||
return host.getAttackTarget() != null && getYerGun() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTask() {
|
||||
EntityLivingBase target = host.getAttackTarget();
|
||||
ItemStack stack = host.getHeldItem();
|
||||
ItemGunBaseNT gun = getYerGun();
|
||||
|
||||
gun.onUpdate(stack, host.worldObj, host, 0, true);
|
||||
|
||||
double distanceToTargetSquared = host.getDistanceSq(target.posX, target.posY, target.posZ);
|
||||
boolean canSeeTarget = host.getEntitySenses().canSee(target);
|
||||
|
||||
if(canSeeTarget) {
|
||||
attackTimer++;
|
||||
} else {
|
||||
attackTimer = 0;
|
||||
}
|
||||
|
||||
if(distanceToTargetSquared < maxRange * maxRange && attackTimer > 20) {
|
||||
host.getNavigator().clearPathEntity();
|
||||
} else {
|
||||
host.getNavigator().tryMoveToEntityLiving(target, attackMoveSpeed);
|
||||
}
|
||||
|
||||
host.getLookHelper().setLookPositionWithEntity(target, 30.0F, 30.0F);
|
||||
|
||||
stateTimer--;
|
||||
if(stateTimer < 0) {
|
||||
stateTimer = 0;
|
||||
|
||||
if(state == FireState.WAIT) {
|
||||
updateState(FireState.IDLE, 0, gun, stack);
|
||||
} else if(state != FireState.IDLE) {
|
||||
updateState(FireState.WAIT, host.worldObj.rand.nextInt(maxWait - minWait) + minWait, gun, stack);
|
||||
}
|
||||
} else if(state == FireState.FIRING) {
|
||||
// Keep the trigger held throughout the duration of firing
|
||||
updateKeybind(gun, stack, EnumKeybind.GUN_PRIMARY);
|
||||
}
|
||||
|
||||
if(canSeeTarget && distanceToTargetSquared < maxRange * maxRange) {
|
||||
if(state == FireState.IDLE) {
|
||||
GunConfig config = gun.getConfig(stack, 0);
|
||||
Receiver rec = config.getReceivers(stack)[0];
|
||||
if(rec.getMagazine(stack).getAmount(stack, null) <= 0) {
|
||||
updateState(FireState.RELOADING, 20, gun, stack);
|
||||
} else if(ItemGunBaseNT.getState(stack, 0) == GunState.IDLE) {
|
||||
updateState(FireState.FIRING, host.worldObj.rand.nextInt(burstTime), gun, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateState(FireState toState, int time, ItemGunBaseNT gun, ItemStack stack) {
|
||||
state = toState;
|
||||
stateTimer = time;
|
||||
|
||||
switch(state) {
|
||||
case FIRING: updateKeybind(gun, stack, EnumKeybind.GUN_PRIMARY);
|
||||
case RELOADING: updateKeybind(gun, stack, EnumKeybind.RELOAD);
|
||||
default: clearKeybinds(gun, stack); break;
|
||||
}
|
||||
}
|
||||
|
||||
private void clearKeybinds(ItemGunBaseNT gun, ItemStack stack) {
|
||||
updateKeybind(gun, stack, null);
|
||||
}
|
||||
|
||||
private void updateKeybind(ItemGunBaseNT gun, ItemStack stack, EnumKeybind bind) {
|
||||
// Turn body to face firing direction, since the gun is attached to that, not the head
|
||||
// Also apply accuracy debuff just before firing
|
||||
if(bind != null && bind != EnumKeybind.RELOAD) {
|
||||
host.rotationYawHead += (host.worldObj.rand.nextFloat() - 0.5F) * inaccuracy;
|
||||
host.rotationPitch += (host.worldObj.rand.nextFloat() - 0.5F) * inaccuracy;
|
||||
host.rotationYaw = host.rotationYawHead;
|
||||
}
|
||||
|
||||
gun.handleKeybind(host, null, stack, EnumKeybind.GUN_PRIMARY, bind == EnumKeybind.GUN_PRIMARY);
|
||||
gun.handleKeybind(host, null, stack, EnumKeybind.GUN_SECONDARY, bind == EnumKeybind.GUN_SECONDARY);
|
||||
gun.handleKeybind(host, null, stack, EnumKeybind.GUN_TERTIARY, bind == EnumKeybind.GUN_TERTIARY);
|
||||
gun.handleKeybind(host, null, stack, EnumKeybind.RELOAD, bind == EnumKeybind.RELOAD);
|
||||
}
|
||||
|
||||
public ItemGunBaseNT getYerGun() {
|
||||
ItemStack stack = host.getHeldItem();
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ItemGunBaseNT)) return null;
|
||||
|
||||
return (ItemGunBaseNT) stack.getItem();
|
||||
}
|
||||
|
||||
}
|
||||
@ -86,7 +86,7 @@ public class EntityGlyphidBehemoth extends EntityGlyphid {
|
||||
public void acidAttack(){
|
||||
if(!worldObj.isRemote && entityToAttack instanceof EntityLivingBase && this.getDistanceToEntity(entityToAttack) < 20) {
|
||||
this.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2 * 20, 6));
|
||||
EntityChemical chem = new EntityChemical(worldObj, this);
|
||||
EntityChemical chem = new EntityChemical(worldObj, this, 0, 0, 0);
|
||||
|
||||
chem.setFluid(Fluids.SULFURIC_ACID);
|
||||
worldObj.spawnEntityInWorld(chem);
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
package com.hbm.entity.projectile;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.TrackerUtil;
|
||||
import com.hbm.util.Vec3NT;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EntityTrackerEntry;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -19,6 +23,7 @@ public class EntityBulletBaseMK4 extends EntityThrowableInterp {
|
||||
public double accel;
|
||||
public float damage;
|
||||
public int ricochets = 0;
|
||||
public Entity lockonTarget = null;
|
||||
|
||||
public EntityBulletBaseMK4(World world) {
|
||||
super(world);
|
||||
@ -49,6 +54,10 @@ public class EntityBulletBaseMK4 extends EntityThrowableInterp {
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionY = (-MathHelper.sin(this.rotationPitch / 180.0F * (float) Math.PI));
|
||||
|
||||
/*motionX += entity.motionX;
|
||||
motionY += entity.motionY;
|
||||
motionZ += entity.motionZ;*/
|
||||
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, 1.0F, this.config.spread + gunSpread);
|
||||
}
|
||||
@ -90,6 +99,22 @@ public class EntityBulletBaseMK4 extends EntityThrowableInterp {
|
||||
double dY = this.posY - this.prevPosY;
|
||||
double dZ = this.posZ - this.prevPosZ;
|
||||
|
||||
if(this.lockonTarget != null && !this.lockonTarget.isDead) {
|
||||
Vec3NT motion = new Vec3NT(motionX, motionY, motionZ);
|
||||
double vel = motion.lengthVector();
|
||||
Vec3NT delta = new Vec3NT(lockonTarget.posX - posX, lockonTarget.posY + lockonTarget.height / 2D - posY, lockonTarget.posZ - posZ);
|
||||
float turn = Math.min(0.005F * this.ticksExisted, 1F);
|
||||
Vec3NT newVec = new Vec3NT(
|
||||
BobMathUtil.interp(motion.xCoord, delta.xCoord, turn),
|
||||
BobMathUtil.interp(motion.yCoord, delta.yCoord, turn),
|
||||
BobMathUtil.interp(motion.zCoord, delta.zCoord, turn)).normalizeSelf().multiply(vel);
|
||||
this.motionX = newVec.xCoord;
|
||||
this.motionY = newVec.yCoord;
|
||||
this.motionZ = newVec.zCoord;
|
||||
EntityTrackerEntry entry = TrackerUtil.getTrackerEntry((WorldServer) worldObj, this.getEntityId());
|
||||
entry.lastYaw = MathHelper.floor_float(this.rotationYaw * 256.0F / 360.0F) + 10; //force-trigger rotation update
|
||||
}
|
||||
|
||||
this.prevVelocity = this.velocity;
|
||||
this.velocity = Math.sqrt(dX * dX + dY * dY + dZ * dZ);
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ public class EntityChemical extends EntityThrowableNT {
|
||||
this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
public EntityChemical(World world, EntityLivingBase thrower) {
|
||||
public EntityChemical(World world, EntityLivingBase thrower, double sideOffset, double heightOffset, double frontOffset) {
|
||||
super(world, thrower);
|
||||
this.ignoreFrustumCheck = true;
|
||||
this.isImmuneToFire = true;
|
||||
|
||||
@ -310,7 +310,7 @@ public class OreDictManager {
|
||||
public static final DictGroup ANY_HARDPLASTIC = new DictGroup("AnyHardPlastic", PC, PVC);
|
||||
/** Any post nuclear steel like TCA or CDA */
|
||||
public static final DictGroup ANY_RESISTANTALLOY = new DictGroup("AnyResistantAlloy", TCALLOY, CDALLOY);
|
||||
/** Any post nuclear steel like TCA or CDA */
|
||||
/** Any post RBMK bronze like BB or AB */
|
||||
public static final DictGroup ANY_BISMOIDBRONZE = new DictGroup("AnyBismoidBronze", BBRONZE, ABRONZE);
|
||||
/** Any "powder" propellant like gunpowder, ballistite and cordite */
|
||||
public static final DictFrame ANY_GUNPOWDER = new DictFrame("AnyPropellant");
|
||||
@ -462,11 +462,11 @@ public class OreDictManager {
|
||||
* RARE METALS
|
||||
*/
|
||||
AUSTRALIUM .nugget(nugget_australium) .billet(billet_australium) .ingot(ingot_australium) .dust(powder_australium) .block(block_australium) .ore(ore_australium);
|
||||
REIIUM .nugget(nugget_reiium) .ingot(ingot_reiium) .dust(powder_reiium) .block(block_reiium);
|
||||
WEIDANIUM .nugget(nugget_weidanium) .ingot(ingot_weidanium) .dust(powder_weidanium) .block(block_weidanium);
|
||||
UNOBTAINIUM .nugget(nugget_unobtainium) .ingot(ingot_unobtainium) .dust(powder_unobtainium) .block(block_unobtainium);
|
||||
VERTICIUM .nugget(nugget_verticium) .ingot(ingot_verticium) .dust(powder_verticium) .block(block_verticium);
|
||||
DAFFERGON .nugget(nugget_daffergon) .ingot(ingot_daffergon) .dust(powder_daffergon) .block(block_daffergon);
|
||||
REIIUM .block(block_reiium);
|
||||
WEIDANIUM .block(block_weidanium);
|
||||
UNOBTAINIUM .block(block_unobtainium);
|
||||
VERTICIUM .block(block_verticium);
|
||||
DAFFERGON .block(block_daffergon);
|
||||
|
||||
/*
|
||||
* RARE EARTHS
|
||||
@ -547,6 +547,7 @@ public class OreDictManager {
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.smeltable == SmeltingBehavior.SMELTABLE) {
|
||||
if(mat.shapes.contains(MaterialShapes.BOLT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.BOLT.name() + name, new ItemStack(ModItems.bolt, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.INGOT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.INGOT.name() + name, new ItemStack(ModItems.ingot_raw, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.CASTPLATE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.CASTPLATE.name() + name, new ItemStack(ModItems.plate_cast, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.WELDEDPLATE)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.WELDEDPLATE.name() + name, new ItemStack(ModItems.plate_welded, 1, mat.id));
|
||||
if(mat.shapes.contains(MaterialShapes.HEAVY_COMPONENT)) for(String name : mat.names) OreDictionary.registerOre(MaterialShapes.HEAVY_COMPONENT.name() + name, new ItemStack(ModItems.heavy_component, 1, mat.id));
|
||||
@ -651,16 +652,6 @@ public class OreDictManager {
|
||||
OreDictionary.registerOre("container1000lubricant", bdcl);
|
||||
OreDictionary.registerOre("itemSilicon", billet_silicon);
|
||||
|
||||
//Legacy wires
|
||||
OreDictionary.registerOre(AL.wireFine(), wire_aluminium);
|
||||
OreDictionary.registerOre(CU.wireFine(), wire_copper);
|
||||
OreDictionary.registerOre(MINGRADE.wireFine(), wire_red_copper);
|
||||
OreDictionary.registerOre(GOLD.wireFine(), wire_gold);
|
||||
OreDictionary.registerOre(W.wireFine(), wire_tungsten);
|
||||
OreDictionary.registerOre(ALLOY.wireFine(), wire_advanced_alloy);
|
||||
OreDictionary.registerOre(MAGTUNG.wireFine(), wire_magnetized_tungsten);
|
||||
OreDictionary.registerOre(SA326.wireFine(), wire_schrabidium);
|
||||
|
||||
for(NTMMaterial mat : Mats.orderedList) {
|
||||
if(mat.shapes.contains(MaterialShapes.FRAGMENT)) {
|
||||
String name = mat.names[0];
|
||||
|
||||
@ -618,8 +618,11 @@ public class Fluids {
|
||||
|
||||
SODIUM.addTraits(new FT_Heatable().setEff(HeatingType.PWR, 2.5D).setEff(HeatingType.ICF, 3D).addStep(400, 1, SODIUM_HOT, 1));
|
||||
SODIUM_HOT.addTraits(new FT_Coolable(SODIUM, 1, 1, 400).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
/* Fuck you, this is final now. If you had any concerns, you could have told me like a normal person instead of shitting on in-dev values that change every other day */
|
||||
LEAD.addTraits(new FT_Heatable().setEff(HeatingType.PWR, 0.75D).setEff(HeatingType.ICF, 4D).addStep(800, 1, LEAD_HOT, 1), new FT_PWRModerator(0.75D));
|
||||
LEAD_HOT.addTraits(new FT_Coolable(LEAD, 1, 1, 680 /* -15% is not a huge nerf but it will piss off the PWRmaxxers hard, lead should not be the end-all-be-all, especially given the cost */).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
/* Or maybe not, because I blocked your sorry ass. Guess why that is? */
|
||||
LEAD_HOT.addTraits(new FT_Coolable(LEAD, 1, 1, 680).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
/* Maybe shittalking me in some corner where you thought I wouldn't listen was not that bright of an idea afterall? */
|
||||
|
||||
THORIUM_SALT.addTraits(new FT_Heatable().setEff(HeatingType.PWR, 1.0D).addStep(400, 1, THORIUM_SALT_HOT, 1), new FT_PWRModerator(2.5D));
|
||||
THORIUM_SALT_HOT.addTraits(new FT_Coolable(THORIUM_SALT_DEPLETED, 1, 1, 400).setEff(CoolingType.HEATEXCHANGER, 1.0D));
|
||||
|
||||
@ -23,6 +23,7 @@ import com.hbm.inventory.material.Mats.MaterialStack;
|
||||
import com.hbm.inventory.recipes.loader.SerializableRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumAshType;
|
||||
import com.hbm.items.ItemEnums.EnumCasingType;
|
||||
import com.hbm.util.Compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@ -57,6 +58,11 @@ public class MatDistribution extends SerializableRecipe {
|
||||
registerEntry(ModItems.stamp_obsidian_flat, MAT_OBSIDIAN, INGOT.q(3));
|
||||
registerEntry(ModItems.pipes_steel, MAT_STEEL, BLOCK.q(3));
|
||||
|
||||
registerEntry(DictFrame.fromOne(ModItems.casing, EnumCasingType.SMALL), MAT_GUNMETAL, PLATE.q(1, 4));
|
||||
registerEntry(DictFrame.fromOne(ModItems.casing, EnumCasingType.SMALL_STEEL), MAT_WEAPONSTEEL, PLATE.q(1, 4));
|
||||
registerEntry(DictFrame.fromOne(ModItems.casing, EnumCasingType.LARGE), MAT_GUNMETAL, PLATE.q(1, 2));
|
||||
registerEntry(DictFrame.fromOne(ModItems.casing, EnumCasingType.LARGE_STEEL), MAT_WEAPONSTEEL, PLATE.q(1, 2));
|
||||
|
||||
//actual ores
|
||||
if(!Compat.isModLoaded(Compat.MOD_GT6)) {
|
||||
registerOre(OreDictManager.IRON.ore(), MAT_IRON, INGOT.q(2), MAT_TITANIUM, NUGGET.q(3), MAT_STONE, QUART.q(1));
|
||||
@ -93,6 +99,7 @@ public class MatDistribution extends SerializableRecipe {
|
||||
if(key instanceof Item) comp = new ComparableStack((Item) key);
|
||||
if(key instanceof Block) comp = new ComparableStack((Block) key);
|
||||
if(key instanceof ItemStack) comp = new ComparableStack((ItemStack) key);
|
||||
if(key instanceof ComparableStack) comp = (ComparableStack) key;
|
||||
|
||||
if(comp == null) return;
|
||||
if(matDef.length % 2 == 1) return;
|
||||
|
||||
@ -50,7 +50,7 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_WOOD = makeNonSmeltable(_VS + 03, WOOD, 0x896727, 0x281E0B, 0x896727).setShapes(STOCK, GRIP).n();
|
||||
public static final NTMMaterial MAT_IVORY = makeNonSmeltable(_VS + 04, BONE, 0xFFFEEE, 0x797870, 0xEDEBCA).setShapes(GRIP).n();
|
||||
public static final NTMMaterial MAT_STONE = makeSmeltable(_VS + 00, df("Stone"), 0x7F7F7F, 0x353535, 0x4D2F23).n();
|
||||
public static final NTMMaterial MAT_CARBON = makeAdditive( 699, CARBON, 0x363636, 0x030303, 0x404040).setShapes(WIRE, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_CARBON = makeAdditive( 699, CARBON, 0x363636, 0x030303, 0x404040).setShapes(WIRE, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COAL = makeNonSmeltable(600, COAL, 0x363636, 0x030303, 0x404040).setConversion(MAT_CARBON, 2, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_LIGNITE = makeNonSmeltable(601, LIGNITE, 0x542D0F, 0x261508, 0x472913).setConversion(MAT_CARBON, 3, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_COALCOKE = make( 610, COALCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
@ -58,8 +58,8 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_LIGCOKE = make( 612, LIGCOKE) .setConversion(MAT_CARBON, 4, 3).n();
|
||||
public static final NTMMaterial MAT_GRAPHITE = make( 620, GRAPHITE) .setConversion(MAT_CARBON, 1, 1).n();
|
||||
public static final NTMMaterial MAT_DIAMOND = makeNonSmeltable(1430, DIAMOND, 0xFFFFFF, 0x1B7B6B, 0x8CF4E2).setConversion(MAT_CARBON, 1, 1).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setShapes(FRAGMENT, INGOT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(FRAGMENT, WIRE, NUGGET, INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_IRON = makeSmeltable(2600, IRON, 0xFFFFFF, 0x353535, 0xFFA259).setShapes(FRAGMENT, DUST, PIPE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GOLD = makeSmeltable(7900, GOLD, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(FRAGMENT, WIRE, NUGGET, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_REDSTONE = makeSmeltable(_VS + 01, REDSTONE, 0xE3260C, 0x700E06, 0xFF1000).setShapes(FRAGMENT).n();
|
||||
public static final NTMMaterial MAT_OBSIDIAN = makeSmeltable(_VS + 02, df("Obsidian"), 0x3D234D).n();
|
||||
public static final NTMMaterial MAT_HEMATITE = makeAdditive( 2601, HEMATITE, 0xDFB7AE, 0x5F372E, 0x6E463D).m();
|
||||
@ -69,57 +69,57 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_MALACHITE = makeAdditive( 2901, MALACHITE, 0xA2F0C8, 0x227048, 0x61AF87).m();
|
||||
|
||||
//Radioactive
|
||||
public static final NTMMaterial MAT_URANIUM = makeSmeltable(9200, U, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U233 = makeSmeltable(9233, U233, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U235 = makeSmeltable(9235, U235, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U238 = makeSmeltable(9238, U238, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_THORIUM = makeSmeltable(9032, TH232, 0xBF825F, 0x1C0000, 0xBF825F).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PLUTONIUM = makeSmeltable(9400, PU, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGP = makeSmeltable(9401, PURG, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU238 = makeSmeltable(9438, PU238, 0xFFBC59, 0xFF8E2B, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU239 = makeSmeltable(9439, PU239, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU240 = makeSmeltable(9440, PU240, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU241 = makeSmeltable(9441, PU241, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGA = makeSmeltable(9501, AMRG, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM241 = makeSmeltable(9541, AM241, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM242 = makeSmeltable(9542, AM242, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEPTUNIUM = makeSmeltable(9337, NP237, 0xA6B2A6, 0x030F03, 0x647064).setShapes(NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_POLONIUM = makeSmeltable(8410, PO210, 0x968779, 0x3D1509, 0x715E4A).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_TECHNETIUM = makeSmeltable(4399, TC99, 0xFAFFFF, 0x576C6C, 0xCADFDF).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0xFCFCFC, 0xADBFBA, 0xE9FAF6).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ACTINIUM = makeSmeltable(8927, AC227, 0xECE0E0, 0x221616, 0x958989).setShapes(NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_CO60 = makeSmeltable(2760, CO60, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_AU198 = makeSmeltable(7998, AU198, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_PB209 = makeSmeltable(8209, PB209, 0xB38A94, 0x12020E, 0x7B535D).setShapes(NUGGET, BILLET, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDIUM = makeSmeltable(12626, SA326, 0x32FFFF, 0x005C5C, 0x32FFFF).setShapes(NUGGET, WIRE, BILLET, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SOLINIUM = makeSmeltable(12627, SA327, 0xA2E6E0, 0x00433D, 0x72B6B0).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDATE = makeSmeltable(12600, SBD, 0x77C0D7, 0x39005E, 0x6589B4).setShapes(INGOT, DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SCHRARANIUM = makeSmeltable(12601, SRN, 0x2B3227, 0x2B3227, 0x24AFAC).setShapes(INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_GHIORSIUM = makeSmeltable(12836, GH336, 0xF4EFE1, 0x2A3306, 0xC6C6A1).setShapes(NUGGET, BILLET, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_URANIUM = makeSmeltable(9200, U, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U233 = makeSmeltable(9233, U233, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U235 = makeSmeltable(9235, U235, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_U238 = makeSmeltable(9238, U238, 0xC1C7BD, 0x2B3227, 0x9AA196).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_THORIUM = makeSmeltable(9032, TH232, 0xBF825F, 0x1C0000, 0xBF825F).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PLUTONIUM = makeSmeltable(9400, PU, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGP = makeSmeltable(9401, PURG, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU238 = makeSmeltable(9438, PU238, 0xFFBC59, 0xFF8E2B, 0x78817E).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU239 = makeSmeltable(9439, PU239, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU240 = makeSmeltable(9440, PU240, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_PU241 = makeSmeltable(9441, PU241, 0x9AA3A0, 0x111A17, 0x78817E).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RGA = makeSmeltable(9501, AMRG, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM241 = makeSmeltable(9541, AM241, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_AM242 = makeSmeltable(9542, AM242, 0xCEB3B9, 0x3A1C21, 0x93767B).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEPTUNIUM = makeSmeltable(9337, NP237, 0xA6B2A6, 0x030F03, 0x647064).setShapes(NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_POLONIUM = makeSmeltable(8410, PO210, 0x968779, 0x3D1509, 0x715E4A).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_TECHNETIUM = makeSmeltable(4399, TC99, 0xFAFFFF, 0x576C6C, 0xCADFDF).setShapes(FRAGMENT, NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_RADIUM = makeSmeltable(8826, RA226, 0xFCFCFC, 0xADBFBA, 0xE9FAF6).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ACTINIUM = makeSmeltable(8927, AC227, 0xECE0E0, 0x221616, 0x958989).setShapes(NUGGET, BILLET).m();
|
||||
public static final NTMMaterial MAT_CO60 = makeSmeltable(2760, CO60, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(NUGGET, BILLET, DUST).m();
|
||||
public static final NTMMaterial MAT_AU198 = makeSmeltable(7998, AU198, 0xFFFF8B, 0xC26E00, 0xE8D754).setShapes(NUGGET, BILLET, DUST).m();
|
||||
public static final NTMMaterial MAT_PB209 = makeSmeltable(8209, PB209, 0xB38A94, 0x12020E, 0x7B535D).setShapes(NUGGET, BILLET, DUST).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDIUM = makeSmeltable(12626, SA326, 0x32FFFF, 0x005C5C, 0x32FFFF).setShapes(NUGGET, WIRE, BILLET, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SOLINIUM = makeSmeltable(12627, SA327, 0xA2E6E0, 0x00433D, 0x72B6B0).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SCHRABIDATE = makeSmeltable(12600, SBD, 0x77C0D7, 0x39005E, 0x6589B4).setShapes(DUST, DENSEWIRE, CASTPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SCHRARANIUM = makeSmeltable(12601, SRN, 0x2B3227, 0x2B3227, 0x24AFAC).setShapes(BLOCK).m();
|
||||
public static final NTMMaterial MAT_GHIORSIUM = makeSmeltable(12836, GH336, 0xF4EFE1, 0x2A3306, 0xC6C6A1).setShapes(NUGGET, BILLET, BLOCK).m();
|
||||
|
||||
//Base metals
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xF7F3F2, 0x4F4C4B, 0xA99E79).setShapes(FRAGMENT, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(FRAGMENT, WIRE, BOLT, INGOT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(FRAGMENT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(FRAGMENT, NUGGET, WIRE, INGOT, DUST, PLATE, CASTPLATE, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF, 0xB200FF, 0xB200FF).setShapes(FRAGMENT, NUGGET, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setShapes(NUGGET, INGOT).m();
|
||||
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setShapes(NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_TITANIUM = makeSmeltable(2200, TI, 0xF7F3F2, 0x4F4C4B, 0xA99E79).setShapes(FRAGMENT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_COPPER = makeSmeltable(2900, CU, 0xFDCA88, 0x601E0D, 0xC18336).setShapes(FRAGMENT, WIRE, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_TUNGSTEN = makeSmeltable(7400, W, 0x868686, 0x000000, 0x977474).setShapes(FRAGMENT, WIRE, BOLT, DUST, DENSEWIRE, CASTPLATE, WELDEDPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_ALUMINIUM = makeSmeltable(1300, AL, 0xFFFFFF, 0x344550, 0xD0B8EB).setShapes(FRAGMENT, WIRE, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_LEAD = makeSmeltable(8200, PB, 0xA6A6B2, 0x03030F, 0x646470).setShapes(FRAGMENT, NUGGET, WIRE, DUST, PLATE, CASTPLATE, PIPE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BISMUTH = makeSmeltable(8300, BI, 0xB200FF, 0xB200FF, 0xB200FF).setShapes(FRAGMENT, NUGGET, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ARSENIC = makeSmeltable(3300, AS, 0x6CBABA, 0x242525, 0x558080).setShapes(NUGGET).m();
|
||||
public static final NTMMaterial MAT_TANTALIUM = makeSmeltable(7300, TA, 0xFFFFFF, 0x1D1D36, 0xA89B74).setShapes(NUGGET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NEODYMIUM = makeSmeltable(6000, ND, 0xE6E6B6, 0x1C1C00, 0x8F8F5F).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(FRAGMENT, NUGGET, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setShapes(FRAGMENT, NUGGET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_NIOBIUM = makeSmeltable(4100, NB, 0xB76EC9, 0x2F2D42, 0xD576B1).setShapes(FRAGMENT, NUGGET, DUSTTINY, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BERYLLIUM = makeSmeltable(400, BE, 0xB2B2A6, 0x0F0F03, 0xAE9572).setShapes(FRAGMENT, NUGGET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_EMERALD = makeNonSmeltable(401, EMERALD, 0xBAFFD4, 0x003900, 0x17DD62).setConversion(MAT_BERYLLIUM, 4, 3).setShapes(FRAGMENT, DUST, GEM, BLOCK).n();
|
||||
public static final NTMMaterial MAT_COBALT = makeSmeltable(2700, CO, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(FRAGMENT, NUGGET, DUSTTINY, BILLET, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(FRAGMENT, DUSTTINY, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORAX = makeSmeltable(501, BORAX, 0xFFFFFF, 0x946E23, 0xFFECC6).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_LANTHANIUM = makeSmeltable(5700, LA, 0xC8E0E0, 0x3B5353, 0xA1B9B9).setShapes(FRAGMENT, INGOT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(FRAGMENT, NUGGET, WIRE, DUSTTINY, BILLET, INGOT, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_COBALT = makeSmeltable(2700, CO, 0xC2D1EE, 0x353554, 0x8F72AE).setShapes(FRAGMENT, NUGGET, DUSTTINY, BILLET, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORON = makeSmeltable(500, B, 0xBDC8D2, 0x29343E, 0xAD72AE).setShapes(FRAGMENT, DUSTTINY, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_BORAX = makeSmeltable(501, BORAX, 0xFFFFFF, 0x946E23, 0xFFECC6).setShapes(FRAGMENT, INGOT, DUST).n();
|
||||
public static final NTMMaterial MAT_LANTHANIUM = makeSmeltable(5700, LA, 0xC8E0E0, 0x3B5353, 0xA1B9B9).setShapes(FRAGMENT, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ZIRCONIUM = makeSmeltable(4000, ZR, 0xE3DCBE, 0x3E3719, 0xADA688).setShapes(FRAGMENT, NUGGET, WIRE, DUSTTINY, BILLET, DUST, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SODIUM = makeSmeltable(1100, NA, 0xD3BF9E, 0x3A5A6B, 0x7E9493).setShapes(FRAGMENT, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SODALITE = makeNonSmeltable(1101, SODALITE, 0xDCE5F6, 0x4927B4, 0x96A7E6).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(FRAGMENT, DUST).m();
|
||||
public static final NTMMaterial MAT_CALCIUM = makeSmeltable(2000, CA, 0xCFCFA6, 0x747F6E, 0xB7B784).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_LITHIUM = makeSmeltable(300, LI, 0xFFFFFF, 0x818181, 0xD6D6D6).setShapes(FRAGMENT, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_STRONTIUM = makeSmeltable(3800, SR, 0xF1E8BA, 0x271E00, 0xCAC193).setShapes(FRAGMENT, INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_CALCIUM = makeSmeltable(2000, CA, 0xCFCFA6, 0x747F6E, 0xB7B784).setShapes(DUST).m();
|
||||
public static final NTMMaterial MAT_LITHIUM = makeSmeltable(300, LI, 0xFFFFFF, 0x818181, 0xD6D6D6).setShapes(FRAGMENT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_SULFUR = makeNonSmeltable(1600, S, 0xFCEE80, 0xBDA022, 0xF1DF68).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_KNO = makeNonSmeltable(700, KNO, 0xD4D4D4, 0x969696, 0xC9C9C9).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
public static final NTMMaterial MAT_FLUORITE = makeNonSmeltable(900, F, 0xFFFFFF, 0xB0A192, 0xE1DBD4).setShapes(FRAGMENT, DUST, BLOCK).n();
|
||||
@ -127,36 +127,36 @@ public class Mats {
|
||||
public static final NTMMaterial MAT_CHLOROCALCITE = makeNonSmeltable(1701, CHLOROCALCITE, 0xF7E761, 0x475B46, 0xB8B963).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_MOLYSITE = makeNonSmeltable(1702, MOLYSITE, 0xF9E97B, 0x216E00, 0xD0D264).setShapes(FRAGMENT, DUST).n();
|
||||
public static final NTMMaterial MAT_CINNABAR = makeNonSmeltable(8001, CINNABAR, 0xD87070, 0x993030, 0xBF4E4E).setShapes(FRAGMENT, GEM).n();
|
||||
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(INGOT, DUST).m();
|
||||
public static final NTMMaterial MAT_SILICON = makeSmeltable(1400, SI, 0xD1D7DF, 0x1A1A3D, 0x878B9E).setShapes(FRAGMENT, NUGGET, BILLET, INGOT).m();
|
||||
public static final NTMMaterial MAT_ASBESTOS = makeSmeltable(1401, ASBESTOS, 0xD8D9CF, 0x616258, 0xB0B3A8).setShapes(FRAGMENT, INGOT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, INGOT, CASTPLATE, WELDEDPLATE).m();
|
||||
public static final NTMMaterial MAT_CADMIUM = makeSmeltable(4800, CD, 0xFFFADE, 0x350000, 0xA85600).setShapes(DUST).m();
|
||||
public static final NTMMaterial MAT_SILICON = makeSmeltable(1400, SI, 0xD1D7DF, 0x1A1A3D, 0x878B9E).setShapes(FRAGMENT, NUGGET, BILLET).m();
|
||||
public static final NTMMaterial MAT_ASBESTOS = makeSmeltable(1401, ASBESTOS, 0xD8D9CF, 0x616258, 0xB0B3A8).setShapes(FRAGMENT, BLOCK).n();
|
||||
public static final NTMMaterial MAT_OSMIRIDIUM = makeSmeltable(7699, OSMIRIDIUM, 0xDBE3EF, 0x7891BE, 0xACBDD9).setShapes(NUGGET, CASTPLATE, WELDEDPLATE).m();
|
||||
|
||||
//Alloys
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, WIRE, INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_MINGRADE = makeSmeltable(_AS + 1, MINGRADE, 0xFFBA7D, 0xAF1700, 0xE44C0F).setShapes(WIRE, INGOT, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, INGOT, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(BOLT, INGOT, DUST, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setShapes(INGOT, DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).setShapes(INGOT).m();
|
||||
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setShapes(INGOT, DUST, CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setShapes(INGOT, CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BBRONZE = makeSmeltable(_AS + 16, BBRONZE, 0xE19A69, 0x485353, 0x987D65).setShapes(INGOT, CASTPLATE).m();
|
||||
public static final NTMMaterial MAT_ABRONZE = makeSmeltable(_AS + 17, ABRONZE, 0xDB9462, 0x203331, 0x77644D).setShapes(INGOT, CASTPLATE).m();
|
||||
public static final NTMMaterial MAT_BSCCO = makeSmeltable(_AS + 18, BSCCO, 0x767BF1, 0x000000, 0x5E62C0).setShapes(INGOT, DENSEWIRE).m();
|
||||
public static final NTMMaterial MAT_MAGTUNG = makeSmeltable(_AS + 8, MAGTUNG, 0x22A2A2, 0x0F0F0F, 0x22A2A2).setShapes(WIRE, INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_CMB = makeSmeltable(_AS + 9, CMB, 0x6F6FB4, 0x000011, 0x6F6FB4).setShapes(INGOT, DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_DNT = makeSmeltable(_AS + 15, DNT, 0x7582B9, 0x16000E, 0x455289).setShapes(INGOT, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_STEEL = makeSmeltable(_AS + 0, STEEL, 0xAFAFAF, 0x0F0F0F, 0x4A4A4A).setShapes(DUSTTINY, BOLT, WIRE, DUST, PLATE, CASTPLATE, WELDEDPLATE, SHELL, PIPE, BLOCK, HEAVY_COMPONENT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_MINGRADE = makeSmeltable(_AS + 1, MINGRADE, 0xFFBA7D, 0xAF1700, 0xE44C0F).setShapes(WIRE, DUST, BLOCK).m();
|
||||
public static final NTMMaterial MAT_ALLOY = makeSmeltable(_AS + 2, ALLOY, 0xFF8330, 0x700000, 0xFF7318).setShapes(WIRE, DUST, DENSEWIRE, PLATE, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_DURA = makeSmeltable(_AS + 3, DURA, 0x183039, 0x030B0B, 0x376373).setShapes(BOLT, DUST, PIPE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, GRIP).m();
|
||||
public static final NTMMaterial MAT_DESH = makeSmeltable(_AS + 12, DESH, 0xFF6D6D, 0x720000, 0xF22929).setShapes(DUST, CASTPLATE, BLOCK, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_STAR = makeSmeltable(_AS + 5, STAR, 0xCCCCEA, 0x11111A, 0xA5A5D3).setShapes(DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_FERRO = makeSmeltable(_AS + 7, FERRO, 0xB7B7C9, 0x101022, 0x6B6B8B).m();
|
||||
public static final NTMMaterial MAT_TCALLOY = makeSmeltable(_AS + 6, TCALLOY, 0xD4D6D6, 0x323D3D, 0x9CA6A6).setShapes(DUST, CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_CDALLOY = makeSmeltable(_AS + 13, CDALLOY, 0xF7DF8F, 0x604308, 0xFBD368).setShapes(CASTPLATE, WELDEDPLATE, HEAVY_COMPONENT).m();
|
||||
public static final NTMMaterial MAT_BBRONZE = makeSmeltable(_AS + 16, BBRONZE, 0xE19A69, 0x485353, 0x987D65).setShapes(CASTPLATE).m();
|
||||
public static final NTMMaterial MAT_ABRONZE = makeSmeltable(_AS + 17, ABRONZE, 0xDB9462, 0x203331, 0x77644D).setShapes(CASTPLATE).m();
|
||||
public static final NTMMaterial MAT_BSCCO = makeSmeltable(_AS + 18, BSCCO, 0x767BF1, 0x000000, 0x5E62C0).setShapes(DENSEWIRE).m();
|
||||
public static final NTMMaterial MAT_MAGTUNG = makeSmeltable(_AS + 8, MAGTUNG, 0x22A2A2, 0x0F0F0F, 0x22A2A2).setShapes(WIRE, DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_CMB = makeSmeltable(_AS + 9, CMB, 0x6F6FB4, 0x000011, 0x6F6FB4).setShapes(DUST, PLATE, CASTPLATE, WELDEDPLATE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_DNT = makeSmeltable(_AS + 15, DNT, 0x7582B9, 0x16000E, 0x455289).setShapes(DUST, DENSEWIRE, BLOCK).m();
|
||||
public static final NTMMaterial MAT_FLUX = makeAdditive(_AS + 10, df("Flux"), 0xF1E0BB, 0x6F6256, 0xDECCAD).setShapes(DUST).n();
|
||||
public static final NTMMaterial MAT_SLAG = makeSmeltable(_AS + 11, SLAG, 0x554940, 0x34281F, 0x6C6562).setShapes(BLOCK).n();
|
||||
public static final NTMMaterial MAT_MUD = makeSmeltable(_AS + 14, MUD, 0xBCB5A9, 0x481213, 0x96783B).setShapes(INGOT).n();
|
||||
public static final NTMMaterial MAT_GUNMETAL = makeSmeltable(_AS + 19, GUNMETAL, 0xFFEF3F, 0xAD3600, 0xF9C62C).setShapes(INGOT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).n();
|
||||
public static final NTMMaterial MAT_WEAPONSTEEL = makeSmeltable(_AS + 20, WEAPONSTEEL, 0xA0A0A0, 0x000000, 0x808080).setShapes(INGOT, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).n();
|
||||
public static final NTMMaterial MAT_SATURN = makeSmeltable(_AS + 4, BIGMT, 0x3AC4DA, 0x09282C, 0x30A4B7).setShapes(INGOT, PLATE, CASTPLATE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).m();
|
||||
public static final NTMMaterial MAT_MUD = makeSmeltable(_AS + 14, MUD, 0xBCB5A9, 0x481213, 0x96783B).n();
|
||||
public static final NTMMaterial MAT_GUNMETAL = makeSmeltable(_AS + 19, GUNMETAL, 0xFFEF3F, 0xAD3600, 0xF9C62C).setShapes(LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).n();
|
||||
public static final NTMMaterial MAT_WEAPONSTEEL = makeSmeltable(_AS + 20, WEAPONSTEEL, 0xA0A0A0, 0x000000, 0x808080).setShapes(LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).n();
|
||||
public static final NTMMaterial MAT_SATURN = makeSmeltable(_AS + 4, BIGMT, 0x3AC4DA, 0x09282C, 0x30A4B7).setShapes(PLATE, CASTPLATE, BLOCK, LIGHTBARREL, HEAVYBARREL, LIGHTRECEIVER, HEAVYRECEIVER, MECHANISM, STOCK, GRIP).m();
|
||||
|
||||
//Extension
|
||||
public static final NTMMaterial MAT_RAREEARTH = makeNonSmeltable(_ES + 00, RAREEARTH, 0xC1BDBD, 0x384646, 0x7B7F7F).setShapes(FRAGMENT, INGOT).n();
|
||||
public static final NTMMaterial MAT_RAREEARTH = makeNonSmeltable(_ES + 00, RAREEARTH, 0xC1BDBD, 0x384646, 0x7B7F7F).setShapes(FRAGMENT).n();
|
||||
|
||||
public static NTMMaterial makeSmeltable(int id, DictFrame dict, int color) { return makeSmeltable(id, dict, color, color, color); }
|
||||
|
||||
|
||||
@ -44,7 +44,6 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack("dustActinium"), new ItemStack(ModItems.powder_thorium), liA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack(U.dust()), new ItemStack(ModItems.powder_neptunium), liA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium), new OreDictStack(NP237.dust()), new ItemStack(ModItems.powder_plutonium), liA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_lithium), new ComparableStack(ModItems.powder_reiium), new ItemStack(ModItems.powder_weidanium), liA);
|
||||
/// LITHIUM END ///
|
||||
|
||||
/// BERYLLIUM START ///
|
||||
@ -57,7 +56,6 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium), new ComparableStack(ModItems.powder_strontium), new ItemStack(ModItems.powder_niobium), beA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium), new ComparableStack(ModItems.powder_cerium), new ItemStack(ModItems.powder_neodymium), beA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium), new OreDictStack("dustThorium"), new ItemStack(ModItems.powder_uranium), beA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_beryllium), new ComparableStack(ModItems.powder_weidanium), new ItemStack(ModItems.powder_australium), beA);
|
||||
/// BERYLLIUM END ///
|
||||
|
||||
/// CARBON START ///
|
||||
@ -71,7 +69,6 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.ingot_mercury), new ItemStack(ModItems.powder_polonium), caA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon), new OreDictStack(PB.dust()), new ItemStack(ModItems.powder_ra226),caA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_astatine), new ItemStack(ModItems.powder_actinium), caA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_carbon), new ComparableStack(ModItems.powder_australium), new ItemStack(ModItems.powder_verticium), caA);
|
||||
/// CARBON END ///
|
||||
|
||||
/// COPPER START ///
|
||||
@ -87,7 +84,6 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper), new ComparableStack(ModItems.powder_iodine), new ItemStack(ModItems.powder_polonium), coA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper), new ComparableStack(ModItems.powder_caesium), new ItemStack(ModItems.powder_actinium), coA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper), new OreDictStack("dustGold"), new ItemStack(ModItems.powder_uranium), coA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_copper), new ComparableStack(ModItems.powder_verticium), new ItemStack(ModItems.powder_unobtainium), coA);
|
||||
/// COPPER END ///
|
||||
|
||||
/// PLUTONIUM START ///
|
||||
@ -95,13 +91,10 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new OreDictStack("dustPhosphorus"), new ItemStack(ModItems.powder_tennessine), plA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new OreDictStack(PU.dust()), new ItemStack(ModItems.powder_tennessine), plA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.powder_tennessine), new ItemStack(ModItems.powder_reiium), plA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.powder_tennessine), new ItemStack(ModItems.powder_australium), plA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.pellet_charged), new ItemStack(ModItems.nugget_schrabidium), 1000);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.powder_unobtainium), new ItemStack(ModItems.powder_daffergon), plA);
|
||||
makeRecipe(new ComparableStack(ModItems.part_plutonium), new ComparableStack(ModItems.cell_antimatter), new ItemStack(ModItems.cell_anti_schrabidium), 0);
|
||||
/// PLUTONIUM END ///
|
||||
|
||||
///TODO: fictional elements
|
||||
}
|
||||
|
||||
private static void makeRecipe(ComparableStack part, AStack in, ItemStack out, int amat) {
|
||||
@ -124,23 +117,6 @@ public class CyclotronRecipes extends SerializableRecipe {
|
||||
}
|
||||
}
|
||||
|
||||
//there's literally 0 reason why this doesn't work yet it refuses, fuck this
|
||||
|
||||
/*Pair<ItemStack, Integer> output = recipes.get(new Pair(boxStack, comp));
|
||||
|
||||
if(output != null) {
|
||||
return new Object[] { output.getKey().copy(), output.getValue() };
|
||||
}
|
||||
|
||||
for(String name : ItemStackUtil.getOreDictNames(stack)) {
|
||||
OreDictStack ods = new OreDictStack(name);
|
||||
output = recipes.get(new Pair(new ComparableStack(ModItems.part_beryllium), new OreDictStack("dustCobalt")));
|
||||
|
||||
if(output != null) {
|
||||
return new Object[] { output.getKey().copy(), output.getValue() };
|
||||
}
|
||||
}*/
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -77,10 +77,10 @@ public class ItemEnums {
|
||||
}
|
||||
|
||||
public static enum EnumSecretType {
|
||||
CANISTER, CONTROLLER
|
||||
CANISTER, CONTROLLER, SELENIUM_STEEL
|
||||
}
|
||||
|
||||
public static enum EnumCasingType {
|
||||
SMALL, LARGE, SMALL_STEEL, LARGE_STEEL, SHOTSHELL, BUCKSHOT
|
||||
SMALL, LARGE, SMALL_STEEL, LARGE_STEEL, SHOTSHELL, BUCKSHOT, BUCKSHOT_ADVANCED
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,19 +168,9 @@ public class ModItems {
|
||||
public static Item nugget_gh336;
|
||||
|
||||
public static Item ingot_australium;
|
||||
public static Item ingot_weidanium;
|
||||
public static Item ingot_reiium;
|
||||
public static Item ingot_unobtainium;
|
||||
public static Item ingot_daffergon;
|
||||
public static Item ingot_verticium;
|
||||
public static Item nugget_australium;
|
||||
public static Item nugget_australium_lesser;
|
||||
public static Item nugget_australium_greater;
|
||||
public static Item nugget_weidanium;
|
||||
public static Item nugget_reiium;
|
||||
public static Item nugget_unobtainium;
|
||||
public static Item nugget_daffergon;
|
||||
public static Item nugget_verticium;
|
||||
|
||||
public static Item ingot_desh;
|
||||
public static Item nugget_desh;
|
||||
@ -505,11 +495,6 @@ public class ModItems {
|
||||
public static Item powder_sodium;
|
||||
|
||||
public static Item powder_australium;
|
||||
public static Item powder_weidanium;
|
||||
public static Item powder_reiium;
|
||||
public static Item powder_unobtainium;
|
||||
public static Item powder_daffergon;
|
||||
public static Item powder_verticium;
|
||||
|
||||
public static Item powder_dura_steel;
|
||||
public static Item powder_polymer;
|
||||
@ -582,15 +567,6 @@ public class ModItems {
|
||||
public static Item rtg_unit;
|
||||
public static Item levitation_unit;
|
||||
|
||||
public static Item wire_aluminium;
|
||||
public static Item wire_copper;
|
||||
public static Item wire_red_copper;
|
||||
public static Item wire_tungsten;
|
||||
public static Item wire_gold;
|
||||
public static Item wire_schrabidium;
|
||||
public static Item wire_advanced_alloy;
|
||||
public static Item wire_magnetized_tungsten;
|
||||
|
||||
public static Item coil_advanced_alloy;
|
||||
public static Item coil_advanced_torus;
|
||||
public static Item coil_magnetized_tungsten;
|
||||
@ -769,6 +745,7 @@ public class ModItems {
|
||||
public static Item mold_base;
|
||||
public static Item mold;
|
||||
public static Item scraps;
|
||||
public static Item ingot_raw;
|
||||
public static Item plate_cast;
|
||||
public static Item plate_welded;
|
||||
public static Item heavy_component;
|
||||
@ -1529,9 +1506,7 @@ public class ModItems {
|
||||
|
||||
public static Item gun_rpg;
|
||||
public static Item gun_karl;
|
||||
public static Item gun_quadro;
|
||||
public static Item gun_hk69;
|
||||
public static Item gun_stinger;
|
||||
public static Item gun_skystinger;
|
||||
public static Item gun_revolver;
|
||||
public static Item gun_revolver_saturnite;
|
||||
@ -1557,7 +1532,6 @@ public class ModItems {
|
||||
public static Item gun_proto;
|
||||
public static Item gun_mirv;
|
||||
public static Item gun_bf;
|
||||
public static Item gun_chemthrower;
|
||||
public static Item gun_mp40;
|
||||
public static Item gun_thompson;
|
||||
public static Item gun_uzi_silencer;
|
||||
@ -1614,7 +1588,6 @@ public class ModItems {
|
||||
public static Item gun_waluigi;
|
||||
public static Item gun_darter;
|
||||
public static Item gun_glass_cannon;
|
||||
public static Item gun_m2;
|
||||
public static Item gun_lunatic_marksman;
|
||||
public static Item gun_uac_pistol;
|
||||
|
||||
@ -1628,6 +1601,7 @@ public class ModItems {
|
||||
public static Item gun_greasegun;
|
||||
public static Item gun_maresleg;
|
||||
public static Item gun_maresleg_akimbo;
|
||||
public static Item gun_maresleg_broken;
|
||||
public static Item gun_flaregun;
|
||||
public static Item gun_heavy_revolver;
|
||||
public static Item gun_carbine;
|
||||
@ -1640,6 +1614,11 @@ public class ModItems {
|
||||
public static Item gun_spas12;
|
||||
public static Item gun_panzerschreck;
|
||||
public static Item gun_g3;
|
||||
public static Item gun_stinger;
|
||||
public static Item gun_chemthrower;
|
||||
public static Item gun_m2;
|
||||
public static Item gun_autoshotgun;
|
||||
public static Item gun_quadro;
|
||||
|
||||
public static Item ammo_standard;
|
||||
|
||||
@ -2529,7 +2508,6 @@ public class ModItems {
|
||||
ingot_semtex = new ItemLemon(4, 5, true).setUnlocalizedName("ingot_semtex").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_semtex");
|
||||
ingot_c4 = new Item().setUnlocalizedName("ingot_c4").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_c4");
|
||||
ingot_phosphorus = new Item().setUnlocalizedName("ingot_phosphorus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_phosphorus");
|
||||
wire_advanced_alloy = new Item().setUnlocalizedName("wire_advanced_alloy").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_advanced_alloy");
|
||||
coil_advanced_alloy = new Item().setUnlocalizedName("coil_advanced_alloy").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_advanced_alloy");
|
||||
coil_advanced_torus = new Item().setUnlocalizedName("coil_advanced_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_advanced_torus");
|
||||
ingot_magnetized_tungsten = new Item().setUnlocalizedName("ingot_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_magnetized_tungsten");
|
||||
@ -2705,19 +2683,9 @@ public class ModItems {
|
||||
nugget_gh336 = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("nugget_gh336").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_gh336");
|
||||
|
||||
ingot_australium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("ingot_australium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_australium");
|
||||
ingot_weidanium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("ingot_weidanium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ingot_weidanium");
|
||||
ingot_reiium = new ItemCustomLore().setUnlocalizedName("ingot_reiium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ingot_reiium");
|
||||
ingot_unobtainium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("ingot_unobtainium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ingot_unobtainium");
|
||||
ingot_daffergon = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("ingot_daffergon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ingot_daffergon");
|
||||
ingot_verticium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("ingot_verticium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":ingot_verticium");
|
||||
nugget_australium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_australium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_australium");
|
||||
nugget_australium_lesser = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_australium_lesser").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_australium_lesser");
|
||||
nugget_australium_greater = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_australium_greater").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_australium_greater");
|
||||
nugget_weidanium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_weidanium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":nugget_weidanium");
|
||||
nugget_reiium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_reiium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":nugget_reiium");
|
||||
nugget_unobtainium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_unobtainium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":nugget_unobtainium");
|
||||
nugget_daffergon = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_daffergon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":nugget_daffergon");
|
||||
nugget_verticium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("nugget_verticium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":nugget_verticium");
|
||||
|
||||
nugget_th232 = new Item().setUnlocalizedName("nugget_th232").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_th232");
|
||||
nugget_uranium = new Item().setUnlocalizedName("nugget_uranium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_uranium");
|
||||
@ -2745,8 +2713,6 @@ public class ModItems {
|
||||
nugget_actinium = new Item().setUnlocalizedName("nugget_actinium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_actinium");
|
||||
plate_titanium = new Item().setUnlocalizedName("plate_titanium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_titanium");
|
||||
plate_aluminium = new Item().setUnlocalizedName("plate_aluminium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_aluminium");
|
||||
wire_red_copper = new Item().setUnlocalizedName("wire_red_copper").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_red_copper");
|
||||
wire_tungsten = new ItemCustomLore().setUnlocalizedName("wire_tungsten").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_tungsten");
|
||||
neutron_reflector = new Item().setUnlocalizedName("neutron_reflector").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":neutron_reflector");
|
||||
nugget_lead = new Item().setUnlocalizedName("nugget_lead").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":nugget_lead");
|
||||
ingot_bismuth = new ItemCustomLore().setUnlocalizedName("ingot_bismuth").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_bismuth");
|
||||
@ -2865,11 +2831,6 @@ public class ModItems {
|
||||
powder_astatine = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_astatine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_astatine");
|
||||
powder_caesium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_caesium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_caesium");
|
||||
powder_australium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_australium").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_australium");
|
||||
powder_weidanium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_weidanium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_weidanium");
|
||||
powder_reiium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_reiium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_reiium");
|
||||
powder_unobtainium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_unobtainium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_unobtainium");
|
||||
powder_daffergon = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_daffergon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_daffergon");
|
||||
powder_verticium = new ItemCustomLore().setRarity(EnumRarity.uncommon).setUnlocalizedName("powder_verticium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_verticium");
|
||||
powder_strontium = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_strontium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_strontium");
|
||||
powder_cobalt = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_cobalt").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":powder_cobalt");
|
||||
powder_bromine = new ItemCustomLore().setRarity(EnumRarity.epic).setUnlocalizedName("powder_bromine").setCreativeTab(null).setTextureName(RefStrings.MODID + ":powder_bromine");
|
||||
@ -2943,11 +2904,6 @@ public class ModItems {
|
||||
reactor_core = new Item().setUnlocalizedName("reactor_core").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":reactor_core");
|
||||
rtg_unit = new Item().setUnlocalizedName("rtg_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":rtg_unit");
|
||||
levitation_unit = new Item().setUnlocalizedName("levitation_unit").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":levitation_unit");
|
||||
wire_aluminium = new Item().setUnlocalizedName("wire_aluminium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_aluminium");
|
||||
wire_copper = new Item().setUnlocalizedName("wire_copper").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_copper");
|
||||
wire_gold = new Item().setUnlocalizedName("wire_gold").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_gold");
|
||||
wire_schrabidium = new ItemCustomLore().setRarity(EnumRarity.rare).setUnlocalizedName("wire_schrabidium").setCreativeTab(null).setTextureName(RefStrings.MODID + ":wire_schrabidium");
|
||||
wire_magnetized_tungsten = new Item().setUnlocalizedName("wire_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_magnetized_tungsten");
|
||||
coil_magnetized_tungsten = new Item().setUnlocalizedName("coil_magnetized_tungsten").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_magnetized_tungsten");
|
||||
coil_gold = new Item().setUnlocalizedName("coil_gold").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold");
|
||||
coil_gold_torus = new Item().setUnlocalizedName("coil_gold_torus").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":coil_gold_torus");
|
||||
@ -3200,6 +3156,7 @@ public class ModItems {
|
||||
mold_base = new Item().setUnlocalizedName("mold_base").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":mold_base");
|
||||
mold = new ItemMold().setUnlocalizedName("mold").setCreativeTab(MainRegistry.controlTab);
|
||||
scraps = new ItemScraps().aot(Mats.MAT_BISMUTH, "scraps_bismuth").setUnlocalizedName("scraps").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":scraps");
|
||||
ingot_raw = new ItemAutogen(MaterialShapes.INGOT).setUnlocalizedName("ingot_raw").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":ingot_raw");
|
||||
plate_cast = new ItemAutogen(MaterialShapes.CASTPLATE).aot(Mats.MAT_BISMUTH, "plate_cast_bismuth").setUnlocalizedName("plate_cast").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_cast");
|
||||
plate_welded = new ItemAutogen(MaterialShapes.WELDEDPLATE).setUnlocalizedName("plate_welded").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_welded");
|
||||
heavy_component = new ItemAutogen(MaterialShapes.HEAVY_COMPONENT).setUnlocalizedName("heavy_component").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":heavy_component");
|
||||
@ -4093,10 +4050,8 @@ public class ModItems {
|
||||
gun_rpg = new ItemGunBase(GunRocketFactory.getGustavConfig()).setUnlocalizedName("gun_rpg").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_rpg");
|
||||
gun_karl = new ItemGunBase(GunRocketFactory.getKarlConfig()).setUnlocalizedName("gun_karl").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_karl");
|
||||
gun_panzerschreck = new ItemGunBase(GunRocketFactory.getPanzConfig()).setUnlocalizedName("gun_panzerschreck").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_panzerschreck");
|
||||
gun_quadro = new ItemGunBase(GunRocketFactory.getQuadroConfig()).setUnlocalizedName("gun_quadro").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_quadro");
|
||||
gun_hk69 = new ItemGunBase(GunGrenadeFactory.getHK69Config()).setUnlocalizedName("gun_hk69").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_hk69");
|
||||
//gun_congolake = new ItemGunBase(GunGrenadeFactory.getCongoConfig()).setUnlocalizedName("gun_congolake").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_congolake");
|
||||
gun_stinger = new ItemGunBase(GunRocketHomingFactory.getStingerConfig()).setUnlocalizedName("gun_stinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_stinger");
|
||||
gun_skystinger = new ItemGunBase(GunRocketHomingFactory.getSkyStingerConfig()).setUnlocalizedName("gun_skystinger").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_skystinger");
|
||||
gun_revolver = new ItemGunBase(Gun357MagnumFactory.getRevolverConfig()).setUnlocalizedName("gun_revolver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver");
|
||||
gun_revolver_saturnite = new ItemGunBase(Gun357MagnumFactory.getRevolverSaturniteConfig()).setUnlocalizedName("gun_revolver_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_saturnite");
|
||||
@ -4122,7 +4077,6 @@ public class ModItems {
|
||||
gun_proto = new ItemGunBase(GunFatmanFactory.getProtoConfig()).setUnlocalizedName("gun_proto").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||
gun_mirv = new ItemGunBase(GunFatmanFactory.getMIRVConfig()).setUnlocalizedName("gun_mirv").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mirv");
|
||||
gun_bf = new ItemGunBase(GunFatmanFactory.getBELConfig()).setUnlocalizedName("gun_bf").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_bf");
|
||||
gun_chemthrower = new ItemGunChemthrower().setUnlocalizedName("gun_chemthrower").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
|
||||
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
|
||||
gun_thompson = new ItemGunBase(Gun45ACPFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
|
||||
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
|
||||
@ -4178,7 +4132,6 @@ public class ModItems {
|
||||
gun_moist_nugget = new ItemNugget(3, false).setUnlocalizedName("gun_moist_nugget").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_moist_nugget");
|
||||
gun_darter = new ItemGunDart(GunDartFactory.getDarterConfig()).setFull3D().setUnlocalizedName("gun_darter").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
gun_glass_cannon = new ItemEnergyGunBase(GunPoweredFactory.getGlassCannonConfig()).setFull3D().setUnlocalizedName("gun_glass_cannon").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
gun_m2 = new ItemGunBase(Gun50BMGFactory.getM2Config()).setFull3D().setUnlocalizedName("gun_m2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
gun_lunatic_marksman = new ItemGunBase(Gun50BMGFactory.getLunaticMarksman()).setFull3D().setUnlocalizedName("gun_lunatic_marksman").setCreativeTab(MainRegistry.weaponTab);
|
||||
gun_uac_pistol = new ItemGunBase(Gun45ACPFactory.getUACPistolConfig(), Gun45ACPFactory.getUACPistolBurstConfig()).setFull3D().setUnlocalizedName("gun_uac_pistol").setCreativeTab(MainRegistry.weaponTab);
|
||||
|
||||
@ -5583,11 +5536,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(ingot_hes, ingot_hes.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_les, ingot_les.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_australium, ingot_australium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_weidanium, ingot_weidanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_reiium, ingot_reiium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_unobtainium, ingot_unobtainium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_daffergon, ingot_daffergon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_verticium, ingot_verticium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_lanthanium, ingot_lanthanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_actinium, ingot_actinium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_desh, ingot_desh.getUnlocalizedName());
|
||||
@ -5625,6 +5573,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(rocket_fuel, rocket_fuel.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_fiberglass, ingot_fiberglass.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_asbestos, ingot_asbestos.getUnlocalizedName());
|
||||
GameRegistry.registerItem(ingot_raw, ingot_raw.getUnlocalizedName());
|
||||
|
||||
//Billets
|
||||
GameRegistry.registerItem(billet_uranium, billet_uranium.getUnlocalizedName());
|
||||
@ -5764,11 +5713,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(powder_astatine, powder_astatine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_caesium, powder_caesium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_australium, powder_australium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_weidanium, powder_weidanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_reiium, powder_reiium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_unobtainium, powder_unobtainium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_daffergon, powder_daffergon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_verticium, powder_verticium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_strontium, powder_strontium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_cobalt, powder_cobalt.getUnlocalizedName());
|
||||
GameRegistry.registerItem(powder_cobalt_tiny, powder_cobalt_tiny.getUnlocalizedName());
|
||||
@ -5938,11 +5882,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(nugget_australium, nugget_australium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_australium_lesser, nugget_australium_lesser.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_australium_greater, nugget_australium_greater.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_weidanium, nugget_weidanium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_reiium, nugget_reiium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_unobtainium, nugget_unobtainium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_daffergon, nugget_daffergon.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_verticium, nugget_verticium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_desh, nugget_desh.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_euphemium, nugget_euphemium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(nugget_dineutronium, nugget_dineutronium.getUnlocalizedName());
|
||||
@ -6004,14 +5943,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(filter_coal, filter_coal.getUnlocalizedName());
|
||||
|
||||
//Wires
|
||||
GameRegistry.registerItem(wire_aluminium, wire_aluminium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_copper, wire_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_tungsten, wire_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_red_copper, wire_red_copper.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_advanced_alloy, wire_advanced_alloy.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_gold, wire_gold.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_schrabidium, wire_schrabidium.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_magnetized_tungsten, wire_magnetized_tungsten.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_fine, wire_fine.getUnlocalizedName());
|
||||
GameRegistry.registerItem(wire_dense, wire_dense.getUnlocalizedName());
|
||||
|
||||
@ -6958,7 +6889,6 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_flechette, gun_flechette.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_ar15, gun_ar15.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_calamity, gun_calamity.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_m2, gun_m2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_minigun, gun_minigun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_lacunae, gun_lacunae.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
|
||||
@ -6966,14 +6896,11 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_b93, gun_b93.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_rpg, gun_rpg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_karl, gun_karl.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_quadro, gun_quadro.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_hk69, gun_hk69.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stinger, gun_stinger.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_fatman, gun_fatman.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_proto, gun_proto.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_mirv, gun_mirv.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_bf, gun_bf.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_chemthrower, gun_chemthrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_mp40, gun_mp40.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_thompson, gun_thompson.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_uzi_silencer,gun_uzi_silencer.getUnlocalizedName());
|
||||
@ -7031,6 +6958,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_greasegun, gun_greasegun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_maresleg, gun_maresleg.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_maresleg_akimbo, gun_maresleg_akimbo.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_maresleg_broken, gun_maresleg_broken.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_flaregun, gun_flaregun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_heavy_revolver, gun_heavy_revolver.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_carbine, gun_carbine.getUnlocalizedName());
|
||||
@ -7043,6 +6971,11 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_spas12, gun_spas12.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_panzerschreck, gun_panzerschreck.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_g3, gun_g3.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_stinger, gun_stinger.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_chemthrower, gun_chemthrower.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_m2, gun_m2.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_autoshotgun, gun_autoshotgun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_quadro, gun_quadro.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerItem(ammo_standard, ammo_standard.getUnlocalizedName());
|
||||
|
||||
|
||||
@ -6,8 +6,10 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.material.Mats;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
import com.hbm.inventory.material.MaterialShapes;
|
||||
import com.hbm.inventory.material.NTMMaterial;
|
||||
import com.hbm.items.ItemEnums.EnumCasingType;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -75,11 +77,12 @@ public class ItemMold extends Item {
|
||||
registerMold(new MoldBlock( 12, L, "block", MaterialShapes.BLOCK));
|
||||
registerMold(new MoldSingle( 13, L, "pipes", new ItemStack(ModItems.pipes_steel), Mats.MAT_STEEL, MaterialShapes.BLOCK.q(3)));
|
||||
|
||||
registerMold(new MoldSingle( 14, S, "c357", new ItemStack(ModItems.casing_357), Mats.MAT_COPPER, MaterialShapes.PLATE.q(1)));
|
||||
registerMold(new MoldSingle( 15, S, "c44", new ItemStack(ModItems.casing_44), Mats.MAT_COPPER, MaterialShapes.PLATE.q(1)));
|
||||
registerMold(new MoldSingle( 16, S, "c9", new ItemStack(ModItems.casing_9), Mats.MAT_COPPER, MaterialShapes.PLATE.q(1)));
|
||||
registerMold(new MoldSingle( 17, S, "c50", new ItemStack(ModItems.casing_50), Mats.MAT_COPPER, MaterialShapes.PLATE.q(1)));
|
||||
registerMold(new MoldSingle( 18, S, "cbuckshot", new ItemStack(ModItems.casing_buckshot), Mats.MAT_COPPER, MaterialShapes.PLATE.q(1)));
|
||||
registerMold(new MoldMulti( 16, S, "c9", MaterialShapes.PLATE.q(1, 4),
|
||||
Mats.MAT_GUNMETAL, DictFrame.fromOne(ModItems.casing, EnumCasingType.SMALL),
|
||||
Mats.MAT_WEAPONSTEEL, DictFrame.fromOne(ModItems.casing, EnumCasingType.SMALL_STEEL)));
|
||||
registerMold(new MoldMulti( 17, S, "c50", MaterialShapes.PLATE.q(1, 2),
|
||||
Mats.MAT_GUNMETAL, DictFrame.fromOne(ModItems.casing, EnumCasingType.LARGE),
|
||||
Mats.MAT_WEAPONSTEEL, DictFrame.fromOne(ModItems.casing, EnumCasingType.LARGE_STEEL)));
|
||||
|
||||
registerMold(new MoldShape( 22, S, "barrel_light", MaterialShapes.LIGHTBARREL));
|
||||
registerMold(new MoldShape( 23, S, "barrel_heavy", MaterialShapes.HEAVYBARREL));
|
||||
@ -182,6 +185,15 @@ public class ItemMold extends Item {
|
||||
String od = shape.name() + name;
|
||||
List<ItemStack> ores = OreDictionary.getOres(od);
|
||||
if(!ores.isEmpty()) {
|
||||
//prioritize NTM items
|
||||
for(ItemStack ore : ores) {
|
||||
if(Item.itemRegistry.getNameForObject(ore.getItem()).startsWith(RefStrings.MODID)) {
|
||||
ItemStack copy = ore.copy();
|
||||
copy.stackSize = this.amount;
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
//...then try whatever comes first
|
||||
ItemStack copy = ores.get(0).copy();
|
||||
copy.stackSize = this.amount;
|
||||
return copy;
|
||||
|
||||
@ -69,7 +69,7 @@ public class ItemCryoCannon extends ItemGunBase {
|
||||
|
||||
@Override
|
||||
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
|
||||
EntityChemical chem = new EntityChemical(world, player);
|
||||
EntityChemical chem = new EntityChemical(world, player, 0, 0, 0);
|
||||
chem.setFluid(Fluids.OXYGEN);
|
||||
world.spawnEntityInWorld(chem);
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ public class ItemGunChemthrower extends ItemGunBase implements IFillableItem {
|
||||
@Override
|
||||
protected void spawnProjectile(World world, EntityPlayer player, ItemStack stack, int config) {
|
||||
//spawn fluid projectile
|
||||
EntityChemical chem = new EntityChemical(world, player);
|
||||
EntityChemical chem = new EntityChemical(world, player, 0, 0, 0);
|
||||
chem.setFluid(this.getFluidType(stack));
|
||||
world.spawnEntityInWorld(chem);
|
||||
}
|
||||
|
||||
@ -83,6 +83,7 @@ public class BulletConfig {
|
||||
public BulletConfig setVel(float velocity) { this.velocity = velocity; return this; }
|
||||
public BulletConfig setSpread(float spread) { this.spread = spread; return this; }
|
||||
public BulletConfig setWear(float wear) { this.wear = wear; return this; }
|
||||
public BulletConfig setProjectiles(int amount) { this.projectilesMin = this.projectilesMax = amount; return this; }
|
||||
public BulletConfig setProjectiles(int min, int max) { this.projectilesMin = min; this.projectilesMax = max; return this; }
|
||||
public BulletConfig setDamage(float damageMult) { this.damageMult = damageMult; return this; }
|
||||
public BulletConfig setArmorPiercing(float armorPiercingPercent) { this.armorPiercingPercent = armorPiercingPercent; return this; }
|
||||
|
||||
@ -20,7 +20,9 @@ public enum Crosshair {
|
||||
L_ARROWS(32, 122, 32),
|
||||
L_BOX(64, 122, 32),
|
||||
L_CIRCUMFLEX(96, 122, 32),
|
||||
L_RAD(0, 154, 32);
|
||||
L_RAD(0, 154, 32),
|
||||
L_MODERN(32, 154, 32),
|
||||
L_BOX_OUTLINE(64, 154, 32);
|
||||
|
||||
public int x;
|
||||
public int y;
|
||||
|
||||
@ -30,6 +30,7 @@ public class GunConfig {
|
||||
public static final String I_DRAWDURATION = "I_DRAWDURATION";
|
||||
public static final String I_INSPECTDURATION = "I_INSPECTDURATION";
|
||||
public static final String O_CROSSHAIR = "O_CROSSHAIR";
|
||||
public static final String B_HIDECROSSHAIR = "B_HIDECROSSHAIR";
|
||||
public static final String B_RELOADANIMATIONSEQUENTIAL = "B_RELOADANIMATIONSEQUENTIAL";
|
||||
public static final String CON_SMOKE = "CON_SMOKE";
|
||||
public static final String CON_ORCHESTRA = "CON_ORCHESTRA";
|
||||
@ -53,6 +54,7 @@ public class GunConfig {
|
||||
protected int drawDuration_DNA = 0;
|
||||
protected int inspectDuration_DNA = 0;
|
||||
protected Crosshair crosshair_DNA;
|
||||
protected boolean hideCrosshair_DNA = true;
|
||||
protected boolean reloadAnimationsSequential_DNA;
|
||||
/** Handles smoke clientside */
|
||||
protected BiConsumer<ItemStack, LambdaContext> smokeHandler_DNA;
|
||||
@ -81,6 +83,7 @@ public class GunConfig {
|
||||
public int getDrawDuration(ItemStack stack) { return WeaponUpgradeManager.eval(drawDuration_DNA, stack, I_DRAWDURATION, this); }
|
||||
public int getInspectDuration(ItemStack stack) { return WeaponUpgradeManager.eval(inspectDuration_DNA, stack, I_INSPECTDURATION, this); }
|
||||
public Crosshair getCrosshair(ItemStack stack) { return WeaponUpgradeManager.eval(crosshair_DNA, stack, O_CROSSHAIR, this); }
|
||||
public boolean getHideCrosshair(ItemStack stack) { return WeaponUpgradeManager.eval(hideCrosshair_DNA, stack, B_HIDECROSSHAIR, this); }
|
||||
public boolean getReloadAnimSequential(ItemStack stack) { return WeaponUpgradeManager.eval(reloadAnimationsSequential_DNA, stack, B_RELOADANIMATIONSEQUENTIAL, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getSmokeHandler(ItemStack stack) { return WeaponUpgradeManager.eval(smokeHandler_DNA, stack, CON_SMOKE, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getOrchestra(ItemStack stack) { return WeaponUpgradeManager.eval(this.orchestra_DNA, stack, CON_ORCHESTRA, this); }
|
||||
@ -107,6 +110,7 @@ public class GunConfig {
|
||||
public GunConfig draw(int draw) { this.drawDuration_DNA = draw; return this; }
|
||||
public GunConfig inspect(int inspect) { this.inspectDuration_DNA = inspect; return this; }
|
||||
public GunConfig crosshair(Crosshair crosshair) { this.crosshair_DNA = crosshair; return this; }
|
||||
public GunConfig hideCrosshair(boolean flag) { this.hideCrosshair_DNA = flag; return this; }
|
||||
public GunConfig reloadSequential(boolean flag) { this.reloadAnimationsSequential_DNA = flag; return this; }
|
||||
|
||||
public GunConfig smoke(BiConsumer<ItemStack, LambdaContext> smoke) { this.smokeHandler_DNA = smoke; return this; }
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.hbm.items.weapon.sedna;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
@ -9,6 +10,8 @@ import com.hbm.interfaces.IItemHUD;
|
||||
import com.hbm.items.IEquipReceiver;
|
||||
import com.hbm.items.IKeybindReceiver;
|
||||
import com.hbm.items.weapon.sedna.hud.IHUDComponent;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
@ -16,6 +19,7 @@ import com.hbm.packet.toclient.GunAnimationPacket;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
@ -23,11 +27,14 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
@ -59,25 +66,40 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
public static final String KEY_RELOAD = "reload_";
|
||||
public static final String KEY_LASTANIM = "lastanim_";
|
||||
public static final String KEY_ANIMTIMER = "animtimer_";
|
||||
public static final String KEY_LOCKONTARGET = "lockontarget";
|
||||
public static final String KEY_LOCKEDON = "lockedon";
|
||||
|
||||
public static ConcurrentHashMap<EntityPlayer, AudioWrapper> loopedSounds = new ConcurrentHashMap();
|
||||
public static ConcurrentHashMap<EntityLivingBase, AudioWrapper> loopedSounds = new ConcurrentHashMap();
|
||||
|
||||
public static float prevAimingProgress;
|
||||
public static float aimingProgress;
|
||||
|
||||
/** NEVER ACCESS DIRECTLY - USE GETTER */
|
||||
private GunConfig[] configs_DNA;
|
||||
protected GunConfig[] configs_DNA;
|
||||
|
||||
public WeaponQuality quality;
|
||||
|
||||
public GunConfig getConfig(ItemStack stack, int index) {
|
||||
GunConfig cfg = configs_DNA[index];
|
||||
return WeaponUpgradeManager.eval(cfg, stack, O_GUNCONFIG + index, this);
|
||||
}
|
||||
|
||||
public ItemGunBaseNT(GunConfig... cfg) {
|
||||
public ItemGunBaseNT(WeaponQuality quality, GunConfig... cfg) {
|
||||
this.setMaxStackSize(1);
|
||||
this.configs_DNA = cfg;
|
||||
this.quality = quality;
|
||||
this.lastShot = new long[cfg.length];
|
||||
this.setCreativeTab(MainRegistry.weaponTab);
|
||||
this.setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
}
|
||||
|
||||
public static enum WeaponQuality {
|
||||
A_SIDE,
|
||||
B_SIDE,
|
||||
LEGENDARY,
|
||||
SEPCIAL,
|
||||
SECRET,
|
||||
DEBUG
|
||||
}
|
||||
|
||||
public static enum GunState {
|
||||
@ -89,6 +111,29 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
JAMMED, //gun is jammed, either after reloading or while firing
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
int configs = this.configs_DNA.length;
|
||||
for(int i = 0; i < configs; i++) {
|
||||
GunConfig config = getConfig(stack, i);
|
||||
for(Receiver rec : config.getReceivers(stack)) {
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
list.add("Ammo: " + mag.getIconForHUD(stack, player).getDisplayName() + " " + mag.reportAmmoStateForHUD(stack, player));
|
||||
list.add("Base Damage: " + rec.getBaseDamage(stack));
|
||||
}
|
||||
}
|
||||
|
||||
switch(this.quality) {
|
||||
case A_SIDE: list.add(EnumChatFormatting.YELLOW + "Standard Arsenal"); break;
|
||||
case B_SIDE: list.add(EnumChatFormatting.GOLD + "B-Side"); break;
|
||||
case LEGENDARY: list.add(EnumChatFormatting.RED + "Legendary Weapon"); break;
|
||||
case SEPCIAL: list.add(EnumChatFormatting.AQUA + "Special Weapon"); break;
|
||||
case SECRET: list.add(EnumChatFormatting.DARK_RED + "SECRET"); break;
|
||||
case DEBUG: list.add((BobMathUtil.getBlink() ? EnumChatFormatting.YELLOW : EnumChatFormatting.GOLD) + "DEBUG"); break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandleKeybind(EntityPlayer player, ItemStack stack, EnumKeybind keybind) {
|
||||
return keybind == EnumKeybind.GUN_PRIMARY || keybind == EnumKeybind.GUN_SECONDARY || keybind == EnumKeybind.GUN_TERTIARY || keybind == EnumKeybind.RELOAD;
|
||||
@ -96,12 +141,15 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
|
||||
@Override
|
||||
public void handleKeybind(EntityPlayer player, ItemStack stack, EnumKeybind keybind, boolean newState) {
|
||||
|
||||
handleKeybind(player, player.inventory, stack, keybind, newState);
|
||||
}
|
||||
|
||||
public void handleKeybind(EntityLivingBase entity, IInventory inventory, ItemStack stack, EnumKeybind keybind, boolean newState) {
|
||||
int configs = this.configs_DNA.length;
|
||||
|
||||
for(int i = 0; i < configs; i++) {
|
||||
GunConfig config = getConfig(stack, i);
|
||||
LambdaContext ctx = new LambdaContext(config, player, i);
|
||||
LambdaContext ctx = new LambdaContext(config, entity, inventory, i);
|
||||
|
||||
if(keybind == EnumKeybind.GUN_PRIMARY && newState && !getPrimary(stack, i)) { if(config.getPressPrimary(stack) != null) config.getPressPrimary(stack).accept(stack, ctx); this.setPrimary(stack, i, newState); continue; }
|
||||
if(keybind == EnumKeybind.GUN_PRIMARY && !newState && getPrimary(stack, i)) { if(config.getReleasePrimary(stack) != null) config.getReleasePrimary(stack).accept(stack, ctx); this.setPrimary(stack, i, newState); continue; }
|
||||
@ -130,14 +178,14 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld) {
|
||||
|
||||
if(!(entity instanceof EntityPlayer)) return;
|
||||
if(!(entity instanceof EntityLivingBase)) return;
|
||||
EntityPlayer player = entity instanceof EntityPlayer ? (EntityPlayer) entity : null;
|
||||
int confNo = this.configs_DNA.length;
|
||||
GunConfig[] configs = new GunConfig[confNo];
|
||||
LambdaContext[] ctx = new LambdaContext[confNo];
|
||||
for(int i = 0; i < confNo; i++) {
|
||||
configs[i] = this.getConfig(stack, i);
|
||||
ctx[i] = new LambdaContext(configs[i], player, i);
|
||||
ctx[i] = new LambdaContext(configs[i], (EntityLivingBase) entity, player != null ? player.inventory : null, i);
|
||||
}
|
||||
|
||||
if(world.isRemote) {
|
||||
@ -231,6 +279,11 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
// GUN AIMING //
|
||||
public static float getWear(ItemStack stack, int index) { return getValueFloat(stack, KEY_WEAR + index); }
|
||||
public static void setWear(ItemStack stack, int index, float value) { setValueFloat(stack, KEY_WEAR + index, value); }
|
||||
// LOCKON //
|
||||
public static int getLockonTarget(ItemStack stack) { return getValueInt(stack, KEY_LOCKONTARGET); }
|
||||
public static void setLockonTarget(ItemStack stack, int value) { setValueInt(stack, KEY_LOCKONTARGET, value); }
|
||||
public static boolean getIsLockedOn(ItemStack stack) { return getValueBool(stack, KEY_LOCKEDON); }
|
||||
public static void setIsLockedOn(ItemStack stack, boolean value) { setValueBool(stack, KEY_LOCKEDON, value); }
|
||||
// ANIM TRACKING //
|
||||
public static AnimType getLastAnim(ItemStack stack, int index) { return EnumUtil.grabEnumSafely(AnimType.class, getValueInt(stack, KEY_LASTANIM + index)); }
|
||||
public static void setLastAnim(ItemStack stack, int index, AnimType value) { setValueInt(stack, KEY_LASTANIM + index, value.ordinal()); }
|
||||
@ -264,14 +317,21 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
/** Wrapper for extra context used in most Consumer lambdas which are part of the guncfg */
|
||||
public static class LambdaContext {
|
||||
public final GunConfig config;
|
||||
public final EntityPlayer player;
|
||||
public final EntityLivingBase entity;
|
||||
public final IInventory inventory;
|
||||
public final int configIndex;
|
||||
|
||||
public LambdaContext(GunConfig config, EntityPlayer player, int configIndex) {
|
||||
public LambdaContext(GunConfig config, EntityLivingBase player, IInventory inventory, int configIndex) {
|
||||
this.config = config;
|
||||
this.player = player;
|
||||
this.entity = player;
|
||||
this.inventory = inventory;
|
||||
this.configIndex = configIndex;
|
||||
}
|
||||
|
||||
public EntityPlayer getPlayer() {
|
||||
if(!(entity instanceof EntityPlayer)) return null;
|
||||
return (EntityPlayer) entity;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -282,8 +342,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IEquipRecei
|
||||
|
||||
if(type == ElementType.CROSSHAIRS) {
|
||||
event.setCanceled(true);
|
||||
if(aimingProgress >= 1F) return;
|
||||
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, gun.getConfig(stack, 0).getCrosshair(stack));
|
||||
GunConfig config = gun.getConfig(stack, 0);
|
||||
if(config.getHideCrosshair(stack) && aimingProgress >= 1F) return;
|
||||
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, config.getCrosshair(stack));
|
||||
}
|
||||
|
||||
int confNo = this.configs_DNA.length;
|
||||
|
||||
@ -24,7 +24,9 @@ public class Receiver {
|
||||
public static final String I_ROUNDSPERCYCLE = "I_ROUNDSPERCYCLE";
|
||||
public static final String F_SPREADMOD = "F_SPREADMOD";
|
||||
public static final String B_REFIREONHOLD = "B_REFIREONHOLD";
|
||||
public static final String B_REFIREAFTERDRY = "B_REFIREAFTERDRY";
|
||||
public static final String B_DOESDRYFIRE = "B_DOESDRYFIRE";
|
||||
public static final String B_DOESDRYFIREAFTERAUTO = "B_DOESDRYFIREAFTERAUTO";
|
||||
public static final String B_EJECTONFIRE = "B_EJECTONFIRE";
|
||||
public static final String I_RELOADBEGINDURATION = "I_RELOADBEGINDURATION";
|
||||
public static final String I_RELOADCYCLEDURATION = "I_RELOADCYCLEDURATION";
|
||||
@ -52,7 +54,9 @@ public class Receiver {
|
||||
protected int roundsPerCycle_DNA = 1;
|
||||
protected float spreadModExtra_DNA = 0F;
|
||||
protected boolean refireOnHold_DNA = false;
|
||||
protected boolean refireAfterDry_DNA = false;
|
||||
protected boolean doesDryFire_DNA = true;
|
||||
protected boolean doesDryFireAfterAuto_DNA = false;
|
||||
protected boolean ejectOnFire_DNA = true;
|
||||
protected int reloadBeginDuration_DNA;
|
||||
protected int reloadCycleDuration_DNA;
|
||||
@ -70,25 +74,27 @@ public class Receiver {
|
||||
protected BiConsumer<ItemStack, LambdaContext> onRecoil_DNA;
|
||||
|
||||
/* GETTERS */
|
||||
public float getBaseDamage(ItemStack stack) { return WeaponUpgradeManager.eval(this.baseDamage_DNA, stack, F_BASEDAMAGE, this); }
|
||||
public int getDelayAfterFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this); }
|
||||
public int getDelayAfterDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this); }
|
||||
public int getRoundsPerCycle(ItemStack stack) { return WeaponUpgradeManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this); }
|
||||
public float getGunSpread(ItemStack stack) { return WeaponUpgradeManager.eval(this.spreadModExtra_DNA, stack, F_SPREADMOD, this); }
|
||||
public boolean getRefireOnHold(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireOnHold_DNA, stack, B_REFIREONHOLD, this); }
|
||||
public boolean getDoesDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFire_DNA, stack, B_DOESDRYFIRE, this); }
|
||||
public boolean getEjectOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.ejectOnFire_DNA, stack, B_EJECTONFIRE, this); }
|
||||
public int getReloadBeginDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadBeginDuration_DNA, stack, I_RELOADBEGINDURATION, this); }
|
||||
public int getReloadCycleDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCycleDuration_DNA, stack, I_RELOADCYCLEDURATION, this); }
|
||||
public int getReloadEndDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadEndDuration_DNA, stack, I_RELOADENDDURATION, this); }
|
||||
public int getReloadCockOnEmptyPre(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPre_DNA, stack, I_RELOADCOCKONEMPTYPRE, this); }
|
||||
public int getReloadCockOnEmptyPost(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPost_DNA, stack, I_RELOADCOCKONEMPTYPOST, this); }
|
||||
public int getJamDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.jamDuration_DNA, stack, I_JAMDURATION, this); }
|
||||
public String getFireSound(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireSound_DNA, stack, S_FIRESOUND, this); }
|
||||
public float getFireVolume(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireVolume_DNA, stack, F_FIREVOLUME, this); }
|
||||
public float getFirePitch(ItemStack stack) { return WeaponUpgradeManager.eval(this.firePitch_DNA, stack, F_FIREPITCH, this); }
|
||||
public IMagazine getMagazine(ItemStack stack) { return WeaponUpgradeManager.eval(this.magazine_DNA, stack, O_MAGAZINE, this); }
|
||||
public Vec3 getProjectileOffset(ItemStack stack) { return WeaponUpgradeManager.eval(this.projectileOffset_DNA, stack, O_PROJECTILEOFFSET, this); }
|
||||
public float getBaseDamage(ItemStack stack) { return WeaponUpgradeManager.eval(this.baseDamage_DNA, stack, F_BASEDAMAGE, this); }
|
||||
public int getDelayAfterFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this); }
|
||||
public int getDelayAfterDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this); }
|
||||
public int getRoundsPerCycle(ItemStack stack) { return WeaponUpgradeManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this); }
|
||||
public float getGunSpread(ItemStack stack) { return WeaponUpgradeManager.eval(this.spreadModExtra_DNA, stack, F_SPREADMOD, this); }
|
||||
public boolean getRefireOnHold(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireOnHold_DNA, stack, B_REFIREONHOLD, this); }
|
||||
public boolean getRefireAfterDry(ItemStack stack) { return WeaponUpgradeManager.eval(this.refireAfterDry_DNA, stack, B_REFIREAFTERDRY, this); }
|
||||
public boolean getDoesDryFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFire_DNA, stack, B_DOESDRYFIRE, this); }
|
||||
public boolean getDoesDryFireAfterAuto(ItemStack stack) { return WeaponUpgradeManager.eval(this.doesDryFireAfterAuto_DNA, stack, B_DOESDRYFIREAFTERAUTO, this); }
|
||||
public boolean getEjectOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.ejectOnFire_DNA, stack, B_EJECTONFIRE, this); }
|
||||
public int getReloadBeginDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadBeginDuration_DNA, stack, I_RELOADBEGINDURATION, this); }
|
||||
public int getReloadCycleDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCycleDuration_DNA, stack, I_RELOADCYCLEDURATION, this); }
|
||||
public int getReloadEndDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadEndDuration_DNA, stack, I_RELOADENDDURATION, this); }
|
||||
public int getReloadCockOnEmptyPre(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPre_DNA, stack, I_RELOADCOCKONEMPTYPRE, this); }
|
||||
public int getReloadCockOnEmptyPost(ItemStack stack) { return WeaponUpgradeManager.eval(this.reloadCockOnEmptyPost_DNA, stack, I_RELOADCOCKONEMPTYPOST, this); }
|
||||
public int getJamDuration(ItemStack stack) { return WeaponUpgradeManager.eval(this.jamDuration_DNA, stack, I_JAMDURATION, this); }
|
||||
public String getFireSound(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireSound_DNA, stack, S_FIRESOUND, this); }
|
||||
public float getFireVolume(ItemStack stack) { return WeaponUpgradeManager.eval(this.fireVolume_DNA, stack, F_FIREVOLUME, this); }
|
||||
public float getFirePitch(ItemStack stack) { return WeaponUpgradeManager.eval(this.firePitch_DNA, stack, F_FIREPITCH, this); }
|
||||
public IMagazine getMagazine(ItemStack stack) { return WeaponUpgradeManager.eval(this.magazine_DNA, stack, O_MAGAZINE, this); }
|
||||
public Vec3 getProjectileOffset(ItemStack stack) { return WeaponUpgradeManager.eval(this.projectileOffset_DNA, stack, O_PROJECTILEOFFSET, this); }
|
||||
|
||||
public BiFunction<ItemStack, LambdaContext, Boolean> getCanFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.canFire_DNA, stack, FUN_CANFIRE, this); }
|
||||
public BiConsumer<ItemStack, LambdaContext> getOnFire(ItemStack stack) { return WeaponUpgradeManager.eval(this.onFire_DNA, stack, CON_ONFIRE, this); }
|
||||
@ -101,7 +107,9 @@ public class Receiver {
|
||||
public Receiver rounds(int rounds) { this.roundsPerCycle_DNA = rounds; return this; }
|
||||
public Receiver spread(float spread) { this.spreadModExtra_DNA = spread; return this; }
|
||||
public Receiver auto(boolean auto) { this.refireOnHold_DNA = auto; return this; }
|
||||
public Receiver autoAfterDry(boolean auto) { this.refireAfterDry_DNA = auto; return this; }
|
||||
public Receiver dryfire(boolean dryfire) { this.doesDryFire_DNA = dryfire; return this; }
|
||||
public Receiver dryfireAfterAuto(boolean dryfire) { this.doesDryFireAfterAuto_DNA = dryfire; return this; }
|
||||
public Receiver ejectOnFire(boolean eject) { this.ejectOnFire_DNA = eject; return this; }
|
||||
public Receiver mag(IMagazine magazine) { this.magazine_DNA = magazine; return this; }
|
||||
public Receiver offset(double f, double u, double s) { this.projectileOffset_DNA = Vec3.createVectorHelper(f, u, s); return this; }
|
||||
@ -134,4 +142,10 @@ public class Receiver {
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE)
|
||||
.fire(Lego.LAMBDA_STANDARD_FIRE);
|
||||
}
|
||||
|
||||
public Receiver setupLockonFire() {
|
||||
return this
|
||||
.canFire(Lego.LAMBDA_LOCKON_CAN_FIRE)
|
||||
.fire(Lego.LAMBDA_STANDARD_FIRE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -33,7 +34,7 @@ public class GunFactory {
|
||||
ammo_debug_buckshot = new BulletConfig().setItem(ModItems.ammo_12gauge).setSpread(0.1F).setRicochetAngle(45).setProjectiles(6, 6).setCasing(CASING44.clone().register("DEBUG1"));
|
||||
|
||||
/// GUNS ///
|
||||
ModItems.gun_debug = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_debug = new ItemGunBaseNT(WeaponQuality.DEBUG, new GunConfig()
|
||||
.dura(600F).draw(15).inspect(23).crosshair(Crosshair.L_CLASSIC).smoke(Lego.LAMBDA_STANDARD_SMOKE).orchestra(Orchestras.DEBUG_ORCHESTRA)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
@ -43,7 +44,7 @@ public class GunFactory {
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY) .pr(Lego.LAMBDA_STANDARD_RELOAD) .pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(Lego.LAMBDA_DEBUG_ANIMS)
|
||||
).setUnlocalizedName("gun_debug").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_debug");
|
||||
|
||||
XFactoryBlackPowder.init();
|
||||
XFactory357.init();
|
||||
@ -56,6 +57,7 @@ public class GunFactory {
|
||||
XFactoryFlamer.init();
|
||||
XFactoryRocket.init();
|
||||
XFactory556mm.init();
|
||||
XFactory50.init();
|
||||
|
||||
/// PROXY BULLSHIT ///
|
||||
MainRegistry.proxy.registerGunCfg();
|
||||
@ -69,9 +71,11 @@ public class GunFactory {
|
||||
P9_SP, P9_FMJ, P9_JHP, P9_AP,
|
||||
R556_SP, R556_FMJ, R556_JHP, R556_AP,
|
||||
R762_SP, R762_FMJ, R762_JHP, R762_AP, R762_DU,
|
||||
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12,
|
||||
BMG50_SP, BMG50_FMJ, BMG50_JHP, BMG50_AP, BMG50_DU,
|
||||
G12_BP, G12_BP_MAGNUM, G12_BP_SLUG, G12, G12_SLUG, G12_FLECHETTE, G12_MAGNUM, G12_EXPLOSIVE, G12_PHOSPHORUS, G12_ANTHRAX,
|
||||
G40_FLARE, G40,
|
||||
ROCKET_HE, ROCKET_HEAT,
|
||||
FLAME_DIESEL,
|
||||
M44_EQUESTRIAN, G12_EQUESTRIAN, BMG50_EQUESTRIAN
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactory22lr.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory357.*;
|
||||
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.XFactory50.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory556mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory762mm.*;
|
||||
import static com.hbm.items.weapon.sedna.factory.XFactory9mm.*;
|
||||
@ -13,6 +14,7 @@ import static com.hbm.items.weapon.sedna.factory.XFactoryRocket.*;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.weapon.sedna.*;
|
||||
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@ -27,8 +29,9 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_light_revolver_dani, new ItemRenderDANI());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_henry, new ItemRenderHenry());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_greasegun, new ItemRenderGreasegun());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_maresleg, new ItemRenderMaresleg());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_maresleg, new ItemRenderMaresleg(ResourceManager.maresleg_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_maresleg_akimbo, new ItemRenderMareslegAkimbo());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_maresleg_broken, new ItemRenderMaresleg(ResourceManager.maresleg_broken_tex));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flaregun, new ItemRenderFlaregun());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_heavy_revolver, new ItemRenderHeavyRevolver());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_carbine, new ItemRenderCarbine());
|
||||
@ -41,6 +44,11 @@ public class GunFactoryClient {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_spas12, new ItemRenderSPAS12());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_panzerschreck, new ItemRenderPanzerschreck());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_g3, new ItemRenderG3());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stinger, new ItemRenderStinger());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_autoshotgun, new ItemRenderShredder());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_quadro, new ItemRenderQuadro());
|
||||
//PROJECTILES
|
||||
ammo_debug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
ammo_debug_buckshot.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -62,6 +70,12 @@ public class GunFactoryClient {
|
||||
g12_bp_magnum.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_bp_slug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_slug.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_flechette.setRenderer(LegoClient.RENDER_FLECHETTE_BULLET);
|
||||
g12_magnum.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
g12_explosive.setRenderer(LegoClient.RENDER_EXPRESS_BULLET);
|
||||
g12_phosphorus.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
g12_anthrax.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r762_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
@ -75,10 +89,17 @@ public class GunFactoryClient {
|
||||
g40.setRenderer(LegoClient.RENDER_GRENADE);
|
||||
rocket_rpzb_he.setRenderer(LegoClient.RENDER_RPZB);
|
||||
rocket_rpzb_heat.setRenderer(LegoClient.RENDER_RPZB);
|
||||
rocket_qd_he.setRenderer(LegoClient.RENDER_QD);
|
||||
rocket_qd_heat.setRenderer(LegoClient.RENDER_QD);
|
||||
r556_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
r556_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
bmg50_sp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
bmg50_fmj.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
bmg50_jhp.setRenderer(LegoClient.RENDER_STANDARD_BULLET);
|
||||
bmg50_ap.setRenderer(LegoClient.RENDER_AP_BULLET);
|
||||
bmg50_du.setRenderer(LegoClient.RENDER_DU_BULLET);
|
||||
//HUDS
|
||||
((ItemGunBaseNT) ModItems.gun_debug) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_pepperbox) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -86,6 +107,7 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_henry) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_greasegun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_maresleg) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_maresleg_broken) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_flaregun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_heavy_revolver) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_carbine) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
@ -98,6 +120,11 @@ public class GunFactoryClient {
|
||||
((ItemGunBaseNT) ModItems.gun_spas12) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_panzerschreck) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_g3) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_stinger) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_chemthrower) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_m2) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_autoshotgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
((ItemGunBaseNT) ModItems.gun_quadro) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani).getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY_MIRROR, LegoClient.HUD_COMPONENT_AMMO_MIRROR);
|
||||
((ItemGunBaseNT) ModItems.gun_light_revolver_dani).getConfig(null, 1).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
|
||||
|
||||
@ -11,6 +11,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -55,22 +56,23 @@ public class GunStateDecider {
|
||||
|
||||
if(lastState == GunState.RELOADING) {
|
||||
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
GunConfig cfg = ctx.config;
|
||||
Receiver rec = cfg.getReceivers(stack)[recIndex];
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
|
||||
mag.reloadAction(stack, player);
|
||||
mag.reloadAction(stack, ctx.inventory);
|
||||
|
||||
//if after reloading the gun can still reload, assume a tube mag and resume reloading
|
||||
if(mag.canReload(stack, player)) {
|
||||
if(mag.canReload(stack, ctx.inventory)) {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.RELOADING);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getReloadCycleDuration(stack));
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD_CYCLE, gunIndex);
|
||||
//if no more reloading can be done, go idle
|
||||
} else {
|
||||
|
||||
if(getStandardJamChance(stack, cfg, gunIndex) > player.getRNG().nextFloat()) {
|
||||
if(getStandardJamChance(stack, cfg, gunIndex) > entity.getRNG().nextFloat()) {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.JAMMED);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getJamDuration(stack));
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.JAMMED, gunIndex);
|
||||
@ -82,7 +84,7 @@ public class GunStateDecider {
|
||||
}
|
||||
}
|
||||
|
||||
mag.setAmountAfterReload(stack, mag.getAmount(stack));
|
||||
mag.setAmountAfterReload(stack, mag.getAmount(stack, ctx.inventory));
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +99,8 @@ public class GunStateDecider {
|
||||
|
||||
if(lastState == GunState.COOLDOWN) {
|
||||
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
GunConfig cfg = ctx.config;
|
||||
Receiver rec = cfg.getReceivers(stack)[recIndex];
|
||||
|
||||
@ -109,16 +112,18 @@ public class GunStateDecider {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterFire(stack));
|
||||
|
||||
if(rec.getFireSound(stack) != null) player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
|
||||
if(rec.getFireSound(stack) != null) entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
|
||||
|
||||
int remaining = rec.getRoundsPerCycle(stack) - 1;
|
||||
for(int i = 0; i < remaining; i++) if(rec.getCanFire(stack).apply(stack, ctx)) rec.getOnFire(stack).accept(stack, ctx);
|
||||
//if not, revert to idle
|
||||
} else /*if(rec.getDoesDryFire(stack)) {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.DRAWING);
|
||||
//if not, check if dry firing is allowed for refires
|
||||
} else if(rec.getDoesDryFireAfterAuto(stack)) {
|
||||
//if refire after dry is allowed, switch to COOLDOWN which will trigger a refire, otherwise switch to DRAWING
|
||||
ItemGunBaseNT.setState(stack, gunIndex, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterDryFire(stack));
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, gunIndex);
|
||||
} else*/ {
|
||||
//if not, revert to idle
|
||||
} else {
|
||||
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
|
||||
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@ -40,7 +41,7 @@ public class Lego {
|
||||
* If IDLE and the mag of receiver 0 can be loaded, set state to RELOADING. Used by keybinds. */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_RELOAD = (stack, ctx) -> {
|
||||
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
Receiver rec = ctx.config.getReceivers(stack)[0];
|
||||
GunState state = ItemGunBaseNT.getState(stack, ctx.configIndex);
|
||||
|
||||
@ -49,8 +50,8 @@ public class Lego {
|
||||
ItemGunBaseNT.setIsAiming(stack, false);
|
||||
IMagazine mag = rec.getMagazine(stack);
|
||||
|
||||
if(mag.canReload(stack, ctx.player)) {
|
||||
int loaded = mag.getAmount(stack);
|
||||
if(mag.canReload(stack, ctx.inventory)) {
|
||||
int loaded = mag.getAmount(stack, ctx.inventory);
|
||||
mag.setAmountBeforeReload(stack, loaded);
|
||||
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
|
||||
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0));
|
||||
@ -64,7 +65,8 @@ public class Lego {
|
||||
/** If IDLE and ammo is loaded, fire and set to JUST_FIRED. */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_CLICK_PRIMARY = (stack, ctx) -> {
|
||||
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
Receiver rec = ctx.config.getReceivers(stack)[0];
|
||||
int index = ctx.configIndex;
|
||||
GunState state = ItemGunBaseNT.getState(stack, index);
|
||||
@ -75,7 +77,7 @@ public class Lego {
|
||||
rec.getOnFire(stack).accept(stack, ctx);
|
||||
|
||||
if(rec.getFireSound(stack) != null)
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
|
||||
|
||||
int remaining = rec.getRoundsPerCycle(stack) - 1;
|
||||
for(int i = 0; i < remaining; i++) if(rec.getCanFire(stack).apply(stack, ctx)) rec.getOnFire(stack).accept(stack, ctx);
|
||||
@ -86,7 +88,7 @@ public class Lego {
|
||||
|
||||
if(rec.getDoesDryFire(stack)) {
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, index);
|
||||
ItemGunBaseNT.setState(stack, index, GunState.DRAWING);
|
||||
ItemGunBaseNT.setState(stack, index, rec.getDoesDryFireAfterAuto(stack) ? GunState.COOLDOWN : GunState.DRAWING);
|
||||
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
|
||||
}
|
||||
}
|
||||
@ -96,7 +98,7 @@ public class Lego {
|
||||
/** If IDLE, switch mode between 0 and 1. */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_CLICK_SECONDARY = (stack, ctx) -> {
|
||||
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
int index = ctx.configIndex;
|
||||
GunState state = ItemGunBaseNT.getState(stack, index);
|
||||
|
||||
@ -104,9 +106,9 @@ public class Lego {
|
||||
int mode = ItemGunBaseNT.getMode(stack, 0);
|
||||
ItemGunBaseNT.setMode(stack, index, 1 - mode);
|
||||
if(mode == 0)
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.switchmode1", 1F, 1F);
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.switchmode1", 1F, 1F);
|
||||
else
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.switchmode2", 1F, 1F);
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.switchmode2", 1F, 1F);
|
||||
}
|
||||
};
|
||||
|
||||
@ -118,10 +120,10 @@ public class Lego {
|
||||
|
||||
/** Default smoke. */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_SMOKE = (stack, ctx) -> {
|
||||
handleStandardSmoke(ctx.player, stack, 2000, 0.025D, 1.15D, ctx.configIndex);
|
||||
handleStandardSmoke(ctx.entity, stack, 2000, 0.025D, 1.15D, ctx.configIndex);
|
||||
};
|
||||
|
||||
public static void handleStandardSmoke(EntityPlayer player, ItemStack stack, int smokeDuration, double alphaDecay, double widthGrowth, int index) {
|
||||
public static void handleStandardSmoke(EntityLivingBase entity, ItemStack stack, int smokeDuration, double alphaDecay, double widthGrowth, int index) {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
long lastShot = gun.lastShot[index];
|
||||
List<SmokeNode> smokeNodes = gun.getConfig(stack, index).smokeNodes;
|
||||
@ -130,16 +132,16 @@ public class Lego {
|
||||
if(!smoking && !smokeNodes.isEmpty()) smokeNodes.clear();
|
||||
|
||||
if(smoking) {
|
||||
Vec3 prev = Vec3.createVectorHelper(-player.motionX, -player.motionY, -player.motionZ);
|
||||
prev.rotateAroundY((float) (player.rotationYaw * Math.PI / 180D));
|
||||
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
|
||||
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
|
||||
double accel = 15D;
|
||||
double side = (player.rotationYaw - player.prevRotationYawHead) * 0.1D;
|
||||
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
|
||||
double waggle = 0.025D;
|
||||
|
||||
for(SmokeNode node : smokeNodes) {
|
||||
node.forward += -prev.zCoord * accel + player.worldObj.rand.nextGaussian() * waggle;
|
||||
node.forward += -prev.zCoord * accel + entity.worldObj.rand.nextGaussian() * waggle;
|
||||
node.lift += prev.yCoord + 1.5D;
|
||||
node.side += prev.xCoord * accel + player.worldObj.rand.nextGaussian() * waggle + side;
|
||||
node.side += prev.xCoord * accel + entity.worldObj.rand.nextGaussian() * waggle + side;
|
||||
if(node.alpha > 0) node.alpha -= alphaDecay;
|
||||
node.width *= widthGrowth;
|
||||
}
|
||||
@ -154,52 +156,66 @@ public class Lego {
|
||||
|
||||
/** Toggles isAiming. Used by keybinds. */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TOGGLE_AIM = (stack, ctx) -> { ItemGunBaseNT.setIsAiming(stack, !ItemGunBaseNT.getIsAiming(stack)); };
|
||||
|
||||
/** Returns true if the mag has ammo in it. Used by keybind functions on whether to fire, and deciders on whether to trigger a refire. */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_STANDARD_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0; };
|
||||
|
||||
/** Returns true if the mag has ammo in it. Used by keybind functions on whether to fire, and deciders on whether to trigger a refire, */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_STANDARD_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack) > 0; };
|
||||
/** Returns true if the mag has ammo in it, and the gun is in the locked on state */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_LOCKON_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0 && ItemGunBaseNT.getIsLockedOn(stack); };
|
||||
|
||||
|
||||
|
||||
|
||||
/** JUMPER - bypasses mag testing and just allows constant fire */
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_DEBUG_CAN_FIRE = (stack, ctx) -> { return true; };
|
||||
|
||||
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, AnimType.CYCLE);
|
||||
doStandardFire(stack, ctx, AnimType.CYCLE, true);
|
||||
};
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, ignores wear */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_NOWEAR_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, AnimType.CYCLE, false);
|
||||
};
|
||||
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, then resets lockon progress */
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_LOCKON_FIRE = (stack, ctx) -> {
|
||||
doStandardFire(stack, ctx, AnimType.CYCLE, true);
|
||||
ItemGunBaseNT.setIsLockedOn(stack, false);
|
||||
};
|
||||
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, AnimType anim) {
|
||||
EntityPlayer player = ctx.player;
|
||||
public static void doStandardFire(ItemStack stack, LambdaContext ctx, AnimType anim, boolean calcWear) {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
int index = ctx.configIndex;
|
||||
if(anim != null) ItemGunBaseNT.playAnimation(player, stack, anim, ctx.configIndex);
|
||||
|
||||
float aim = ItemGunBaseNT.getIsAiming(stack) ? 0.25F : 1F;
|
||||
Receiver primary = ctx.config.getReceivers(stack)[0];
|
||||
IMagazine mag = primary.getMagazine(stack);
|
||||
BulletConfig config = (BulletConfig) mag.getType(stack);
|
||||
BulletConfig config = (BulletConfig) mag.getType(stack, ctx.inventory);
|
||||
|
||||
Vec3 offset = primary.getProjectileOffset(stack);
|
||||
double forwardOffset = offset.xCoord;
|
||||
double heightOffset = offset.yCoord;
|
||||
double sideOffset = ItemGunBaseNT.getIsAiming(stack) ? 0 : offset.zCoord;
|
||||
|
||||
/*forwardOffset = 1;
|
||||
heightOffset = -0.0625 * 1.5;
|
||||
sideOffset = -0.1875D;*/
|
||||
/*forwardOffset = 0.75;
|
||||
heightOffset = -0.125;
|
||||
sideOffset = -0.25D;*/
|
||||
|
||||
int projectiles = config.projectilesMin;
|
||||
if(config.projectilesMax > config.projectilesMin) projectiles += player.getRNG().nextInt(config.projectilesMax - config.projectilesMin + 1);
|
||||
if(config.projectilesMax > config.projectilesMin) projectiles += entity.getRNG().nextInt(config.projectilesMax - config.projectilesMin + 1);
|
||||
|
||||
for(int i = 0; i < projectiles; i++) {
|
||||
float damage = primary.getBaseDamage(stack) * getStandardWearDamage(stack, ctx.config, index);
|
||||
float spread = primary.getGunSpread(stack) * aim + getStandardWearSpread(stack, ctx.config, index) * 0.125F;
|
||||
EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(player, config, damage, spread, sideOffset, heightOffset, forwardOffset);
|
||||
player.worldObj.spawnEntityInWorld(mk4);
|
||||
float damage = primary.getBaseDamage(stack) * (calcWear ? getStandardWearDamage(stack, ctx.config, index) : 1);
|
||||
float spread = primary.getGunSpread(stack) * aim + (calcWear ? getStandardWearSpread(stack, ctx.config, index) * 0.125F : 0F);
|
||||
EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset);
|
||||
if(ItemGunBaseNT.getIsLockedOn(stack)) mk4.lockonTarget = entity.worldObj.getEntityByID(ItemGunBaseNT.getLockonTarget(stack));
|
||||
entity.worldObj.spawnEntityInWorld(mk4);
|
||||
}
|
||||
|
||||
mag.setAmount(stack, mag.getAmount(stack) - 1);
|
||||
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear, ctx.config.getDurability(stack)));
|
||||
mag.useUpAmmo(stack, ctx.inventory, 1);
|
||||
if(calcWear) ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear, ctx.config.getDurability(stack)));
|
||||
}
|
||||
|
||||
public static float getStandardWearSpread(ItemStack stack, GunConfig config, int index) {
|
||||
|
||||
@ -30,6 +30,12 @@ public class LegoClient {
|
||||
renderBulletStandard(Tessellator.instance, 0xFFBF00, 0xFFFFFF, length, false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_FLECHETTE_BULLET = (bullet, interp) -> {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length <= 0) return;
|
||||
renderBulletStandard(Tessellator.instance, 0x8C8C8C, 0xCACACA, length, false);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_AP_BULLET = (bullet, interp) -> {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length <= 0) return;
|
||||
@ -175,4 +181,19 @@ public class LegoClient {
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length > 0) renderBulletStandard(Tessellator.instance, 0x808080, 0xFFF2A7, length * 2, true);
|
||||
};
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, Float> RENDER_QD = (bullet, interp) -> {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.rocket_tex);
|
||||
ResourceManager.projectiles.renderPart("Rocket");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslatef(0.375F, 0, 0);
|
||||
double length = bullet.prevVelocity + (bullet.velocity - bullet.prevVelocity) * interp;
|
||||
if(length > 0) renderBulletStandard(Tessellator.instance, 0x808080, 0xFFF2A7, length * 2, true);
|
||||
};
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.factory;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.entity.projectile.EntityBulletBaseMK4;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
@ -11,9 +12,11 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.Receiver;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
|
||||
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.mags.MagazineSingleReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -22,8 +25,10 @@ import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
||||
public class XFactory12ga {
|
||||
|
||||
@ -31,70 +36,110 @@ public class XFactory12ga {
|
||||
public static BulletConfig g12_bp_magnum;
|
||||
public static BulletConfig g12_bp_slug;
|
||||
public static BulletConfig g12;
|
||||
public static BulletConfig g12_slug;
|
||||
public static BulletConfig g12_flechette;
|
||||
public static BulletConfig g12_magnum;
|
||||
public static BulletConfig g12_explosive;
|
||||
public static BulletConfig g12_phosphorus;
|
||||
public static BulletConfig g12_anthrax;
|
||||
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
Lego.standardExplode(bullet, mop, 2F); bullet.setDead();
|
||||
};
|
||||
|
||||
public static void init() {
|
||||
|
||||
g12_bp = new BulletConfig().setItem(EnumAmmo.G12_BP).setProjectiles(8, 8).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1.5F).register("12GA_BP"));
|
||||
g12_bp_magnum = new BulletConfig().setItem(EnumAmmo.G12_BP_MAGNUM).setProjectiles(4, 4).setSpread(0.05F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1.5F).register("12GA_BP_MAGNUM"));
|
||||
g12_bp_slug = new BulletConfig().setItem(EnumAmmo.G12_BP_SLUG).setSpread(0.01F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1.5F).register("12GA_BP_SLUG"));
|
||||
g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8, 8).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA"));
|
||||
g12_bp = new BulletConfig().setItem(EnumAmmo.G12_BP).setProjectiles(8).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP"));
|
||||
g12_bp_magnum = new BulletConfig().setItem(EnumAmmo.G12_BP_MAGNUM).setProjectiles(4).setSpread(0.05F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_MAGNUM"));
|
||||
g12_bp_slug = new BulletConfig().setItem(EnumAmmo.G12_BP_SLUG).setSpread(0.01F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(SpentCasing.COLOR_CASE_BRASS, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_BP_SLUG"));
|
||||
g12 = new BulletConfig().setItem(EnumAmmo.G12).setProjectiles(8).setSpread(0.05F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xB52B2B, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA"));
|
||||
g12_slug = new BulletConfig().setItem(EnumAmmo.G12_SLUG).setSpread(0.0F).setRicochetAngle(25).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x393939, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_SLUG"));
|
||||
g12_flechette = new BulletConfig().setItem(EnumAmmo.G12_FLECHETTE).setProjectiles(8).setSpread(0.025F).setRicochetAngle(5).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x3C80F0, SpentCasing.COLOR_CASE_BRASS).setScale(0.75F).register("12GA_FLECHETTE"));
|
||||
g12_magnum = new BulletConfig().setItem(EnumAmmo.G12_MAGNUM).setProjectiles(4).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x278400, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_MAGNUM"));
|
||||
g12_explosive = new BulletConfig().setItem(EnumAmmo.G12_EXPLOSIVE).setOnImpact(LAMBDA_STANDARD_EXPLODE).setSpread(0F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0xDA4127, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_EXPLOSIVE"));
|
||||
g12_phosphorus = new BulletConfig().setItem(EnumAmmo.G12_PHOSPHORUS).setProjectiles(8).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x910001, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_PHOSPHORUS"));
|
||||
g12_anthrax = new BulletConfig().setItem(EnumAmmo.G12_ANTHRAX).setProjectiles(8).setSpread(0.015F).setRicochetAngle(15).setCasing(new SpentCasing(CasingType.SHOTGUN).setColor(0x749300, SpentCasing.COLOR_CASE_12GA).setScale(0.75F).register("12GA_ANTHRAX"));
|
||||
|
||||
ModItems.gun_maresleg = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
BulletConfig[] all = new BulletConfig[] {g12_bp, g12_bp_magnum, g12_bp_slug, g12, g12_slug, g12_flechette, g12_magnum, g12_explosive, g12_phosphorus, g12_anthrax};
|
||||
|
||||
ModItems.gun_maresleg = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(600).draw(10).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_MARESLEG_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG)
|
||||
).setUnlocalizedName("gun_maresleg").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
ModItems.gun_maresleg_akimbo = new ItemGunBaseNT(
|
||||
new GunConfig().dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
).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)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(all))
|
||||
.offset(0.75, -0.0625, 0.1875D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_MARESLEG_SHORT_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG_AKIMBO),
|
||||
new GunConfig().dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
new GunConfig().dura(600).draw(5).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(1, 6).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.mag(new MagazineSingleReload(1, 6).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_MARESLEG_SHORT_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG_AKIMBO)
|
||||
).setUnlocalizedName("gun_maresleg_akimbo").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_maresleg_akimbo");
|
||||
ModItems.gun_maresleg_broken = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
|
||||
.dura(0).draw(5).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(22, 10, 13, 0).jam(24).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 6).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.canFire(Lego.LAMBDA_STANDARD_CAN_FIRE).fire(Lego.LAMBDA_NOWEAR_FIRE).recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_MARESLEG_SHORT_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG_SHORT)
|
||||
).setUnlocalizedName("gun_maresleg_broken");
|
||||
|
||||
ModItems.gun_liberator = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_liberator = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(200).draw(20).inspect(21).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).rounds(4).reload(25, 15, 7, 0).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.mag(new MagazineSingleReload(0, 4).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LIBERATOR_ANIMS).orchestra(Orchestras.ORCHESTRA_LIBERATOR)
|
||||
).setUnlocalizedName("gun_liberator").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_liberator");
|
||||
|
||||
ModItems.gun_spas12 = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_spas12 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(600).draw(20).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(5, 10, 10, 10, 0).jam(24).sound("hbm:weapon.shotgunShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 8).addConfigs(g12_bp, g12_bp_magnum, g12_bp_slug, g12))
|
||||
.offset(0.75, -0.0625, -0.1875D)
|
||||
.mag(new MagazineSingleReload(0, 8).addConfigs(all))
|
||||
.offset(0.75, -0.0625, -0.1875)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().ps(LAMBDA_SPAS_SECONDARY).pt(null)
|
||||
.anim(LAMBDA_SPAS_ANIMS).orchestra(Orchestras.ORCHESTRA_SPAS)
|
||||
).setUnlocalizedName("gun_spas12").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_spas12");
|
||||
|
||||
ModItems.gun_autoshotgun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(2_000).draw(10).inspect(33).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(10).auto(true).autoAfterDry(true).dryfireAfterAuto(true).reload(44).jam(19).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 20).addConfigs(all))
|
||||
.offset(0.75, -0.125, -0.25)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_SHREDDER_ANIMS).orchestra(Orchestras.ORCHESTRA_SHREDDER)
|
||||
).setUnlocalizedName("gun_autoshotgun");
|
||||
}
|
||||
//TODO: make generic code for this crap
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SPAS_SECONDARY = (stack, ctx) -> {
|
||||
EntityPlayer player = ctx.player;
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
Receiver rec = ctx.config.getReceivers(stack)[0];
|
||||
int index = ctx.configIndex;
|
||||
GunState state = ItemGunBaseNT.getState(stack, index);
|
||||
@ -109,7 +154,7 @@ public class XFactory12ga {
|
||||
timeFired++;
|
||||
}
|
||||
}
|
||||
if(rec.getFireSound(stack) != null) player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack) * (timeFired > 1 ? 0.9F : 1F));
|
||||
if(rec.getFireSound(stack) != null) entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack) * (timeFired > 1 ? 0.9F : 1F));
|
||||
ItemGunBaseNT.setState(stack, index, GunState.COOLDOWN);
|
||||
ItemGunBaseNT.setTimer(stack, index, 10);
|
||||
} else {
|
||||
@ -137,7 +182,7 @@ public class XFactory12ga {
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 600).addPos(0, 0, 45, 200, IType.SIN_DOWN).addPos(0, 0, 0, 200, IType.SIN_UP))
|
||||
.addBus("HAMMER", new BusAnimationSequence().addPos(30, 0, 0, 50).addPos(30, 0, 0, 550).addPos(0, 0, 0, 200));
|
||||
case RELOAD:
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
return new BusAnimation()
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(30, 0, 0, 400, IType.SIN_FULL))
|
||||
.addBus("LEVER", new BusAnimationSequence().addPos(0, 0, 0, 400).addPos(-85, 0, 0, 200))
|
||||
@ -190,7 +235,7 @@ public class XFactory12ga {
|
||||
|
||||
/** This fucking sucks */
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack);
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
@ -293,7 +338,7 @@ public class XFactory12ga {
|
||||
case CYCLE: return ResourceManager.spas_12_anim.get("Fire");
|
||||
case CYCLE_DRY: return new BusAnimation();
|
||||
case RELOAD:
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
return ResourceManager.spas_12_anim.get(empty ? "ReloadEmptyStart" : "ReloadStart");
|
||||
case RELOAD_CYCLE: return ResourceManager.spas_12_anim.get("Reload");
|
||||
case RELOAD_END: return ResourceManager.spas_12_anim.get("ReloadEnd");
|
||||
@ -303,4 +348,30 @@ public class XFactory12ga {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_SHREDDER_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -1, 50, IType.SIN_DOWN).addPos(0, 0, 0, 150, IType.SIN_FULL))
|
||||
.addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100));
|
||||
case CYCLE_DRY: return new BusAnimation()
|
||||
.addBus("CYCLE", new BusAnimationSequence().addPos(0, 0, 0, 150).addPos(0, 0, 18, 100));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, -8, 0, 250, IType.SIN_UP).addPos(0, -8, 0, 1000).addPos(0, 0, 0, 300))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(-25, 0, 0, 300, IType.SIN_FULL).addPos(-25, 0, 0, 500).addPos(-27, 0, 0, 100, IType.SIN_DOWN).addPos(-25, 0, 0, 100, IType.SIN_FULL).addPos(-25, 0, 0, 150).addPos(0, 0, 0, 300, IType.SIN_FULL));
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, -2, 0, 150, IType.SIN_UP).addPos(0, 0, 0, 100))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(-2, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL));
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence()
|
||||
.addPos(0, -1, 0, 150).addPos(6, -1, 0, 150).addPos(6, 12, 0, 350, IType.SIN_DOWN).addPos(6, -2, 0, 350, IType.SIN_UP).addPos(6, -1, 0, 50)
|
||||
.addPos(6, -1, 0, 100).addPos(0, -1, 0, 150, IType.SIN_FULL).addPos(0, 0, 0, 150, IType.SIN_UP))
|
||||
.addBus("SPEEN", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(360, 0, 0, 700))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 1450).addPos(-2, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -11,9 +11,9 @@ 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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -42,7 +42,7 @@ public class XFactory22lr {
|
||||
p22_ap = new BulletConfig().setItem(EnumAmmo.P22_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing22.clone().setColor(SpentCasing.COLOR_CASE_44).register("p22ap"));
|
||||
|
||||
ModItems.gun_am180 = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_am180 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(177 * 25).draw(15).inspect(38).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(1).dry(10).auto(true).spread(0.02F).reload(66).jam(30).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -51,11 +51,11 @@ public class XFactory22lr {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_AM180_ANIMS).orchestra(Orchestras.ORCHESTRA_AM180)
|
||||
).setUnlocalizedName("gun_am180").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_am180");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 3000, 0.05D, 1.1D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 3000, 0.05D, 1.1D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_AM180_ANIMS = (stack, type) -> {
|
||||
|
||||
@ -8,9 +8,9 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
@ -33,7 +33,7 @@ public class XFactory357 {
|
||||
m357_ap = new BulletConfig().setItem(EnumAmmo.M357_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F);
|
||||
m357_express = new BulletConfig().setItem(EnumAmmo.M357_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setArmorPiercing(0.1F).setWear(1.5F);
|
||||
|
||||
ModItems.gun_light_revolver = new ItemGunBaseNT(new GunConfig()
|
||||
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(10F).delay(16).reload(55).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -42,9 +42,9 @@ public class XFactory357 {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_ATLAS_ANIMS).orchestra(Orchestras.ORCHESTRA_ATLAS)
|
||||
).setUnlocalizedName("gun_light_revolver").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_light_revolver");
|
||||
|
||||
ModItems.gun_light_revolver_dani = new ItemGunBaseNT(
|
||||
ModItems.gun_light_revolver_dani = new ItemGunBaseNT(WeaponQuality.LEGENDARY,
|
||||
new GunConfig().dura(30_000).draw(20).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(11).reload(55).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -63,7 +63,7 @@ public class XFactory357 {
|
||||
.ps(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).pr(Lego.LAMBDA_STANDARD_RELOAD)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
|
||||
).setUnlocalizedName("gun_light_revolver_dani").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_light_revolver_dani");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_ATLAS_ANIMS = (stack, type) -> {
|
||||
|
||||
@ -11,9 +11,10 @@ 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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -39,7 +40,7 @@ public class XFactory40mm {
|
||||
g40_flare = new BulletConfig().setItem(EnumAmmo.G40_FLARE).setLife(100).setVel(2F).setGrav(0.035D).setRenderRotations(false).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x9E1616).setScale(2F).register("G40Flare"));
|
||||
g40 = new BulletConfig().setItem(EnumAmmo.G40).setLife(200).setOnImpact(LAMBDA_STANDARD_EXPLODE).setVel(2F).setGrav(0.035D).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_40MM).setScale(2, 2F, 1.5F).register("G40"));
|
||||
|
||||
ModItems.gun_flaregun = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_flaregun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(100).draw(7).inspect(39).crosshair(Crosshair.L_CIRCUMFLEX).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(20).reload(28).jam(33).sound("hbm:weapon.hkShoot", 1.0F, 1.0F)
|
||||
@ -48,9 +49,9 @@ public class XFactory40mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_FLAREGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAREGUN)
|
||||
).setUnlocalizedName("gun_flaregun").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_flaregun");
|
||||
|
||||
ModItems.gun_congolake = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_congolake = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(400).draw(7).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCUMFLEX).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(30F).delay(24).reload(16, 16, 16, 0).jam(0).sound("hbm:weapon.glShoot", 1.0F, 1.0F)
|
||||
@ -59,11 +60,11 @@ public class XFactory40mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_CONGOLAKE_ANIMS).orchestra(Orchestras.ORCHESTRA_CONGOLAKE)
|
||||
).setUnlocalizedName("gun_congolake").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_congolake");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 1500, 0.025D, 1.05D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.025D, 1.05D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FLAREGUN_ANIMS = (stack, type) -> {
|
||||
@ -90,7 +91,7 @@ public class XFactory40mm {
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CONGOLAKE_ANIMS = (stack, type) -> {
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack);
|
||||
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
|
||||
switch(type) {
|
||||
case EQUIP: return ResourceManager.congolake_anim.get("Equip");
|
||||
case CYCLE: return ResourceManager.congolake_anim.get(ammo <= 1 ? "FireEmpty" : "Fire");
|
||||
|
||||
@ -8,10 +8,10 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -42,7 +42,7 @@ public class XFactory44 {
|
||||
m44_express = new BulletConfig().setItem(EnumAmmo.M44_EXPRESS).setDoesPenetrate(true).setDamage(1.5F).setArmorPiercing(0.1F).setWear(1.5F)
|
||||
.setCasing(casing44.clone().register("m44express"));
|
||||
|
||||
ModItems.gun_henry = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_henry = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(15).inspect(23).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(12F).delay(20).reload(25, 11, 14, 8).jam(45).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -51,9 +51,9 @@ public class XFactory44 {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_HENRY_ANIMS).orchestra(Orchestras.ORCHESTRA_HENRY)
|
||||
).setUnlocalizedName("gun_henry").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_henry");
|
||||
|
||||
ModItems.gun_heavy_revolver = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_heavy_revolver = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(600F).draw(10).inspect(23).crosshair(Crosshair.L_CLASSIC).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(14).reload(46).jam(23).sound("hbm:weapon.44Shoot", 1.0F, 1.0F)
|
||||
@ -63,7 +63,7 @@ public class XFactory44 {
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY) .pr(Lego.LAMBDA_STANDARD_RELOAD) .pt(Lego.LAMBDA_TOGGLE_AIM)
|
||||
.decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_NOPIP_ANIMS).orchestra(Orchestras.ORCHESTRA_NOPIP)
|
||||
).setUnlocalizedName("gun_heavy_revolver").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_heavy_revolver");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_HENRY_ANIMS = (stack, type) -> {
|
||||
|
||||
@ -0,0 +1,72 @@
|
||||
package com.hbm.items.weapon.sedna.factory;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineBelt;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
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 XFactory50 {
|
||||
|
||||
public static BulletConfig bmg50_sp;
|
||||
public static BulletConfig bmg50_fmj;
|
||||
public static BulletConfig bmg50_jhp;
|
||||
public static BulletConfig bmg50_ap;
|
||||
public static BulletConfig bmg50_du;
|
||||
|
||||
public static void init() {
|
||||
SpentCasing casing762 = new SpentCasing(CasingType.BOTTLENECK).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(1.5F);
|
||||
bmg50_sp = new BulletConfig().setItem(EnumAmmo.BMG50_SP)
|
||||
.setCasing(casing762.clone().register("bmg50"));
|
||||
bmg50_fmj = new BulletConfig().setItem(EnumAmmo.BMG50_FMJ).setDamage(0.8F).setArmorPiercing(0.1F)
|
||||
.setCasing(casing762.clone().register("bmg50fmj"));
|
||||
bmg50_jhp = new BulletConfig().setItem(EnumAmmo.BMG50_JHP).setDamage(1.5F).setArmorPiercing(-0.25F)
|
||||
.setCasing(casing762.clone().register("bmg50jhp"));
|
||||
bmg50_ap = new BulletConfig().setItem(EnumAmmo.BMG50_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50ap"));
|
||||
bmg50_du = new BulletConfig().setItem(EnumAmmo.BMG50_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("bmg50du"));
|
||||
|
||||
ModItems.gun_m2 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(10).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(2).dry(10).auto(true).spread(0.005F).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineBelt().addConfigs(bmg50_sp, bmg50_fmj, bmg50_jhp, bmg50_ap, bmg50_du))
|
||||
.offset(1, -0.0625 * 2.5, -0.25D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_M2_ANIMS).orchestra(Orchestras.ORCHESTRA_M2)
|
||||
).setUnlocalizedName("gun_m2");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_M2_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.25, 25).addPos(0, 0, 0, 75));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
}
|
||||
@ -10,9 +10,10 @@ 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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -40,7 +41,7 @@ public class XFactory556mm {
|
||||
r556_ap = new BulletConfig().setItem(EnumAmmo.R556_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing556.clone().setColor(SpentCasing.COLOR_CASE_44).register("r556ap"));
|
||||
|
||||
ModItems.gun_g3 = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_g3 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(10).inspect(33).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(2).auto(true).dry(15).spread(0.0F).reload(50).jam(47).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -49,15 +50,15 @@ public class XFactory556mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().ps(Lego.LAMBDA_STANDARD_CLICK_SECONDARY)
|
||||
.anim(LAMBDA_G3_ANIMS).orchestra(Orchestras.ORCHESTRA_G3)
|
||||
).setUnlocalizedName("gun_g3").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_g3");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 1500, 0.075D, 1.1D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.075D, 1.1D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
|
||||
@ -10,9 +10,10 @@ 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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -43,7 +44,7 @@ public class XFactory762mm {
|
||||
r762_du = new BulletConfig().setItem(EnumAmmo.R762_DU).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2.5F).setArmorPiercing(0.25F)
|
||||
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762du"));
|
||||
|
||||
ModItems.gun_carbine = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_carbine = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(10).inspect(31).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(5).dry(15).spread(0.0F).reload(30, 0, 15, 0).jam(60).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -52,15 +53,15 @@ public class XFactory762mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_CARBINE_ANIMS).orchestra(Orchestras.ORCHESTRA_CARBIBE)
|
||||
).setUnlocalizedName("gun_carbine").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_carbine");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 1500, 0.075D, 1.1D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.075D, 1.1D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CARBINE_ANIMS = (stack, type) -> {
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
|
||||
|
||||
@ -10,9 +10,10 @@ 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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -40,8 +41,8 @@ public class XFactory9mm {
|
||||
p9_ap = new BulletConfig().setItem(EnumAmmo.P9_AP).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(1.5F).setArmorPiercing(0.15F)
|
||||
.setCasing(casing9.clone().setColor(SpentCasing.COLOR_CASE_44).register("p9ap"));
|
||||
|
||||
ModItems.gun_greasegun = new ItemGunBaseNT(new GunConfig()
|
||||
.dura(3_000).draw(15).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
ModItems.gun_greasegun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(20).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(5F).delay(4).dry(40).auto(true).spread(0.015F).reload(60).jam(55).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 30).addConfigs(p9_sp, p9_fmj, p9_jhp, p9_ap))
|
||||
@ -49,9 +50,9 @@ public class XFactory9mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_GREASEGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_GREASEGUN)
|
||||
).setUnlocalizedName("gun_greasegun").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_greasegun");
|
||||
|
||||
ModItems.gun_lag = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_lag = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(1_700).draw(15).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(15F).delay(4).dry(40).spread(0.005F).reload(60).jam(55).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -60,9 +61,9 @@ public class XFactory9mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_LAG_ANIMS).orchestra(Orchestras.ORCHESTRA_LAG)
|
||||
).setUnlocalizedName("gun_lag").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_lag");
|
||||
|
||||
ModItems.gun_uzi = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_uzi = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(3_000).draw(15).inspect(31).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(7.5F).delay(2).dry(25).auto(true).spread(0.005F).reload(55).jam(50).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -71,11 +72,11 @@ public class XFactory9mm {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI)
|
||||
).setUnlocalizedName("gun_uzi").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_uzi");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
|
||||
Lego.handleStandardSmoke(ctx.player, stack, 2000, 0.05D, 1.1D, 0);
|
||||
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, 0);
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_GREASEGUN_ANIMS = (stack, type) -> {
|
||||
@ -91,7 +92,7 @@ public class XFactory9mm {
|
||||
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, -45, 250, IType.SIN_FULL).addPos(0, 0, -45, 750).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
.addBus("HANDLE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 0, 250).addPos(-90, 0, 0, 250, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL));
|
||||
case RELOAD:
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, -8, 0, 250, IType.SIN_UP).addPos(0, -8, 0, 750).addPos(0, 0, 0, 500, IType.SIN_DOWN))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(-25, 0, 0, 250, IType.SIN_FULL).addPos(-25, 0, 0, 1750).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
@ -126,7 +127,7 @@ public class XFactory9mm {
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(-25, 0, 0, 250, IType.SIN_FULL).addPos(-25, 0, 0, 500).addPos(0, 0, 0, 250, IType.SIN_FULL))
|
||||
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, -2, 150, IType.SIN_FULL).addPos(0, 0, 0, 50, IType.SIN_UP));
|
||||
case RELOAD:
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
return new BusAnimation()
|
||||
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 250).addPos(0, -10, 0, 250, IType.SIN_UP).addPos(0, -10, 0, 750).addPos(0, 0, 0, 500, IType.SIN_DOWN))
|
||||
.addBus("LIFT", new BusAnimationSequence().addPos(-25, 0, 0, 250, IType.SIN_FULL).addPos(-25, 0, 0, 2000).addPos(0, 0, 0, 500, IType.SIN_FULL))
|
||||
|
||||
@ -8,9 +8,9 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe.IType;
|
||||
@ -27,7 +27,7 @@ public class XFactoryBlackPowder {
|
||||
BulletConfig iron = new BulletConfig().setItem(EnumAmmo.STONE_IRON).setSpread(0F).setRicochetAngle(90).setRicochetCount(5).setDoesPenetrate(true).setDamageFalloutByPen(false).setDamage(2F);
|
||||
BulletConfig shot = new BulletConfig().setItem(EnumAmmo.STONE_SHOT).setSpread(0.1F).setRicochetAngle(45).setProjectiles(6, 6).setDamage(0.5F);
|
||||
|
||||
ModItems.gun_pepperbox = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_pepperbox = 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(5F).delay(27).reload(67).jam(58).sound("hbm:weapon.fire.blackPowder", 1.0F, 1.0F)
|
||||
@ -35,7 +35,7 @@ public class XFactoryBlackPowder {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_PEPPERBOX_ANIMS).orchestra(Orchestras.ORCHESTRA_PEPPERBOX)
|
||||
).setUnlocalizedName("gun_pepperbox").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_pepperbox");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PEPPERBOX_ANIMS = (stack, type) -> {
|
||||
|
||||
@ -8,9 +8,11 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunChemthrower;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFluid;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
@ -38,16 +40,27 @@ public class XFactoryFlamer {
|
||||
}
|
||||
});
|
||||
|
||||
ModItems.gun_flamer = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_flamer = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(20_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(10F).delay(1).auto(true).reload(90).jam(0)
|
||||
.dmg(10F).delay(1).auto(true).reload(90).jam(17)
|
||||
.mag(new MagazineFullReload(0, 300).addConfigs(flame_diesel))
|
||||
.offset(0.75, -0.0625, -0.25D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_FLAMER_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAMER)
|
||||
).setUnlocalizedName("gun_flamer").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_flamer");
|
||||
|
||||
ModItems.gun_chemthrower = new ItemGunChemthrower(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(90_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
|
||||
.rec(new Receiver(0)
|
||||
.delay(1).auto(true)
|
||||
.mag(new MagazineFluid(0, 3_000))
|
||||
.offset(0.75, -0.0625, -0.25D)
|
||||
.canFire(ItemGunChemthrower.LAMBDA_CAN_FIRE).fire(ItemGunChemthrower.LAMBDA_FIRE))
|
||||
.pp(Lego.LAMBDA_STANDARD_CLICK_PRIMARY).decider(GunStateDecider.LAMBDA_STANDARD_DECIDER)
|
||||
.anim(LAMBDA_CHEMTHROWER_ANIMS).orchestra(Orchestras.ORCHESTRA_CHEMTHROWER)
|
||||
).setUnlocalizedName("gun_chemthrower");
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FLAMER_ANIMS = (stack, type) -> {
|
||||
@ -55,9 +68,18 @@ public class XFactoryFlamer {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case RELOAD: return ResourceManager.flamethrower_anim.get("Reload");
|
||||
case INSPECT: return new BusAnimation()
|
||||
case INSPECT:
|
||||
case JAMMED: return new BusAnimation()
|
||||
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 45, 250, IType.SIN_FULL).addPos(0, 0, 45, 350).addPos(0, 0, -15, 150, IType.SIN_FULL).addPos(0, 0, 0, 100, IType.SIN_FULL));
|
||||
case JAMMED: return new BusAnimation();
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CHEMTHROWER_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -11,25 +11,56 @@ import com.hbm.items.weapon.sedna.Crosshair;
|
||||
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.ItemGunBaseNT.WeaponQuality;
|
||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunStinger;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
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.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class XFactoryRocket {
|
||||
|
||||
public static BulletConfig rocket_rpzb_he;
|
||||
public static BulletConfig rocket_rpzb_heat;
|
||||
|
||||
public static BulletConfig rocket_qd_he;
|
||||
public static BulletConfig rocket_qd_heat;
|
||||
|
||||
public static Consumer<EntityBulletBaseMK4> LAMBDA_STANDARD_ACCELERATE = (bullet) -> {
|
||||
if(bullet.accel < 7) bullet.accel += 0.4D;
|
||||
};
|
||||
public static Consumer<EntityBulletBaseMK4> LAMBDA_STEERING_ACCELERATE = (bullet) -> {
|
||||
if(bullet.accel < 4) bullet.accel += 0.4D;
|
||||
|
||||
if(bullet.getThrower() == null || !(bullet.getThrower() instanceof EntityPlayer)) return;
|
||||
EntityPlayer player = (EntityPlayer) bullet.getThrower();
|
||||
if(Vec3.createVectorHelper(bullet.posX - player.posX, bullet.posY - player.posY, bullet.posZ - player.posZ).lengthVector() > 100) return;
|
||||
|
||||
if(player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ItemGunBaseNT) || !ItemGunBaseNT.getIsAiming(player.getHeldItem())) return;
|
||||
|
||||
MovingObjectPosition mop = Library.rayTrace(player, 200, 1);
|
||||
if(mop == null || mop.hitVec == null) return;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(mop.hitVec.xCoord - bullet.posX, mop.hitVec.yCoord - bullet.posY, mop.hitVec.zCoord - bullet.posZ);
|
||||
if(vec.lengthVector() < 3) return;
|
||||
vec = vec.normalize();
|
||||
|
||||
double speed = Vec3.createVectorHelper(bullet.motionX, bullet.motionY, bullet.motionZ).lengthVector();
|
||||
|
||||
bullet.motionX = vec.xCoord * speed;
|
||||
bullet.motionY = vec.yCoord * speed;
|
||||
bullet.motionZ = vec.zCoord * speed;
|
||||
};
|
||||
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
|
||||
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
|
||||
Lego.standardExplode(bullet, mop, 5F); bullet.setDead();
|
||||
@ -45,8 +76,12 @@ public class XFactoryRocket {
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
rocket_rpzb_heat = new BulletConfig().setItem(EnumAmmo.ROCKET_HEAT).setLife(300).setDamage(1.5F).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
|
||||
rocket_qd_he = new BulletConfig().setItem(EnumAmmo.ROCKET_HE).setLife(400).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STEERING_ACCELERATE);
|
||||
rocket_qd_heat = new BulletConfig().setItem(EnumAmmo.ROCKET_HEAT).setLife(400).setDamage(1.5F).setSelfDamageDelay(10).setVel(0F).setGrav(0D)
|
||||
.setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STEERING_ACCELERATE);
|
||||
|
||||
ModItems.gun_panzerschreck = new ItemGunBaseNT(new GunConfig()
|
||||
ModItems.gun_panzerschreck = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_CIRCUMFLEX)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(25F).delay(5).reload(50).jam(40).sound("hbm:weapon.rpgShoot", 1.0F, 1.0F)
|
||||
@ -55,11 +90,36 @@ public class XFactoryRocket {
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_PANZERSCHRECK_ANIMS).orchestra(Orchestras.ORCHESTRA_PANERSCHRECK)
|
||||
).setUnlocalizedName("gun_panzerschreck").setTextureName(RefStrings.MODID + ":gun_darter");
|
||||
).setUnlocalizedName("gun_panzerschreck");
|
||||
|
||||
ModItems.gun_stinger = new ItemGunStinger(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_BOX_OUTLINE)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(25F).delay(5).reload(50).jam(40).sound("hbm:weapon.rpgShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineSingleReload(0, 1).addConfigs(rocket_rpzb_he, rocket_rpzb_heat))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.setupLockonFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration().ps(LAMBDA_STINGER_SECONDARY_PRESS).rs(LAMBDA_STINGER_SECONDARY_RELEASE)
|
||||
.anim(LAMBDA_PANZERSCHRECK_ANIMS).orchestra(Orchestras.ORCHESTRA_STINGER)
|
||||
).setUnlocalizedName("gun_stinger");
|
||||
|
||||
ModItems.gun_quadro = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
|
||||
.dura(300).draw(7).inspect(40).crosshair(Crosshair.L_CIRCUMFLEX).hideCrosshair(false)
|
||||
.rec(new Receiver(0)
|
||||
.dmg(25F).delay(10).reload(55).jam(40).sound("hbm:weapon.rpgShoot", 1.0F, 1.0F)
|
||||
.mag(new MagazineFullReload(0, 4).addConfigs(rocket_qd_he, rocket_qd_heat))
|
||||
.offset(1, -0.0625 * 1.5, -0.1875D)
|
||||
.setupStandardFire().recoil(Lego.LAMBDA_STANDARD_RECOIL))
|
||||
.setupStandardConfiguration()
|
||||
.anim(LAMBDA_QUADRO_ANIMS).orchestra(Orchestras.ORCHESTRA_QUADRO)
|
||||
).setUnlocalizedName("gun_quadro");
|
||||
}
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STINGER_SECONDARY_PRESS = (stack, ctx) -> { ItemGunStinger.setIsLockingOn(stack, true); };
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STINGER_SECONDARY_RELEASE = (stack, ctx) -> { ItemGunStinger.setIsLockingOn(stack, false); };
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack) <= 0;
|
||||
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
@ -74,4 +134,20 @@ public class XFactoryRocket {
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_QUADRO_ANIMS = (stack, type) -> {
|
||||
switch(type) {
|
||||
case EQUIP: return new BusAnimation()
|
||||
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
|
||||
case CYCLE: return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50).addPos(0, 0, 0, 50));
|
||||
case RELOAD: return new BusAnimation()
|
||||
.addBus("RELOAD_ROTATE", new BusAnimationSequence().addPos(0, 0, 60, 500, IType.SIN_FULL).addPos(0, 0, 60, 1500).addPos(0, 0, 0, 750, IType.SIN_FULL))
|
||||
.addBus("RELOAD_PUSH", new BusAnimationSequence().addPos(-1, -1, 0, 0).addPos(-1, -1, 0, 500).addPos(-1, 0, 0, 350).addPos(0, 0, 0, 1000));
|
||||
case JAMMED:
|
||||
case INSPECT: return new BusAnimation()
|
||||
.addBus("RELOAD_ROTATE", new BusAnimationSequence().addPos(0, 0, 60, 750, IType.SIN_FULL).addPos(0, 0, 60, 500).addPos(0, 0, 0, 750, IType.SIN_FULL));
|
||||
}
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@ -55,12 +55,12 @@ public class HUDComponentAmmoCounter implements IHUDComponent {
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
IMagazine mag = gun.getConfig(stack, gunIndex).getReceivers(stack)[this.receiver].getMagazine(stack);
|
||||
|
||||
if(!noCounter) mc.fontRenderer.drawString(mag.reportAmmoStateForHUD(stack), pX + 17, pZ + 6, 0xFFFFFF);
|
||||
if(!noCounter) mc.fontRenderer.drawString(mag.reportAmmoStateForHUD(stack, player), pX + 17, pZ + 6, 0xFFFFFF);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), mag.getIconForHUD(stack), pX, pZ);
|
||||
itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.getTextureManager(), mag.getIconForHUD(stack, player), pX, pZ);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
@ -0,0 +1,101 @@
|
||||
package com.hbm.items.weapon.sedna.impl;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
import com.hbm.entity.projectile.EntityChemical;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
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.mags.IMagazine;
|
||||
import com.hbm.items.weapon.sedna.mags.MagazineFluid;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import api.hbm.fluid.IFillableItem;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class ItemGunChemthrower extends ItemGunBaseNT implements IFillableItem {
|
||||
|
||||
public static final int CONSUMPTION = 3;
|
||||
|
||||
public ItemGunChemthrower(WeaponQuality quality, GunConfig... cfg) {
|
||||
super(quality, cfg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsFluid(FluidType type, ItemStack stack) {
|
||||
return getFluidType(stack) == type || this.getMagCount(stack) == 0;
|
||||
}
|
||||
|
||||
public static final int transferSpeed = 50;
|
||||
|
||||
@Override
|
||||
public int tryFill(FluidType type, int amount, ItemStack stack) {
|
||||
|
||||
if(!acceptsFluid(type, stack)) return amount;
|
||||
if(this.getMagCount(stack) == 0) this.setMagType(stack, type.getID());
|
||||
|
||||
int fill = this.getMagCount(stack);
|
||||
int req = this.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getCapacity(stack) - fill;
|
||||
int toFill = Math.min(amount, req);
|
||||
toFill = Math.min(toFill, transferSpeed);
|
||||
this.setMagCount(stack, fill + toFill);
|
||||
|
||||
return amount - toFill;
|
||||
}
|
||||
|
||||
public FluidType getFluidType(ItemStack stack) {
|
||||
return Fluids.fromID(this.getMagType(stack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean providesFluid(FluidType type, ItemStack stack) {
|
||||
return getFluidType(stack) == type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tryEmpty(FluidType type, int amount, ItemStack stack) {
|
||||
int fill = this.getMagCount(stack);
|
||||
int toUnload = Math.min(fill, amount);
|
||||
toUnload = Math.min(toUnload, transferSpeed);
|
||||
this.setMagCount(stack, fill - toUnload);
|
||||
return toUnload;
|
||||
}
|
||||
|
||||
@Override public FluidType getFirstFluidType(ItemStack stack) { return Fluids.fromID(this.getMagType(stack)); }
|
||||
@Override public int getFill(ItemStack stack) { return this.getMagCount(stack); }
|
||||
|
||||
public static int getMagType(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, MagazineFluid.KEY_MAG_TYPE + 0); }
|
||||
public static void setMagType(ItemStack stack, int value) { ItemGunBaseNT.setValueInt(stack, MagazineFluid.KEY_MAG_TYPE + 0, value); }
|
||||
public static int getMagCount(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, MagazineFluid.KEY_MAG_COUNT + 0); }
|
||||
public static void setMagCount(ItemStack stack, int value) { ItemGunBaseNT.setValueInt(stack, MagazineFluid.KEY_MAG_COUNT + 0, value); }
|
||||
|
||||
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) >= CONSUMPTION; };
|
||||
|
||||
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
|
||||
EntityLivingBase entity = ctx.entity;
|
||||
EntityPlayer player = ctx.getPlayer();
|
||||
int index = ctx.configIndex;
|
||||
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE, ctx.configIndex);
|
||||
|
||||
Receiver primary = ctx.config.getReceivers(stack)[0];
|
||||
IMagazine mag = primary.getMagazine(stack);
|
||||
|
||||
Vec3 offset = primary.getProjectileOffset(stack);
|
||||
double forwardOffset = offset.xCoord;
|
||||
double heightOffset = offset.yCoord;
|
||||
double sideOffset = offset.zCoord;
|
||||
|
||||
EntityChemical chem = new EntityChemical(entity.worldObj, entity, sideOffset, heightOffset, forwardOffset);
|
||||
chem.setFluid((FluidType) mag.getType(stack, ctx.inventory));
|
||||
entity.worldObj.spawnEntityInWorld(chem);
|
||||
|
||||
mag.useUpAmmo(stack, ctx.inventory, CONSUMPTION);
|
||||
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + 1F, ctx.config.getDurability(stack)));
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
package com.hbm.items.weapon.sedna.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.weapon.sedna.GunConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.hud.IHUDComponent;
|
||||
import com.hbm.render.util.RenderScreenOverlay;
|
||||
import com.hbm.util.Vec3NT;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
|
||||
public class ItemGunStinger extends ItemGunBaseNT {
|
||||
|
||||
public static final String KEY_LOCKINGON = "lockingon";
|
||||
public static final String KEY_LOCKONPROGRESS = "lockonprogress";
|
||||
|
||||
public static float prevLockon;
|
||||
public static float lockon;
|
||||
|
||||
public ItemGunStinger(WeaponQuality quality, GunConfig... cfg) {
|
||||
super(quality, cfg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isHeld) {
|
||||
super.onUpdate(stack, world, entity, slot, isHeld);
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if(!world.isRemote && !isHeld && this.getIsLockingOn(stack)) {
|
||||
this.setIsLockingOn(stack, false);
|
||||
}
|
||||
|
||||
this.prevLockon = this.lockon;
|
||||
|
||||
if(!world.isRemote) {
|
||||
int prevTarget = this.getLockonTarget(stack);
|
||||
if(isHeld && this.getIsLockingOn(stack) && this.getIsAiming(stack) && this.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, player.inventory) > 0) {
|
||||
int newLockonTarget = this.getLockonTarget(player);
|
||||
|
||||
if(newLockonTarget == -1) {
|
||||
if(!this.getIsLockedOn(stack)) resetLockon(world, stack);
|
||||
} else {
|
||||
if(!this.getIsLockedOn(stack) && newLockonTarget != prevTarget) {
|
||||
resetLockon(world, stack);
|
||||
this.setLockonTarget(stack, newLockonTarget);
|
||||
}
|
||||
progressLockon(world, stack);
|
||||
|
||||
if(this.getLockonProgress(stack) >= 60 && !this.getIsLockedOn(stack)) {
|
||||
player.worldObj.playSoundAtEntity(player, "hbm:item.techBleep", 1F, 1F);
|
||||
this.setIsLockedOn(stack, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
resetLockon(world, stack);
|
||||
}
|
||||
} else {
|
||||
if(this.getLockonProgress(stack) > 1) {
|
||||
this.lockon += (1F / 60F);
|
||||
} else {
|
||||
this.lockon = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void resetLockon(World world, ItemStack stack) {
|
||||
this.setLockonProgress(stack, 0);
|
||||
this.setIsLockedOn(stack, false);
|
||||
}
|
||||
|
||||
public void progressLockon(World world, ItemStack stack) {
|
||||
this.setLockonProgress(stack, this.getLockonProgress(stack) + 1);
|
||||
}
|
||||
|
||||
public static int getLockonTarget(EntityPlayer player) {
|
||||
|
||||
double x = player.posX;
|
||||
double y = player.posY + player.getEyeHeight();
|
||||
double z = player.posZ;
|
||||
|
||||
Vec3NT delta = new Vec3NT(player.getLook(1F)).multiply(150);
|
||||
Vec3NT look = new Vec3NT(delta).add(x, y, z);
|
||||
Vec3NT pos = new Vec3NT(x, y, z);
|
||||
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(Vec3NT.getMinX(look, pos), Vec3NT.getMinY(look, pos), Vec3NT.getMinZ(look, pos),
|
||||
Vec3NT.getMaxX(look, pos), Vec3NT.getMaxY(look, pos), Vec3NT.getMaxZ(look, pos));
|
||||
List<Entity> entities = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, aabb);
|
||||
Entity closestEntity = null;
|
||||
double closestAngle = 360D;
|
||||
|
||||
Vec3NT toEntity = new Vec3NT(0, 0, 0);
|
||||
|
||||
for(Entity entity : entities) {
|
||||
if(entity.height < 0.5F) continue;
|
||||
toEntity.setComponents(entity.posX - x, entity.posY + entity.height / 2D - y, entity.posZ - z);
|
||||
|
||||
double vecProd = toEntity.xCoord * delta.xCoord + toEntity.yCoord * delta.yCoord + toEntity.zCoord * delta.zCoord;
|
||||
double bot = toEntity.lengthVector() * delta.lengthVector();
|
||||
double angle = Math.abs(Math.acos(vecProd / bot) * 180 / Math.PI);
|
||||
|
||||
if(angle < closestAngle && angle < 10) {
|
||||
closestAngle = angle;
|
||||
closestEntity = entity;
|
||||
}
|
||||
}
|
||||
|
||||
return closestEntity == null ? - 1 : closestEntity.getEntityId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderHUD(Pre event, ElementType type, EntityPlayer player, ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
|
||||
if(type == ElementType.CROSSHAIRS) {
|
||||
event.setCanceled(true);
|
||||
if(aimingProgress < 1F) return;
|
||||
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, gun.getConfig(stack, 0).getCrosshair(stack));
|
||||
RenderScreenOverlay.renderStingerLockon(event.resolution, Minecraft.getMinecraft().ingameGUI);
|
||||
}
|
||||
|
||||
int confNo = this.configs_DNA.length;
|
||||
|
||||
for(int i = 0; i < confNo; i++) {
|
||||
IHUDComponent[] components = gun.getConfig(stack, i).getHUDComponents(stack);
|
||||
|
||||
if(components != null) for(IHUDComponent component : components) {
|
||||
int bottomOffset = 0;
|
||||
component.renderHUDComponent(event, type, player, stack, bottomOffset, i);
|
||||
bottomOffset += component.getComponentHeight(player, stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean getIsLockingOn(ItemStack stack) { return getValueBool(stack, KEY_LOCKINGON); }
|
||||
public static void setIsLockingOn(ItemStack stack, boolean value) { setValueBool(stack, KEY_LOCKINGON, value); }
|
||||
public static int getLockonProgress(ItemStack stack) { return getValueInt(stack, KEY_LOCKONPROGRESS); }
|
||||
public static void setLockonProgress(ItemStack stack, int value) { setValueInt(stack, KEY_LOCKONPROGRESS, value); }
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.hbm.items.weapon.sedna.mags;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
@ -14,25 +15,27 @@ import net.minecraft.item.ItemStack;
|
||||
public interface IMagazine<T> {
|
||||
|
||||
/** What ammo is loaded currently */
|
||||
public T getType(ItemStack stack);
|
||||
public T getType(ItemStack stack, IInventory inventory);
|
||||
/** Sets the mag's ammo type */
|
||||
public void setType(ItemStack stack, T type);
|
||||
/** How much ammo this mag can carry */
|
||||
public int getCapacity(ItemStack stack);
|
||||
/** How much ammo is currently loaded */
|
||||
public int getAmount(ItemStack stack);
|
||||
public int getAmount(ItemStack stack, IInventory inventory);
|
||||
/** Sets the mag's ammo level */
|
||||
public void setAmount(ItemStack stack, int amount);
|
||||
/** If a reload can even be initiated, i.e. the player even has bullets to load */
|
||||
public boolean canReload(ItemStack stack, EntityPlayer player);
|
||||
/** The action done at the end of one reload cycle, either loading one shell or replacing the whole mag */
|
||||
public void reloadAction(ItemStack stack, EntityPlayer player);
|
||||
/** removes the specified amount fro mthe magazine */
|
||||
public void useUpAmmo(ItemStack stack, IInventory inventory, int amount);
|
||||
/** If a reload can even be initiated, i.e. the player even has bullets to load, inventory can be null */
|
||||
public boolean canReload(ItemStack stack, IInventory inventory);
|
||||
/** The action done at the end of one reload cycle, either loading one shell or replacing the whole mag, inventory can be null */
|
||||
public void reloadAction(ItemStack stack, IInventory inventory);
|
||||
/** The stack that should be displayed for the ammo HUD */
|
||||
public ItemStack getIconForHUD(ItemStack stack);
|
||||
public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player);
|
||||
/** It explains itself */
|
||||
public String reportAmmoStateForHUD(ItemStack stack);
|
||||
public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player);
|
||||
/** Casing config to use then ejecting */
|
||||
public SpentCasing getCasing(ItemStack stack);
|
||||
public SpentCasing getCasing(ItemStack stack, IInventory inventory);
|
||||
/** When reloading, remember the amount before reload is initiated */
|
||||
public void setAmountBeforeReload(ItemStack stack, int amount);
|
||||
/** Amount of rounds before reload has started. Do note that the NBT stack sync likely arrives
|
||||
|
||||
@ -0,0 +1,98 @@
|
||||
package com.hbm.items.weapon.sedna.mags;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MagazineBelt implements IMagazine<BulletConfig> {
|
||||
|
||||
protected List<BulletConfig> acceptedBullets = new ArrayList();
|
||||
|
||||
public MagazineBelt addConfigs(BulletConfig... cfgs) { for(BulletConfig cfg : cfgs) acceptedBullets.add(cfg); return this; }
|
||||
|
||||
@Override
|
||||
public BulletConfig getType(ItemStack stack, IInventory inventory) {
|
||||
return getFirstConfig(inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useUpAmmo(ItemStack stack, IInventory inventory, int amount) {
|
||||
|
||||
BulletConfig first = this.getFirstConfig(inventory);
|
||||
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
if(first.ammo.matchesRecipe(slot, true)) {
|
||||
int toRemove = Math.min(slot.stackSize, amount);
|
||||
amount -= toRemove;
|
||||
inventory.decrStackSize(i, toRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void setType(ItemStack stack, BulletConfig type) { }
|
||||
@Override public int getCapacity(ItemStack stack) { return 0; }
|
||||
@Override public void setAmount(ItemStack stack, int amount) { }
|
||||
@Override public boolean canReload(ItemStack stack, IInventory inventory) { return false; }
|
||||
@Override public void reloadAction(ItemStack stack, IInventory inventory) { }
|
||||
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { }
|
||||
@Override public int getAmountBeforeReload(ItemStack stack) { return 0; }
|
||||
@Override public void setAmountAfterReload(ItemStack stack, int amount) { }
|
||||
@Override public int getAmountAfterReload(ItemStack stack) { return 0; }
|
||||
|
||||
@Override
|
||||
public int getAmount(ItemStack stack, IInventory inventory) {
|
||||
BulletConfig first = this.getFirstConfig(inventory);
|
||||
int count = 0;
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
if(first.ammo.matchesRecipe(slot, true)) count += slot.stackSize;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) {
|
||||
BulletConfig first = this.getFirstConfig(player.inventory);
|
||||
return first.ammo.toStack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) {
|
||||
return "x" + getAmount(stack, player.inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpentCasing getCasing(ItemStack stack, IInventory invnetory) {
|
||||
return getFirstConfig(invnetory).casing;
|
||||
}
|
||||
|
||||
public BulletConfig getFirstConfig(IInventory inventory) {
|
||||
|
||||
if(inventory == null) return acceptedBullets.get(0);
|
||||
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
for(BulletConfig config : this.acceptedBullets) {
|
||||
if(config.ammo.matchesRecipe(slot, true)) return config;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return acceptedBullets.get(0);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.hbm.items.weapon.sedna.mags;
|
||||
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MagazineFluid implements IMagazine<FluidType> {
|
||||
|
||||
public static final String KEY_MAG_COUNT = "magcount";
|
||||
public static final String KEY_MAG_TYPE = "magtype";
|
||||
public static final String KEY_MAG_PREV = "magprev";
|
||||
public static final String KEY_MAG_AFTER = "magafter";
|
||||
|
||||
/** A number so the gun tell multiple mags apart */
|
||||
public int index;
|
||||
/** How much ammo this mag can hold */
|
||||
public int capacity;
|
||||
|
||||
public MagazineFluid(int index, int capacity) {
|
||||
this.index = index;
|
||||
this.capacity = capacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidType getType(ItemStack stack, IInventory inventory) {
|
||||
int id = this.getMagType(stack, index);
|
||||
return Fluids.fromID(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(ItemStack stack, FluidType type) {
|
||||
this.setMagType(stack, index, type.getID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCapacity(ItemStack stack) {
|
||||
return capacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useUpAmmo(ItemStack stack, IInventory inventory, int amount) {
|
||||
this.setAmount(stack, this.getAmount(stack, inventory) - amount);
|
||||
}
|
||||
|
||||
@Override public int getAmount(ItemStack stack, IInventory inventory) { return getMagCount(stack, index); }
|
||||
@Override public void setAmount(ItemStack stack, int amount) { setMagCount(stack, index, amount); }
|
||||
|
||||
@Override public boolean canReload(ItemStack stack, IInventory inventory) { return false; }
|
||||
@Override public void reloadAction(ItemStack stack, IInventory inventory) { }
|
||||
@Override public SpentCasing getCasing(ItemStack stack, IInventory inventory) { return null; }
|
||||
|
||||
@Override public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) { return new ItemStack(ModItems.fluid_icon, 1, this.getMagType(stack, index)); }
|
||||
@Override public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) { return getIconForHUD(stack, player).getDisplayName(); }
|
||||
|
||||
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }
|
||||
@Override public int getAmountBeforeReload(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_PREV + index); }
|
||||
@Override public void setAmountAfterReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_AFTER + index, amount); }
|
||||
@Override public int getAmountAfterReload(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_AFTER + index); }
|
||||
|
||||
public static int getMagType(ItemStack stack, int index) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_TYPE + index); }
|
||||
public static void setMagType(ItemStack stack, int index, int value) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_TYPE + index, value); }
|
||||
public static int getMagCount(ItemStack stack, int index) { return ItemGunBaseNT.getValueInt(stack, KEY_MAG_COUNT + index); }
|
||||
public static void setMagCount(ItemStack stack, int index, int value) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_COUNT + index, value); }
|
||||
}
|
||||
@ -2,7 +2,7 @@ package com.hbm.items.weapon.sedna.mags;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/** Uses individual bullets which are loaded all at once */
|
||||
@ -14,19 +14,22 @@ public class MagazineFullReload extends MagazineSingleTypeBase {
|
||||
|
||||
/** Returns true if the player has the same ammo if partially loaded, or any valid ammo if not */
|
||||
@Override
|
||||
public boolean canReload(ItemStack stack, EntityPlayer player) {
|
||||
public boolean canReload(ItemStack stack, IInventory inventory) {
|
||||
|
||||
if(this.getAmount(stack) >= this.getCapacity(stack)) return false;
|
||||
if(this.getAmount(stack, inventory) >= this.getCapacity(stack)) return false;
|
||||
|
||||
if(inventory == null) return true;
|
||||
|
||||
for(ItemStack slot : player.inventory.mainInventory) {
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
if(this.getAmount(stack) == 0) {
|
||||
if(this.getAmount(stack, inventory) == 0) {
|
||||
for(BulletConfig config : this.acceptedBullets) {
|
||||
if(config.ammo.matchesRecipe(slot, true)) return true;
|
||||
}
|
||||
} else {
|
||||
BulletConfig config = this.getType(stack);
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); }
|
||||
if(config.ammo.matchesRecipe(slot, true)) return true;
|
||||
}
|
||||
@ -38,15 +41,22 @@ public class MagazineFullReload extends MagazineSingleTypeBase {
|
||||
|
||||
/** Reloads all rounds at once. If the mag is empty, the mag's type will change to the first valid ammo type */
|
||||
@Override
|
||||
public void reloadAction(ItemStack stack, EntityPlayer player) {
|
||||
public void reloadAction(ItemStack stack, IInventory inventory) {
|
||||
|
||||
if(inventory == null) {
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); } //fixing broken NBT
|
||||
this.setAmount(stack, this.capacity);
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack slot = player.inventory.mainInventory[i];
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
|
||||
//mag is empty, assume next best type
|
||||
if(this.getAmount(stack) == 0) {
|
||||
if(this.getAmount(stack, inventory) == 0) {
|
||||
|
||||
for(BulletConfig config : this.acceptedBullets) {
|
||||
if(config.ammo.matchesRecipe(slot, true)) {
|
||||
@ -54,21 +64,21 @@ public class MagazineFullReload extends MagazineSingleTypeBase {
|
||||
int wantsToLoad = (int) Math.ceil((double) this.getCapacity(stack) / (double) config.ammoReloadCount);
|
||||
int toLoad = Math.min(wantsToLoad, slot.stackSize);
|
||||
this.setAmount(stack, Math.min(toLoad * config.ammoReloadCount, this.capacity));
|
||||
player.inventory.decrStackSize(i, toLoad);
|
||||
inventory.decrStackSize(i, toLoad);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//mag has a type set, only load that
|
||||
} else {
|
||||
BulletConfig config = this.getType(stack);
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); } //fixing broken NBT
|
||||
|
||||
if(config.ammo.matchesRecipe(slot, true)) {
|
||||
int alreadyLoaded = this.getAmount(stack);
|
||||
int alreadyLoaded = this.getAmount(stack, inventory);
|
||||
int wantsToLoad = (int) Math.ceil((double) this.getCapacity(stack) / (double) config.ammoReloadCount) - (alreadyLoaded / config.ammoReloadCount);
|
||||
int toLoad = Math.min(wantsToLoad, slot.stackSize);
|
||||
this.setAmount(stack, Math.min((toLoad * config.ammoReloadCount) + alreadyLoaded, this.capacity));
|
||||
player.inventory.decrStackSize(i, toLoad);
|
||||
inventory.decrStackSize(i, toLoad);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.items.weapon.sedna.mags;
|
||||
|
||||
import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/** Uses individual bullets which are loaded one by one */
|
||||
@ -14,19 +14,22 @@ public class MagazineSingleReload extends MagazineSingleTypeBase {
|
||||
|
||||
/** Returns true if the player has the same ammo if partially loaded, or any valid ammo if not */
|
||||
@Override
|
||||
public boolean canReload(ItemStack stack, EntityPlayer player) {
|
||||
public boolean canReload(ItemStack stack, IInventory inventory) {
|
||||
|
||||
if(this.getAmount(stack) >= this.getCapacity(stack)) return false;
|
||||
if(this.getAmount(stack, inventory) >= this.getCapacity(stack)) return false;
|
||||
|
||||
if(inventory == null) return true;
|
||||
|
||||
for(ItemStack slot : player.inventory.mainInventory) {
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
if(this.getAmount(stack) == 0) {
|
||||
if(this.getAmount(stack, inventory) == 0) {
|
||||
for(BulletConfig config : this.acceptedBullets) {
|
||||
if(config.ammo.matchesRecipe(slot, true)) return true;
|
||||
}
|
||||
} else {
|
||||
BulletConfig config = this.getType(stack);
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); }
|
||||
if(config.ammo.matchesRecipe(slot, true)) return true;
|
||||
}
|
||||
@ -38,33 +41,40 @@ public class MagazineSingleReload extends MagazineSingleTypeBase {
|
||||
|
||||
/** Reloads all rounds at once. If the mag is empty, the mag's type will change to the first valid ammo type */
|
||||
@Override
|
||||
public void reloadAction(ItemStack stack, EntityPlayer player) {
|
||||
public void reloadAction(ItemStack stack, IInventory inventory) {
|
||||
|
||||
if(inventory == null) {
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); } //fixing broken NBT
|
||||
this.setAmount(stack, this.getAmount(stack, inventory) + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i < player.inventory.mainInventory.length; i++) {
|
||||
ItemStack slot = player.inventory.mainInventory[i];
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack slot = inventory.getStackInSlot(i);
|
||||
|
||||
if(slot != null) {
|
||||
|
||||
//mag is empty, assume next best type
|
||||
if(this.getAmount(stack) == 0) {
|
||||
if(this.getAmount(stack, inventory) == 0) {
|
||||
|
||||
for(BulletConfig config : this.acceptedBullets) {
|
||||
if(config.ammo.matchesRecipe(slot, true)) {
|
||||
this.setType(stack, config);
|
||||
this.setAmount(stack, 1);
|
||||
player.inventory.decrStackSize(i, 1);
|
||||
inventory.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//mag has a type set, only load that
|
||||
} else {
|
||||
BulletConfig config = this.getType(stack);
|
||||
BulletConfig config = this.getType(stack, inventory);
|
||||
if(config == null) { config = this.acceptedBullets.get(0); this.setType(stack, config); } //fixing broken NBT
|
||||
|
||||
if(config.ammo.matchesRecipe(slot, true)) {
|
||||
int alreadyLoaded = this.getAmount(stack);
|
||||
int alreadyLoaded = this.getAmount(stack, inventory);
|
||||
this.setAmount(stack, alreadyLoaded + 1);
|
||||
player.inventory.decrStackSize(i, 1);
|
||||
inventory.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,8 @@ import com.hbm.items.weapon.sedna.BulletConfig;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/** Base class for typical magazines, i.e. ones that hold bullets, shells, grenades, etc, any ammo item. Stores a single type of BulletConfigs */
|
||||
@ -32,7 +34,7 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
public MagazineSingleTypeBase addConfigs(BulletConfig... cfgs) { for(BulletConfig cfg : cfgs) acceptedBullets.add(cfg); return this; }
|
||||
|
||||
@Override
|
||||
public BulletConfig getType(ItemStack stack) {
|
||||
public BulletConfig getType(ItemStack stack, IInventory inventory) {
|
||||
int type = getMagType(stack, index);
|
||||
if(type >= 0 && type < BulletConfig.configs.size()) {
|
||||
BulletConfig cfg = BulletConfig.configs.get(type);
|
||||
@ -49,24 +51,29 @@ public abstract class MagazineSingleTypeBase implements IMagazine<BulletConfig>
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIconForHUD(ItemStack stack) {
|
||||
BulletConfig config = this.getType(stack);
|
||||
public ItemStack getIconForHUD(ItemStack stack, EntityPlayer player) {
|
||||
BulletConfig config = this.getType(stack, player.inventory);
|
||||
if(config != null) return config.ammo.toStack();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String reportAmmoStateForHUD(ItemStack stack) {
|
||||
return getAmount(stack) + " / " + getCapacity(stack);
|
||||
public String reportAmmoStateForHUD(ItemStack stack, EntityPlayer player) {
|
||||
return getAmount(stack, player.inventory) + " / " + getCapacity(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpentCasing getCasing(ItemStack stack) {
|
||||
return this.getType(stack).casing;
|
||||
public SpentCasing getCasing(ItemStack stack, IInventory inventory) {
|
||||
return this.getType(stack, inventory).casing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useUpAmmo(ItemStack stack, IInventory inventory, int amount) {
|
||||
this.setAmount(stack, this.getAmount(stack, inventory) - amount);
|
||||
}
|
||||
|
||||
@Override public int getCapacity(ItemStack stack) { return capacity; }
|
||||
@Override public int getAmount(ItemStack stack) { return getMagCount(stack, index); }
|
||||
@Override public int getAmount(ItemStack stack, IInventory inventory) { return getMagCount(stack, index); }
|
||||
@Override public void setAmount(ItemStack stack, int amount) { setMagCount(stack, index, amount); }
|
||||
|
||||
@Override public void setAmountBeforeReload(ItemStack stack, int amount) { ItemGunBaseNT.setValueInt(stack, KEY_MAG_PREV + index, amount); }
|
||||
|
||||
@ -137,6 +137,13 @@ public class ClientProxy extends ServerProxy {
|
||||
|
||||
public RenderInfoSystem theInfoSystem = new RenderInfoSystem();
|
||||
|
||||
/** Runs just before item an block init */
|
||||
@Override
|
||||
public void registerPreRenderInfo() {
|
||||
AdvancedModelLoader.registerModelHandler(new HmfModelLoader());
|
||||
}
|
||||
|
||||
/** Runs right after item and block init */
|
||||
@Override
|
||||
public void registerRenderInfo() {
|
||||
|
||||
@ -145,8 +152,6 @@ public class ClientProxy extends ServerProxy {
|
||||
registerClientEventHandler(new EventHandlerParticleEngine());
|
||||
registerClientEventHandler(theInfoSystem);
|
||||
|
||||
AdvancedModelLoader.registerModelHandler(new HmfModelLoader());
|
||||
|
||||
registerTileEntitySpecialRenderer();
|
||||
registerItemRenderer();
|
||||
registerEntityRenderer();
|
||||
@ -529,7 +534,6 @@ public class ClientProxy extends ServerProxy {
|
||||
//guns
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_rpg, new ItemRenderRpg());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_karl, new ItemRenderRpg());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_stinger, new ItemRenderStinger());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_skystinger, new ItemRenderStinger());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver, new ItemRenderWeaponFFColt(ResourceManager.ff_gun_bright, ResourceManager.ff_iron, ResourceManager.ff_wood));
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_saturnite, new ItemRenderWeaponFFColt(ResourceManager.ff_saturnite, ResourceManager.ff_iron, ResourceManager.ff_wood));
|
||||
@ -579,7 +583,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_supershotgun, new ItemRenderWeaponShotty());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_ks23, new ItemRenderWeaponKS23());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_flechette, new ItemRenderWeaponObj());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_quadro, new ItemRenderWeaponQuadro());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_sauer, new ItemRenderWeaponSauer());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_vortex, new ItemRenderWeaponVortex());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_thompson, new ItemRenderWeaponThompson());
|
||||
@ -590,8 +593,6 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.detonator_laser, new ItemRenderDetonatorLaser());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_remington, new ItemRenderWeaponRemington());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_glass_cannon, new ItemRenderWeaponGlass());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderWeaponChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponLilMac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderWeaponNovac());
|
||||
|
||||
@ -273,6 +273,7 @@ public class MainRegistry {
|
||||
* This "fix" just makes sure that the material system is loaded first no matter what. */
|
||||
Mats.MAT_STONE.getUnlocalizedName();
|
||||
Fluids.init();
|
||||
proxy.registerPreRenderInfo();
|
||||
ModBlocks.mainRegistry();
|
||||
ModItems.mainRegistry();
|
||||
proxy.registerRenderInfo();
|
||||
@ -1432,6 +1433,29 @@ public class MainRegistry {
|
||||
ignoreMappings.add("hbm:item.flame_10");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_uf6");
|
||||
ignoreMappings.add("hbm:tile.dummy_block_puf6");
|
||||
ignoreMappings.add("hbm:item.wire_aluminium");
|
||||
ignoreMappings.add("hbm:item.wire_copper");
|
||||
ignoreMappings.add("hbm:item.wire_red_copper");
|
||||
ignoreMappings.add("hbm:item.wire_tungsten");
|
||||
ignoreMappings.add("hbm:item.wire_gold");
|
||||
ignoreMappings.add("hbm:item.wire_schrabidium");
|
||||
ignoreMappings.add("hbm:item.wire_advanced_alloy");
|
||||
ignoreMappings.add("hbm:item.wire_magnetized_tungsten");
|
||||
ignoreMappings.add("hbm:item.nugget_weidanium");
|
||||
ignoreMappings.add("hbm:item.nugget_reiium");
|
||||
ignoreMappings.add("hbm:item.nugget_unobtainium");
|
||||
ignoreMappings.add("hbm:item.nugget_daffergon");
|
||||
ignoreMappings.add("hbm:item.nugget_verticium");
|
||||
ignoreMappings.add("hbm:item.ingot_weidanium");
|
||||
ignoreMappings.add("hbm:item.ingot_reiium");
|
||||
ignoreMappings.add("hbm:item.ingot_unobtainium");
|
||||
ignoreMappings.add("hbm:item.ingot_daffergon");
|
||||
ignoreMappings.add("hbm:item.ingot_verticium");
|
||||
ignoreMappings.add("hbm:item.powder_weidanium");
|
||||
ignoreMappings.add("hbm:item.powder_reiium");
|
||||
ignoreMappings.add("hbm:item.powder_unobtainium");
|
||||
ignoreMappings.add("hbm:item.powder_daffergon");
|
||||
ignoreMappings.add("hbm:item.powder_verticium");
|
||||
|
||||
/// REMAP ///
|
||||
remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses);
|
||||
|
||||
@ -27,6 +27,7 @@ import com.hbm.entity.mob.EntityCyberCrab;
|
||||
import com.hbm.entity.mob.EntityDuck;
|
||||
import com.hbm.entity.mob.EntityCreeperNuclear;
|
||||
import com.hbm.entity.mob.EntityQuackos;
|
||||
import com.hbm.entity.mob.ai.EntityAIFireGun;
|
||||
import com.hbm.entity.mob.EntityCreeperTainted;
|
||||
import com.hbm.entity.projectile.EntityBulletBaseNT;
|
||||
import com.hbm.entity.projectile.EntityBurningFOEQ;
|
||||
@ -56,6 +57,7 @@ import com.hbm.items.armor.ItemModShackles;
|
||||
import com.hbm.items.food.ItemConserve.EnumFoodType;
|
||||
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.lib.RefStrings;
|
||||
@ -67,14 +69,7 @@ import com.hbm.saveddata.AuxSavedData;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineRadarNT;
|
||||
import com.hbm.tileentity.network.RTTYSystem;
|
||||
import com.hbm.tileentity.network.RequestNetwork;
|
||||
import com.hbm.util.AchievementHandler;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.EnchantmentUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
import com.hbm.util.ShadyUtil;
|
||||
import com.hbm.util.*;
|
||||
import com.hbm.util.ArmorRegistry.HazardClass;
|
||||
import com.hbm.world.generator.TimedGenerator;
|
||||
|
||||
@ -91,8 +86,10 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAITasks;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityCaveSpider;
|
||||
@ -118,13 +115,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntitySign;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EntityDamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.FoodStats;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -425,6 +416,62 @@ public class ModEventHandler {
|
||||
}
|
||||
if(rand.nextInt(64) == 0)
|
||||
entity.setCurrentItemOrArmor(3, new ItemStack(ModItems.steel_plate, 1, world.rand.nextInt(ModItems.steel_plate.getMaxDamage())));
|
||||
|
||||
float soot = PollutionHandler.getPollution(entity.worldObj, MathHelper.floor_double(event.x), MathHelper.floor_double(event.y), MathHelper.floor_double(event.z), PollutionType.SOOT);
|
||||
ItemStack bowReplacement = getSkelegun(soot, entity.worldObj.rand);
|
||||
if(bowReplacement != null) {
|
||||
entity.setCurrentItemOrArmor(0, bowReplacement);
|
||||
addFireTask((EntityLiving) entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static ItemStack getSkelegun(float soot, Random rand) {
|
||||
if(!MobConfig.enableMobWeapons) return null;
|
||||
if(rand.nextDouble() > Math.log(soot) * 0.25) return null;
|
||||
|
||||
ArrayList<WeightedRandomObject> pool = new ArrayList<WeightedRandomObject>();
|
||||
pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_light_revolver), 12));
|
||||
pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_heavy_revolver), 8));
|
||||
|
||||
if(soot > 2) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_pepperbox), 10));
|
||||
if(soot > 2) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_henry), 8));
|
||||
if(soot > 2) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_greasegun), 6));
|
||||
|
||||
if(soot > 4) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_maresleg), 4));
|
||||
if(soot > 4) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_uzi), 6));
|
||||
|
||||
if(soot > 8) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_spas12), 3));
|
||||
if(soot > 8) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_am180), 4));
|
||||
|
||||
if(soot > 12) pool.add(new WeightedRandomObject(new ItemStack(ModItems.gun_congolake), 1));
|
||||
|
||||
WeightedRandomObject selected = (WeightedRandomObject) WeightedRandom.getRandomItem(rand, pool);
|
||||
|
||||
return selected.asStack();
|
||||
}
|
||||
|
||||
// these fucking tasks keep stacking on top of themselves
|
||||
private static void addFireTask(EntityLiving entity) {
|
||||
entity.setEquipmentDropChance(0, 0); // Prevent dropping guns
|
||||
|
||||
for(Object entry : entity.tasks.taskEntries) {
|
||||
EntityAITasks.EntityAITaskEntry task = (EntityAITasks.EntityAITaskEntry) entry;
|
||||
if(task.action instanceof EntityAIFireGun) return;
|
||||
}
|
||||
|
||||
entity.tasks.addTask(3, new EntityAIFireGun(entity));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void addAITasks(EntityJoinWorldEvent event) {
|
||||
if(event.world.isRemote || !(event.entity instanceof EntityLiving)) return;
|
||||
|
||||
EntityLiving living = (EntityLiving) event.entity;
|
||||
ItemStack held = living.getHeldItem();
|
||||
|
||||
if(held != null && held.getItem() instanceof ItemGunBaseNT) {
|
||||
addFireTask(living);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ public class ModEventHandlerClient {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
/// NUKE FLASH ///
|
||||
if(event.type == ElementType.CROSSHAIRS && (flashTimestamp + flashDuration - System.currentTimeMillis()) > 0) {
|
||||
if(event.type == ElementType.CROSSHAIRS && (flashTimestamp + flashDuration - System.currentTimeMillis()) > 0 && ClientConfig.NUKE_HUD_FLASH.get()) {
|
||||
int width = event.resolution.getScaledWidth();
|
||||
int height = event.resolution.getScaledHeight();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
@ -5,6 +5,7 @@ import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GLContext;
|
||||
|
||||
import com.hbm.blocks.ICustomBlockHighlight;
|
||||
import com.hbm.config.ClientConfig;
|
||||
import com.hbm.config.RadiationConfig;
|
||||
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
|
||||
import com.hbm.items.armor.IArmorDisableModel;
|
||||
@ -115,11 +116,11 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
RenderPlayer renderer = event.renderer;
|
||||
|
||||
|
||||
boolean akimbo = false;
|
||||
|
||||
ItemStack held = player.getHeldItem();
|
||||
|
||||
|
||||
if(held != null) {
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
@ -131,7 +132,7 @@ public class ModEventHandlerRenderer {
|
||||
}
|
||||
|
||||
boolean isManly = PermaSyncHandler.boykissers.contains(player.getEntityId());
|
||||
|
||||
|
||||
if(akimbo) {
|
||||
ModelBiped biped = renderer.modelBipedMain;
|
||||
renderer.modelArmorChestplate.bipedLeftArm.rotateAngleY = renderer.modelArmor.bipedLeftArm.rotateAngleY = biped.bipedLeftArm.rotateAngleY =
|
||||
@ -158,7 +159,7 @@ public class ModEventHandlerRenderer {
|
||||
if(f6 > 1.0F) {
|
||||
f6 = 1.0F;
|
||||
}
|
||||
|
||||
|
||||
manlyModel.render(event.entityPlayer, f7, f6, yawWrapped, yaw, pitch, 0.0625F, renderer);
|
||||
}
|
||||
}
|
||||
@ -175,14 +176,14 @@ public class ModEventHandlerRenderer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderHeldGun(RenderPlayerEvent.Pre event) {
|
||||
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
RenderPlayer renderer = event.renderer;
|
||||
ItemStack held = player.getHeldItem();
|
||||
|
||||
|
||||
if(held != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) {
|
||||
renderer.modelBipedMain.aimedBow = true;
|
||||
renderer.modelArmor.aimedBow = true;
|
||||
@ -209,7 +210,7 @@ public class ModEventHandlerRenderer {
|
||||
if(held == null) return;
|
||||
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(held, IItemRenderer.ItemRenderType.EQUIPPED);
|
||||
|
||||
|
||||
if(customRenderer instanceof ItemRenderWeaponBase) {
|
||||
ItemRenderWeaponBase renderWeapon = (ItemRenderWeaponBase) customRenderer;
|
||||
if(renderWeapon.isAkimbo()) {
|
||||
@ -250,16 +251,16 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
if(manlyModel == null)
|
||||
manlyModel = new ModelMan();
|
||||
|
||||
|
||||
event.renderItem = false;
|
||||
|
||||
float f2 = 1.3333334F;
|
||||
|
||||
ItemStack held = player.getHeldItem();
|
||||
|
||||
|
||||
if(held == null)
|
||||
return;
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
manlyModel.rightArm.postRender(0.0625F);
|
||||
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
||||
@ -357,16 +358,16 @@ public class ModEventHandlerRenderer {
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDrawHighlight(DrawBlockHighlightEvent event) {
|
||||
MovingObjectPosition mop = event.target;
|
||||
|
||||
|
||||
if(mop != null && mop.typeOfHit == mop.typeOfHit.BLOCK) {
|
||||
Block b = event.player.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
|
||||
if(b instanceof ICustomBlockHighlight) {
|
||||
ICustomBlockHighlight cus = (ICustomBlockHighlight) b;
|
||||
|
||||
|
||||
if(cus.shouldDrawHighlight(event.player.worldObj, mop.blockX, mop.blockY, mop.blockZ)) {
|
||||
cus.drawHighlight(event, event.player.worldObj, mop.blockX, mop.blockY, mop.blockZ);
|
||||
event.setCanceled(true);
|
||||
@ -444,17 +445,17 @@ public class ModEventHandlerRenderer {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
float renderSoot = 0;
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void worldTick(WorldTickEvent event) {
|
||||
|
||||
|
||||
if(event.phase == event.phase.START && RadiationConfig.enableSootFog) {
|
||||
|
||||
float step = 0.05F;
|
||||
float soot = PermaSyncHandler.pollution[PollutionType.SOOT.ordinal()];
|
||||
|
||||
|
||||
if(Math.abs(renderSoot - soot) < step) {
|
||||
renderSoot = soot;
|
||||
} else if(renderSoot < soot) {
|
||||
@ -469,7 +470,7 @@ public class ModEventHandlerRenderer {
|
||||
public void thickenFog(FogDensity event) {
|
||||
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
|
||||
if(soot > 0 && RadiationConfig.enableSootFog) {
|
||||
|
||||
|
||||
float farPlaneDistance = (float) (Minecraft.getMinecraft().gameSettings.renderDistanceChunks * 16);
|
||||
float fogDist = farPlaneDistance / (1 + soot * 5F / (float) RadiationConfig.sootFogDivisor);
|
||||
GL11.glFogf(GL11.GL_FOG_START, 0);
|
||||
@ -483,10 +484,10 @@ public class ModEventHandlerRenderer {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOW)
|
||||
public void tintFog(FogColors event) {
|
||||
|
||||
|
||||
EntityPlayer player = MainRegistry.proxy.me();
|
||||
if(player.worldObj.getBlock((int) Math.floor(player.posX), (int) Math.floor(player.posY), (int) Math.floor(player.posZ)).getMaterial() != Material.water) {
|
||||
Vec3 color = getFogBlendColor(player.worldObj, (int) Math.floor(player.posX), (int) Math.floor(player.posZ), event.red, event.green, event.blue, event.renderPartialTicks);
|
||||
@ -496,7 +497,7 @@ public class ModEventHandlerRenderer {
|
||||
event.blue = (float) color.zCoord;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float soot = (float) (renderSoot - RadiationConfig.sootFogThreshold);
|
||||
float sootColor = 0.15F;
|
||||
float sootReq = (float) RadiationConfig.sootFogDivisor;
|
||||
@ -507,11 +508,11 @@ public class ModEventHandlerRenderer {
|
||||
event.blue = event.blue * (1 - interp) + sootColor * interp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderHUD(RenderGameOverlayEvent.Pre event) {
|
||||
|
||||
if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0) {
|
||||
|
||||
if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0 && ClientConfig.NUKE_HUD_SHAKE.get()) {
|
||||
double mult = (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.shakeDuration * 2;
|
||||
double horizontal = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.02), -0.7, 0.7) * 15;
|
||||
double vertical = MathHelper.clamp_double(Math.sin(System.currentTimeMillis() * 0.01 + 2), -0.7, 0.7) * 3;
|
||||
@ -521,13 +522,13 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderHand(RenderHandEvent event) {
|
||||
|
||||
|
||||
//can't use plaxer.getHeldItem() here because the item rendering persists for a few frames after hitting the switch key
|
||||
ItemStack toRender = Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender;
|
||||
|
||||
|
||||
if(toRender != null) {
|
||||
IItemRenderer renderer = MinecraftForgeClient.getItemRenderer(toRender, ItemRenderType.EQUIPPED_FIRST_PERSON);
|
||||
|
||||
|
||||
if(renderer instanceof ItemRenderWeaponBase) {
|
||||
((ItemRenderWeaponBase) renderer).setPerspectiveAndRender(toRender, event.partialTicks);
|
||||
event.setCanceled(true);
|
||||
@ -541,10 +542,10 @@ public class ModEventHandlerRenderer {
|
||||
private static Vec3 fogRGBMultiplier;
|
||||
private static boolean doesBiomeApply = false;
|
||||
private static long fogTimer = 0;
|
||||
|
||||
|
||||
/** Same procedure as getting the blended sky color but for fog */
|
||||
public static Vec3 getFogBlendColor(World world, int playerX, int playerZ, float red, float green, float blue, double partialTicks) {
|
||||
|
||||
|
||||
long millis = System.currentTimeMillis() - fogTimer;
|
||||
if(playerX == fogX && playerZ == fogZ && fogInit && millis < 3000) return fogRGBMultiplier;
|
||||
|
||||
@ -553,7 +554,7 @@ public class ModEventHandlerRenderer {
|
||||
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||
int[] ranges = ForgeModContainer.blendRanges;
|
||||
int distance = 0;
|
||||
|
||||
|
||||
if(settings.fancyGraphics && settings.renderDistanceChunks >= 0) {
|
||||
distance = ranges[Math.min(settings.renderDistanceChunks, ranges.length - 1)];
|
||||
}
|
||||
@ -561,10 +562,10 @@ public class ModEventHandlerRenderer {
|
||||
float r = 0F;
|
||||
float g = 0F;
|
||||
float b = 0F;
|
||||
|
||||
|
||||
int divider = 0;
|
||||
doesBiomeApply = false;
|
||||
|
||||
|
||||
for(int x = -distance; x <= distance; x++) {
|
||||
for(int z = -distance; z <= distance; z++) {
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(playerX + x, playerZ + z);
|
||||
@ -578,7 +579,7 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
fogX = playerX;
|
||||
fogZ = playerZ;
|
||||
|
||||
|
||||
if(doesBiomeApply) {
|
||||
fogRGBMultiplier = Vec3.createVectorHelper(r / divider, g / divider, b / divider);
|
||||
} else {
|
||||
@ -587,25 +588,25 @@ public class ModEventHandlerRenderer {
|
||||
|
||||
return fogRGBMultiplier;
|
||||
}
|
||||
|
||||
|
||||
/** Returns the current biome's fog color adjusted for brightness if in a crater, or the world's cached fog color if not */
|
||||
public static Vec3 getBiomeFogColors(World world, BiomeGenBase biome, float r, float g, float b, double partialTicks) {
|
||||
|
||||
|
||||
if(biome instanceof BiomeGenCraterBase) {
|
||||
int color = biome.getSkyColorByTemp(biome.temperature);
|
||||
r = ((color & 0xff0000) >> 16) / 255F;
|
||||
g = ((color & 0x00ff00) >> 8) / 255F;
|
||||
b = (color & 0x0000ff) / 255F;
|
||||
|
||||
|
||||
float celestialAngle = world.getCelestialAngle((float) partialTicks);
|
||||
float skyBrightness = MathHelper.clamp_float(MathHelper.cos(celestialAngle * (float) Math.PI * 2.0F) * 2.0F + 0.5F, 0F, 1F);
|
||||
r *= skyBrightness;
|
||||
g *= skyBrightness;
|
||||
b *= skyBrightness;
|
||||
|
||||
|
||||
doesBiomeApply = true;
|
||||
}
|
||||
|
||||
|
||||
return Vec3.createVectorHelper(r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,9 +253,6 @@ public class ResourceManager {
|
||||
//Forcefield
|
||||
public static final IModelCustom forcefield_top = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/forcefield_top.obj"));
|
||||
|
||||
//Shredder
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/shredder.obj"));
|
||||
|
||||
//Bombs
|
||||
public static final IModelCustom bomb_gadget = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/gadget.obj")).asVBO();
|
||||
public static final IModelCustom bomb_boy = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/LilBoy1.obj"));
|
||||
@ -680,9 +677,6 @@ public class ResourceManager {
|
||||
public static final ResourceLocation forcefield_base_tex = new ResourceLocation(RefStrings.MODID, "textures/models/forcefield_base.png");
|
||||
public static final ResourceLocation forcefield_top_tex = new ResourceLocation(RefStrings.MODID, "textures/models/forcefield_top.png");
|
||||
|
||||
//Shredder
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/shredder.png");
|
||||
|
||||
//Bombs
|
||||
public static final ResourceLocation bomb_gadget_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/gadget.png");
|
||||
public static final ResourceLocation bomb_boy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lilboy.png");
|
||||
@ -816,7 +810,6 @@ public class ResourceManager {
|
||||
public static final IModelCustom shotty = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/supershotty.obj"));
|
||||
public static final IModelCustom ks23 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/ks23.obj"));
|
||||
public static final IModelCustom flechette = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/flechette.obj"));
|
||||
public static final IModelCustom quadro = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/quadro.obj"));
|
||||
public static final IModelCustom sauergun = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sauergun.obj"));
|
||||
public static final IModelCustom vortex = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/vortex.obj"));
|
||||
public static final IModelCustom thompson = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/thompson.obj"));
|
||||
@ -863,6 +856,8 @@ public class ResourceManager {
|
||||
public static final IModelCustom uzi = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/uzi.obj")).asVBO();
|
||||
public static final IModelCustom panzerschreck = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/panzerschreck.obj")).asVBO();
|
||||
public static final IModelCustom g3 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/g3.obj")).asVBO();
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/shredder.obj")).asVBO();
|
||||
public static final IModelCustom quadro = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/quadro.obj"));
|
||||
|
||||
public static final HashMap<String, BusAnimation> python_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/python.json"));
|
||||
public static final HashMap<String, BusAnimation> cursed_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/cursed.json"));
|
||||
@ -934,8 +929,6 @@ public class ResourceManager {
|
||||
public static final ResourceLocation flechette_drum = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_drum.png");
|
||||
public static final ResourceLocation flechette_trigger = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_trigger.png");
|
||||
public static final ResourceLocation flechette_stock = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/flechette_stock.png");
|
||||
public static final ResourceLocation quadro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro.png");
|
||||
public static final ResourceLocation quadro_rocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro_rocket.png");
|
||||
public static final ResourceLocation sauergun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/sauergun.png");
|
||||
public static final ResourceLocation vortex_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/vortex.png");
|
||||
public static final ResourceLocation thompson_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/thompson.png");
|
||||
@ -981,6 +974,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation henry_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/henry.png");
|
||||
public static final ResourceLocation greasegun_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/greasegun.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");
|
||||
public static final ResourceLocation heavy_revolver_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/heavy_revolver.png");
|
||||
public static final ResourceLocation carbine_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/huntsman.png");
|
||||
@ -991,6 +985,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 shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/shredder.png");
|
||||
public static final ResourceLocation quadro_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro.png");
|
||||
public static final ResourceLocation quadro_rocket_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/quadro_rocket.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
@ -28,7 +28,8 @@ public class ServerProxy {
|
||||
public static final int ID_TOOLABILITY = 9;
|
||||
public static final int ID_GUN_MODE = 10;
|
||||
public static final int ID_GAS_HAZARD = 11;
|
||||
|
||||
|
||||
public void registerPreRenderInfo() { }
|
||||
public void registerRenderInfo() { }
|
||||
public void registerTileEntitySpecialRenderer() { }
|
||||
public void registerItemRenderer() { }
|
||||
|
||||
@ -125,7 +125,7 @@ public class GunAnimationPacket implements IMessage {
|
||||
if(receiverIndex >= 0 && receiverIndex < receivers.length) {
|
||||
Receiver rec = receivers[receiverIndex];
|
||||
BiConsumer<ItemStack, LambdaContext> onRecoil= rec.getRecoil(stack);
|
||||
if(onRecoil != null) onRecoil.accept(stack, new LambdaContext(config, player, receiverIndex));
|
||||
if(onRecoil != null) onRecoil.accept(stack, new LambdaContext(config, player, player.inventory, receiverIndex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,8 +5,11 @@ import java.util.Random;
|
||||
import com.hbm.particle.ParticleSpentCasing;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -15,11 +18,11 @@ import net.minecraft.world.World;
|
||||
public class CasingCreator implements IParticleCreator {
|
||||
|
||||
/** Casing without smoke */
|
||||
public static void composeEffect(World world, EntityPlayer player, double frontOffset, double heightOffset, double sideOffset, double frontMotion, double heightMotion, double sideMotion, double motionVariance, String casing) {
|
||||
public static void composeEffect(World world, EntityLivingBase player, double frontOffset, double heightOffset, double sideOffset, double frontMotion, double heightMotion, double sideMotion, double motionVariance, String casing) {
|
||||
composeEffect(world, player, frontOffset, heightOffset, sideOffset, frontMotion, heightMotion, sideMotion, motionVariance, casing, false, 0, 0, 0);
|
||||
}
|
||||
|
||||
public static void composeEffect(World world, EntityPlayer player, double frontOffset, double heightOffset, double sideOffset, double frontMotion, double heightMotion, double sideMotion, double motionVariance, String casing, boolean smoking, int smokeLife, double smokeLift, int nodeLife) {
|
||||
public static void composeEffect(World world, EntityLivingBase player, double frontOffset, double heightOffset, double sideOffset, double frontMotion, double heightMotion, double sideMotion, double motionVariance, String casing, boolean smoking, int smokeLife, double smokeLift, int nodeLife) {
|
||||
|
||||
if(player.isSneaking()) heightOffset -= 0.075F;
|
||||
|
||||
@ -56,6 +59,7 @@ public class CasingCreator implements IParticleCreator {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
||||
|
||||
String name = data.getString("name");
|
||||
|
||||
@ -5,6 +5,8 @@ import java.util.Random;
|
||||
import com.hbm.particle.ParticleExplosionSmall;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
@ -34,6 +36,7 @@ public class ExplosionSmallCreator implements IParticleCreator {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
||||
|
||||
int cloudCount = data.getInteger("cloudCount");
|
||||
|
||||
@ -4,6 +4,8 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.particle.ParticleFlamethrower;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -19,6 +21,7 @@ public class FlameCreator implements IParticleCreator {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
|
||||
ParticleFlamethrower particle = new ParticleFlamethrower(world, x, y, z);
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect(particle);
|
||||
|
||||
@ -25,7 +25,7 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
case INVENTORY:
|
||||
return item.getItem() == ModItems.gun_hk69
|
||||
|| item.getItem() == ModItems.gun_deagle
|
||||
|| item.getItem() == ModItems.gun_flechette || item.getItem() == ModItems.gun_quadro;
|
||||
|| item.getItem() == ModItems.gun_flechette;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@ -50,9 +50,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_deagle)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.universal_bright);
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro)
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
@ -100,25 +97,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glTranslatef(0.75F, 0.0F, -0.15F);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-25F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
|
||||
if(player.isSneaking()) {
|
||||
GL11.glRotatef(5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(1.0F, 0.5F, 0.3F);
|
||||
}
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("QUADRO_RECOIL");
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
double[] reload = HbmAnimations.getRelevantTransformation("QUADRO_RELOAD_ROTATE");
|
||||
GL11.glRotated(reload[2], 1, 0, 0);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -144,13 +122,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glTranslatef(-1.4F, -0.55F, 0.0F);
|
||||
GL11.glScaled(0.125, 0.125, 0.125);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glRotatef(20F, 1.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.4F, -0.35F, -0.4F);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -173,12 +144,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glScaled(0.125, 0.125, 0.125);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
@ -208,14 +173,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
GL11.glRotatef(-45F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glScaled(4.5, 4.5, -4.5);
|
||||
GL11.glTranslatef(1.0F, 2.5F, 0.0F);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-45F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
@ -236,12 +193,6 @@ public class ItemRenderWeaponObj implements IItemRenderer {
|
||||
if(item.getItem() == ModItems.gun_flechette) {
|
||||
renderFlechette();
|
||||
}
|
||||
|
||||
if(item.getItem() == ModItems.gun_quadro) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -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.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -80,7 +81,7 @@ public class ItemRenderAm180 extends ItemRenderWeaponBase {
|
||||
HbmAnimations.applyRelevantTransformation("Mag");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
int mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack);
|
||||
int mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
|
||||
GL11.glTranslated(0, 0, 1.5);
|
||||
GL11.glRotated(mag / 59D * 360D, 0, -1, 0);
|
||||
GL11.glTranslated(0, 0, -1.5);
|
||||
|
||||
@ -0,0 +1,93 @@
|
||||
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.mags.IMagazine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderChemthrower extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-2F * offset, -2F * offset, 2.5F * offset,
|
||||
0, -4.375 / 8D, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.chemthrower_tex);
|
||||
double scale = 0.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
|
||||
GL11.glTranslated(0, -2, -4);
|
||||
GL11.glRotated(equip[0], -1, 0, 0);
|
||||
GL11.glTranslated(0, 2, 4);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
ResourceManager.chemthrower.renderPart("Gun");
|
||||
ResourceManager.chemthrower.renderPart("Hose");
|
||||
ResourceManager.chemthrower.renderPart("Nozzle");
|
||||
|
||||
GL11.glTranslated(0, 0.875, 1.75);
|
||||
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
|
||||
double d = (double) mag.getAmount(stack, MainRegistry.proxy.me().inventory) / (double) mag.getCapacity(stack);
|
||||
GL11.glRotated(135 - d * 270, 1, 0, 0);
|
||||
GL11.glTranslated(0, -0.875, -1.75);
|
||||
|
||||
ResourceManager.chemthrower.renderPart("Gauge");
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 2D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -2.5, 0.5);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 2D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0.875, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.chemthrower_tex);
|
||||
ResourceManager.chemthrower.renderPart("Gun");
|
||||
ResourceManager.chemthrower.renderPart("Hose");
|
||||
ResourceManager.chemthrower.renderPart("Nozzle");
|
||||
ResourceManager.chemthrower.renderPart("Gauge");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
@ -83,13 +84,13 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
|
||||
GL11.glPushMatrix();
|
||||
{
|
||||
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
|
||||
if(gun.getLastAnim(stack, 0) != AnimType.INSPECT || mag.getAmount(stack) > 0) { //omit when inspecting and no shell is loaded
|
||||
if(gun.getLastAnim(stack, 0) != AnimType.INSPECT || mag.getAmount(stack, MainRegistry.proxy.me().inventory) > 0) { //omit when inspecting and no shell is loaded
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Shell");
|
||||
|
||||
SpentCasing casing = mag.getCasing(stack);
|
||||
SpentCasing casing = mag.getCasing(stack, MainRegistry.proxy.me().inventory);
|
||||
int[] colors = casing != null ? casing.getColors() : new int[] { SpentCasing.COLOR_CASE_40MM };
|
||||
|
||||
Color shellColor = new Color(colors[0]);
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.items.weapon.sedna.mags.IMagazine;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
@ -61,7 +62,7 @@ public class ItemRenderFlamer extends ItemRenderWeaponBase {
|
||||
HbmAnimations.applyRelevantTransformation("Gauge");
|
||||
GL11.glTranslated(1.25, 1.25, 0);
|
||||
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
|
||||
GL11.glRotated(-135 + (mag.getAmount(stack) * 270D / mag.getCapacity(stack)), 0, 0, 1);
|
||||
GL11.glRotated(-135 + (mag.getAmount(stack, MainRegistry.proxy.me().inventory) * 270D / mag.getCapacity(stack)), 0, 0, 1);
|
||||
GL11.glTranslated(-1.25, -1.25, 0);
|
||||
ResourceManager.flamethrower.renderPart("Gauge");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -50,7 +50,7 @@ public class ItemRenderGreasegun extends ItemRenderWeaponBase {
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 3, 3);
|
||||
|
||||
GL11.glRotated(turn[2], 0, 0, 1);
|
||||
if(gun.aimingProgress < 1F) GL11.glRotated(turn[2], 0, 0, 1);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
|
||||
100
src/main/java/com/hbm/render/item/weapon/sedna/ItemRenderM2.java
Normal file
@ -0,0 +1,100 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderM2 extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -2.5F * offset, 1.75F * offset,
|
||||
0, -12.5 / 8D, 1.75);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.greasegun_tex);
|
||||
double scale = 0.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
|
||||
GL11.glTranslated(0, 1, -2.25);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, -1, 2.25);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.m2_tex);
|
||||
ResourceManager.m2.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.5;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.625, 5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(smokeScale, smokeScale, smokeScale);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.375D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1.625, 5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.5, 0.5, 0.5);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0.5, -2, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 2.625D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0.5, -1.25, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.m2_tex);
|
||||
ResourceManager.m2.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -2,14 +2,22 @@ package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
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 ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
|
||||
public ResourceLocation texture;
|
||||
|
||||
public ItemRenderMaresleg(ResourceLocation texture) {
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
@ -28,14 +36,17 @@ public class ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.maresleg_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
double scale = 0.375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
boolean shortened = getShort(stack);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] lever = HbmAnimations.getRelevantTransformation("LEVER");
|
||||
double[] turn = HbmAnimations.getRelevantTransformation("TURN");
|
||||
double[] flip = HbmAnimations.getRelevantTransformation("FLIP");
|
||||
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
|
||||
double[] shell = HbmAnimations.getRelevantTransformation("SHELL");
|
||||
double[] flag = HbmAnimations.getRelevantTransformation("FLAG");
|
||||
@ -54,16 +65,23 @@ public class ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
GL11.glRotated(equip[0], -1, 0, 0);
|
||||
GL11.glTranslated(0, 0, 4);
|
||||
|
||||
GL11.glTranslated(0, 0, -2);
|
||||
GL11.glRotated(flip[0], -1, 0, 0);
|
||||
GL11.glTranslated(0, 0, 2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1, 8);
|
||||
GL11.glTranslated(0, 1, shortened ? 3.75 : 8);
|
||||
GL11.glRotated(turn[2], 0, 0, -1);
|
||||
GL11.glRotated(flip[0], 1, 0, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 0.25D);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
ResourceManager.maresleg.renderPart("Gun");
|
||||
ResourceManager.maresleg.renderPart("Stock");
|
||||
ResourceManager.maresleg.renderPart("Barrel");
|
||||
if(!shortened) {
|
||||
ResourceManager.maresleg.renderPart("Stock");
|
||||
ResourceManager.maresleg.renderPart("Barrel");
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0.125, -2.875);
|
||||
@ -87,7 +105,7 @@ public class ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1, 8);
|
||||
GL11.glTranslated(0, 1, shortened ? 3.75 : 8);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 75, 5);
|
||||
@ -106,23 +124,39 @@ public class ItemRenderMaresleg extends ItemRenderWeaponBase {
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 1.4375D;
|
||||
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(getShort(stack)) {
|
||||
double scale = 2.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
} else {
|
||||
double scale = 1.4375D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-0.5, 0.5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.maresleg_tex);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
ResourceManager.maresleg.renderPart("Gun");
|
||||
ResourceManager.maresleg.renderPart("Stock");
|
||||
ResourceManager.maresleg.renderPart("Barrel");
|
||||
ResourceManager.maresleg.renderPart("Lever");
|
||||
if(!getShort(stack)) {
|
||||
ResourceManager.maresleg.renderPart("Stock");
|
||||
ResourceManager.maresleg.renderPart("Barrel");
|
||||
}
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
public boolean getShort(ItemStack stack) {
|
||||
return stack.getItem() == ModItems.gun_maresleg_broken;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,142 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemRenderQuadro extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-2.5F * offset, -3.5F * offset, 2.5F * offset,
|
||||
-1.5F * offset, -3F * offset, 2.5F * offset);
|
||||
}
|
||||
|
||||
protected static String label = ">> <<";
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
double scale = 1.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] reloadPush = HbmAnimations.getRelevantTransformation("RELOAD_PUSH");
|
||||
double[] reloadRotate = HbmAnimations.getRelevantTransformation("RELOAD_ROTATE");
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(reloadRotate[2], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
GL11.glTranslated(0, 3, 0);
|
||||
GL11.glRotated(reloadPush[1] * 30, 1, 0, 0);
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glTranslated(0, 0, reloadPush[0] * 3);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_rocket_tex);
|
||||
ResourceManager.quadro.renderPart("Rockets");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(gun.prevAimingProgress >= 1F && gun.aimingProgress >= 1F) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef(-0.375F, 2.25F, 0.875F);
|
||||
GL11.glRotated(180D + (System.currentTimeMillis() / 2) % 360D, 0, -1, 0);
|
||||
GL11.glTranslated(-(font.getStringWidth(label) / 2) * f3, 0, 0);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
float variance = 0.7F + player.getRNG().nextFloat() * 0.3F;
|
||||
font.drawString(label, 0, 0, new Color(0F, variance, variance).getRGB());
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
int brightness = player.worldObj.getLightBrightnessForSkyBlocks(MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ), 0);
|
||||
int j = brightness % 65536;
|
||||
int k = brightness / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-1, 0.75, 6.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 150, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 7.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -0.5, -0.25);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 4.75D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(0, -1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.quadro_tex);
|
||||
ResourceManager.quadro.renderPart("Launcher");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -5,6 +5,7 @@ import java.awt.Color;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
@ -55,7 +56,7 @@ public class ItemRenderSPAS12 extends ItemRenderWeaponBase {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);
|
||||
|
||||
HbmAnimations.applyRelevantTransformation("Shell");
|
||||
SpentCasing casing = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getCasing(stack);
|
||||
SpentCasing casing = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getCasing(stack, MainRegistry.proxy.me().inventory);
|
||||
int color0 = SpentCasing.COLOR_CASE_BRASS;
|
||||
int color1 = SpentCasing.COLOR_CASE_BRASS;
|
||||
|
||||
|
||||
@ -0,0 +1,154 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ItemRenderShredder extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-1.5F * offset, -1.25F * offset, 1.5F * offset,
|
||||
0, -6.25 / 8D, 0.5);
|
||||
}
|
||||
|
||||
protected static String label = "[> <]";
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
double scale = 0.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] mag = HbmAnimations.getRelevantTransformation("MAG");
|
||||
double[] speen = HbmAnimations.getRelevantTransformation("SPEEN");
|
||||
double[] cycle = HbmAnimations.getRelevantTransformation("CYCLE");
|
||||
|
||||
GL11.glTranslated(0, -2, -6);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 2, 6);
|
||||
|
||||
GL11.glTranslated(0, 0, -4);
|
||||
GL11.glRotated(lift[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 0, 4);
|
||||
|
||||
GL11.glTranslated(0, 0, recoil[2]);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
if(gun.prevAimingProgress >= 1F && gun.aimingProgress >= 1F) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef((font.getStringWidth(label) / 2) * f3, 3.25F, -1);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glRotated(180D, 0, 1, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
float variance = 0.7F + player.getRNG().nextFloat() * 0.3F;
|
||||
font.drawString(label, 0, 0, new Color(0F, variance, 0F).getRGB());
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
int brightness = player.worldObj.getLightBrightnessForSkyBlocks(MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ), 0);
|
||||
int j = brightness % 65536;
|
||||
int k = brightness / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.shredder_tex);
|
||||
|
||||
ResourceManager.shredder.renderPart("Gun");
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(mag[0], mag[1], mag[2]);
|
||||
GL11.glTranslated(0, -1, -0.5);
|
||||
GL11.glRotated(speen[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 0.5);
|
||||
ResourceManager.shredder.renderPart("Magazine");
|
||||
GL11.glTranslated(0, -1, -0.5);
|
||||
GL11.glRotated(cycle[2], 0, 0, 1);
|
||||
GL11.glTranslated(0, 1, 0.5);
|
||||
ResourceManager.shredder.renderPart("Shells");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
double smokeScale = 0.75;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 1, 7.5);
|
||||
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, 1, 7.5);
|
||||
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, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, 0.5, 4);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 1.25D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
GL11.glTranslated(-1.5, 0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.shredder_tex);
|
||||
ResourceManager.shredder.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,125 @@
|
||||
package com.hbm.render.item.weapon.sedna;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemRenderStinger extends ItemRenderWeaponBase {
|
||||
|
||||
@Override
|
||||
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.25F; }
|
||||
|
||||
@Override
|
||||
public void setupFirstPerson(ItemStack stack) {
|
||||
GL11.glTranslated(0, 0, 0.875);
|
||||
|
||||
float offset = 0.8F;
|
||||
standardAimingTransform(stack,
|
||||
-3.75F * offset, -9F * offset, -3.5F * offset,
|
||||
-2.625F * offset, -6.5, -8.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFirstPerson(ItemStack stack) {
|
||||
if(ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
|
||||
|
||||
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.stinger_tex);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
|
||||
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
|
||||
double[] reload = HbmAnimations.getRelevantTransformation("RELOAD");
|
||||
double[] rocket = HbmAnimations.getRelevantTransformation("ROCKET");
|
||||
|
||||
GL11.glTranslated(0, -1, -1);
|
||||
GL11.glRotated(equip[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 1, 1);
|
||||
|
||||
GL11.glTranslated(0, -4, -3);
|
||||
GL11.glRotated(reload[0], 1, 0, 0);
|
||||
GL11.glTranslated(0, 4, 3);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
ResourceManager.stinger.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.panzerschreck_tex);
|
||||
GL11.glTranslated(rocket[0], rocket[1] + 3.5, rocket[2] - 3);
|
||||
ResourceManager.panzerschreck.renderPart("Rocket");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);
|
||||
|
||||
String label = "Not accurate";
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
float f3 = 0.04F;
|
||||
GL11.glTranslatef(0.025F, -0.5F, (font.getStringWidth(label) / 2) * f3 - 3);
|
||||
GL11.glScalef(f3, -f3, f3);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(45, -1, 0, 0);
|
||||
GL11.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
font.drawString(label, 0, 0, 0xff0000);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0, 0, 6.5);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
|
||||
GL11.glScaled(0.75, 0.75, 0.75);
|
||||
this.renderMuzzleFlash(gun.lastShot[0], 150, 7.5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupThirdPerson(ItemStack stack) {
|
||||
super.setupThirdPerson(stack);
|
||||
double scale = 1.5D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glTranslated(0, -2.5, -3.5);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupInv(ItemStack stack) {
|
||||
super.setupInv(stack);
|
||||
double scale = 1.0625D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotated(25, 1, 0, 0);
|
||||
GL11.glRotated(225, 0, 1, 0);
|
||||
GL11.glTranslated(0.25, -2.5, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderOther(ItemStack stack, ItemRenderType type) {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.stinger_tex);
|
||||
ResourceManager.stinger.renderAll();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
}
|
||||
@ -8,6 +8,7 @@ import com.hbm.extprop.HbmPlayerProps;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.interfaces.Untested;
|
||||
import com.hbm.items.weapon.sedna.Crosshair;
|
||||
import com.hbm.items.weapon.sedna.impl.ItemGunStinger;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -25,8 +26,8 @@ import net.minecraftforge.client.GuiIngameForge;
|
||||
|
||||
public class RenderScreenOverlay {
|
||||
|
||||
private static final ResourceLocation misc = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_misc.png");
|
||||
private static final RenderItem itemRenderer = RenderItem.getInstance();
|
||||
public static final ResourceLocation misc = new ResourceLocation(RefStrings.MODID + ":textures/misc/overlay_misc.png");
|
||||
public static final RenderItem itemRenderer = RenderItem.getInstance();
|
||||
|
||||
private static long lastSurvey;
|
||||
private static float prevResult;
|
||||
@ -38,8 +39,6 @@ public class RenderScreenOverlay {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
// GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
// GL11.glDepthMask(false);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
@ -98,7 +97,7 @@ public class RenderScreenOverlay {
|
||||
|
||||
|
||||
public static void renderCustomCrosshairs(ScaledResolution resolution, Gui gui, Crosshair cross) {
|
||||
|
||||
|
||||
if(cross == Crosshair.NONE) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
return;
|
||||
@ -107,13 +106,26 @@ public class RenderScreenOverlay {
|
||||
int size = cross.size;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
gui.drawTexturedModalRect(resolution.getScaledWidth() / 2 - (size / 2), resolution.getScaledHeight() / 2 - (size / 2), cross.x, cross.y, size, size);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
gui.drawTexturedModalRect(resolution.getScaledWidth() / 2 - (size / 2), resolution.getScaledHeight() / 2 - (size / 2), cross.x, cross.y, size, size);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
public static void renderStingerLockon(ScaledResolution resolution, Gui gui) {
|
||||
|
||||
int progress = (int) (ItemGunStinger.lockon * 28);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(misc);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
gui.drawTexturedModalRect(resolution.getScaledWidth() / 2 - 15, resolution.getScaledHeight() / 2 + 18, 146, 18, 30, 10);
|
||||
gui.drawTexturedModalRect(resolution.getScaledWidth() / 2 - 14, resolution.getScaledHeight() / 2 + 19, 147, 29, progress, 8);
|
||||
GL11.glPopMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
|
||||
@ -156,7 +156,7 @@ public class TileEntityICFPress extends TileEntityMachineBase implements IFluidS
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack itemStack, int side) {
|
||||
return slot == 1;
|
||||
return slot == 1 || slot == 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -149,6 +149,7 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG
|
||||
|
||||
connections = connectionsDouble / 2;
|
||||
connectionsControlled = connectionsControlledDouble / 2;
|
||||
heatsinkCount = Math.min(heatsinkCount, 80);
|
||||
|
||||
//switching this to int64 because after 2127 heatsinks the capacity exceeds the int32 which is well within the 4000+ threshold we are working with. oops!
|
||||
this.coreHeatCapacity = this.coreHeatCapacityBase + this.heatsinkCount * (this.coreHeatCapacityBase / 20);
|
||||
|
||||
@ -116,8 +116,6 @@ public class TileEntityMachineCatalyticCracker extends TileEntityLoadedBase impl
|
||||
tanks[3].setTankType(quart.getValue().type);
|
||||
tanks[4].setTankType(Fluids.SPENTSTEAM);
|
||||
} else {
|
||||
tanks[0].setTankType(Fluids.NONE);
|
||||
tanks[1].setTankType(Fluids.NONE);
|
||||
tanks[2].setTankType(Fluids.NONE);
|
||||
tanks[3].setTankType(Fluids.NONE);
|
||||
tanks[4].setTankType(Fluids.NONE);
|
||||
|
||||
128
src/main/java/com/hbm/util/Vec3NT.java
Normal file
@ -0,0 +1,128 @@
|
||||
package com.hbm.util;
|
||||
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
|
||||
public class Vec3NT extends Vec3 {
|
||||
|
||||
public Vec3NT(double x, double y, double z) {
|
||||
super(x, y, z);
|
||||
}
|
||||
|
||||
public Vec3NT(Vec3 vec) {
|
||||
super(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
}
|
||||
|
||||
public Vec3NT normalizeSelf() {
|
||||
double len = MathHelper.sqrt_double(this.xCoord * this.xCoord + this.yCoord * this.yCoord + this.zCoord * this.zCoord);
|
||||
if(len < 1.0E-4D) {
|
||||
return multiply(0D);
|
||||
} else {
|
||||
return multiply(1D / len);
|
||||
}
|
||||
}
|
||||
|
||||
public Vec3NT add(double x, double y, double z) {
|
||||
this.xCoord += x;
|
||||
this.yCoord += y;
|
||||
this.zCoord += z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vec3NT multiply(double m) {
|
||||
this.xCoord *= m;
|
||||
this.yCoord *= m;
|
||||
this.zCoord *= m;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vec3NT multiply(double x, double y, double z) {
|
||||
this.xCoord *= x;
|
||||
this.yCoord *= y;
|
||||
this.zCoord *= z;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3NT setComponents(double x, double y, double z) {
|
||||
this.xCoord = x;
|
||||
this.yCoord = y;
|
||||
this.zCoord = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundXRad(double alpha) {
|
||||
double cos = Math.cos(alpha);
|
||||
double sin = Math.sin(alpha);
|
||||
double x = this.xCoord;
|
||||
double y = this.yCoord * cos + this.zCoord * sin;
|
||||
double z = this.zCoord * cos - this.yCoord * sin;
|
||||
return this.setComponents(x, y, z);
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundYRad(double alpha) {
|
||||
double cos = Math.cos(alpha);
|
||||
double sin = Math.sin(alpha);
|
||||
double x = this.xCoord * cos + this.zCoord * sin;
|
||||
double y = this.yCoord;
|
||||
double z = this.zCoord * cos - this.xCoord * sin;
|
||||
return this.setComponents(x, y, z);
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundZRad(double alpha) {
|
||||
double cos = Math.cos(alpha);
|
||||
double sin = Math.sin(alpha);
|
||||
double x = this.xCoord * cos + this.yCoord * sin;
|
||||
double y = this.yCoord * cos - this.xCoord * sin;
|
||||
double z = this.zCoord;
|
||||
return this.setComponents(x, y, z);
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundXDeg(double alpha) {
|
||||
return this.rotateAroundXRad(alpha * 180D / Math.PI);
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundYDeg(double alpha) {
|
||||
return this.rotateAroundYRad(alpha * 180D / Math.PI);
|
||||
}
|
||||
|
||||
public Vec3NT rotateAroundZDeg(double alpha) {
|
||||
return this.rotateAroundZRad(alpha * 180D / Math.PI);
|
||||
}
|
||||
|
||||
public static double getMinX(Vec3NT... vecs) {
|
||||
double min = Double.POSITIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.xCoord < min) min = vec.xCoord;
|
||||
return min;
|
||||
}
|
||||
|
||||
public static double getMinY(Vec3NT... vecs) {
|
||||
double min = Double.POSITIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.yCoord < min) min = vec.yCoord;
|
||||
return min;
|
||||
}
|
||||
|
||||
public static double getMinZ(Vec3NT... vecs) {
|
||||
double min = Double.POSITIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.zCoord < min) min = vec.zCoord;
|
||||
return min;
|
||||
}
|
||||
|
||||
public static double getMaxX(Vec3NT... vecs) {
|
||||
double max = Double.NEGATIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.xCoord > max) max = vec.xCoord;
|
||||
return max;
|
||||
}
|
||||
|
||||
public static double getMaxY(Vec3NT... vecs) {
|
||||
double max = Double.NEGATIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.yCoord > max) max = vec.yCoord;
|
||||
return max;
|
||||
}
|
||||
|
||||
public static double getMaxZ(Vec3NT... vecs) {
|
||||
double max = Double.NEGATIVE_INFINITY;
|
||||
for(Vec3NT vec : vecs) if(vec.zCoord > max) max = vec.zCoord;
|
||||
return max;
|
||||
}
|
||||
}
|
||||
@ -1150,16 +1150,56 @@ item.ammo_shell.name=240mm Geschoss
|
||||
item.ammo_shell_apfsds_du.name=240mm APFSDS-DU
|
||||
item.ammo_shell_apfsds_t.name=240mm APFSDS-T
|
||||
item.ammo_shell_explosive.name=240mm HE-Geschoss
|
||||
item.ammo_standard.bmg50_ap.name=.50 BMG Patrone (Panzerbrechend)
|
||||
item.ammo_standard.bmg50_du.name=.50 BMG Patrone (Urangeschoss)
|
||||
item.ammo_standard.bmg50_equestrian.name=.50 BMG Zerstörer
|
||||
item.ammo_standard.bmg50_fmj.name=.50 BMG Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.bmg50_jhp.name=.50 BMG Patrone (Hohlspitz)
|
||||
item.ammo_standard.bmg50_sp.name=.50 BMG Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.flame_diesel.name=Dieseltank
|
||||
item.ammo_standard.g12.name=Kaliber 12 Schrot
|
||||
item.ammo_standard.g12_anthrax.name=Kaliber 12 Anthrax
|
||||
item.ammo_standard.g12_bp.name=Kaliber 12 Schwarzpulver
|
||||
item.ammo_standard.g12_bp_magnum.name=Kaliber 12 Schwarzpulver Magnum
|
||||
item.ammo_standard.g12_bp_slug.name=Kaliber 12 Schwarzpulver Laufgeschoss
|
||||
item.ammo_standard.g12_equestrian.name=Kaliber 12 Gleisnägel
|
||||
item.ammo_standard.g12_explosive.name=Kaliber 12 Explosivgeschoss
|
||||
item.ammo_standard.g12_flechette.name=Kaliber 12 Flechett
|
||||
item.ammo_standard.g12_magnum.name=Kaliber 12 Magnum
|
||||
item.ammo_standard.g12_phosphorus.name=Kaliber 12 Phosphor
|
||||
item.ammo_standard.g12_slug.name=Kaliber 12 Laufgeschoss
|
||||
item.ammo_standard.g40.name=40mm Granate
|
||||
item.ammo_standard.g40_flare.name=Signalpatrone
|
||||
item.ammo_standard.m357_ap.name=.357 Magnumkugel (Panzerbrechend)
|
||||
item.ammo_standard.m357_express.name=.357 Magnumkugel (VMG Express)
|
||||
item.ammo_standard.m357_fmj.name=.357 Magnumkugel (Vollmantelgeschoss)
|
||||
item.ammo_standard.m357_jhp.name=.357 Magnumkugel (Hohlspitz)
|
||||
item.ammo_standard.m357_sp.name=.357 Magnumkugel (Teilmantelgeschoss)
|
||||
item.ammo_standard.m44_ap.name=.44 Magnumkugel (Panzerbrechend)
|
||||
item.ammo_standard.m44_equestrian.name=.44 Magnum Schädelsprenger
|
||||
item.ammo_standard.m44_express.name=.44 Magnumkugel (VMG Express)
|
||||
item.ammo_standard.m44_fmj.name=.44 Magnumkugel (Vollmantelgeschoss)
|
||||
item.ammo_standard.m44_jhp.name=.44 Magnumkugel (Hohlspitz)
|
||||
item.ammo_standard.m44_sp.name=.44 Magnumkugel (Teilmantelgeschoss)
|
||||
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.p9_ap.name=9mm Patrone (Panzerbrechend)
|
||||
item.ammo_standard.p9_fmj.name=9mm Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.p9_jhp.name=9mm Patrone (Hohlspitz)
|
||||
item.ammo_standard.p9_sp.name=.9mm Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.r556_ap.name=5,56mm Patrone (Panzerbrechend)
|
||||
item.ammo_standard.r556_fmj.name=5,56mm Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.r556_jhp.name=5,56mm Patrone (Hohlspitz)
|
||||
item.ammo_standard.r556_sp.name=5,56mm Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.r762_ap.name=7,62mm Patrone (Panzerbrechend)
|
||||
item.ammo_standard.r762_du.name=7,62mm Patrone (Urangeschoss)
|
||||
item.ammo_standard.r762_fmj.name=7,62mm Patrone (Vollmantelgeschoss)
|
||||
item.ammo_standard.r762_jhp.name=7,62mm Patrone (Hohlspitz)
|
||||
item.ammo_standard.r762_sp.name=7,62mm Patrone (Teilmantelgeschoss)
|
||||
item.ammo_standard.rocket_he.name=Explosivrakete
|
||||
item.ammo_standard.rocket_heat.name=Hohlladungsrakete
|
||||
item.ammo_standard.stone.name=Kugel und Pulver
|
||||
item.ammo_standard.stone_ap.name=Feuerstein und Pulver
|
||||
item.ammo_standard.stone_iron.name=Eisenkugel und Pulver
|
||||
@ -2308,6 +2348,8 @@ item.ingot_pu239.name=Plutonium-239-Barren
|
||||
item.ingot_pu240.name=Plutonium-240-Barren
|
||||
item.ingot_pu241.name=Plutonium-241-Barren
|
||||
item.ingot_pvc.name=PVC-Tafel
|
||||
item.ingot_ra226.name=Radium-226-Barren
|
||||
item.ingot_raw.name=%s-Barren
|
||||
item.ingot_red_copper.name=Minecraft-Kupfer
|
||||
item.ingot_reiium.name=Reiiumbarren
|
||||
item.ingot_rubber.name=Gummitafel
|
||||
@ -2356,6 +2398,7 @@ item.insert_xsapi.name=XSAPI-Einlage
|
||||
item.insert_yharonite.name=Yharoniteinlage
|
||||
item.item_secret.canister.name=Komposit SB-26
|
||||
item.item_secret.controller.name=Proprietäre Steuereinheit
|
||||
item.item_secret.selenium_steel.name=Selen-Stahl
|
||||
item.iv_blood.name=Blutbeutel
|
||||
item.iv_empty.name=Infusionsbeutel
|
||||
item.iv_xp.name=Erfahrungsbeutel
|
||||
|
||||
@ -1873,16 +1873,56 @@ item.ammo_shell_apfsds_du.name=240mm APFSDS-DU
|
||||
item.ammo_shell_apfsds_t.name=240mm APFSDS-T
|
||||
item.ammo_shell_explosive.name=240mm HE Shell
|
||||
item.ammo_shell_w9.name=240mm W9 Nuclear Shell
|
||||
item.ammo_standard.bmg50_ap.name=.50 BMG Round (Armor Piercing)
|
||||
item.ammo_standard.bmg50_du.name=.50 BMG Round (Depleted Uranium)
|
||||
item.ammo_standard.bmg50_equestrian.name=.50 BMG Demolisher
|
||||
item.ammo_standard.bmg50_fmj.name=.50 BMG Round (Full Metal Jacket)
|
||||
item.ammo_standard.bmg50_jhp.name=.50 BMG Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.bmg50_sp.name=.50 BMG Round (Soft Point)
|
||||
item.ammo_standard.flame_diesel.name=Diesel Tank
|
||||
item.ammo_standard.g12.name=12 Gauge Buckshot
|
||||
item.ammo_standard.g12_anthrax.name=12 Gauge Anthrax Shell
|
||||
item.ammo_standard.g12_bp.name=12 Gauge Black Powder Buckshot
|
||||
item.ammo_standard.g12_bp_magnum.name=12 Gauge Black Powder Magnum Shell
|
||||
item.ammo_standard.g12_bp_slug.name=12 Gauge Black Powder Slug
|
||||
item.ammo_standard.g12_equestrian.name=12 Gauge Railway Spike Shot
|
||||
item.ammo_standard.g12_explosive.name=12 Gauge Explosive Shell
|
||||
item.ammo_standard.g12_flechette.name=12 Gauge Flechette Shell
|
||||
item.ammo_standard.g12_magnum.name=12 Gauge Magnum Shell
|
||||
item.ammo_standard.g12_phosphorus.name=12 Gauge Phosphorus Shell
|
||||
item.ammo_standard.g12_slug.name=12 Gauge Slug
|
||||
item.ammo_standard.g40.name=40mm Grenade
|
||||
item.ammo_standard.g40_flare.name=Signal Flare
|
||||
item.ammo_standard.m357_ap.name=.357 Magnum Round (Armor Piercing)
|
||||
item.ammo_standard.m357_express.name=.357 Magnum Round (FMJ Express)
|
||||
item.ammo_standard.m357_fmj.name=.357 Magnum Round (Full Metal Jacket)
|
||||
item.ammo_standard.m357_jhp.name=.357 Magnum Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.m357_sp.name=.357 Magnum Round (Soft Point)
|
||||
item.ammo_standard.m44_ap.name=.44 Magnum Round (Armor Piercing)
|
||||
item.ammo_standard.m44_equestrian.name=.44 Magnum Head-Exploder
|
||||
item.ammo_standard.m44_express.name=.44 Magnum Round (FMJ Express)
|
||||
item.ammo_standard.m44_fmj.name=.44 Magnum Round (Full Metal Jacket)
|
||||
item.ammo_standard.m44_jhp.name=.44 Magnum Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.m44_sp.name=.44 Magnum Round (Soft Point)
|
||||
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.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)
|
||||
item.ammo_standard.p9_sp.name=.9mm Round (Soft Point)
|
||||
item.ammo_standard.r556_ap.name=5.56mm Round (Armor Piercing)
|
||||
item.ammo_standard.r556_fmj.name=5.56mm Round (Full Metal Jacket)
|
||||
item.ammo_standard.r556_jhp.name=5.56mm Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.r556_sp.name=5.56mm Round (Soft Point)
|
||||
item.ammo_standard.r762_ap.name=7.62mm Round (Armor Piercing)
|
||||
item.ammo_standard.r762_du.name=7.62mm Round (Depleted Uranium)
|
||||
item.ammo_standard.r762_fmj.name=7.62mm Round (Full Metal Jacket)
|
||||
item.ammo_standard.r762_jhp.name=7.62mm Round (Jacketed Hollow Point)
|
||||
item.ammo_standard.r762_sp.name=7.62mm Round (Soft Point)
|
||||
item.ammo_standard.rocket_he.name=Rocket, High-Explosive
|
||||
item.ammo_standard.rocket_heat.name=Rocket, Shaped Charge
|
||||
item.ammo_standard.stone.name=Ball and Powder
|
||||
item.ammo_standard.stone_ap.name=Flint and Powder
|
||||
item.ammo_standard.stone_iron.name=Iron Ball and Powder
|
||||
@ -3130,6 +3170,7 @@ item.ingot_pu240.name=Plutonium-240 Ingot
|
||||
item.ingot_pu241.name=Plutonium-241 Ingot
|
||||
item.ingot_pvc.name=PVC Bar
|
||||
item.ingot_ra226.name=Radium-226 Ingot
|
||||
item.ingot_raw.name=%s Ingot
|
||||
item.ingot_red_copper.name=Minecraft Grade Copper
|
||||
item.ingot_reiium.name=Reiium Ingot
|
||||
item.ingot_rubber.name=Rubber Bar
|
||||
@ -3182,6 +3223,7 @@ item.insert_xsapi.name=XSAPI Insert
|
||||
item.insert_yharonite.name=Yharonite Insert
|
||||
item.item_secret.canister.name=Composition SB-26
|
||||
item.item_secret.controller.name=Proprietary Control Unit
|
||||
item.item_secret.selenium_steel.name=Selenium Steel
|
||||
item.iv_blood.name=Blood Bag
|
||||
item.iv_empty.name=IV Bag
|
||||
item.iv_xp.name=Experience Bag
|
||||
|
||||
@ -226,6 +226,8 @@
|
||||
|
||||
"weapon.fire.blackPowder": {"category": "player", "sounds": [{"name": "weapon/fire/blackPowder", "stream": false}]},
|
||||
"weapon.fire.flameLoop": {"category": "player", "sounds": [{"name": "weapon/fire/flameLoop", "stream": false}]},
|
||||
"weapon.fire.lockon": {"category": "player", "sounds": [{"name": "weapon/fire/lockon", "stream": false}]},
|
||||
"weapon.fire.shredderCycle": {"category": "player", "sounds": [{"name": "weapon/fire/shredderCycle", "stream": false}]},
|
||||
|
||||
"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/lockon.ogg
Normal file
|
After Width: | Height: | Size: 361 B |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 259 B |
|
After Width: | Height: | Size: 314 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 302 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 318 B |