Merge pull request #852 from UFFR/casings

It's Raining Brass
This commit is contained in:
HbmMods 2023-01-09 13:18:11 +01:00 committed by GitHub
commit 7269b26396
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
82 changed files with 4439 additions and 1144 deletions

View File

@ -6,18 +6,21 @@ import java.util.Optional;
import javax.annotation.CheckForNull;
import com.hbm.interfaces.IByteSerializable;
import com.hbm.interfaces.ILocationProvider;
import com.hbm.interfaces.INBTSerializable;
import com.hbm.main.DeserializationException;
import api.hbm.serialization.ISerializable;
import api.hbm.serialization.SerializationRegistry;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class EasyLocation implements Cloneable, Comparable<EasyLocation>, ISerializable<EasyLocation>, ILocationProvider
public class EasyLocation implements Cloneable, Comparable<EasyLocation>, ISerializable<EasyLocation>, IByteSerializable, INBTSerializable, ILocationProvider
{
/**
*
@ -31,13 +34,26 @@ public class EasyLocation implements Cloneable, Comparable<EasyLocation>, ISeria
{
SerializationRegistry.register(EasyLocation.class, EasyLocation::new);
}
/**
* Returns a new {@code EasyLocation} object with all coordinates set to 0.
* @return A unique {@code EasyLocation} object at position (0, 0, 0).
*/
public static EasyLocation getZeroLocation()
{
return ZERO_LOCATION.clone();
}
public EasyLocation(ILocationProvider locationProvider)
{
posX = locationProvider.posX();
posY = locationProvider.posY();
posZ = locationProvider.posZ();
if (locationProvider.hasWorld())
{
world = Optional.of(locationProvider.getWorld());
dimID = locationProvider.getWorld().provider.dimensionId;
}
}
public EasyLocation(double x, double y, double z)
{
@ -272,7 +288,7 @@ public class EasyLocation implements Cloneable, Comparable<EasyLocation>, ISeria
final double myDist = ILocationProvider.distance(this, ZERO_LOCATION);
if (testDist == myDist)
return 0;
return myDist < testDist ? 1 : -1;
return myDist > testDist ? 1 : -1;
}
@Override
@ -310,4 +326,44 @@ public class EasyLocation implements Cloneable, Comparable<EasyLocation>, ISeria
{
return world.get();
}
@Override
public void writeToNBT(NBTTagCompound nbt)
{
nbt.setDouble("posX", posX);
nbt.setDouble("posY", posY);
nbt.setDouble("posZ", posZ);
nbt.setInteger("dimID", dimID);
}
@Override
public void readFromNBT(NBTTagCompound nbt)
{
posX = nbt.getDouble("posX");
posY = nbt.getDouble("posY");
posZ = nbt.getDouble("posZ");
dimID = nbt.getInteger("dimID");
}
@Override
public void writeToBytes(ByteBuf buf)
{
buf.writeBytes(serialize());
}
@Override
public void readFromBytes(byte[] bytes) throws DeserializationException
{
try
{
final ByteBuf buf = allocCopy.apply(bytes);
posX = buf.readDouble();
posY = buf.readDouble();
posZ = buf.readDouble();
dimID = buf.readInt();
} catch (Exception e)
{
throw new DeserializationException(e);
}
}
}

View File

@ -16,6 +16,8 @@ public class WeaponConfig {
public static boolean dropCrys = true;
public static boolean dropDead = true;
public static boolean spawnCasings = true;
public static void loadFromConfig(Configuration config) {
final String CATEGORY_MISSILE = CommonConfig.CATEGORY_MISSILE;
@ -38,5 +40,7 @@ public class WeaponConfig {
dropStar = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.02_dropStar", "Whether rigged star blaster cells should explode when dropped", true);
dropCrys = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.04_dropCrys", "Whether xen crystals should move blocks when dropped", true);
dropDead = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.05_dropDead", "Whether dead man's explosives should explode when dropped", true);
spawnCasings = CommonConfig.createConfigBool(config, CATEGORY_DROPS, "10.06_spawnCasings", "Should applicable guns spawn spent shell casings? (Disable if performance heavy)", true);
}
}

View File

@ -72,7 +72,6 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', FE.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket, 4), new Object[] { "SS ", "STI", " IR", 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt), 'I', AL.plate(), 'R', REDSTONE.dust() });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, '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', ModItems.wire_tungsten, 'M', ModItems.mechanism_revolver_2 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_iron, 1), new Object[] { "SSM", " RW", 'S', FE.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
@ -215,8 +214,8 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
//Rockets
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', Blocks.tnt, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });// I got tired of changing *all* of them, the stock one is always the first one anyway
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', ModItems.ball_dynamite, 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });// I got tired of changing *all* of them, the stock one is always the first one anyway
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE), new Object[] { "G", "R", 'G', ANY_PLASTICEXPLOSIVE.ingot(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY), new Object[] { "G", "R", 'G', P_RED.dust(), 'R', ModItems.ammo_rocket });
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS), new Object[] { "G", "R", 'G', P_WHITE.ingot(), 'R', ModItems.ammo_rocket });

View File

@ -9,7 +9,9 @@ import com.hbm.config.MobConfig;
import com.hbm.entity.mob.ai.EntityAIBreaking;
import com.hbm.entity.mob.ai.EntityAI_MLPF;
import com.hbm.entity.projectile.EntityBullet;
import com.hbm.handler.guncfg.Gun4GaugeFactory;
import com.hbm.items.ModItems;
import com.hbm.main.MainRegistry;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
@ -32,6 +34,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
@ -145,6 +148,18 @@ public class EntityFBI extends EntityMob implements IRangedAttackMob {
this.worldObj.spawnEntityInWorld(bullet);
}
this.playSound("hbm:weapon.shotgunShoot", 1.0F, 1.0F);
// Casing stuff, not doing it in a method or anything because I'm gonna do that with the SNPC class.
final NBTTagCompound data = new NBTTagCompound();
data.setString("type", "casing");
data.setDouble("posX", posX);
data.setDouble("posY", posY + getEyeHeight());
data.setDouble("posZ", posZ);
data.setFloat("pitch", (float) Math.toRadians(rotationPitch));
data.setFloat("yaw", (float) Math.toRadians(rotationYaw));
data.setBoolean("crouched", isSneaking());
data.setString("name", "4g");
MainRegistry.proxy.effectNT(data);
}
}
}

View File

@ -11,7 +11,7 @@ public class EntityCombineBallNT extends EntityBulletBase
super(world, config, shooter);
overrideDamage = 1000;
}
@Override
public void setDead()
{

View File

@ -88,7 +88,7 @@ public class BulletConfiguration implements Cloneable {
/**The function that handles lost penetration over distance**/
@Nonnull
public Optional<PenetrationModifierFunction> modFunction = Optional.of(DEFAULT_FUNCTION);
//whether or not the bullet should penetrate mobs
public boolean doesPenetrate;
//whether or not the bullet should phase through blocks

View File

@ -1,11 +1,16 @@
package com.hbm.handler;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nonnull;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -32,7 +37,7 @@ public class GunConfiguration implements Cloneable {
public int durability;
//animations!
public HashMap<AnimType, BusAnimation> animations = new HashMap<AnimType, BusAnimation>();
public final Map<AnimType, BusAnimation> animations = new EnumMap<>(AnimType.class);
//whether ot not to disable crosshais when sneaking
public boolean hasSights;
@ -89,7 +94,11 @@ public class GunConfiguration implements Cloneable {
//crosshair
public Crosshair crosshair;
/**Controller for spent casings. If {@code Optional.empty()} it will not eject casings.**/
@Nonnull
public Optional<SpentCasingConfig> casingConfig = Optional.empty();
public static final int MODE_NORMAL = 0;
public static final int MODE_RELEASE = 1;
public static final int MODE_BOTH = 1;

View File

@ -67,6 +67,8 @@ public class BulletConfigFactory {
}
public static final float defaultSpread = 0.005f;
/// STANDARD CONFIGS ///
//do not include damage or ammo
public static BulletConfiguration standardBulletConfig() {

View File

@ -1,11 +1,17 @@
package com.hbm.handler.guncfg;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -15,9 +21,38 @@ import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun12GaugeFactory {
static final SpentCasingConfig CASING_SPAS, CASING_SPAS_ALT, CASING_BENELLI, CASING_UBOINIK, CASING_SSG;
static
{
final SpentCasingConfigBuilder CASING_12G_BUILDER = new SpentCasingConfigBuilder("", CasingType.SHOTGUN, false)
.setScaleX(1.5f).setScaleY(1.5f).setScaleZ(1.5f);
CASING_SPAS = CASING_12G_BUILDER.setRegistryName("spas12").setInitialMotion(Vec3.createVectorHelper(-0.4, 0.1, 0))
.setPosOffset(new EasyLocation(-0.35, 0, 0.5)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setSmokeChance(0).setDelay(10)
.build();
CASING_SPAS_ALT = CASING_12G_BUILDER.setRegistryName("spas12alt").setCasingAmount(2)
.build();
CASING_BENELLI = CASING_12G_BUILDER.setRegistryName("benelli").setCasingAmount(1).setDelay(0)
.setInitialMotion(Vec3.createVectorHelper(-0.3, 1, 0))
.build();
CASING_UBOINIK = CASING_12G_BUILDER.setRegistryName("uboinik").setOverrideColor(true)
.setBlueOverride(255).setPosOffset(new EasyLocation(-0.35, -0.3, 0.5))
.build();
CASING_SSG = CASING_12G_BUILDER.setRegistryName("ssg").setBlueOverride(0).setRedOverride(255).setCasingAmount(2)
.setPosOffset(new EasyLocation(0.8, 0, 0)).setInitialMotion(Vec3.createVectorHelper(0.2, 0, -0.2))
.setPitchFactor(0.05f).setYawFactor(0.02f)
.build();
}
public static GunConfiguration getSpas12Config() {
GunConfiguration config = new GunConfiguration();
@ -59,6 +94,8 @@ public class Gun12GaugeFactory {
)
);
config.casingConfig = Optional.of(CASING_SPAS);
return config;
}
@ -78,6 +115,8 @@ public class Gun12GaugeFactory {
config.config = HbmCollection.twelveGauge;
config.casingConfig = Optional.of(CASING_SPAS_ALT);
return config;
}
@ -105,6 +144,8 @@ public class Gun12GaugeFactory {
config.config = HbmCollection.twelveGauge;
config.casingConfig = Optional.of(CASING_UBOINIK);
return config;
}
@ -156,6 +197,8 @@ public class Gun12GaugeFactory {
config.config = HbmCollection.twelveGauge;
config.casingConfig = Optional.of(CASING_SSG);
return config;
}
@ -230,6 +273,8 @@ public class Gun12GaugeFactory {
config.advFuncLore.add("user to quickly exchange the various assembly groups (barrel, buttstock, forend, etc.) without the use");
config.advFuncLore.add("of additional tools.");
config.casingConfig = Optional.of(CASING_BENELLI);
return config;
}

View File

@ -1,14 +1,18 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
@ -17,9 +21,18 @@ import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun20GaugeFactory {
private static final SpentCasingConfigBuilder CASING_20G_BUILDER = new SpentCasingConfigBuilder("20g_lever", CasingType.SHOTGUN, false);
static final SpentCasingConfig
CASING_20G_LEVER = CASING_20G_BUILDER
.setPosOffset(new EasyLocation(-0.55, 0, 0.5))
.setInitialMotion(Vec3.createVectorHelper(-0.4, 0.95, 0)).setPitchFactor(0.05f).setYawFactor(0.01f)
.setSmokeChance(0)
.build();
public static GunConfiguration getShotgunConfig() {
GunConfiguration config = new GunConfiguration();
@ -53,6 +66,8 @@ public class Gun20GaugeFactory {
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}
@ -69,6 +84,8 @@ public class Gun20GaugeFactory {
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}
@ -86,6 +103,8 @@ public class Gun20GaugeFactory {
config.manufacturer = EnumGunManufacturer.WINCHESTER;
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}
@ -121,6 +140,8 @@ public class Gun20GaugeFactory {
);
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}
@ -157,6 +178,8 @@ public class Gun20GaugeFactory {
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}
@ -191,17 +214,20 @@ public class Gun20GaugeFactory {
)
);
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.G20_SLUG_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_NORMAL_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SHOCK_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_WITHER_FIRE);
config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
// config.config = new ArrayList<Integer>();
// config.config.add(BulletConfigSyncingUtil.G20_SLUG_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_NORMAL_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_FLECHETTE_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_SHRAPNEL);
// config.config.add(BulletConfigSyncingUtil.G20_EXPLOSIVE_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_CAUSTIC_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_SHOCK_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_WITHER_FIRE);
// config.config.add(BulletConfigSyncingUtil.G20_SLEEK);
config.config = HbmCollection.twentyGauge;
config.casingConfig = Optional.of(CASING_20G_LEVER);
return config;
}

View File

@ -1,17 +1,30 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.Vec3;
public class Gun22LRFactory {
static final SpentCasingConfig CASING_22LR = new SpentCasingConfigBuilder("22lr", CasingType.BRASS_STRAIGHT_WALL, false)
.setSmokeChance(20).setScaleX(0.4f).setScaleY(0.4f).setScaleZ(0.4f)
.setInitialMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setPosOffset(new EasyLocation(-0.35, -0.2, 0.35))
.build();
public static GunConfiguration getUziConfig() {
GunConfiguration config = new GunConfiguration();
@ -54,6 +67,8 @@ public class Gun22LRFactory {
config.advFuncLore.add("to be moved far back into the receiver and the magazine to be housed in the pistol grip, allowing for a heavier,");
config.advFuncLore.add("slower-firing bolt in a shorter, better-balanced weapon.");
config.casingConfig = Optional.of(CASING_22LR);
return config;
}
@ -70,6 +85,8 @@ public class Gun22LRFactory {
config.config.add(BulletConfigSyncingUtil.LR22_NORMAL_FIRE);
config.config.add(BulletConfigSyncingUtil.LR22_AP_FIRE);
config.config.add(BulletConfigSyncingUtil.CHL_LR22_FIRE);
config.casingConfig = Optional.of(CASING_22LR);
return config;
}

View File

@ -1,7 +1,9 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
@ -9,6 +11,9 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -16,6 +21,16 @@ import net.minecraft.potion.PotionEffect;
public class Gun357MagnumFactory {
private static final SpentCasingConfigBuilder CASING_357_BUILDER = new SpentCasingConfigBuilder("357", CasingType.BRASS_STRAIGHT_WALL, false)
.setCasingAmount(6).setYawFactor(0.05f).setPosOffset(new EasyLocation(0, -0.15, 0)).setSmokeChance(6).setAfterReload(true)
.setBounceSound("weapon.smallCasingBouncePB3");
static final SpentCasingConfig
CASING_357 = CASING_357_BUILDER.build(),
CASING_357_SA = CASING_357_BUILDER.setRegistryName("357Schrabidium").setSmokeChance(0).setOverrideColor(true)
.setRedOverride(2).setGreenOverride(207).setBlueOverride(207)
.build();
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -34,6 +49,8 @@ public class Gun357MagnumFactory {
config.firingSound = "hbm:weapon.revolverShoot";
config.reloadSoundEnd = false;
config.casingConfig = Optional.of(CASING_357);
return config;
}
@ -149,6 +166,8 @@ public class Gun357MagnumFactory {
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SCHRABIDIUM_REVOLVER);
config.config.add(BulletConfigSyncingUtil.DESH_REVOLVER);
config.casingConfig = Optional.of(CASING_357_SA);
return config;
}
@ -184,6 +203,8 @@ public class Gun357MagnumFactory {
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.NIGHT2_REVOLVER);
config.casingConfig = Optional.of(Gun20GaugeFactory.CASING_20G_LEVER);
return config;
}
@ -210,7 +231,7 @@ public class Gun357MagnumFactory {
public static GunConfiguration getColtPythonConfig()
{
GunConfiguration config = getBaseConfig().clone();
GunConfiguration config = getBaseConfig();
config.durability = 8000;
config.name = "cPython";

View File

@ -1,7 +1,9 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.entity.particle.EntityBSmokeFX;
import com.hbm.entity.projectile.EntityBoxcar;
import com.hbm.entity.projectile.EntityBuilding;
@ -15,6 +17,9 @@ import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -24,6 +29,10 @@ import net.minecraft.potion.PotionEffect;
public class Gun44MagnumFactory {
static final SpentCasingConfig CASING_44 = new SpentCasingConfigBuilder("44Magnum", CasingType.BRASS_STRAIGHT_WALL, false)
.setCasingAmount(6).setYawFactor(0.05f).setPosOffset(new EasyLocation(0, -0.15, 0)).setSmokeChance(6)
.setAfterReload(true).setScaleX(1.25f).setBounceSound("weapon.smallCasingBouncePB3").build();
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -44,6 +53,8 @@ public class Gun44MagnumFactory {
config.config.addAll(HbmCollection.fourtyFourMagBasic);
config.casingConfig = Optional.of(CASING_44);
return config;
}

View File

@ -1,22 +1,39 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.Vec3;
public class Gun45ACPFactory
{
private static final SpentCasingConfigBuilder CASING_45_BUILDER = new SpentCasingConfigBuilder("45acp", CasingType.BRASS_STRAIGHT_WALL, false)
.setSmokeChance(8).setInitialMotion(Vec3.createVectorHelper(0.3, 0.75, 0)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setPosOffset(new EasyLocation(-0.3, -0.25, 0.6)).setScaleZ(0.75f).setBounceSound("weapon.smallCasingBouncePB3");
static final SpentCasingConfig
CASING_45 = CASING_45_BUILDER.build(),
CASING_45_UAC = CASING_45_BUILDER.setRegistryName("45acp_UAC_Pistol")
.setInitialMotion(Vec3.createVectorHelper(0.3, 0.9, 0))
.build();
public static GunConfiguration getThompsonConfig() {
GunConfiguration config = new GunConfiguration();
@ -48,6 +65,8 @@ public class Gun45ACPFactory
config.advLore.add("Thompson in 1918. It was originally designed to break the stalemate of trench warfare of World");
config.advLore.add("War I, but was not finished until after the war ended.");
config.casingConfig = Optional.of(CASING_45);
return config;
}
@ -85,6 +104,8 @@ public class Gun45ACPFactory
.addKeyframe(new BusAnimationKeyframe(15, 0, 0, 10))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 40))));
config.casingConfig = Optional.of(CASING_45_UAC);
return config;
}
@ -114,6 +135,8 @@ public class Gun45ACPFactory
config.config.addAll(HbmCollection.fourtyFiveACP);
config.casingConfig = Optional.of(CASING_45);
return config;
}
public static BulletConfiguration get45AutoConfig()

View File

@ -2,7 +2,9 @@ package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.explosion.ExplosionLarge;
import com.hbm.explosion.ExplosionNT;
@ -18,6 +20,9 @@ import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -31,10 +36,16 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
import net.minecraftforge.common.IExtendedEntityProperties;
public class Gun4GaugeFactory {
static final SpentCasingConfig CASING_4G = new SpentCasingConfigBuilder("4g", CasingType.SHOTGUN, false)
.setSmokeChance(0).setPosOffset(new EasyLocation(-0.5, 0, 0.5))
.setInitialMotion(Vec3.createVectorHelper(-0.4, 0.4, 0)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setScaleX(2.5f).setScaleY(2.5f).setScaleZ(2.5f).build();
private static GunConfiguration getShotgunConfig() {
GunConfiguration config = new GunConfiguration();
@ -52,6 +63,8 @@ public class Gun4GaugeFactory {
config.crosshair = Crosshair.L_CIRCLE;
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
config.casingConfig = Optional.of(CASING_4G);
return config;
}
@ -123,7 +136,6 @@ public class Gun4GaugeFactory {
return config;
}
static byte i = 0;
static final BulletConfiguration stock = get4GaugeConfig();
public static BulletConfiguration get4GaugeConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
@ -339,7 +351,7 @@ public class Gun4GaugeFactory {
public static BulletConfiguration get4GaugeClawConfig() {
BulletConfiguration bullet = stock.clone();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
bullet.dmgMin = 6;
@ -373,7 +385,7 @@ public class Gun4GaugeFactory {
public static BulletConfiguration get4GaugeVampireConfig() {
BulletConfiguration bullet = stock.clone();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
bullet.dmgMin = 5;
@ -407,7 +419,7 @@ public class Gun4GaugeFactory {
public static BulletConfiguration get4GaugeVoidConfig() {
BulletConfiguration bullet = stock.clone();
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge, 1, i++);
bullet.dmgMin = 6;

View File

@ -1,15 +1,27 @@
package com.hbm.handler.guncfg;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.Vec3;
public class Gun50AEFactory {
static final SpentCasingConfig CASING_50AE = new SpentCasingConfigBuilder("50ae", CasingType.BRASS_STRAIGHT_WALL, false)
.setSmokeChance(4).setInitialMotion(Vec3.createVectorHelper(-0.3, 0.7, 0)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setPosOffset(new EasyLocation(-0.5, 0, 0.5)).setScaleZ(1.5f).setBounceSound("weapon.smallCasingBouncePB3").build();
public static GunConfiguration getBaseConfig() {
GunConfiguration config = new GunConfiguration();
@ -28,6 +40,8 @@ public class Gun50AEFactory {
config.firingSound = "hbm:weapon.deagleShoot";
config.reloadSoundEnd = false;
config.casingConfig = Optional.of(CASING_50AE);
return config;
}

View File

@ -1,7 +1,9 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
@ -12,6 +14,9 @@ import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -26,9 +31,22 @@ import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun50BMGFactory {
public static final SpentCasingConfig
CONFIG_50BMG = new SpentCasingConfigBuilder("50bmg", CasingType.BRASS_BOTTLENECK, false)
.setSmokeChance(0).setInitialMotion(Vec3.createVectorHelper(-0.35, 0.9, 0)).setScaleX(3).setScaleY(3).setScaleZ(3)
.setPosOffset(new EasyLocation(-0.45, -0.2, 0.35)).setPitchFactor(0.05f).setYawFactor(0.01f)
.build(),
CONFIG_LUNA = new SpentCasingConfigBuilder("luna", CasingType.BRASS_BOTTLENECK, true)
.setScaleX(4).setScaleY(4).setScaleZ(4).setSmokeChance(0).setInitialMotion(Vec3.createVectorHelper(-2, 0.15, 0))
.setPosOffset(new EasyLocation(-0.45, -0.2, 0.35)).setRedOverride(11).setGreenOverride(97).setBlueOverride(109)
.setYawFactor(0.02f)
.build();
public static GunConfiguration getCalamityConfig() {
GunConfiguration config = new GunConfiguration();
@ -67,6 +85,8 @@ public class Gun50BMGFactory {
config.config = HbmCollection.fiftyBMG;
config.casingConfig = Optional.of(CONFIG_50BMG);
return config;
}
@ -93,6 +113,8 @@ public class Gun50BMGFactory {
config.config = HbmCollection.fiftyBMG;
config.casingConfig = Optional.of(CONFIG_50BMG);
return config;
}
@ -141,6 +163,8 @@ public class Gun50BMGFactory {
// .addKeyframe(new BusAnimationKeyframe(-20, -2, 0.75, 400))//Just plop that thing in there
// .addKeyframe(new BusAnimationKeyframe(20, -2, 0.75, 75))));//Wait for the slide to close
config.casingConfig = Optional.of(CONFIG_LUNA);
return config;
}
@ -155,6 +179,7 @@ public class Gun50BMGFactory {
bullet.dmgMin = 450F;
bullet.penetration = 10000;
bullet.penetrationModifier = 1;
bullet.headshotMult = 2.5f;
bullet.wear = 2000;
bullet.velocity = 100;
bullet.doesPenetrate = true;
@ -216,15 +241,17 @@ public class Gun50BMGFactory {
config.manufacturer = EnumGunManufacturer.ARMALITE;
config.config = new ArrayList<Integer>();
config.config.addAll(HbmCollection.fiftyBMG);
config.config.addAll(HbmCollection.fiftyBMGFlechette);
config.config.addAll(HbmCollection.fiftyBMG);
config.casingConfig = Optional.of(CONFIG_50BMG);
return config;
}
public static GunConfiguration getM2Config()
{
GunConfiguration config = getAR15Config().clone();
GunConfiguration config = getAR15Config();
config.rateOfFire = 2;
config.durability *= 10;
@ -257,17 +284,22 @@ public class Gun50BMGFactory {
config.advFuncLore.add("gun on aircraft before and during World War II, as on the early versions of the Curtiss P-40 fighter.");
config.advFuncLore.add("The M2 is a scaled-up version of John Browning's M1917 .30 caliber machine gun. ");
config.casingConfig = Optional.of(CONFIG_50BMG);
config.config.clear();
config.config.addAll(HbmCollection.fiftyBMG);
config.config.addAll(HbmCollection.fiftyBMGFlechette);
return config;
}
static final float inaccuracy = 0.0005F;
static byte i = 0;
static final float inaccuracy = 0.0005F, standardSpread = BulletConfigFactory.defaultSpread * inaccuracy;
public static BulletConfiguration get50BMGConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, 0);
bullet.spread = standardSpread;
bullet.dmgMin = 50;
bullet.dmgMax = 56;
bullet.penetration = 120;
@ -277,10 +309,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGFireConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 1;
bullet.dmgMin = 50;
bullet.dmgMax = 56;
bullet.penetration = 120;
@ -292,10 +323,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGPhosphorusConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 2;
bullet.dmgMin = 50;
bullet.dmgMax = 56;
bullet.penetration = 75;
@ -325,10 +355,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGExplosiveConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 3;
bullet.dmgMin = 90;
bullet.dmgMax = 94;
bullet.penetration = 100;
@ -340,10 +369,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGAPConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 4;
bullet.dmgMin = 82;
bullet.dmgMax = 88;
bullet.penetration = 150;
@ -355,10 +383,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGDUConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 5;
bullet.dmgMin = 90;
bullet.dmgMax = 96;
bullet.penetration = 200;
@ -370,10 +397,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGStarConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 6;
bullet.dmgMin = 108;
bullet.dmgMax = 112;
bullet.penetration = 250;
@ -385,10 +411,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGSleekConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 8;
bullet.dmgMin = 60;
bullet.dmgMax = 80;
bullet.penetration = 120;
@ -428,10 +453,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGFlechetteConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 9;
bullet.dmgMin = 60;
bullet.dmgMax = 64;
bullet.penetration = 130;
@ -442,10 +466,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGFlechetteAMConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.spread *= inaccuracy;
bullet.ammo.meta = 10;
bullet.dmgMin = 70;
bullet.dmgMax = 74;
bullet.penetration = 140;
@ -466,9 +489,9 @@ public class Gun50BMGFactory {
public static BulletConfiguration get50BMGFlechettePOConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get50BMGConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_50bmg, 1, i++);
bullet.ammo.meta = 11;
bullet.spread *= inaccuracy;
bullet.dmgMin = 70;
bullet.dmgMax = 74;

View File

@ -1,8 +1,9 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
@ -11,8 +12,12 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.lib.Library;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -23,9 +28,15 @@ import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.Vec3;
public class Gun556mmFactory {
static final SpentCasingConfig CONFIG_556 = new SpentCasingConfigBuilder("556", CasingType.BRASS_BOTTLENECK, false)
.setSmokeChance(4).setInitialMotion(Vec3.createVectorHelper(-0.35, 0.6, 0)).setPitchFactor(0.03f).setYawFactor(0.01f)
.setPosOffset(new EasyLocation(-0.35, 0, 0.35)).setScaleZ(1.5f)
.build();
public static GunConfiguration getEuphieConfig() {
GunConfiguration config = new GunConfiguration();
@ -52,16 +63,19 @@ public class Gun556mmFactory {
config.comment.add("Why is this gun so sticky?");
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.R556_NORMAL);
config.config.add(BulletConfigSyncingUtil.R556_GOLD);
config.config.add(BulletConfigSyncingUtil.R556_TRACER);
config.config.add(BulletConfigSyncingUtil.R556_PHOSPHORUS);
config.config.add(BulletConfigSyncingUtil.R556_AP);
config.config.add(BulletConfigSyncingUtil.R556_DU);
config.config.add(BulletConfigSyncingUtil.R556_STAR);
config.config.add(BulletConfigSyncingUtil.CHL_R556);
config.config.add(BulletConfigSyncingUtil.R556_SLEEK);
config.config.add(BulletConfigSyncingUtil.R556_K);
config.config.addAll(HbmCollection.NATO);
// config.config.add(BulletConfigSyncingUtil.R556_NORMAL);
// config.config.add(BulletConfigSyncingUtil.R556_GOLD);
// config.config.add(BulletConfigSyncingUtil.R556_TRACER);
// config.config.add(BulletConfigSyncingUtil.R556_PHOSPHORUS);
// config.config.add(BulletConfigSyncingUtil.R556_AP);
// config.config.add(BulletConfigSyncingUtil.R556_DU);
// config.config.add(BulletConfigSyncingUtil.R556_STAR);
// config.config.add(BulletConfigSyncingUtil.CHL_R556);
// config.config.add(BulletConfigSyncingUtil.R556_SLEEK);
// config.config.add(BulletConfigSyncingUtil.R556_K);
config.casingConfig = Optional.of(CONFIG_556);
return config;
}
@ -102,6 +116,8 @@ public class Gun556mmFactory {
config.config = new ArrayList<Integer>();
config.config.addAll(HbmCollection.NATOFlechette);
config.casingConfig = Optional.of(CONFIG_556);
return config;
}
@ -128,12 +144,14 @@ public class Gun556mmFactory {
config.config = new ArrayList<Integer>();
config.config.addAll(HbmCollection.grenade);
config.casingConfig = Optional.of(GunGrenadeFactory.CASING_40);
return config;
}
public static GunConfiguration getMLRConfig()
{
GunConfiguration config = new GunConfiguration();
final GunConfiguration config = new GunConfiguration();
config.rateOfFire = 2;
config.roundsPerCycle = 1;
@ -153,21 +171,21 @@ public class Gun556mmFactory {
config.manufacturer = EnumGunManufacturer.LUNA;
config.comment.add("\"May you never reincarnate again\"");
config.config.addAll(HbmCollection.NATO);
config.config.addAll(HbmCollection.NATOFlechette);
config.config.addAll(Library.mergeWithoutDuplicates(HbmCollection.NATO, HbmCollection.NATOFlechette));
config.animations = new HashMap<>();
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 30))));
config.casingConfig = Optional.of(CONFIG_556);
return config;
}
public static GunConfiguration getG36Config()
{
GunConfiguration config = new GunConfiguration();
final GunConfiguration config = new GunConfiguration();
config.rateOfFire = 3;
config.roundsPerCycle = 1;
@ -188,16 +206,18 @@ public class Gun556mmFactory {
config.config.addAll(HbmCollection.NATO);
config.animations = new HashMap<>();
config.animations.put(AnimType.CYCLE, new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 30))));
config.casingConfig = Optional.of(CONFIG_556);
return config;
}
static final float inaccuracy = 1.15F;
public static BulletConfiguration get556Config() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
@ -215,11 +235,11 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 1);
bullet.ammo.meta = 1;
bullet.dmgMin = 250;
bullet.dmgMax = 320;
bullet.spread = 0.0F;
return bullet;
}
@ -227,7 +247,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 2);
bullet.ammo.meta = 2;
bullet.wear = 15;
bullet.incendiary = 5;
bullet.doesPenetrate = false;
@ -247,7 +267,7 @@ public class Gun556mmFactory {
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, projectile.posX, projectile.posY, projectile.posZ), new TargetPoint(projectile.dimension, projectile.posX, projectile.posY, projectile.posZ, 50));
};
return bullet;
}
@ -255,13 +275,13 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 3);
bullet.ammo.meta = 3;
bullet.dmgMin = 20;
bullet.dmgMax = 26;
bullet.penetration *= 1.5;
bullet.wear = 15;
bullet.leadChance = 10;
return bullet;
}
@ -269,13 +289,13 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 4);
bullet.ammo.meta = 4;
bullet.dmgMin = 24;
bullet.dmgMax = 32;
bullet.penetration *= 2;
bullet.wear = 25;
bullet.leadChance = 50;
return bullet;
}
@ -283,13 +303,13 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 5);
bullet.ammo.meta = 5;
bullet.dmgMin = 30;
bullet.dmgMax = 36;
bullet.penetration *= 2.5;
bullet.wear = 25;
bullet.leadChance = 100;
return bullet;
}
@ -297,7 +317,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 6);
bullet.ammo.meta = 7;
bullet.dmgMin = 45;
bullet.dmgMax = 50;
bullet.wear = 10;
@ -330,7 +350,7 @@ public class Gun556mmFactory {
meteor.shooter = projectile.shooter;
projectile.worldObj.spawnEntityInWorld(meteor);
};
return bullet;
}
@ -338,7 +358,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 7);
bullet.ammo.meta = 8;
bullet.vPFX = "reddust";
return bullet;
@ -348,7 +368,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 8);
bullet.ammo.meta = 9;
bullet.dmgMin = 26;
bullet.dmgMax = 32;
bullet.penetration = 22;
@ -357,7 +377,7 @@ public class Gun556mmFactory {
bullet.wear = 15;
bullet.style = BulletConfiguration.STYLE_FLECHETTE;
bullet.doesPenetrate = false;
return bullet;
}
@ -365,9 +385,9 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 9);
bullet.ammo.meta = 10;
bullet.incendiary = 5;
return bullet;
}
@ -375,7 +395,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 10);
bullet.ammo.meta = 11;
bullet.incendiary = 5;
PotionEffect eff = new PotionEffect(HbmPotion.phosphorus.id, 20 * 20, 0, true);
@ -393,7 +413,7 @@ public class Gun556mmFactory {
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, projectile.posX, projectile.posY, projectile.posZ), new TargetPoint(projectile.dimension, projectile.posX, projectile.posY, projectile.posZ, 50));
};
return bullet;
}
@ -401,14 +421,14 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 11);
bullet.ammo.meta = 12;
bullet.dmgMin = 46;
bullet.dmgMax = 52;
bullet.penetration *= 2.5;
bullet.wear = 25;
bullet.leadChance = 50;
bullet.doesPenetrate = true;
return bullet;
}
@ -416,7 +436,7 @@ public class Gun556mmFactory {
BulletConfiguration bullet = get556FlechetteConfig();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 12);
bullet.ammo.meta = 13;
bullet.dmgMin = 45;
bullet.dmgMax = 50;
bullet.wear = 10;
@ -449,20 +469,21 @@ public class Gun556mmFactory {
meteor.shooter = projectile.shooter;
projectile.worldObj.spawnEntityInWorld(meteor);
};
return bullet;
}
public static BulletConfiguration get556KConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();
BulletConfiguration bullet = get556Config();
bullet.ammo = new ComparableStack(ModItems.ammo_556, 1, 13);
bullet.ammo.meta = 14;
bullet.dmgMin = 0;
bullet.dmgMax = 0;
bullet.penetration = 0;
bullet.maxAge = 0;
bullet.wear /= 2;
return bullet;
}
}

View File

@ -1,6 +1,7 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
@ -9,10 +10,14 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class Gun5mmFactory {
public static final SpentCasingConfig CASING_5MM = Gun22LRFactory.CASING_22LR.toBuilder("5mm").setCasingAmount(5).build(),
CASING_5MM_TURRET = CASING_5MM.toBuilder("5mmTurret").setCasingAmount(1).build();
public static GunConfiguration getMinigunConfig() {
GunConfiguration config = new GunConfiguration();
@ -32,6 +37,8 @@ public class Gun5mmFactory {
config.config = HbmCollection.fiveMM;
config.casingConfig = Optional.of(CASING_5MM);
return config;
}

View File

@ -1,6 +1,7 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
@ -8,6 +9,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
@ -16,6 +18,10 @@ import net.minecraft.potion.PotionEffect;
public class Gun762mmFactory
{
// TODO Confirm
static final SpentCasingConfig CASING_762_NATO = Gun556mmFactory.CONFIG_556.toBuilder("762NATO").setSmokeChance(2).setScaleX(2)
.setScaleZ(2.5f).build();
public static GunConfiguration getUACDMRConfig()
{
final GunConfiguration config = new GunConfiguration();
@ -42,6 +48,8 @@ public class Gun762mmFactory
config.config.addAll(HbmCollection.threeZeroEight);
config.casingConfig = Optional.of(CASING_762_NATO);
return config;
}
@ -118,6 +126,8 @@ public class Gun762mmFactory
config.advFuncLore.add("extra ammunition, and reloads and spots targets for the gunner. The ammunition bearer carries additional ammunition");
config.advFuncLore.add("and the tripod with associated traversing and elevation mechanism, if issued, and fetches more ammunition as needed");
config.advFuncLore.add("during firing.");
config.casingConfig = Optional.of(CASING_762_NATO);
return config;
}

View File

@ -1,7 +1,9 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
@ -9,14 +11,21 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.util.Vec3;
public class Gun9mmFactory {
static final SpentCasingConfig CASING_9 = Gun45ACPFactory.CASING_45_UAC.toBuilder("9")
.setInitialMotion(Vec3.createVectorHelper(-0.3, 0.6, 0)).setPosOffset(new EasyLocation(-0.35, -0.2, 0.55))
.setScaleX(1).setScaleY(1).setScaleZ(0.6f).setBounceSound("weapon.smallCasingBouncePB3").build();
public static GunConfiguration getMP40Config() {
GunConfiguration config = new GunConfiguration();
@ -46,6 +55,8 @@ public class Gun9mmFactory {
config.config.add(BulletConfigSyncingUtil.CHL_P9);
config.config.add(BulletConfigSyncingUtil.P9_ROCKET);
config.casingConfig = Optional.of(CASING_9);
return config;
}
@ -77,6 +88,8 @@ public class Gun9mmFactory {
config.config.add(BulletConfigSyncingUtil.P9_DU);
config.config.add(BulletConfigSyncingUtil.CHL_P9);
config.config.add(BulletConfigSyncingUtil.P9_ROCKET);
config.casingConfig = Optional.of(CASING_9);
return config;
}
@ -110,6 +123,8 @@ public class Gun9mmFactory {
.addBus("RECOIL", new BusAnimationSequence()
.addKeyframe(new BusAnimationKeyframe(0, 0, -0.1, 30))
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 30))));
config.casingConfig = Optional.of(CASING_9);
return config;
}

View File

@ -1,13 +1,30 @@
package com.hbm.handler.guncfg;
import com.hbm.calc.EasyLocation;
import com.hbm.config.BombConfig;
import com.hbm.entity.effect.EntityNukeCloudSmall;
import com.hbm.entity.logic.EntityNukeExplosionMK4;
import com.hbm.handler.BulletConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.particle.SpentCasingConfig.CasingType;
import net.minecraft.util.Vec3;
public class GunCannonFactory {
private static final SpentCasingConfigBuilder CASING_CANNON_BUILDER = new SpentCasingConfigBuilder("240", CasingType.BRASS_BOTTLENECK, false)
.setInitialMotion(Vec3.createVectorHelper(0, 0.2, -1)).setPosOffset(new EasyLocation(0, 1.75, -1.5)).setSmokeChance(0)
.setScaleX(10).setScaleY(10).setScaleZ(10).setPitchFactor(0.15f).setYawFactor(0.015f);
public static final SpentCasingConfig
CASING_240 = CASING_CANNON_BUILDER.build(),
CASING_16IN = CASING_CANNON_BUILDER.setRegistryName("16inch").setInitialMotion(Vec3.createVectorHelper(0, 2, -1.75))
.setScaleX(20).setScaleY(20).setScaleZ(25).setCasingType(CasingType.BRASS_STRAIGHT_WALL)
.build();
static final int stockPen = 10000;
static byte i = 0;
public static BulletConfiguration getShellConfig() {
@ -17,8 +34,8 @@ public class GunCannonFactory {
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
bullet.dmgMin = 225;
bullet.dmgMax = 235;
bullet.penetration = stockPen;
bullet.explosive = 40F;
bullet.penetration = 40;
bullet.explosive = 20F;
bullet.blockDamage = false;
return bullet;
@ -31,8 +48,8 @@ public class GunCannonFactory {
bullet.ammo = new ComparableStack(ModItems.ammo_shell, 1, i++);
bullet.dmgMin = 235;
bullet.dmgMax = 245;
bullet.penetration = stockPen;
bullet.explosive = 40F;
bullet.penetration = 50;
bullet.explosive = 25F;
bullet.blockDamage = true;
return bullet;

View File

@ -1,11 +1,20 @@
package com.hbm.handler.guncfg;
import com.hbm.calc.EasyLocation;
import com.hbm.handler.BulletConfiguration;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.particle.SpentCasingConfig;
import net.minecraft.util.Vec3;
public class GunDGKFactory {
public static final SpentCasingConfig CASING_DGK = Gun50BMGFactory.CONFIG_LUNA.toBuilder("dgk")
.setInitialMotion(Vec3.createVectorHelper(0.8, 1, 0)).setPosOffset(new EasyLocation(0.15, 1.5, -1.5))
.setOverrideColor(false).setPitchFactor(0.1f).setYawFactor(0.08f)
.build();
public static BulletConfiguration getDGKConfig() {
BulletConfiguration bullet = BulletConfigFactory.standardBulletConfig();

View File

@ -1,6 +1,7 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Optional;
import com.hbm.config.BombConfig;
import com.hbm.entity.effect.EntityCloudTom;
@ -11,10 +12,17 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
public class GunGrenadeFactory {
static final SpentCasingConfig CASING_40 = new SpentCasingConfigBuilder("40", CasingType.BRASS_STRAIGHT_WALL, false)
.setSmokeChance(0).setScaleX(4).setScaleY(4).setScaleZ(3).setAfterReload(true).setPitchFactor(0.02f).setYawFactor(0.03f)
.build();
public static GunConfiguration getHK69Config() {
GunConfiguration config = new GunConfiguration();
@ -40,6 +48,8 @@ public class GunGrenadeFactory {
config.config = new ArrayList<Integer>();
config.config.addAll(HbmCollection.grenade);
config.durability = 300;
config.casingConfig = Optional.of(GunGrenadeFactory.CASING_40);
return config;
}

View File

@ -1,24 +1,41 @@
package com.hbm.handler.guncfg;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
import com.hbm.blocks.generic.RedBarrel;
import com.hbm.calc.EasyLocation;
import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.ILocationProvider;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.particle.SpentCasingConfigBuilder;
import com.hbm.particle.SpentCasingConfig.CasingType;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
import com.hbm.potion.HbmPotion;
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
public class GunOSIPRFactory {
static final SpentCasingConfig CASING_AR2 = new SpentCasingConfigBuilder("ar2", CasingType.AR2, false)
.setSmokeChance(0).setInitialMotion(Vec3.createVectorHelper(-0.15, 0.2, 0)).setPitchFactor(0.02f)
.setAfterReload(true).setPosOffset(new EasyLocation(-0.4, 0, 0)).build();
public static GunConfiguration getOSIPRConfig() {
GunConfiguration config = new GunConfiguration();
@ -44,6 +61,8 @@ public class GunOSIPRFactory {
config.config = new ArrayList<Integer>();
config.config.add(BulletConfigSyncingUtil.SPECIAL_OSIPR);
config.casingConfig = Optional.of(CASING_AR2);
return config;
}
@ -151,37 +170,41 @@ public class GunOSIPRFactory {
return bullet;
}
// private static void tryRedirectBall(EntityBulletBase ball, EntityLivingBase lastHit)
// {
// if (!ball.worldObj.isRemote)
// {
// final ILocationProvider ballLoc = ILocationProvider.wrap(ball, false), targetLoc;
// final Vec3 newVector;
// final List<Entity> entities = ball.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(ball.posX - 10, ball.posY - 10, ball.posZ - 10, ball.posX + 10, ball.posY + 10, ball.posZ + 10));
// entities.remove(ball);
// entities.remove(ball.shooter);
// entities.remove(lastHit);
// entities.removeIf(e -> Library.isObstructed(ball.worldObj, ballLoc, ILocationProvider.wrap(e, false)));
// if (entities.isEmpty())
// return;
//
// entities.sort(Comparator.comparing(e -> ILocationProvider.distance(ILocationProvider.wrap(e, false), ballLoc)));
//
// targetLoc = ILocationProvider.wrap(entities.get(0), false);
// newVector = ILocationProvider.makeVector(ballLoc, targetLoc).normalize();
//
// System.out.println(ballLoc);
// System.out.println(targetLoc);
// System.out.println(newVector);
// System.out.println(Vec3.createVectorHelper(ball.motionX, ball.motionY, ball.motionZ));
//
// final double total = ball.motionX + ball.motionY + ball.motionZ;
//
// ball.motionX = newVector.xCoord * total;
// ball.motionY = newVector.yCoord * total;
// ball.motionZ = newVector.zCoord * total;
//
// System.out.println(Vec3.createVectorHelper(ball.motionX, ball.motionY, ball.motionZ));
// }
// }
}
private static void tryRedirectBall(EntityBulletBase ball, EntityLivingBase lastHit)
{
if (!ball.worldObj.isRemote)
{
final ILocationProvider ballLoc = ILocationProvider.wrap(ball, false), targetLoc;
final Vec3 newVector;
final List<Entity> entities = ball.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(ball.posX - 10, ball.posY - 10, ball.posZ - 10, ball.posX + 10, ball.posY + 10, ball.posZ + 10));
entities.remove(ball);
entities.remove(ball.shooter);
entities.remove(lastHit);
entities.removeIf(e -> Library.isObstructed(ball.worldObj, ballLoc, ILocationProvider.wrap(e, false)));
if (entities.isEmpty())
return;
entities.sort(Comparator.comparing(e -> ILocationProvider.distance(ILocationProvider.wrap(e, false), ballLoc)));
targetLoc = ILocationProvider.wrap(entities.get(0), false);
System.out.println(ballLoc);
System.out.println(targetLoc);
System.out.println(Vec3.createVectorHelper(ball.motionX, ball.motionY, ball.motionZ));
final double oldMagnitude = Math.sqrt(ball.motionX * ball.motionX + ball.motionY * ball.motionY + ball.motionZ * ball.motionZ), newMagnitude;
newVector = Vec3.createVectorHelper(
targetLoc.posX() - ball.motionX,
targetLoc.posY() - ball.motionY,
targetLoc.posZ() - ball.motionZ
);
newMagnitude = Math.sqrt(newVector.xCoord * newVector.xCoord + newVector.yCoord * newVector.yCoord + newVector.zCoord * newVector.zCoord);
ball.motionX = newVector.xCoord * oldMagnitude / newMagnitude;
ball.motionY = newVector.yCoord * oldMagnitude / newMagnitude;
ball.motionZ = newVector.zCoord * oldMagnitude / newMagnitude;
System.out.println(Vec3.createVectorHelper(ball.motionX, ball.motionY, ball.motionZ));
}
}
}

View File

@ -0,0 +1,19 @@
package com.hbm.interfaces;
import com.hbm.main.DeserializationException;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
public interface IByteSerializable
{
public void writeToBytes(ByteBuf buf);
public void readFromBytes(byte[] bytes) throws DeserializationException;
public default byte[] writeToBytes()
{
final ByteBuf buf = Unpooled.buffer();
writeToBytes(buf);
return buf.array();
}
}

View File

@ -0,0 +1,16 @@
package com.hbm.interfaces;
import net.minecraft.nbt.NBTTagCompound;
public interface INBTSerializable
{
public void writeToNBT(NBTTagCompound nbt);
public void readFromNBT(NBTTagCompound nbt);
public default NBTTagCompound writeToNBT()
{
final NBTTagCompound nbt = new NBTTagCompound();
writeToNBT(nbt);
return nbt;
}
}

View File

@ -560,9 +560,9 @@ public class ItemAmmoEnums
STAR(Gun50BMGFactory.get50BMGStarConfig(), HbmCollection.StarmetalType),
CHLOROPHYTE(Gun50BMGFactory.get50BMGConfig().getChlorophyte(), HbmCollection.ChlorophyteType),
SLEEK(Gun50BMGFactory.get50BMGSleekConfig(), AmmoItemTrait.NEU_MASKMAN_METEORITE),
FLECHETTE(Gun50BMGFactory.get50BMGFlechetteConfig()),
FLECHETTE_AM(Gun50BMGFactory.get50BMGFlechetteAMConfig()),
FLECHETTE_PO(Gun50BMGFactory.get50BMGFlechettePOConfig());
FLECHETTE(Gun50BMGFactory.get50BMGFlechetteConfig(), AmmoItemTrait.PRO_DAMAGE),
FLECHETTE_AM(Gun50BMGFactory.get50BMGFlechetteAMConfig(), AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH),
FLECHETTE_PO(Gun50BMGFactory.get50BMGFlechettePOConfig(), AmmoItemTrait.PRO_DAMAGE, AmmoItemTrait.NEU_UHH);
private final Set<AmmoItemTrait> traits;
private final BulletConfiguration config;
private Ammo50BMG(BulletConfiguration config, AmmoItemTrait...traits)

View File

@ -2,26 +2,17 @@ package com.hbm.items.tool;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.entity.effect.EntityNukeTorex;
import com.hbm.entity.mob.siege.EntitySiegeTunneler;
import com.hbm.items.ModItems;
import com.hbm.items.special.ItemKitCustom;
import com.hbm.lib.Library;
import com.hbm.world.feature.OilSpot;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class ItemWandD extends Item {
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {

View File

@ -41,17 +41,17 @@ import net.minecraft.util.Vec3;
public class ItemAmmoArty extends Item {
public static ArtilleryShell[] itemTypes = new ArtilleryShell[ /* >>> */ 8 /* <<< */ ];
public static ArtilleryShell[] shellTypes = new ArtilleryShell[ /* >>> */ 8 /* <<< */ ];
public static final ArtilleryShell[] itemTypes = new ArtilleryShell[ /* >>> */ 8 /* <<< */ ];
public static final ArtilleryShell[] shellTypes = new ArtilleryShell[ /* >>> */ 8 /* <<< */ ];
/* item types */
public final int NORMAL = 0;
public final int CLASSIC = 1;
public final int EXPLOSIVE = 2;
public final int MINI_NUKE = 3;
public final int NUKE = 4;
public final int PHOSPHORUS = 5;
public final int MINI_NUKE_MULTI = 6;
public final int PHOSPHORUS_MULTI = 7;
public static final int NORMAL = 0;
public static final int CLASSIC = 1;
public static final int EXPLOSIVE = 2;
public static final int MINI_NUKE = 3;
public static final int NUKE = 4;
public static final int PHOSPHORUS = 5;
public static final int MINI_NUKE_MULTI = 6;
public static final int PHOSPHORUS_MULTI = 7;
/* non-item shell types */
public ItemAmmoArty() {
@ -118,11 +118,13 @@ public class ItemAmmoArty extends Item {
list.add(r + "(that is the best skull and crossbones");
list.add(r + "minecraft's unicode has to offer)");
break;
default: break;
}
}
private IIcon[] icons = new IIcon[itemTypes.length];
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg) {
@ -204,12 +206,16 @@ public class ItemAmmoArty extends Item {
private void init() {
/* STANDARD SHELLS */
this.shellTypes[NORMAL] = this.itemTypes[NORMAL] = new ArtilleryShell("ammo_arty") { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 10F, 3F, false); }};
this.shellTypes[CLASSIC] = this.itemTypes[CLASSIC] = new ArtilleryShell("ammo_arty_classic") { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 5F, false); }};
this.shellTypes[EXPLOSIVE] = this.itemTypes[EXPLOSIVE] = new ArtilleryShell("ammo_arty_he") { public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 3F, true); }};
ItemAmmoArty.shellTypes[NORMAL] = ItemAmmoArty.itemTypes[NORMAL] = new ArtilleryShell("ammo_arty") { @Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 10F, 3F, false); }};
ItemAmmoArty.shellTypes[CLASSIC] = ItemAmmoArty.itemTypes[CLASSIC] = new ArtilleryShell("ammo_arty_classic") { @Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 5F, false); }};
ItemAmmoArty.shellTypes[EXPLOSIVE] = ItemAmmoArty.itemTypes[EXPLOSIVE] = new ArtilleryShell("ammo_arty_he") { @Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { standardExplosion(shell, mop, 15F, 3F, true); }};
/* MINI NUKE */
this.shellTypes[MINI_NUKE] = this.itemTypes[MINI_NUKE] = new ArtilleryShell("ammo_arty_mini_nuke") {
ItemAmmoArty.shellTypes[MINI_NUKE] = ItemAmmoArty.itemTypes[MINI_NUKE] = new ArtilleryShell("ammo_arty_mini_nuke") {
@Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) {
shell.killAndClear();
Vec3 vec = Vec3.createVectorHelper(shell.motionX, shell.motionY, shell.motionZ).normalize();
@ -218,7 +224,8 @@ public class ItemAmmoArty extends Item {
};
/* FULL NUKE */
this.shellTypes[NUKE] = this.itemTypes[NUKE] = new ArtilleryShell("ammo_arty_nuke") {
ItemAmmoArty.shellTypes[NUKE] = ItemAmmoArty.itemTypes[NUKE] = new ArtilleryShell("ammo_arty_nuke") {
@Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) {
shell.worldObj.spawnEntityInWorld(EntityNukeExplosionMK4.statFac(shell.worldObj, BombConfig.missileRadius, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord));
EntityNukeCloudSmall entity2 = new EntityNukeCloudSmall(shell.worldObj, 1000, BombConfig.missileRadius * 0.005F);
@ -231,7 +238,8 @@ public class ItemAmmoArty extends Item {
};
/* PHOSPHORUS */
this.shellTypes[PHOSPHORUS] = this.itemTypes[PHOSPHORUS] = new ArtilleryShell("ammo_arty_phosphorus") {
ItemAmmoArty.shellTypes[PHOSPHORUS] = ItemAmmoArty.itemTypes[PHOSPHORUS] = new ArtilleryShell("ammo_arty_phosphorus") {
@Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) {
standardExplosion(shell, mop, 10F, 3F, false);
shell.worldObj.playSoundEffect(shell.posX, shell.posY, shell.posZ, "hbm:weapon.explosionMedium", 20.0F, 0.9F + shell.worldObj.rand.nextFloat() * 0.2F);
@ -260,12 +268,16 @@ public class ItemAmmoArty extends Item {
};
/* CLUSTER SHELLS */
this.shellTypes[PHOSPHORUS_MULTI] = this.itemTypes[PHOSPHORUS_MULTI] = new ArtilleryShell("ammo_arty_phosphorus_multi") {
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { ItemAmmoArty.this.shellTypes[PHOSPHORUS].onImpact(shell, mop); }
ItemAmmoArty.shellTypes[PHOSPHORUS_MULTI] = ItemAmmoArty.itemTypes[PHOSPHORUS_MULTI] = new ArtilleryShell("ammo_arty_phosphorus_multi") {
@Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { ItemAmmoArty.shellTypes[PHOSPHORUS].onImpact(shell, mop); }
@Override
public void onUpdate(EntityArtilleryShell shell) { standardCluster(shell, PHOSPHORUS, 10, 300, 5); }
};
this.shellTypes[MINI_NUKE_MULTI] = this.itemTypes[MINI_NUKE_MULTI] = new ArtilleryShell("ammo_arty_mini_nuke_multi") {
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { ItemAmmoArty.this.shellTypes[MINI_NUKE].onImpact(shell, mop); }
ItemAmmoArty.shellTypes[MINI_NUKE_MULTI] = ItemAmmoArty.itemTypes[MINI_NUKE_MULTI] = new ArtilleryShell("ammo_arty_mini_nuke_multi") {
@Override
public void onImpact(EntityArtilleryShell shell, MovingObjectPosition mop) { ItemAmmoArty.shellTypes[MINI_NUKE].onImpact(shell, mop); }
@Override
public void onUpdate(EntityArtilleryShell shell) { standardCluster(shell, MINI_NUKE, 5, 300, 5); }
};
}

View File

@ -16,10 +16,12 @@ import com.hbm.interfaces.IItemHUD;
import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.IEquipReceiver;
import com.hbm.lib.HbmCollection;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.GunAnimationPacket;
import com.hbm.packet.GunButtonPacket;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.util.RenderScreenOverlay;
@ -208,6 +210,9 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
}
world.playSoundAtEntity(player, mainConfig.firingSound, 1.0F, mainConfig.firingPitch);
if (mainConfig.casingConfig.isPresent() && !mainConfig.casingConfig.get().isAfterReload())
spawnCasing(player, mainConfig.casingConfig.get(), stack);
if(player.getDisplayName().equals("Vic4Games")) {
NBTTagCompound nbt = new NBTTagCompound();
@ -245,6 +250,9 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
}
world.playSoundAtEntity(player, altConfig.firingSound, 1.0F, altConfig.firingPitch);
if (altConfig.casingConfig.isPresent())
spawnCasing(player, altConfig.casingConfig.get(), stack);
}
//spawns the actual projectile, can be overridden to change projectile entity
@ -438,6 +446,10 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
if(hasLoaded && mainConfig.reloadSoundEnd)
world.playSoundAtEntity(player, mainConfig.reloadSound, 1.0F, 1.0F);
if (mainConfig.casingConfig.isPresent() && mainConfig.casingConfig.get().isAfterReload())
spawnCasing(player, mainConfig.casingConfig.get(), stack);
InventoryUtil.doesPlayerHaveAStack(player, ammo, true, false);
} else {
setReloadCycle(stack, getReloadCycle(stack) - 1);
@ -579,6 +591,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
list.add("Is Reloading: " + getIsReloading(stack));
list.add("Reload Cycle: " + getReloadCycle(stack));
list.add("RoF Cooldown: " + getDelay(stack));
// list.add("Casing Spawning: " + stack.stackTagCompound.getBoolean("casingReady"));
// list.add("Casing Cooldown: " + stack.stackTagCompound.getByte("casingDelay"));
}
if (!mainConfig.advLore.isEmpty() || !mainConfig.advFuncLore.isEmpty())
list.add("");
@ -844,10 +858,7 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
event.setCanceled(true);
if(!(gcfg.hasSights && player.isSneaking()))
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, ((IHoldableWeapon)player.getHeldItem().getItem()).getCrosshair());
else
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, Crosshair.NONE);
RenderScreenOverlay.renderCustomCrosshairs(event.resolution, Minecraft.getMinecraft().ingameGUI, (gcfg.hasSights && player.isSneaking()) ? Crosshair.NONE : ((IHoldableWeapon)player.getHeldItem().getItem()).getCrosshair());
}
}
@ -863,4 +874,19 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
if (!mainConfig.equipSound.isEmpty() && !player.worldObj.isRemote)
player.worldObj.playSoundAtEntity(player, mainConfig.equipSound, 1, 1);
}
// TODO Do something to handle delays
protected static void spawnCasing(Entity entity, SpentCasingConfig config, ItemStack stack)
{
final NBTTagCompound data = new NBTTagCompound();
data.setString("type", "casing");
data.setDouble("posX", entity.posX);
data.setDouble("posY", entity.posY + entity.getEyeHeight());
data.setDouble("posZ", entity.posZ);
data.setFloat("pitch", (float) Math.toRadians(entity.rotationPitch));
data.setFloat("yaw", (float) Math.toRadians(entity.rotationYaw));
data.setBoolean("crouched", entity.isSneaking());
data.setString("name", config.getRegistryName());
MainRegistry.proxy.effectNT(data);
}
}

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.stream.Collectors;
import com.google.common.collect.Sets;
import com.hbm.blocks.ModBlocks;
@ -106,6 +107,26 @@ public class Library {
public static final ForgeDirection POS_Z = ForgeDirection.SOUTH;
public static final ForgeDirection NEG_Z = ForgeDirection.NORTH;
public static <T> List<T> mergeWithoutDuplicates(List<T>...lists)
{
final List<T> totalList = new ArrayList<T>();
for (List<T> list : lists)
totalList.addAll(list);
return listWithoutDuplicates(totalList);
}
public static <T> List<T> listWithoutDuplicates(List<T> list)
{
return list.stream().distinct().collect(Collectors.toList());
}
public static <T> void removeListDuplicates(List<T> list)
{
final List<T> newList = listWithoutDuplicates(list);
list.clear();
list.addAll(newList);
}
/*
* Is putting this into this trash can a good idea? No. Do I have a better idea? Not currently.
*/

File diff suppressed because it is too large Load Diff

View File

@ -989,6 +989,9 @@ public class ResourceManager {
public static final IModelCustom cart = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/cart.obj"));
public static final IModelCustom cart_destroyer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/cart_destroyer.obj"));
public static final IModelCustom cart_powder = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/vehicles/cart_powder.obj"));
//Casings
public static final IModelCustom casings = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/effect/casings.obj"));
////Texture Entities
@ -1261,6 +1264,9 @@ public class ResourceManager {
public static final ResourceLocation cart_semtex_side = new ResourceLocation(RefStrings.MODID, "textures/blocks/semtex_side.png");
public static final ResourceLocation cart_semtex_top = new ResourceLocation(RefStrings.MODID, "textures/blocks/semtex_bottom.png");
//Casings
public static final ResourceLocation casings_tex = new ResourceLocation(RefStrings.MODID, "textures/particle/casing_tex.png");
//ISBRHs
public static final IModelCustom scaffold = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/scaffold.obj"));
public static final IModelCustom taperecorder = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/taperecorder.obj"));

View File

@ -4,9 +4,8 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.saveddata.TomSaveData;
import com.hbm.sound.AudioWrapper;
import com.hbm.sound.nt.ISoundSourceTE;
import com.hbm.sound.nt.SoundWrapper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
@ -65,14 +64,22 @@ public class ServerProxy {
public void openLink(String url) { }
public SoundWrapper getTileSound(String sound, ISoundSourceTE source) {
return new SoundWrapper();
}
public List<ItemStack> getSubItems(ItemStack stack) {
List<ItemStack> list = new ArrayList();
List<ItemStack> list = new ArrayList<>();
list.add(stack);
return list;
}
public float getImpactDust(World world) {
return TomSaveData.forWorld(world).dust;
}
public float getImpactFire(World world) {
return TomSaveData.forWorld(world).fire;
}
public boolean getImpact(World world) {
return TomSaveData.forWorld(world).impact;
}
}

View File

@ -0,0 +1,222 @@
package com.hbm.particle;
import java.util.ArrayList;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.calc.EasyLocation;
import com.hbm.main.ResourceManager;
import com.hbm.util.Tuple.Pair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.world.World;
@SideOnly(Side.CLIENT)
public class ParticleSpentCasing extends EntityFX
{
private static final float dScale = 0.05f;//, smokeJitter = 0.025f, smokeAccel = 0.5f;
// private static final byte maxSmokeGen = 60, maxSmokeLife = 120;
private final List<Pair<EasyLocation, Double>> smokeNodes = new ArrayList<Pair<EasyLocation, Double>>();
private final TextureManager textureManager;
private final SpentCasingConfig config;
// private final boolean smoke;
private float momentumPitch, momentumYaw;
private boolean onGroundPreviously = false;
private double maxHeight;
public ParticleSpentCasing(TextureManager textureManager, World world, double x, double y, double z, double mx, double my, double mz, float momentumPitch, float momentumYaw, SpentCasingConfig config)
{
super(world, x, y, z, 0, 0, 0);
this.textureManager = textureManager;
this.momentumPitch = momentumPitch;
this.momentumYaw = momentumYaw;
this.config = config;
particleMaxAge = 240;
// smoke = config.getSmokeChance() == 0 ? true
// : config.getSmokeChance() < 0 ? false
// : rand.nextInt(config.getSmokeChance()) == 0;
motionX = mx;
motionY = my;
motionZ = mz;
particleGravity = 8f;
maxHeight = y;
}
@Override
public int getFXLayer()
{
return 3;
}
@Override
public void onUpdate()
{
super.onUpdate();
if (motionY > 0 && posY > maxHeight)
maxHeight = posY;
if (!onGroundPreviously && onGround)
tryPlayBounceSound();
// TODO Bounce factor in config
if (!onGroundPreviously && onGround)
{
onGroundPreviously = true;
motionY = Math.log10(maxHeight - posY + 2);
momentumPitch = (float) rand.nextGaussian() * config.getPitchFactor();
momentumYaw = (float) rand.nextGaussian() * config.getYawFactor();
maxHeight = posY;
} else if (onGroundPreviously && !onGround)
onGroundPreviously = false;
// if (particleAge > maxSmokeLife && !smokeNodes.isEmpty())
// smokeNodes.clear();
// if (smoke && particleAge <= maxSmokeLife)
// {
// final double side = (rotationYaw - prevRotationYaw) * 0.1D;
// final Vec3 prev = Vec3.createVectorHelper(motionX, motionY, motionZ);
// prev.rotateAroundY((float) Math.toRadians(rotationYaw));
//
// for (Pair<EasyLocation, Double> pair : smokeNodes)
// {
// final EasyLocation node = pair.getKey();
//
// node.posX += prev.xCoord * smokeAccel + rand.nextGaussian() * smokeJitter + side;
// node.posY += prev.yCoord + smokeAccel;
// node.posZ += prev.zCoord * smokeAccel + rand.nextGaussian() * smokeJitter;
// }
//
// if (particleAge < maxSmokeGen || inWater)
// {
// final double alpha = (particleAge / 20d);
// smokeNodes.add(new Pair<EasyLocation, Double>(EasyLocation.getZeroLocation(), alpha));
// }
// }
prevRotationPitch = rotationPitch;
prevRotationYaw = rotationYaw;
// if (motionY > gravity && !onGround)
// motionY += gravity;
// if (motionY < -0.75)
// motionY = -0.75;
if (onGround)
rotationPitch = 0;
else
{
rotationPitch += momentumPitch;
rotationYaw += momentumYaw;
}
}
@Override
public void renderParticle(
Tessellator tessellator, float interp, float x, float y, float z,
float tx, float tz
)
{
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
textureManager.bindTexture(ResourceManager.casings_tex);
GL11.glTranslated(
prevPosX + (posX - prevPosX) * interp - interpPosX,
prevPosY + (posY - prevPosY) * interp - interpPosY,
prevPosZ + (posZ - prevPosZ) * interp - interpPosZ);
GL11.glScalef(dScale, dScale, dScale);
GL11.glRotatef(180 - rotationYaw, 0, 1, 0);
GL11.glRotatef(-rotationPitch, 1, 0, 0);
GL11.glScalef(config.getScaleX(), config.getScaleY(), config.getScaleZ());
if (config.doesOverrideColor())
GL11.glColor3b((byte) config.getRedOverride(), (byte) config.getGreenOverride(), (byte) config.getBlueOverride());
if (!smokeNodes.isEmpty())
{
tessellator.startDrawingQuads();
tessellator.setNormal(0F, 1F, 0F);
for (int i = 0; i < smokeNodes.size() - 1; i++)
{
final Pair<EasyLocation, Double> node = smokeNodes.get(i), past = smokeNodes.get(i + 1);
final EasyLocation nodeLoc = node.getKey(), pastLoc = past.getKey();
final float nodeAlpha = node.getValue().floatValue(), pastAlpha = past.getValue().floatValue(), scale = config.getScaleX();
tessellator.setColorRGBA_F(1F, 1F, 1F, nodeAlpha);
tessellator.addVertex(nodeLoc.posX(), nodeLoc.posY(), nodeLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, 0F);
tessellator.addVertex(nodeLoc.posX() + scale, nodeLoc.posY(), nodeLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, 0F);
tessellator.addVertex(pastLoc.posX() + scale, pastLoc.posY(), pastLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, pastAlpha);
tessellator.addVertex(pastLoc.posX(), pastLoc.posY(), pastLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, nodeAlpha);
tessellator.addVertex(nodeLoc.posX(), nodeLoc.posY(), nodeLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, 0F);
tessellator.addVertex(nodeLoc.posX() - scale, nodeLoc.posY(), nodeLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, 0F);
tessellator.addVertex(pastLoc.posX() - scale, pastLoc.posY(), pastLoc.posZ());
tessellator.setColorRGBA_F(1F, 1F, 1F, pastAlpha);
tessellator.addVertex(pastLoc.posX(), pastLoc.posY(), pastLoc.posZ());
}
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
tessellator.draw();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glDisable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
}
ResourceManager.casings.renderPart(config.getCasingType().objName);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
private void tryPlayBounceSound()
{
if (!config.getBounceSound().isEmpty())
worldObj.playSoundAtEntity(this, config.getBounceSound(), 2, 1);
// playSound(config.getBounceSound(), 2, 1);
}
// private static float[] getOffset(float time)
// {
// final float sinVal1 = (float) ((Math.sin(time * 0.15) + Math.sin(time * 0.25 - 10) + Math.sin(time * 0.1 + 10)) / 3f),
// sinVal2 = (float) ((Math.sin(time * 0.1) + Math.sin(time * 0.05 + 20) + Math.sin(time * 0.13 + 20)) / 3f);
//
// return new float[] {BobMathUtil.remap(BobMathUtil.smoothStep(sinVal1, -1, 1), 0, 1, -2, 1.5F), BobMathUtil.remap(sinVal2, -1, 1, -0.03F, 0.05F)};
// }
//
// private static float[] getJitter(float time)
// {
// final float sinVal1 = (float) ((Math.sin(time * 0.8) + Math.sin(time * 0.6 - 10) + Math.sin(time * 0.9 + 10)) / 3f),
// sinVal2 = (float) ((Math.sin(time * 0.3) + Math.sin(time * 0.2 + 20) + Math.sin(time * 0.1 + 20)) / 3f);
//
// return new float[] {BobMathUtil.remap(sinVal1, -1, 1, -3, 3), BobMathUtil.remap(sinVal2, -1, 1, -1F, 1F)};
// }
}

View File

@ -0,0 +1,329 @@
package com.hbm.particle;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import org.lwjgl.util.vector.Matrix4f;
import org.lwjgl.util.vector.Vector3f;
import org.lwjgl.util.vector.Vector4f;
import com.google.common.annotations.Beta;
import com.google.common.collect.ImmutableMap;
import com.hbm.interfaces.ILocationProvider;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
@Beta
public class SpentCasingConfig
{
private static final Map<String, SpentCasingConfig> CONFIG_MAP = new HashMap<String, SpentCasingConfig>();
private static final Random RANDOM = new Random();
public enum CasingType
{
/**The typical handgun ejected type. Most pistol and some cannon rounds will likely use it.**/
BRASS_STRAIGHT_WALL("Brass_Straight_Casing"),
/**The typical rife ejected type. Most rifle round and sometimes cannon rounds use it. Only use if the bottleneck shape is noticeable.**/
BRASS_BOTTLENECK("Brass_Bottleneck_Casing.002"),
/**Shotgun shells.**/
SHOTGUN("Shotgun_Shell_Cylinder.002"),
/**AR2 pulse rifle plugs.**/
AR2("AR2_Cylinder.001");
public final String objName;
private CasingType(String objName)
{
this.objName = objName;
}
}
/**Unique name used for map lookup.**/
private final String registryName;
/**Change position of the ejecting shell.**/
private final ILocationProvider posOffset;
/**Set initial motion after ejecting.**/
private final Vec3 initialMotion;
/**Multipliers for random pitch and yaw.**/
private final float pitchFactor, yawFactor;
/**Rescale the sprite to match the approximate scale of the rounds.**/
private final float scaleX, scaleY, scaleZ;
/**Overrides for the sprite colors.**/
private final int redOverride, greenOverride, blueOverride;
/**Whether or not to override the default sprite color scheme.**/
private final boolean overrideColor;
/**The type of casing.**/
private final CasingType casingType;
/**Amount of casings to spawn per event. Default 1.**/
private final byte casingAmount;
/**If the casing(s) should be spawned after reloading, instead of after firing.**/
private final boolean afterReload;
/**Sound effect for bouncing. Make empty string to have no sound.**/
private final String bounceSound;
/**Delay before casings are actually spawned**/
private final byte delay;
/**Chance for the casing to emit smoke. 0 for 100% chance and -1 for it to never make smoke.**/
private final byte smokeChance;
// TODO Setting to disregard crouch effect and/or another offset specifically for crouching which can be set to null to use the default one
public SpentCasingConfig(
String registryName, ILocationProvider posOffset, Vec3 initialMotion, float pitchFactor, float yawFactor,
float scaleX, float scaleY, float scaleZ, int redOverride, int greenOverride, int blueOverride,
boolean overrideColor, CasingType casingType, byte casingAmount, boolean afterReload, String bounceSound,
byte delay, byte smokeChance
)
{
this.registryName = registryName;
this.posOffset = posOffset;
this.initialMotion = initialMotion;
this.pitchFactor = pitchFactor;
this.yawFactor = yawFactor;
this.scaleX = scaleX;
this.scaleY = scaleY;
this.scaleZ = scaleZ;
this.redOverride = redOverride;
this.greenOverride = greenOverride;
this.blueOverride = blueOverride;
this.overrideColor = overrideColor;
this.casingType = casingType;
this.casingAmount = casingAmount;
this.afterReload = afterReload;
this.bounceSound = bounceSound;
this.delay = delay;
this.smokeChance = smokeChance;
CONFIG_MAP.put(registryName, this);
}
public void spawnCasing(TextureManager textureManager, World world, double x, double y, double z, float pitch, float yaw, boolean crouched)
{
final Vec3 rotatedMotionVec = rotateVector(getInitialMotion(),
pitch + (float) RANDOM.nextGaussian() * getPitchFactor(), yaw + (float) RANDOM.nextGaussian() * getPitchFactor(),
getPitchFactor(), getPitchFactor());
final ParticleSpentCasing casing = new ParticleSpentCasing(textureManager, world, x,
y, z, rotatedMotionVec.xCoord, rotatedMotionVec.yCoord, rotatedMotionVec.zCoord,
// 0, 0,
(float) (getPitchFactor() * RANDOM.nextGaussian()), (float) (getYawFactor() * RANDOM.nextGaussian()),
this);
offsetCasing(casing, getPosOffset(), pitch, yaw, crouched);
casing.rotationPitch = (float) Math.toDegrees(pitch);
casing.rotationYaw = (float) Math.toDegrees(yaw);
if (overrideColor)
casing.setRBGColorF(redOverride / 255f, blueOverride / 255f, greenOverride / 255f);
Minecraft.getMinecraft().effectRenderer.addEffect(casing);
}
// Rotate a position
private static void offsetCasing(ParticleSpentCasing casing, ILocationProvider offset, float pitch, float yaw, boolean crouched)
{
// // x-axis offset, 0 if crouched to center
// final double oX = crouched ? 0 : offset.posX();
// // Trigonometric operations, saved for convenience
// final double sinP = Math.sin(pitch), cosP = Math.cos(pitch), sinY = Math.sin(yaw), cosY = Math.cos(yaw);
// // New offsets
// final double newX = oX * cosY - offset.posZ() * sinY,
// newY = offset.posY() * cosP - sinP * (oX * sinY + offset.posZ() * cosY),
// newZ = offset.posZ() * sinP + cosP * (oX * sinY + offset.posZ() * cosY);
//
// // Apply
// casing.setPosition(casing.posX + newX, casing.posY + newY, casing.posZ + newZ);
// x-axis offset, 0 if crouched to center
final float oX = (float) (crouched ? 0 : offset.posX());
// Create rotation matrices for pitch and yaw
final Matrix4f pitchMatrix = new Matrix4f(), yawMatrix = new Matrix4f();
pitchMatrix.rotate(pitch, new Vector3f(1, 0, 0)); // modify axis of rotation
yawMatrix.rotate(-yaw, new Vector3f(0, 1, 0));
// Multiply matrices to get combined rotation matrix
final Matrix4f rotMatrix = Matrix4f.mul(yawMatrix, pitchMatrix, null);
// Create vector representing the offset and apply rotation
final Vector4f offsetVector = new Vector4f(oX, (float) offset.posY(), (float) offset.posZ(), 1); // set fourth coordinate to 1
Matrix4f.transform(rotMatrix, offsetVector, offsetVector);
final Vector3f result = new Vector3f(); // create result vector
result.set(offsetVector.x, offsetVector.y, offsetVector.z); // set result vector using transformed coordinates
// Apply rotation
casing.setPosition(casing.posX + result.x, casing.posY + result.y, casing.posZ + result.z);
}
// Rotate a vector
private static Vec3 rotateVector(Vec3 vector, float pitch, float yaw, float pitchFactor, float yawFactor)
{
// Apply randomness to vector
vector.xCoord += RANDOM.nextGaussian() * yawFactor;
vector.yCoord += RANDOM.nextGaussian() * pitchFactor;
vector.zCoord += RANDOM.nextGaussian() * yawFactor;
final Matrix4f pitchMatrix = new Matrix4f(), yawMatrix = new Matrix4f();
pitchMatrix.setIdentity();
pitchMatrix.rotate(-pitch, new Vector3f(1, 0, 0));
yawMatrix.setIdentity();
yawMatrix.rotate(-yaw, new Vector3f(0, 1, 0));
final Vector4f vector4f = new Vector4f((float) vector.xCoord, (float) vector.yCoord, (float) vector.zCoord, 1);
Matrix4f.transform(pitchMatrix, vector4f, vector4f);
Matrix4f.transform(yawMatrix, vector4f, vector4f);
return Vec3.createVectorHelper(vector4f.x, vector4f.y, vector4f.z);
}
public ILocationProvider getPosOffset()
{
return posOffset;
}
public Vec3 getInitialMotion()
{
return Vec3.createVectorHelper(initialMotion.xCoord, initialMotion.yCoord, initialMotion.zCoord);
}
public float getScaleX()
{
return scaleX;
}
public float getScaleY()
{
return scaleY;
}
public float getScaleZ()
{
return scaleZ;
}
public float getPitchFactor()
{
return pitchFactor;
}
public float getYawFactor()
{
return yawFactor;
}
public int getRedOverride()
{
return redOverride;
}
public int getGreenOverride()
{
return greenOverride;
}
public int getBlueOverride()
{
return blueOverride;
}
public boolean doesOverrideColor()
{
return overrideColor;
}
public CasingType getCasingType()
{
return casingType;
}
public byte getCasingAmount()
{
return casingAmount;
}
public boolean isAfterReload()
{
return afterReload;
}
public String getRegistryName()
{
return registryName;
}
public String getBounceSound()
{
return bounceSound;
}
public byte getDelay()
{
return delay;
}
public byte getSmokeChance()
{
return smokeChance;
}
/**
* Convert to a new builder for modification.
* @param newName The new registry name.
* @return A new builder with all the settings inherited from this config, except for registry name.
*/
public SpentCasingConfigBuilder toBuilder(String newName)
{
final SpentCasingConfigBuilder builder = new SpentCasingConfigBuilder(newName, casingType, overrideColor);
builder.setAfterReload(afterReload).setBlueOverride(blueOverride).setBounceSound(bounceSound).setCasingAmount(casingAmount)
.setDelay(delay).setGreenOverride(greenOverride).setInitialMotion(getInitialMotion()).setPitchFactor(pitchFactor)
.setPosOffset(getPosOffset()).setRedOverride(redOverride).setScaleX(scaleX).setScaleY(scaleY).setScaleZ(scaleZ)
.setSmokeChance(smokeChance).setYawFactor(yawFactor);
return builder;
}
@Override
public int hashCode()
{
return Objects.hash(afterReload, blueOverride, bounceSound, casingAmount, casingType, delay, greenOverride,
initialMotion.xCoord, initialMotion.yCoord, initialMotion.zCoord, overrideColor, pitchFactor,
posOffset, redOverride, registryName, scaleX, scaleY, scaleZ, smokeChance, yawFactor);
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (!(obj instanceof SpentCasingConfig))
return false;
final SpentCasingConfig other = (SpentCasingConfig) obj;
return afterReload == other.afterReload && blueOverride == other.blueOverride
&& Objects.equals(bounceSound, other.bounceSound) && casingAmount == other.casingAmount
&& casingType == other.casingType && delay == other.delay && greenOverride == other.greenOverride
&& Double.doubleToLongBits(initialMotion.xCoord) == Double.doubleToLongBits(other.initialMotion.xCoord)
&& Double.doubleToLongBits(initialMotion.yCoord) == Double.doubleToLongBits(other.initialMotion.yCoord)
&& Double.doubleToLongBits(initialMotion.zCoord) == Double.doubleToLongBits(other.initialMotion.zCoord)
&& overrideColor == other.overrideColor
&& Float.floatToIntBits(pitchFactor) == Float.floatToIntBits(other.pitchFactor)
&& Objects.equals(posOffset, other.posOffset) && redOverride == other.redOverride
&& Objects.equals(registryName, other.registryName)
&& Float.floatToIntBits(scaleX) == Float.floatToIntBits(other.scaleX)
&& Float.floatToIntBits(scaleY) == Float.floatToIntBits(other.scaleY)
&& Float.floatToIntBits(scaleZ) == Float.floatToIntBits(other.scaleZ)
&& smokeChance == other.smokeChance
&& Float.floatToIntBits(yawFactor) == Float.floatToIntBits(other.yawFactor);
}
@Override
public String toString()
{
final StringBuilder builder = new StringBuilder();
builder.append("SpentCasingConfig [registryName=").append(registryName).append(", posOffset=").append(posOffset)
.append(", initialMotion=").append(initialMotion).append(", pitchFactor=").append(pitchFactor)
.append(", yawFactor=").append(yawFactor).append(", scaleX=").append(scaleX).append(", scaleY=")
.append(scaleY).append(", scaleZ=").append(scaleZ).append(", redOverride=").append(redOverride)
.append(", greenOverride=").append(greenOverride).append(", blueOverride=").append(blueOverride)
.append(", overrideColor=").append(overrideColor).append(", casingType=").append(casingType)
.append(", casingAmount=").append(casingAmount).append(", afterReload=").append(afterReload)
.append(", bounceSound=").append(bounceSound).append(", delay=").append(delay).append(", smokeChance=")
.append(smokeChance).append("]");
return builder.toString();
}
public static boolean containsKey(String key)
{
return CONFIG_MAP.containsKey(key);
}
public static SpentCasingConfig get(String key)
{
return CONFIG_MAP.get(key);
}
public static Map<String, SpentCasingConfig> getConfigMap()
{
return ImmutableMap.copyOf(CONFIG_MAP);
}
}

View File

@ -0,0 +1,423 @@
package com.hbm.particle;
import java.util.Objects;
import com.google.common.annotations.Beta;
import com.hbm.calc.EasyLocation;
import com.hbm.interfaces.ILocationProvider;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasingConfig.CasingType;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
@Beta
public class SpentCasingConfigBuilder implements Cloneable
{
/**Unique name used for map lookup.**/
private String registryName;
/**Change position of the ejecting shell.**/
private ILocationProvider posOffset = EasyLocation.getZeroLocation();
/**Set initial motion after ejecting.**/
private Vec3 initialMotion = Vec3.createVectorHelper(0, 0, 0);
/**Multipliers for random pitch and yaw.**/
private float pitchFactor, yawFactor;
/**Rescale the sprite to match the approximate scale of the rounds.**/
private float scaleX = 1, scaleY = 1, scaleZ = 1;
/**Overrides for the sprite colors.**/
private int redOverride, greenOverride, blueOverride;
/**Whether or not to override the default sprite color scheme.**/
private boolean overrideColor;
/**The type of casing.**/
private CasingType casingType = CasingType.BRASS_STRAIGHT_WALL;
/**Amount of casings to spawn per event. Default 1.**/
private byte casingAmount = 1;
/**If the casing(s) should be spawned after reloading, instead of after firing.**/
private boolean afterReload;
/**Sound effect for bouncing. Make empty string to have no sound.**/
private String bounceSound = "";
/**Delay before casings are actually spawned**/
private byte delay;
/**Chance for the casing to emit smoke. 0 for 100% chance and -1 for it to never make smoke.**/
private byte smokeChance = -1;
// TODO Setting to disregard crouch effect and/or another offset specifically for crouching which can be set to null to use the default one
/**
* Constructor with fields for the required bare minimum parameters.<br>
* All parameters may overridden using setters at any time at your discretion, however.
* @param registryName The unique name for map lookup. Null not permitted, becomes empty string.
* @param casingType Type of casing model to use. Null not permitted, defaults to straight wall type.
* @param overrideColor Whether or not the config will override the model texture's color.
*/
public SpentCasingConfigBuilder(String registryName, CasingType casingType, boolean overrideColor)
{
this.registryName = registryName == null ? "" : registryName;
this.casingType = casingType == null ? CasingType.BRASS_STRAIGHT_WALL : casingType;
this.overrideColor = overrideColor;
}
public ILocationProvider getPosOffset()
{
return posOffset;
}
/**
* Set the relative x, y, z coordinate offset on spawn.
* @param posOffset Any ILocationProvider that serves as the offset. Null becomes a zero location.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setPosOffset(ILocationProvider posOffset)
{
this.posOffset = posOffset == null ? EasyLocation.getZeroLocation() : posOffset;
return this;
}
public Vec3 getInitialMotion()
{
return initialMotion;
}
/**
* Sets the casing's initial relative x, y, z motion on spawn.
* @param initialMotion Vector representing the initial motion. Null becomes a zero vector.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setInitialMotion(Vec3 initialMotion)
{
this.initialMotion = initialMotion == null ? Vec3.createVectorHelper(0, 0, 0) : initialMotion;
return this;
}
public double getScaleX()
{
return scaleX;
}
/**
* Scale of the model on its x-axis.
* @param scaleX The scale/stretch factor of the model on the x-axis.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setScaleX(float scaleX)
{
this.scaleX = scaleX;
return this;
}
public double getScaleY()
{
return scaleY;
}
/**
* Scale of the model on its y-axis.
* @param scaleY The scale/stretch factor of the model on the y-axis.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setScaleY(float scaleY)
{
this.scaleY = scaleY;
return this;
}
public float getScaleZ()
{
return scaleZ;
}
/**
* Scale of the model on its z-axis.
* @param scaleZ The scale/stretch of the model on the z-axis.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setScaleZ(float scaleZ)
{
this.scaleZ = scaleZ;
return this;
}
public float getPitchFactor()
{
return pitchFactor;
}
/**
* Multiplier for random pitch-related motion. Recommended to keep in the thousanths (0.00X), as even with the hundreths (0.0X) the pitch can get crazy at times.
* @param pitchFactor The multiplier.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setPitchFactor(float pitchFactor)
{
this.pitchFactor = pitchFactor;
return this;
}
public float getYawFactor()
{
return yawFactor;
}
/**
* Multiplier for random yaw-related motion. Recommended to keep in the thousanths (0.00X), as even with the hundreths (0.0X) the yaw can get crazy at times.
* @param yawFactor The multiplier.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setYawFactor(float yawFactor)
{
this.yawFactor = yawFactor;
return this;
}
public int getRedOverride()
{
return redOverride;
}
/**
* Red color override. Clamped between 0-255, but I don't know how it actually works on the receiving end, so feel free to change.
* @param redOverride Red color override.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setRedOverride(int redOverride)
{
this.redOverride = MathHelper.clamp_int(redOverride, 0, 255);
return this;
}
public int getGreenOverride()
{
return greenOverride;
}
/**
* Green color override. Clamped between 0-255, but I don't know how it actually works on the receiving end, so feel free to change.
* @param greenOverride Green color override.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setGreenOverride(int greenOverride)
{
this.greenOverride = MathHelper.clamp_int(greenOverride, 0, 255);
return this;
}
public int getBlueOverride()
{
return blueOverride;
}
/**
* Blue color override. Clamped between 0-255, but I don't know how it actually works on the receiving end, so feel free to change.
* @param blueOverride Blue color override.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setBlueOverride(int blueOverride)
{
this.blueOverride = MathHelper.clamp_int(blueOverride, 0, 255);
return this;
}
public boolean doesOverrideColor()
{
return overrideColor;
}
/**
* Sets whether or not the config will override color. If false, the integer overrides will be ignored.
* @param overrideColor True, to use the integer color overrides, false to ignore them.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setOverrideColor(boolean overrideColor)
{
this.overrideColor = overrideColor;
return this;
}
public CasingType getCasingType()
{
return casingType;
}
/**
* Sets the model the casing will use.
* @param casingType One of the 4 casing model types. Null is not permitted, will have no effect.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setCasingType(CasingType casingType)
{
this.casingType = casingType == null ? this.casingType : casingType;
return this;
}
public byte getCasingAmount()
{
return casingAmount;
}
/**
* Sets the amount of casings to spawn. Default is 1.
* @param casingAmount Amount of casings to spawn. Clamped to a positive byte (0 - 127).
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setCasingAmount(int casingAmount)
{
this.casingAmount = (byte) MathHelper.clamp_int(casingAmount, 0, 127);
return this;
}
public boolean isAfterReload()
{
return afterReload;
}
/**
* Sets whether or not the casing will be spawned after reloading is done or after firing.
* @param afterReload If true, casings will be spawned when reloading, false, they will be spawned after firing.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setAfterReload(boolean afterReload)
{
this.afterReload = afterReload;
return this;
}
public String getRegistryName()
{
return registryName;
}
/**
* Resets the unique name for the config used in map lookup.<br>
* As the real class is self-registering, <i>make sure to set this in reused builders.</i>
* @param registryName The registry name to use. Null is not permitted, becomes an empty string.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setRegistryName(String registryName)
{
this.registryName = registryName == null ? "" : registryName;
return this;
}
public String getBounceSound()
{
return bounceSound;
}
/**
* The sound used when bouncing. If empty, no sound will be made.
* @param bounceSound The sound path. Null is not permitted, becomes an empty string.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setBounceSound(String bounceSound)
{
this.bounceSound = bounceSound == null ? "" : bounceSound;
return this;
}
public byte getDelay()
{
return delay;
}
/**
* The delay in ticks before spawning.
* @param delay Tick spawn delay. Must be nonnegative, otherwise 0.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setDelay(int delay)
{
this.delay = (byte) (delay < 0 ? 0 : delay);
return this;
}
public byte getSmokeChance()
{
return smokeChance;
}
/**
* Chance for the casing to emit smoke. 0 for 100% chance and -1 for it to never make smoke.
* @param smokeChance Chance to emit smoke. Clamped to a byte.
* @return Itself for chaining.
*/
public SpentCasingConfigBuilder setSmokeChance(int smokeChance)
{
this.smokeChance = (byte) smokeChance;
return this;
}
/**
* Constructs the true immutable config with all settings loaded from this builder.<br>
* This builder may be reused as all non-immutable and primitive fields are copied before being passed to the constructor.<br>
* The config's constructor is self-registering.
* @return The finished config with its settings specified by this builder.
*/
public SpentCasingConfig build()
{
return new SpentCasingConfig(registryName, new EasyLocation(posOffset),
Vec3.createVectorHelper(initialMotion.xCoord, initialMotion.yCoord, initialMotion.zCoord), pitchFactor,
yawFactor, scaleX, scaleY, scaleZ, redOverride, greenOverride, blueOverride, overrideColor, casingType,
casingAmount, afterReload, bounceSound, delay, smokeChance);
}
@Override
public int hashCode()
{
return Objects.hash(afterReload, blueOverride, bounceSound, casingAmount, casingType, delay, greenOverride,
initialMotion.xCoord, initialMotion.yCoord, initialMotion.zCoord, overrideColor, pitchFactor,
posOffset, redOverride, registryName, scaleX, scaleY, scaleZ, smokeChance, yawFactor);
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
return true;
if (!(obj instanceof SpentCasingConfigBuilder))
return false;
final SpentCasingConfigBuilder other = (SpentCasingConfigBuilder) obj;
return afterReload == other.afterReload && blueOverride == other.blueOverride
&& Objects.equals(bounceSound, other.bounceSound) && casingAmount == other.casingAmount
&& casingType == other.casingType && delay == other.delay && greenOverride == other.greenOverride
&& Double.doubleToLongBits(initialMotion.xCoord) == Double.doubleToLongBits(other.initialMotion.xCoord)
&& Double.doubleToLongBits(initialMotion.yCoord) == Double.doubleToLongBits(other.initialMotion.yCoord)
&& Double.doubleToLongBits(initialMotion.zCoord) == Double.doubleToLongBits(other.initialMotion.zCoord)
&& overrideColor == other.overrideColor
&& Float.floatToIntBits(pitchFactor) == Float.floatToIntBits(other.pitchFactor)
&& Objects.equals(posOffset, other.posOffset) && redOverride == other.redOverride
&& Objects.equals(registryName, other.registryName)
&& Float.floatToIntBits(scaleX) == Float.floatToIntBits(other.scaleX)
&& Float.floatToIntBits(scaleY) == Float.floatToIntBits(other.scaleY)
&& Float.floatToIntBits(scaleZ) == Float.floatToIntBits(other.scaleZ)
&& smokeChance == other.smokeChance
&& Float.floatToIntBits(yawFactor) == Float.floatToIntBits(other.yawFactor);
}
@Override
public String toString()
{
final StringBuilder builder = new StringBuilder();
builder.append("SpentCasingConfigBuilder [registryName=").append(registryName).append(", posOffset=")
.append(posOffset).append(", initialMotion=").append(initialMotion).append(", pitchFactor=")
.append(pitchFactor).append(", yawFactor=").append(yawFactor).append(", scaleX=").append(scaleX)
.append(", scaleY=").append(scaleY).append(", scaleZ=").append(scaleZ).append(", redOverride=")
.append(redOverride).append(", greenOverride=").append(greenOverride).append(", blueOverride=")
.append(blueOverride).append(", overrideColor=").append(overrideColor).append(", casingType=")
.append(casingType).append(", casingAmount=").append(casingAmount).append(", afterReload=")
.append(afterReload).append(", bounceSound=").append(bounceSound).append(", delay=").append(delay)
.append(", smokeChance=").append(smokeChance).append(']');
return builder.toString();
}
@Override
public SpentCasingConfigBuilder clone()
{
try
{
return (SpentCasingConfigBuilder) super.clone();
} catch (CloneNotSupportedException e)
{
MainRegistry.logger.catching(e);
return new SpentCasingConfigBuilder(registryName, casingType, overrideColor);
}
}
}

View File

@ -0,0 +1,56 @@
package com.hbm.render.entity.effect;
import org.lwjgl.opengl.GL11;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasingConfig.CasingType;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;
public class RenderCasingTest implements IItemRenderer
{
@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type)
{
return true;
}
@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
{
return false;
}
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
{
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().getTextureManager().bindTexture(ResourceManager.casings_tex);
// GL11.glTranslated(
// player.prevPosX + (player.posX - player.prevPosX),
// player.prevPosY + (player.posY - player.prevPosY),
// player.prevPosZ + (player.posZ - player.prevPosZ));
// GL11.glRotatef(player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw),
// 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch),
// 0.0F, 0.0F, 1.0F);
GL11.glRotatef(180 - player.rotationYaw, 0, 1, 0);
GL11.glRotatef(-player.rotationPitch, 1, 0, 0);
ResourceManager.casings.renderPart(CasingType.BRASS_BOTTLENECK.objName);
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPopMatrix();
}
}

View File

@ -39,7 +39,7 @@ public class ItemRenderBenelli implements IItemRenderer
static final String frontGrip = "Pump_Cylinder.003";
static final String slide = "Cylinder";
static final String barrelAndTube = "Body_Cube.002";
static final String shell = "Shell_Cylinder.002";
// static final String shell = "Shell_Cylinder.002";
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
{
@ -55,7 +55,7 @@ public class ItemRenderBenelli implements IItemRenderer
final double scale3 = 0.52D;
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
double[] eject = HbmAnimations.getRelevantTransformation("EJECT");
// double[] eject = HbmAnimations.getRelevantTransformation("EJECT");
// double[] reload = HbmAnimations.getRelevantTransformation("RELOAD");
double[] feedNew = HbmAnimations.getRelevantTransformation("PUMP");
switch (type)
@ -82,7 +82,7 @@ public class ItemRenderBenelli implements IItemRenderer
// GL11.glTranslated(reload[2] / 2, 0, 0);
// GL11.glRotated(reload[0], 1, 0, 0);
// GL11.glRotated(reload[1], 0, 0, 1);
ResourceManager.benelli.renderAllExcept(shell, slide);
ResourceManager.benelli.renderAll();
// Pump new round if empty
if (magSize == 0)
GL11.glTranslated(feedNew[0], feedNew[1], feedNew[2]);
@ -90,8 +90,8 @@ public class ItemRenderBenelli implements IItemRenderer
GL11.glPopMatrix();
// Eject spent shell
GL11.glPushMatrix();
GL11.glTranslated(eject[0], eject[1], eject[2]);
ResourceManager.benelli.renderPart(shell);
// GL11.glTranslated(eject[0], eject[1], eject[2]);
// ResourceManager.benelli.renderPart(shell);
GL11.glPopMatrix();
break;
case EQUIPPED:// In hand from other's POV
@ -104,8 +104,8 @@ public class ItemRenderBenelli implements IItemRenderer
GL11.glScaled(scale2 - scale2 * 2, scale2, scale2);
GL11.glPushMatrix();
GL11.glTranslated(eject[0], eject[1], eject[2]);
ResourceManager.benelli.renderPart(shell);
// GL11.glTranslated(eject[0], eject[1], eject[2]);
// ResourceManager.benelli.renderPart(shell);
GL11.glPopMatrix();
break;
case ENTITY:// Dropped entity

View File

@ -49,7 +49,7 @@ public class ItemRenderLunaticSniper implements IItemRenderer
{
GL11.glPushMatrix();
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
double[] eject = HbmAnimations.getRelevantTransformation("EJECT");
// double[] eject = HbmAnimations.getRelevantTransformation("EJECT");
double[] tilt = HbmAnimations.getRelevantTransformation("TILT");
// double[] insert = HbmAnimations.getRelevantTransformation("INSERT_ROUND");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lunatic_sniper_tex);
@ -93,7 +93,7 @@ public class ItemRenderLunaticSniper implements IItemRenderer
// Eject casing
GL11.glPushMatrix();
GL11.glTranslated(0, 2, 0);//FIXME Where on earth is it?!
ResourceManager.lunatic_sniper.renderPart(spentShell);
// ResourceManager.lunatic_sniper.renderPart(spentShell);
GL11.glPopMatrix();
break;
case EQUIPPED:// In hand from other's POV
@ -103,8 +103,8 @@ public class ItemRenderLunaticSniper implements IItemRenderer
GL11.glTranslatef(0F, -0.25F, -0.76F);
GL11.glScalef(scale2 - scale2 * 2, scale2, scale2);
GL11.glPushMatrix();
GL11.glTranslated(eject[0] / 2, 0, -5);
ResourceManager.lunatic_sniper.renderPart(spentShell);
// GL11.glTranslated(eject[0] / 2, 0, -5);
// ResourceManager.lunatic_sniper.renderPart(spentShell);
GL11.glPopMatrix();
break;
case ENTITY:// Dropped item

View File

@ -5,6 +5,7 @@ import java.util.List;
import com.hbm.blocks.BlockDummyable;
import com.hbm.entity.projectile.EntityArtilleryShell;
import com.hbm.handler.guncfg.GunCannonFactory;
import com.hbm.inventory.container.ContainerTurretBase;
import com.hbm.inventory.gui.GUITurretArty;
import com.hbm.items.ModItems;
@ -12,6 +13,7 @@ import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.tileentity.IGUIProvider;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -45,7 +47,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
if(ammoStacks != null)
return ammoStacks;
ammoStacks = new ArrayList();
ammoStacks = new ArrayList<>();
List list = new ArrayList();
ModItems.ammo_arty.getSubItems(ModItems.ammo_arty, MainRegistry.weaponTab, list);
@ -56,7 +58,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
@Override
protected List<Integer> getAmmoList() {
return new ArrayList();
return new ArrayList<>();
}
@Override
@ -86,12 +88,12 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
@Override
public double getDecetorRange() {
return this.mode == this.MODE_CANNON ? 250D : 3000D;
return this.mode == MODE_CANNON ? 250D : 3000D;
}
@Override
public double getDecetorGrace() {
return this.mode == this.MODE_CANNON ? 32D : 250D;
return this.mode == MODE_CANNON ? 32D : 250D;
}
@Override
@ -121,7 +123,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
@Override
public boolean doLOSCheck() {
return this.mode == this.MODE_CANNON;
return this.mode == MODE_CANNON;
}
@Override
@ -198,12 +200,15 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
proj.setTarget((int) tPos.xCoord, (int) tPos.yCoord, (int) tPos.zCoord);
proj.setType(type);
if(this.mode != this.MODE_CANNON)
if(this.mode != MODE_CANNON)
proj.setWhistle(true);
worldObj.spawnEntityInWorld(proj);
spawnCasing();
}
@Override
protected void updateConnections() {
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset).getOpposite();
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
@ -239,7 +244,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
}
}
if(this.mode == this.MODE_MANUAL) {
if(this.mode == MODE_MANUAL) {
if(!this.targetQueue.isEmpty()) {
this.tPos = this.targetQueue.get(0);
}
@ -264,7 +269,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
}
}
if(target != null && this.mode != this.MODE_MANUAL) {
if(target != null && this.mode != MODE_MANUAL) {
if(!this.entityInLOS(this.target)) {
this.target = null;
}
@ -275,7 +280,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
if(target != null) {
this.tPos = this.getEntityPos(target);
} else {
if(this.mode != this.MODE_MANUAL) {
if(this.mode != MODE_MANUAL) {
this.tPos = null;
}
}
@ -307,7 +312,7 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
if(searchTimer <= 0) {
searchTimer = this.getDecetorInterval();
if(this.target == null && this.mode != this.MODE_MANUAL)
if(this.target == null && this.mode != MODE_MANUAL)
this.seekNewTarget();
}
} else {
@ -371,9 +376,10 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
data.setFloat("size", 0F);
data.setByte("count", (byte)5);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord + vec.xCoord, pos.yCoord + vec.yCoord, pos.zCoord + vec.zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 150));
}
if(this.mode == this.MODE_MANUAL && !this.targetQueue.isEmpty()) {
if(this.mode == MODE_MANUAL && !this.targetQueue.isEmpty()) {
this.targetQueue.remove(0);
this.tPos = null;
}
@ -436,4 +442,16 @@ public class TileEntityTurretArty extends TileEntityTurretBaseArtillery implemen
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUITurretArty(player.inventory, this);
}
@Override
public boolean usesCasings()
{
return true;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return GunCannonFactory.CASING_16IN;
}
}

View File

@ -8,7 +8,7 @@ import net.minecraft.util.Vec3;
public abstract class TileEntityTurretBaseArtillery extends TileEntityTurretBaseNT {
protected List<Vec3> targetQueue = new ArrayList();
protected List<Vec3> targetQueue = new ArrayList<>();
public void enqueueTarget(double x, double y, double z) {

View File

@ -17,6 +17,8 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
import com.hbm.items.ModItems;
import com.hbm.items.machine.ItemTurretBiometry;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.tileentity.TileEntityMachineBase;
import api.hbm.energy.IEnergyUser;
@ -90,6 +92,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
//tally marks!
public int stattrak;
// Not saved because client side only
public byte casingDelay;
/**
* X
@ -226,6 +230,14 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
else
this.lastRotationYaw -= Math.PI * 2;
}
if (usesCasings() && getCasingConfig().getDelay() > 0)
{
if (casingDelay > 0)
casingDelay--;
else
spawnCasing();
}
}
}
@ -297,6 +309,8 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
}
public abstract void updateFiringTick();
public abstract boolean usesCasings();
public abstract SpentCasingConfig getCasingConfig();
public BulletConfiguration getFirstConfigLoaded() {
@ -338,6 +352,14 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
proj.setThrowableHeading(vec.xCoord, vec.yCoord, vec.zCoord, bullet.velocity, bullet.spread);
worldObj.spawnEntityInWorld(proj);
if (usesCasings())
{
if (getCasingConfig().getDelay() == 0)
spawnCasing();
else
casingDelay = getCasingConfig().getDelay();
}
}
public void conusmeAmmo(ComparableStack ammo) {
@ -821,4 +843,18 @@ public abstract class TileEntityTurretBaseNT extends TileEntityMachineBase imple
public void closeInventory() {
this.worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:block.closeC", 1.0F, 1.0F);
}
protected void spawnCasing()
{
final NBTTagCompound data = new NBTTagCompound();
data.setString("type", "casing");
data.setDouble("posX", xCoord);
data.setDouble("posY", yCoord + 1);
data.setDouble("posZ", zCoord);
data.setFloat("pitch", (float) rotationPitch);
data.setFloat("yaw", (float) rotationYaw);
data.setBoolean("crouched", false);
data.setString("name", getCasingConfig().getRegistryName());
MainRegistry.proxy.effectNT(data);
}
}

View File

@ -2,6 +2,8 @@ package com.hbm.tileentity.turret;
import java.util.List;
import com.hbm.particle.SpentCasingConfig;
public class TileEntityTurretBrandon extends TileEntityTurretBaseNT {
@Override
@ -28,4 +30,16 @@ public class TileEntityTurretBrandon extends TileEntityTurretBaseNT {
return null;
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -3,10 +3,12 @@ package com.hbm.tileentity.turret;
import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.guncfg.Gun50BMGFactory;
import com.hbm.lib.HbmCollection;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
@ -14,21 +16,22 @@ import net.minecraft.util.Vec3;
public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static List<Integer> configs = new ArrayList<>();
//because cramming it into the ArrayList's constructor with nested curly brackets and all that turned out to be not as pretty
//also having a floaty `static` like this looks fun
//idk if it's just me though
static {
configs.add(BulletConfigSyncingUtil.BMG50_NORMAL);
configs.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
configs.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
configs.add(BulletConfigSyncingUtil.BMG50_AP);
configs.add(BulletConfigSyncingUtil.BMG50_DU);
configs.add(BulletConfigSyncingUtil.BMG50_STAR);
configs.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
configs.add(BulletConfigSyncingUtil.BMG50_SLEEK);
configs.add(BulletConfigSyncingUtil.CHL_BMG50);
// configs.add(BulletConfigSyncingUtil.BMG50_NORMAL);
// configs.add(BulletConfigSyncingUtil.BMG50_INCENDIARY);
// configs.add(BulletConfigSyncingUtil.BMG50_EXPLOSIVE);
// configs.add(BulletConfigSyncingUtil.BMG50_AP);
// configs.add(BulletConfigSyncingUtil.BMG50_DU);
// configs.add(BulletConfigSyncingUtil.BMG50_STAR);
// configs.add(BulletConfigSyncingUtil.BMG50_PHOSPHORUS);
// configs.add(BulletConfigSyncingUtil.BMG50_SLEEK);
// configs.add(BulletConfigSyncingUtil.CHL_BMG50);
configs.addAll(HbmCollection.fiftyBMG);
}
@Override
@ -142,4 +145,16 @@ public class TileEntityTurretChekhov extends TileEntityTurretBaseNT {
manual = true;
}
@Override
public boolean usesCasings()
{
return true;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return Gun50BMGFactory.CONFIG_50BMG;
}
}

View File

@ -4,10 +4,12 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.guncfg.Gun5mmFactory;
import com.hbm.particle.SpentCasingConfig;
public class TileEntityTurretFriendly extends TileEntityTurretChekhov {
static List<Integer> configs = new ArrayList();
static List<Integer> configs = new ArrayList<>();
static {
configs.add(BulletConfigSyncingUtil.R5_NORMAL);
@ -31,4 +33,10 @@ public class TileEntityTurretFriendly extends TileEntityTurretChekhov {
public int getDelay() {
return 5;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return Gun5mmFactory.CASING_5MM_TURRET;
}
}

View File

@ -13,6 +13,7 @@ import com.hbm.inventory.fluid.tank.FluidTank;
import com.hbm.items.ModItems;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import api.hbm.fluid.IFluidStandardReceiver;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -212,4 +213,16 @@ public class TileEntityTurretFritz extends TileEntityTurretBaseNT implements IFl
public FluidTank[] getAllTanks() {
return new FluidTank[] { tank };
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.inventory.gui.GUITurretHIMARS;
import com.hbm.items.ModItems;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.tileentity.IGUIProvider;
import cpw.mods.fml.relauncher.Side;
@ -257,4 +258,16 @@ public class TileEntityTurretHIMARS extends TileEntityTurretBaseArtillery implem
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
return new GUITurretHIMARS(player.inventory, this);
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -6,9 +6,11 @@ import java.util.List;
import com.hbm.config.WeaponConfig;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.guncfg.GunDGKFactory;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.util.EntityDamageUtil;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -17,7 +19,7 @@ import net.minecraft.util.Vec3;
public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static List<Integer> configs = new ArrayList<>();
static {
configs.add(BulletConfigSyncingUtil.DGK_NORMAL);
@ -159,6 +161,8 @@ public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
data.setByte("count", (byte)1);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, pos.xCoord + vec.xCoord + hOff.xCoord, pos.yCoord + vec.yCoord + hOff.yCoord, pos.zCoord + vec.zCoord + hOff.zCoord), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
}
spawnCasing();
}
}
}
@ -174,4 +178,16 @@ public class TileEntityTurretHoward extends TileEntityTurretBaseNT {
super.writeToNBT(nbt);
nbt.setInteger("loaded", loaded);
}
@Override
public boolean usesCasings()
{
return true;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return GunDGKFactory.CASING_DGK;
}
}

View File

@ -4,9 +4,11 @@ import java.util.ArrayList;
import java.util.List;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.guncfg.GunCannonFactory;
import com.hbm.lib.HbmCollection;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
@ -98,4 +100,16 @@ public class TileEntityTurretJeremy extends TileEntityTurretBaseNT {
}
}
}
@Override
public boolean usesCasings()
{
return true;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return GunCannonFactory.CASING_240;
}
}

View File

@ -7,6 +7,7 @@ import com.hbm.items.ModItems;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import com.hbm.potion.HbmPotion;
import com.hbm.util.EntityDamageUtil;
@ -39,7 +40,7 @@ public class TileEntityTurretMaxwell extends TileEntityTurretBaseNT {
if(ammoStacks != null)
return ammoStacks;
ammoStacks = new ArrayList();
ammoStacks = new ArrayList<>();
ammoStacks.add(new ItemStack(ModItems.upgrade_speed_1));
ammoStacks.add(new ItemStack(ModItems.upgrade_speed_2));
@ -232,4 +233,16 @@ public class TileEntityTurretMaxwell extends TileEntityTurretBaseNT {
else
super.networkUnpack(nbt);
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -7,6 +7,7 @@ import com.hbm.entity.projectile.EntityBulletBase;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.items.ItemAmmoEnums.AmmoRocket;
import com.hbm.particle.SpentCasingConfig;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3;
@ -163,4 +164,16 @@ public class TileEntityTurretRichard extends TileEntityTurretBaseNT {
super.writeToNBT(nbt);
nbt.setInteger("loaded", this.loaded);
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -8,6 +8,7 @@ import com.hbm.handler.BulletConfiguration;
import com.hbm.lib.ModDamageSource;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
@ -15,7 +16,7 @@ import net.minecraft.util.Vec3;
public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
static List<Integer> configs = new ArrayList();
static List<Integer> configs = new ArrayList<>();
static {
configs.add(BulletConfigSyncingUtil.SPECIAL_GAUSS);
@ -149,4 +150,16 @@ public class TileEntityTurretTauon extends TileEntityTurretBaseNT {
else
super.networkUnpack(nbt);
}
@Override
public boolean usesCasings()
{
return false;
}
@Override
public SpentCasingConfig getCasingConfig()
{
return null;
}
}

View File

@ -81,6 +81,12 @@ public class BobMathUtil {
return MathHelper.clamp_float((num - min1) / (max1 - min1), 0, 1);
}
public static float smoothStep(float f, float lower, float upper)
{
final float t = MathHelper.clamp_float((f - lower) / (upper - lower), 0, 1);
return t * t * (3f - 2f * t);
}
public static ForgeDirection[] getShuffledDirs() {
ForgeDirection[] dirs = new ForgeDirection[6];
@ -94,7 +100,7 @@ public class BobMathUtil {
return dirs;
}
public static String toPercentage(float amount, float total) {
public static String toPercentage(double amount, double total) {
return NumberFormat.getPercentInstance().format(amount / total);
}

View File

@ -1,8 +1,10 @@
package com.hbm.util;
import com.hbm.interfaces.ILocationProvider;
import com.hbm.main.MainRegistry;
import com.hbm.packet.AuxParticlePacketNT;
import com.hbm.packet.PacketDispatcher;
import com.hbm.particle.SpentCasingConfig;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.nbt.NBTTagCompound;
@ -27,4 +29,27 @@ public class ParticleUtil {
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 150));
}
}
/**
* Spawn a spent shell casing.
* @param location Location to spawn from.
* @param config The shell casing configuration to use.
* @param pitch Pitch rotation in radians.
* @param yaw Yaw rotation in radians.
* @param heightAdjustment Height adjustment.
* @param sneaking Assume from a sneaking/crouched entity.
*/
public static void spawnCasing(ILocationProvider location, SpentCasingConfig config, float pitch, float yaw, float heightAdjustment, boolean sneaking)
{
final NBTTagCompound data = new NBTTagCompound();
data.setString("type", "casing");
data.setDouble("posX", location.posX());
data.setDouble("posY", location.posY() + heightAdjustment);
data.setDouble("posZ", location.posZ());
data.setFloat("pitch", pitch);
data.setFloat("yaw", yaw);
data.setBoolean("crouched", sneaking);
data.setString("name", config.getRegistryName());
MainRegistry.proxy.effectNT(data);
}
}

View File

@ -0,0 +1,13 @@
# Blender MTL File: 'casings.blend'
# Material Count: 1
newmtl None
Ns 500.000001
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd /home/justin/eclipse-workspace/Hbm-s-Nuclear-Tech-GIT/src/main/resources/assets/hbm/textures/particle/casing_tex.png

View File

@ -0,0 +1,965 @@
# Blender v3.0.1 OBJ File: 'casings.blend'
# www.blender.org
mtllib casings.mtl
o AR2_Cylinder.001
v 0.000000 0.360000 -1.200000
v 0.000000 0.360000 -0.400000
v 0.254558 0.254558 -1.200000
v 0.254558 0.254558 -0.400000
v 0.360000 0.000000 -1.200000
v 0.360000 -0.000000 -0.400000
v 0.254558 -0.254558 -1.200000
v 0.254558 -0.254558 -0.400000
v -0.000000 -0.360000 -1.200000
v -0.000000 -0.360000 -0.400000
v -0.254558 -0.254558 -1.200000
v -0.254558 -0.254559 -0.400000
v -0.360000 0.000000 -1.200000
v -0.360000 -0.000000 -0.400000
v -0.254559 0.254558 -1.200000
v -0.254559 0.254558 -0.400000
v 0.000000 0.600000 -0.400000
v 0.000000 0.600000 0.000000
v 0.424264 0.424264 -0.400000
v 0.424264 0.424264 0.000000
v 0.600000 -0.000000 -0.400000
v 0.600000 -0.000000 0.000000
v 0.424264 -0.424264 -0.400000
v 0.424264 -0.424264 0.000000
v -0.000000 -0.600000 -0.400000
v -0.000000 -0.600000 0.000000
v -0.424264 -0.424264 -0.400000
v -0.424264 -0.424264 0.000000
v -0.600000 0.000000 -0.400000
v -0.600000 0.000000 0.000000
v -0.424264 0.424264 -0.400000
v -0.424264 0.424264 0.000000
vt 0.162500 0.566875
vt 0.146875 0.504375
vt 0.162500 0.504375
vt 0.146875 0.566875
vt 0.131250 0.504375
vt 0.131250 0.566875
vt 0.115625 0.504375
vt 0.115625 0.566875
vt 0.100000 0.504375
vt 0.100000 0.566875
vt 0.084375 0.504375
vt 0.084375 0.566875
vt 0.068750 0.504375
vt 0.101250 0.599125
vt 0.002250 0.500125
vt 0.101250 0.401125
vt 0.068750 0.566875
vt 0.053125 0.504375
vt 0.053125 0.566875
vt 0.037500 0.504375
vt 0.171253 0.570129
vt 0.171253 0.430121
vt 0.031246 0.430122
vt 0.162500 0.566875
vt 0.146875 0.504375
vt 0.162500 0.504375
vt 0.146875 0.566875
vt 0.131250 0.504375
vt 0.131250 0.566875
vt 0.115625 0.504375
vt 0.115625 0.566875
vt 0.100000 0.504375
vt 0.100000 0.566875
vt 0.084375 0.504375
vt 0.084375 0.566875
vt 0.068750 0.504375
vt 0.171253 0.430121
vt 0.200250 0.500125
vt 0.002250 0.500125
vt 0.068750 0.566875
vt 0.053125 0.504375
vt 0.053125 0.566875
vt 0.037500 0.504375
vt 0.171253 0.430121
vt 0.031246 0.430122
vt 0.031246 0.570129
vt 0.200250 0.500125
vt 0.171253 0.570129
vt 0.031246 0.570129
vt 0.031246 0.430122
vt 0.171253 0.430121
vt 0.037500 0.566875
vt 0.031246 0.570129
vt 0.101250 0.599125
vt 0.200250 0.500125
vt 0.101250 0.401125
vt 0.002250 0.500125
vt 0.171253 0.570129
vt 0.101250 0.599125
vt 0.031246 0.570129
vt 0.031246 0.430122
vt 0.101250 0.401125
vt 0.037500 0.566875
vt 0.101250 0.599125
vt 0.171253 0.570129
vt 0.200250 0.500125
vt 0.101250 0.401125
vt 0.002250 0.500125
vn 0.3827 0.9239 0.0000
vn 0.9239 0.3827 0.0000
vn 0.9239 -0.3827 -0.0000
vn 0.3827 -0.9239 -0.0000
vn -0.3827 -0.9239 0.0000
vn -0.9239 -0.3827 -0.0000
vn 0.0000 -0.0000 1.0000
vn -0.9239 0.3827 0.0000
vn -0.3827 0.9239 0.0000
vn -0.0000 0.0000 -1.0000
usemtl None
s off
f 2/1/1 3/2/1 1/3/1
f 4/4/2 5/5/2 3/2/2
f 6/6/3 7/7/3 5/5/3
f 8/8/4 9/9/4 7/7/4
f 10/10/5 11/11/5 9/9/5
f 12/12/6 13/13/6 11/11/6
f 2/14/7 14/15/7 10/16/7
f 14/17/8 15/18/8 13/13/8
f 16/19/9 1/20/9 15/18/9
f 3/21/10 7/22/10 11/23/10
f 18/24/1 19/25/1 17/26/1
f 20/27/2 21/28/2 19/25/2
f 22/29/3 23/30/3 21/28/3
f 24/31/4 25/32/4 23/30/4
f 26/33/5 27/34/5 25/32/5
f 28/35/6 29/36/6 27/34/6
f 24/37/7 22/38/7 30/39/7
f 30/40/8 31/41/8 29/36/8
f 32/42/9 17/43/9 31/41/9
f 23/44/10 27/45/10 31/46/10
f 2/1/1 4/4/1 3/2/1
f 4/4/2 6/6/2 5/5/2
f 6/6/3 8/8/3 7/7/3
f 8/8/4 10/10/4 9/9/4
f 10/10/5 12/12/5 11/11/5
f 12/12/6 14/17/6 13/13/6
f 6/47/7 4/48/7 2/14/7
f 2/14/7 16/49/7 14/15/7
f 14/15/7 12/50/7 10/16/7
f 10/16/7 8/51/7 6/47/7
f 6/47/7 2/14/7 10/16/7
f 14/17/8 16/19/8 15/18/8
f 16/19/9 2/52/9 1/20/9
f 15/53/10 1/54/10 3/21/10
f 3/21/10 5/55/10 7/22/10
f 7/22/10 9/56/10 11/23/10
f 11/23/10 13/57/10 15/53/10
f 15/53/10 3/21/10 11/23/10
f 18/24/1 20/27/1 19/25/1
f 20/27/2 22/29/2 21/28/2
f 22/29/3 24/31/3 23/30/3
f 24/31/4 26/33/4 25/32/4
f 26/33/5 28/35/5 27/34/5
f 28/35/6 30/40/6 29/36/6
f 22/38/7 20/58/7 18/59/7
f 18/59/7 32/60/7 22/38/7
f 32/60/7 30/39/7 22/38/7
f 30/39/7 28/61/7 26/62/7
f 26/62/7 24/37/7 30/39/7
f 30/40/8 32/42/8 31/41/8
f 32/42/9 18/63/9 17/43/9
f 31/46/10 17/64/10 19/65/10
f 19/65/10 21/66/10 23/44/10
f 23/44/10 25/67/10 27/45/10
f 27/45/10 29/68/10 31/46/10
f 31/46/10 19/65/10 23/44/10
o Shotgun_Shell_Cylinder.002
v -0.317579 0.317579 1.112764
v 0.000000 0.449124 -1.223040
v -0.317579 0.317579 -1.223040
v 0.449124 -0.000000 1.112764
v 0.317579 -0.317578 -1.223040
v 0.449124 -0.000000 -1.223040
v 0.317579 -0.317578 1.112764
v 0.000000 -0.449123 -1.223040
v 0.000000 -0.449124 1.112764
v -0.317579 -0.317578 -1.223040
v -0.317579 -0.317578 1.112764
v -0.449124 -0.000000 -1.223040
v -0.449124 -0.000000 1.112764
v 0.000000 0.449124 1.112764
v 0.317579 0.317579 -1.223040
v 0.317579 0.317579 1.112764
v 0.353356 0.353357 1.148335
v 0.499721 -0.000000 1.148335
v 0.353356 -0.353356 1.148335
v 0.000000 -0.499721 1.148335
v -0.353356 -0.353356 1.148335
v -0.499721 -0.000000 1.148335
v -0.353356 0.353357 1.148335
v 0.000000 0.499721 1.148335
vt 0.468081 0.764346
vt 0.489255 0.933910
vt 0.468081 0.933910
vt 0.395789 0.764346
vt 0.416963 0.933910
vt 0.395789 0.933910
vt 0.293553 0.764346
vt 0.323497 0.933910
vt 0.293553 0.933910
vt 0.323497 0.764346
vt 0.344671 0.933910
vt 0.416963 0.764346
vt 0.438137 0.933910
vt 0.416963 0.933910
vt 0.438137 0.764346
vt 0.344671 0.764346
vt 0.365845 0.933910
vt 0.344671 0.933910
vt 0.365845 0.764346
vt 0.175844 0.775274
vt 0.144213 0.779346
vt 0.145900 0.775274
vt 0.120654 0.755786
vt 0.124726 0.754100
vt 0.124726 0.724156
vt 0.120654 0.722469
vt 0.145900 0.702982
vt 0.144213 0.698910
vt 0.177531 0.698910
vt 0.175844 0.702982
vt 0.201090 0.722469
vt 0.197018 0.724155
vt 0.197018 0.754100
vt 0.201090 0.755787
vt 0.177531 0.779346
vt 0.489255 0.764346
vt 0.416963 0.764346
vt 0.344671 0.764346
vt 0.960365 0.912783
vt 0.858129 0.955131
vt 0.815781 0.852895
vt 0.067942 0.886801
vt 0.086790 0.867953
vt 0.113444 0.867953
vt 0.918017 0.810547
vt 0.960365 0.852895
vt 0.918017 0.955131
vt 0.815781 0.912784
vt 0.858128 0.810547
vt 0.132291 0.886801
vt 0.132291 0.913455
vt 0.113444 0.932302
vt 0.086790 0.932302
vt 0.067942 0.913455
vn -0.3827 0.9239 0.0000
vn 0.9239 -0.3827 -0.0000
vn 0.3827 -0.9239 -0.0000
vn -0.3827 -0.9239 -0.0000
vn -0.9239 -0.3827 -0.0000
vn -0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn 0.9239 0.3827 0.0000
vn 0.2317 0.5595 -0.7958
vn 0.5595 0.2317 -0.7958
vn 0.5595 -0.2317 -0.7958
vn 0.2317 -0.5595 -0.7958
vn -0.2317 -0.5595 -0.7958
vn -0.5595 -0.2317 -0.7958
vn -0.5595 0.2317 -0.7958
vn -0.2317 0.5595 -0.7958
vn -0.0000 0.0000 -1.0000
vn 0.0000 0.0000 1.0000
usemtl None
s 1
f 33/69/11 34/70/11 35/71/11
f 36/72/12 37/73/12 38/74/12
f 39/75/13 40/76/13 37/77/13
f 41/78/14 42/79/14 40/76/14
f 43/80/15 44/81/15 42/82/15
f 45/83/16 35/71/16 44/81/16
f 46/84/17 47/85/17 34/86/17
f 48/87/18 38/74/18 47/85/18
f 46/88/19 49/89/19 48/90/19
f 48/90/20 50/91/20 36/92/20
f 39/93/21 50/91/21 51/94/21
f 41/95/22 51/94/22 52/96/22
f 41/95/23 53/97/23 43/98/23
f 43/98/24 54/99/24 45/100/24
f 33/101/25 54/99/25 55/102/25
f 46/88/26 55/102/26 56/103/26
f 33/69/11 46/104/11 34/70/11
f 36/72/12 39/105/12 37/73/12
f 39/75/13 41/78/13 40/76/13
f 41/78/14 43/106/14 42/79/14
f 43/80/15 45/83/15 44/81/15
f 45/83/16 33/69/16 35/71/16
f 46/84/17 48/87/17 47/85/17
f 48/87/18 36/72/18 38/74/18
f 34/107/27 38/108/27 40/109/27
f 46/88/19 56/103/19 49/89/19
f 48/90/20 49/89/20 50/91/20
f 39/93/21 36/92/21 50/91/21
f 41/95/22 39/93/22 51/94/22
f 41/95/23 52/96/23 53/97/23
f 43/98/24 53/97/24 54/99/24
f 33/101/25 45/100/25 54/99/25
f 46/88/26 33/101/26 55/102/26
f 53/110/28 52/111/28 51/112/28
f 44/113/27 35/114/27 34/107/27
f 34/107/27 47/115/27 38/108/27
f 38/108/27 37/116/27 40/109/27
f 40/109/27 42/117/27 44/113/27
f 44/113/27 34/107/27 40/109/27
f 51/112/28 50/118/28 49/119/28
f 49/119/28 56/120/28 51/112/28
f 56/120/28 55/121/28 51/112/28
f 55/121/28 54/122/28 51/112/28
f 54/122/28 53/110/28 51/112/28
o Brass_Straight_Casing
v 0.300002 -0.000003 0.685047
v 0.185616 0.185613 0.685047
v -0.000000 -0.262503 0.735047
v 0.300002 -0.000001 0.785047
v -0.212132 -0.212133 0.685047
v -0.185614 -0.185617 0.685047
v -0.212132 0.212131 0.685047
v -0.000000 0.262499 0.685047
v -0.000000 0.299999 0.685047
v 0.212132 0.212131 0.685047
v 0.212132 -0.212133 0.685047
v 0.185616 -0.185617 0.685047
v 0.300002 -0.000003 0.735047
v -0.000000 0.299999 0.735047
v -0.212132 0.212131 0.735047
v -0.185614 0.185613 0.735047
v -0.185614 -0.185617 0.735047
v 0.185616 -0.185617 0.735047
v 0.185616 0.185613 0.735047
v 0.212132 -0.212133 0.785047
v -0.300000 -0.000001 0.785047
v -0.212132 0.212131 0.785047
v -0.212132 -0.212133 0.785047
v -0.212132 -0.212133 -0.814953
v 0.300002 -0.000003 -0.814953
v 0.212132 0.212131 -0.814953
v -0.000000 0.299999 -0.814953
v 0.212132 -0.212133 -0.814953
v -0.000000 -0.300001 -0.814953
v -0.000000 -0.300001 0.685047
v -0.300000 -0.000003 -0.814953
v -0.300000 -0.000003 0.685047
v -0.212132 0.212131 -0.814953
v -0.212132 -0.212133 0.735047
v -0.000000 -0.300001 0.785047
v 0.212132 -0.212133 0.735047
v 0.212132 0.212131 0.785047
v 0.212132 0.212131 0.735047
v -0.000000 0.299999 0.785047
v -0.300000 -0.000003 0.735047
v -0.000000 -0.300001 0.735047
v -0.000000 -0.262503 0.685047
v 0.262502 -0.000003 0.735047
v 0.262502 -0.000003 0.685047
v -0.000000 0.262499 0.735047
v -0.185614 0.185613 0.685047
v -0.262500 -0.000003 0.735047
v -0.262500 -0.000003 0.685047
vt 0.555701 0.706657
vt 0.559782 0.681299
vt 0.559782 0.704967
vt 0.374299 0.628133
vt 0.353483 0.613088
vt 0.355173 0.609007
vt 0.621002 0.706657
vt 0.600185 0.721702
vt 0.616920 0.704966
vt 0.601875 0.660482
vt 0.576517 0.664564
vt 0.574827 0.660482
vt 0.555701 0.679609
vt 0.574827 0.725783
vt 0.576518 0.721702
vt 0.616920 0.681299
vt 0.621002 0.679609
vt 0.601876 0.725783
vt 0.600185 0.664564
vt 0.328125 0.609007
vt 0.313080 0.629823
vt 0.308998 0.628133
vt 0.308998 0.655181
vt 0.329815 0.670226
vt 0.328124 0.674308
vt 0.355173 0.674308
vt 0.353482 0.670226
vt 0.370218 0.653491
vt 0.370218 0.629824
vt 0.329815 0.613088
vt 0.313080 0.653491
vt 0.374299 0.655181
vt 0.555701 0.614308
vt 0.378998 0.641356
vt 0.378998 0.614308
vt 0.378998 0.725783
vt 0.555701 0.752832
vt 0.378998 0.752832
vt 0.555701 0.725783
vt 0.378998 0.706657
vt 0.555701 0.706657
vt 0.555701 0.660482
vt 0.378998 0.660482
vt 0.378998 0.679609
vt 0.555701 0.660482
vt 0.555701 0.679609
vt 0.555701 0.706657
vt 0.378998 0.706657
vt 0.555701 0.799007
vt 0.378998 0.771958
vt 0.555701 0.771958
vt 0.834098 0.918854
vt 0.872350 0.826504
vt 0.964699 0.864757
vt 0.555701 0.641356
vt 0.378998 0.660482
vt 0.378998 0.799007
vt 0.964699 0.918854
vt 0.926447 0.957106
vt 0.872350 0.957106
vt 0.834098 0.864757
vt 0.926448 0.826504
vt 0.078463 0.847672
vt 0.152342 0.878274
vt 0.121740 0.952153
vt 0.578726 0.628418
vt 0.559600 0.622528
vt 0.578726 0.622528
vt 0.559600 0.622528
vt 0.578726 0.616637
vt 0.578726 0.622528
vt 0.605775 0.628418
vt 0.586649 0.634308
vt 0.586649 0.628418
vt 0.605775 0.616637
vt 0.578726 0.610747
vt 0.605775 0.610747
vt 0.605775 0.628418
vt 0.605775 0.622528
vt 0.605775 0.616637
vt 0.605775 0.622528
vt 0.559600 0.634308
vt 0.559600 0.628418
vt 0.578726 0.616637
vt 0.559600 0.610747
vt 0.572436 0.725783
vt 0.596104 0.731673
vt 0.572436 0.731673
vt 0.600003 0.604857
vt 0.616739 0.610747
vt 0.600003 0.610747
vt 0.555701 0.725783
vt 0.555701 0.731673
vt 0.583268 0.610747
vt 0.559600 0.604857
vt 0.583268 0.604857
vt 0.600003 0.610747
vt 0.600003 0.604857
vt 0.622437 0.634308
vt 0.646104 0.640198
vt 0.622437 0.640198
vt 0.605701 0.634308
vt 0.605701 0.640198
vt 0.616739 0.604857
vt 0.640406 0.610747
vt 0.559600 0.628418
vt 0.559600 0.616637
vt 0.605775 0.634308
vt 0.559600 0.616637
vt 0.596104 0.725783
vt 0.559600 0.610747
vt 0.646104 0.634308
vt 0.640406 0.604857
vt 0.078463 0.952153
vt 0.047861 0.921551
vt 0.047861 0.878274
vt 0.121740 0.847672
vt 0.152342 0.921551
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn -0.9239 -0.3827 -0.0000
vn -0.3827 0.9239 0.0000
vn -0.9239 0.3827 0.0000
vn -0.3827 -0.9239 -0.0000
vn 0.9239 -0.3827 -0.0000
vn 0.3827 -0.9239 -0.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 0.9239 0.0000
vn 0.5490 -0.5490 0.6303
vn 0.5490 0.5490 0.6303
vn -0.5490 0.5490 0.6303
vn -0.7071 -0.7071 0.0000
vn -0.0000 -0.7764 0.6303
vn -0.5490 -0.5490 0.6303
vn 1.0000 -0.0000 -0.0000
vn 0.7071 -0.7071 0.0000
vn 0.0000 1.0000 0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 0.7764 0.6303
vn -1.0000 -0.0000 -0.0000
vn -0.7764 0.0000 0.6303
vn 0.0000 -1.0000 0.0000
vn 0.7764 0.0000 0.6303
vn -0.7071 0.7071 -0.0000
usemtl None
s off
f 57/123/29 58/124/29 100/125/29
f 90/126/30 59/127/30 97/128/30
f 61/129/29 98/130/29 62/131/29
f 63/132/29 64/133/29 65/134/29
f 66/135/29 64/133/29 58/124/29
f 67/136/29 100/125/29 68/137/29
f 61/129/29 104/138/29 88/139/29
f 67/136/29 98/130/29 86/140/29
f 88/139/29 102/141/29 63/132/29
f 92/142/30 99/143/30 69/144/30
f 94/145/30 101/146/30 70/147/30
f 71/148/30 101/146/30 72/149/30
f 90/126/30 103/150/30 73/151/30
f 92/142/30 59/127/30 74/152/30
f 69/144/30 75/153/30 94/145/30
f 96/154/30 72/149/30 103/150/30
f 57/123/29 66/135/29 58/124/29
f 90/126/30 73/151/30 59/127/30
f 61/129/29 86/140/29 98/130/29
f 63/132/29 102/141/29 64/133/29
f 66/135/29 65/134/29 64/133/29
f 67/136/29 57/123/29 100/125/29
f 61/129/29 62/131/29 104/138/29
f 67/136/29 68/137/29 98/130/29
f 88/139/29 104/138/29 102/141/29
f 92/142/30 74/152/30 99/143/30
f 94/145/30 75/153/30 101/146/30
f 71/148/30 70/147/30 101/146/30
f 90/126/30 96/154/30 103/150/30
f 92/142/30 97/128/30 59/127/30
f 69/144/30 99/143/30 75/153/30
f 96/154/30 71/148/30 72/149/30
f 87/155/31 61/156/31 88/157/31
f 89/158/32 65/159/32 83/160/32
f 63/161/33 87/162/33 88/163/33
f 61/156/34 85/164/34 86/165/34
f 84/166/35 57/167/35 67/168/35
f 84/166/36 86/169/36 85/170/36
f 57/171/37 82/172/37 66/173/37
f 83/160/38 66/173/38 82/172/38
f 89/174/30 82/175/30 84/176/30
f 87/155/31 80/177/31 61/156/31
f 89/158/32 63/161/32 65/159/32
f 63/161/33 89/158/33 87/162/33
f 61/156/34 80/177/34 85/164/34
f 84/166/35 81/178/35 57/167/35
f 84/166/36 67/168/36 86/169/36
f 57/171/37 81/179/37 82/172/37
f 83/160/38 65/159/38 66/173/38
f 84/176/30 85/180/30 80/181/30
f 80/181/30 87/182/30 89/174/30
f 89/174/30 83/183/30 82/175/30
f 82/175/30 81/184/30 84/176/30
f 84/176/30 80/181/30 89/174/30
s 1
f 76/185/39 93/186/40 78/187/41
f 90/188/42 91/189/43 79/190/44
f 69/191/45 76/192/39 92/193/46
f 70/194/47 93/195/40 94/196/48
f 70/197/47 78/198/41 95/199/49
f 96/200/50 79/190/44 77/201/51
f 92/193/46 91/202/43 97/203/52
f 94/196/48 60/204/53 69/205/45
f 71/206/54 77/207/51 78/198/41
f 74/208/46 98/209/52 68/210/46
f 59/211/52 62/212/42 98/213/52
f 99/214/45 68/210/46 100/215/45
f 75/216/48 100/217/45 58/218/48
f 101/219/47 58/218/48 64/220/47
f 72/221/54 64/222/47 102/223/54
f 103/224/50 102/223/54 104/225/50
f 73/226/42 104/227/50 62/212/42
f 90/188/42 97/228/52 91/189/43
f 69/191/45 60/229/53 76/192/39
f 70/194/47 95/230/49 93/195/40
f 70/197/47 71/206/54 78/198/41
f 96/200/50 90/188/42 79/190/44
f 92/193/46 76/192/39 91/202/43
f 94/196/48 93/195/40 60/204/53
f 71/206/54 96/231/50 77/207/51
f 74/208/46 59/232/52 98/209/52
f 59/211/52 73/226/42 62/212/42
f 99/214/45 74/208/46 68/210/46
f 75/216/48 99/233/45 100/217/45
f 101/219/47 75/216/48 58/218/48
f 72/221/54 101/234/47 64/222/47
f 103/224/50 72/221/54 102/223/54
f 73/226/42 103/235/50 104/227/50
f 78/187/41 77/236/51 79/237/44
f 79/237/44 91/238/43 76/185/39
f 76/185/39 60/239/53 93/186/40
f 93/186/40 95/240/49 78/187/41
f 78/187/41 79/237/44 76/185/39
o Brass_Bottleneck_Casing.002
v 0.300002 -0.000003 0.685047
v 0.185616 0.185613 0.685047
v -0.000000 -0.262503 0.735047
v 0.300002 -0.000001 0.785047
v -0.212132 -0.212133 0.685047
v -0.185614 -0.185617 0.685047
v -0.212132 0.212131 0.685047
v -0.000000 0.262499 0.685047
v -0.000000 0.299999 0.685047
v 0.212132 0.212131 0.685047
v 0.212132 -0.212133 0.685047
v 0.185616 -0.185617 0.685047
v 0.300002 -0.000003 0.735047
v -0.000000 0.299999 0.735047
v -0.212132 0.212131 0.735047
v -0.185614 0.185613 0.735047
v -0.185614 -0.185617 0.735047
v 0.185616 -0.185617 0.735047
v 0.185616 0.185613 0.735047
v 0.212132 -0.212133 0.785047
v -0.300000 -0.000001 0.785047
v -0.212132 0.212131 0.785047
v -0.212132 -0.212133 0.785047
v -0.000000 -0.300001 0.685047
v -0.300000 -0.000003 0.685047
v -0.212132 -0.212133 0.735047
v -0.000000 -0.300001 0.785047
v 0.212132 -0.212133 0.735047
v 0.212132 0.212131 0.785047
v 0.212132 0.212131 0.735047
v -0.000000 0.299999 0.785047
v -0.300000 -0.000003 0.735047
v -0.000000 -0.300001 0.735047
v -0.000000 -0.262503 0.685047
v 0.262502 -0.000003 0.735047
v 0.262502 -0.000003 0.685047
v -0.000000 0.262499 0.735047
v -0.185614 0.185613 0.685047
v -0.262500 -0.000003 0.735047
v -0.262500 -0.000003 0.685047
v -0.135596 -0.135597 -0.764953
v -0.212132 -0.212133 -0.414953
v 0.191762 -0.000003 -0.764953
v 0.300002 -0.000003 -0.414953
v 0.212132 0.212131 -0.414953
v 0.135595 0.135594 -0.764953
v -0.000000 0.299999 -0.414953
v -0.000000 0.191760 -0.764953
v 0.135596 -0.135596 -0.764953
v 0.212132 -0.212133 -0.414953
v -0.000000 -0.191762 -0.764953
v -0.000000 -0.300001 -0.414953
v -0.191761 -0.000003 -0.764953
v -0.300000 -0.000003 -0.414953
v -0.212132 0.212131 -0.414953
v -0.135595 0.135594 -0.764953
v -0.000000 -0.191762 -1.014953
v 0.135596 -0.135596 -1.014953
v -0.135595 0.135594 -1.014953
v -0.191761 -0.000003 -1.014953
v -0.000000 0.191760 -1.014953
v 0.135595 0.135594 -1.014953
v -0.135596 -0.135597 -1.014953
v 0.191762 -0.000003 -1.014953
vt 0.630972 0.689316
vt 0.635004 0.664263
vt 0.635004 0.687646
vt 0.760004 0.662592
vt 0.739438 0.647728
vt 0.741108 0.643696
vt 0.695488 0.689316
vt 0.674922 0.704180
vt 0.691456 0.687645
vt 0.676592 0.643696
vt 0.651539 0.647728
vt 0.649868 0.643696
vt 0.630972 0.662592
vt 0.649869 0.708212
vt 0.651539 0.704180
vt 0.691456 0.664263
vt 0.695488 0.662592
vt 0.676592 0.708212
vt 0.674922 0.647728
vt 0.714385 0.643696
vt 0.699521 0.664262
vt 0.695488 0.662592
vt 0.695488 0.689316
vt 0.716055 0.704180
vt 0.714385 0.708212
vt 0.741108 0.708212
vt 0.739438 0.704180
vt 0.755972 0.687645
vt 0.755972 0.664262
vt 0.716055 0.647728
vt 0.699521 0.687645
vt 0.760005 0.689316
vt 0.565094 0.763968
vt 0.437169 0.737244
vt 0.565094 0.737244
vt 0.395530 0.665471
vt 0.366932 0.677549
vt 0.366456 0.665471
vt 0.436423 0.653832
vt 0.565094 0.672728
vt 0.437169 0.672728
vt 0.436423 0.718348
vt 0.565094 0.699452
vt 0.564349 0.718348
vt 0.436423 0.718348
vt 0.565094 0.627109
vt 0.436423 0.608212
vt 0.564349 0.608212
vt 0.436423 0.782864
vt 0.564348 0.782864
vt 0.437168 0.627109
vt 0.565094 0.653832
vt 0.437168 0.653832
vt 0.396006 0.677549
vt 0.396006 0.631929
vt 0.395530 0.619851
vt 0.396006 0.649011
vt 0.395530 0.729986
vt 0.396006 0.742065
vt 0.437169 0.699452
vt 0.396006 0.694631
vt 0.396006 0.759147
vt 0.437169 0.763968
vt 0.818608 0.930835
vt 0.866923 0.814195
vt 0.983563 0.862509
vt 0.366456 0.729986
vt 0.395530 0.706709
vt 0.366932 0.694631
vt 0.395530 0.771225
vt 0.366932 0.759147
vt 0.366932 0.742065
vt 0.366932 0.631929
vt 0.366456 0.619851
vt 0.564349 0.653832
vt 0.564349 0.718348
vt 0.983563 0.930836
vt 0.935248 0.979150
vt 0.866923 0.979150
vt 0.818608 0.862509
vt 0.935250 0.814194
vt 0.366456 0.706709
vt 0.366456 0.771225
vt 0.366932 0.649011
vt 0.078761 0.848420
vt 0.151753 0.878654
vt 0.121519 0.951645
vt 0.714385 0.637881
vt 0.741108 0.643696
vt 0.714385 0.643696
vt 0.585352 0.637881
vt 0.566456 0.642951
vt 0.566456 0.637136
vt 0.630972 0.637136
vt 0.612076 0.643696
vt 0.612076 0.637881
vt 0.760099 0.660723
vt 0.786724 0.666973
vt 0.760004 0.666537
vt 0.695488 0.637136
vt 0.695488 0.642951
vt 0.760004 0.637136
vt 0.741108 0.637881
vt 0.585352 0.643696
vt 0.786819 0.661159
vt 0.805630 0.666537
vt 0.816456 0.643044
vt 0.799922 0.637881
vt 0.816456 0.637229
vt 0.799922 0.643696
vt 0.776539 0.637881
vt 0.655571 0.643696
vt 0.639037 0.637229
vt 0.655571 0.637881
vt 0.678954 0.643696
vt 0.678954 0.637881
vt 0.695488 0.643044
vt 0.695488 0.637229
vt 0.783384 0.660723
vt 0.760099 0.654527
vt 0.783479 0.654909
vt 0.799927 0.660341
vt 0.800022 0.654527
vt 0.776539 0.643696
vt 0.760004 0.637229
vt 0.630972 0.642951
vt 0.760004 0.642951
vt 0.805725 0.660723
vt 0.639037 0.643044
vt 0.760004 0.660341
vt 0.760004 0.643044
vt 0.078761 0.951645
vt 0.048527 0.921411
vt 0.048527 0.878654
vt 0.121519 0.848420
vt 0.151753 0.921411
vn 0.0000 0.0000 1.0000
vn 0.0000 0.0000 -1.0000
vn 0.9239 0.3827 0.0000
vn 0.3827 -0.9239 0.0000
vn -0.9239 -0.3827 -0.0000
vn 0.3827 0.9239 0.0000
vn -0.9239 0.3827 0.0000
vn 0.9239 -0.3827 -0.0000
vn -0.3827 0.9239 0.0000
vn 0.3680 -0.8883 -0.2747
vn -0.8883 0.3680 -0.2747
vn -0.3680 0.8883 -0.2747
vn 0.3680 0.8883 -0.2747
vn -0.3680 -0.8883 -0.2747
vn 0.8883 -0.3680 -0.2747
vn -0.8883 -0.3680 -0.2747
vn 0.8883 0.3680 -0.2747
vn -0.3827 -0.9239 -0.0000
vn 0.5490 -0.5490 0.6303
vn 0.5490 0.5490 0.6303
vn -0.5490 0.5490 0.6303
vn -0.7071 -0.7071 0.0000
vn -0.0000 -0.7764 0.6303
vn -0.5490 -0.5490 0.6303
vn 1.0000 -0.0000 -0.0000
vn 0.7071 -0.7071 0.0000
vn 0.0000 1.0000 0.0000
vn 0.7071 0.7071 -0.0000
vn 0.0000 0.7764 0.6303
vn -1.0000 -0.0000 -0.0000
vn -0.7764 0.0000 0.6303
vn 0.0000 -1.0000 0.0000
vn 0.7764 0.0000 0.6303
vn -0.7071 0.7071 -0.0000
usemtl None
s off
f 105/241/55 106/242/55 140/243/55
f 130/244/56 107/245/56 137/246/56
f 109/247/55 138/248/55 110/249/55
f 111/250/55 112/251/55 113/252/55
f 114/253/55 112/251/55 106/242/55
f 115/254/55 140/243/55 116/255/55
f 109/247/55 144/256/55 129/257/55
f 115/254/55 138/248/55 128/258/55
f 129/257/55 142/259/55 111/250/55
f 132/260/56 139/261/56 117/262/56
f 134/263/56 141/264/56 118/265/56
f 119/266/56 141/264/56 120/267/56
f 130/244/56 143/268/56 121/269/56
f 132/260/56 107/245/56 122/270/56
f 117/262/56 123/271/56 134/263/56
f 136/272/56 120/267/56 143/268/56
f 105/273/57 149/274/57 114/275/57
f 105/241/55 114/253/55 106/242/55
f 130/244/56 121/269/56 107/245/56
f 109/247/55 128/258/55 138/248/55
f 111/250/55 142/259/55 112/251/55
f 114/253/55 113/252/55 112/251/55
f 115/254/55 105/241/55 140/243/55
f 109/247/55 110/249/55 144/256/55
f 115/254/55 116/255/55 138/248/55
f 129/257/55 144/256/55 142/259/55
f 132/260/56 122/270/56 139/261/56
f 134/263/56 123/271/56 141/264/56
f 119/266/56 118/265/56 141/264/56
f 130/244/56 136/272/56 143/268/56
f 132/260/56 137/246/56 107/245/56
f 117/262/56 139/261/56 123/271/56
f 136/272/56 119/266/56 120/267/56
f 153/276/58 161/277/58 162/278/58
f 154/279/58 128/280/58 156/281/58
f 158/282/59 109/283/59 129/284/59
f 151/285/60 114/275/60 149/274/60
f 111/286/61 158/287/61 129/288/61
f 154/289/62 105/273/62 115/290/62
f 159/291/63 113/292/63 151/293/63
f 154/279/64 155/294/64 153/276/64
f 158/287/65 160/295/65 157/296/65
f 160/295/66 151/293/66 152/297/66
f 152/298/67 149/274/67 150/299/67
f 155/294/68 146/300/68 145/301/68
f 154/289/69 147/302/69 148/303/69
f 158/282/70 145/301/70 146/300/70
f 147/302/71 149/274/71 148/303/71
f 109/283/72 156/281/72 128/280/72
f 163/304/56 166/305/56 162/306/56
f 150/299/60 165/307/60 152/298/60
f 157/308/59 167/309/59 145/301/59
f 153/310/62 168/311/62 147/302/62
f 145/301/72 161/277/72 155/294/72
f 150/299/57 168/311/57 166/312/57
f 152/297/63 163/313/63 160/295/63
f 160/295/61 164/314/61 157/296/61
f 105/273/57 148/303/57 149/274/57
f 153/276/58 155/294/58 161/277/58
f 154/279/58 115/315/58 128/280/58
f 158/282/59 146/300/59 109/283/59
f 151/285/60 113/316/60 114/275/60
f 111/286/61 159/291/61 158/287/61
f 154/289/62 148/303/62 105/273/62
f 159/291/63 111/286/63 113/292/63
f 154/279/64 156/281/64 155/294/64
f 158/287/65 159/291/65 160/295/65
f 160/295/66 159/291/66 151/293/66
f 152/298/67 151/285/67 149/274/67
f 155/294/68 156/281/68 146/300/68
f 154/289/69 153/310/69 147/302/69
f 158/282/70 157/308/70 145/301/70
f 147/302/71 150/299/71 149/274/71
f 109/283/72 146/300/72 156/281/72
f 162/306/56 161/317/56 163/304/56
f 161/317/56 167/318/56 163/304/56
f 167/318/56 164/319/56 163/304/56
f 163/304/56 165/320/56 166/305/56
f 166/305/56 168/321/56 162/306/56
f 150/299/60 166/312/60 165/307/60
f 157/308/59 164/322/59 167/309/59
f 153/310/62 162/323/62 168/311/62
f 145/301/72 167/309/72 161/277/72
f 150/299/57 147/302/57 168/311/57
f 152/297/63 165/324/63 163/313/63
f 160/295/61 163/313/61 164/314/61
s 1
f 124/325/73 133/326/74 126/327/75
f 130/328/76 131/329/77 127/330/78
f 117/331/79 124/332/73 132/333/80
f 118/334/81 133/335/74 134/336/82
f 118/337/81 126/338/75 135/339/83
f 136/340/84 127/330/78 125/341/85
f 132/342/80 131/329/77 137/343/86
f 134/336/82 108/344/87 117/331/79
f 119/345/88 125/346/85 126/338/75
f 122/347/80 138/348/86 116/349/80
f 107/350/86 110/351/76 138/348/86
f 139/352/79 116/353/80 140/354/79
f 123/355/82 140/354/79 106/356/82
f 141/357/81 106/356/82 112/358/81
f 120/359/88 112/360/81 142/361/88
f 143/362/84 142/361/88 144/363/84
f 121/364/76 144/365/84 110/351/76
f 130/328/76 137/343/86 131/329/77
f 117/331/79 108/344/87 124/332/73
f 118/334/81 135/366/83 133/335/74
f 118/337/81 119/345/88 126/338/75
f 136/340/84 130/328/76 127/330/78
f 132/342/80 124/367/73 131/329/77
f 134/336/82 133/335/74 108/344/87
f 119/345/88 136/368/84 125/346/85
f 122/347/80 107/350/86 138/348/86
f 107/350/86 121/364/76 110/351/76
f 139/352/79 122/369/80 116/353/80
f 123/355/82 139/352/79 140/354/79
f 141/357/81 123/355/82 106/356/82
f 120/359/88 141/370/81 112/360/81
f 143/362/84 120/359/88 142/361/88
f 121/364/76 143/371/84 144/365/84
f 126/327/75 125/372/85 127/373/78
f 127/373/78 131/374/77 124/325/73
f 124/325/73 108/375/87 133/326/74
f 133/326/74 135/376/83 126/327/75
f 126/327/75 127/373/78 124/325/73

View File

@ -188,6 +188,10 @@
"weapon.LMGMagInPB3": {"category": "player", "sounds": [{"name": "weapon/LMGIN", "stream": false}]},
"weapon.LMGCockPB3": {"category": "player", "sounds": [{"name": "weapon/LMGCLK", "stream": false}]},
"weapon.shotgunDrumPB3": {"category": "player", "sounds": ["weapon/ASGDRM1", "weapon/ASGDRM2"]},
"weapon.shotgunShellBouncePB3": {"category": "player", "sounds": ["weapon/DSSHELL1", "weapon/DSSHELL2", "weapon/DSSHELL3"]},
"weapon.smallCasingBouncePB3": {"category": "player", "sounds": ["weapon/BRASS_C1", "weapon/BRASS_C2", "weapon/BRASS_C3", "weapon/BRASS_C4", "weapon/BRASS_C5"]},
"weapon.smallMagBouncePB3": {"category": "player", "sounds": ["weapon/DSAOUNC1", "weapon/DSAOUNC2", "weapon/DSAOUNC3", "weapon/DSAOUNC4"]},
"weapon.largeMagBouncePB3": {"category": "player", "sounds": ["weapon/DSBOUNC1", "weapon/DSBOUNC2", "weapon/DSBOUNC3", "weapon/DSBOUNC4"]},
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},

View File

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 297 B

View File

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B