honestly quite incredible

This commit is contained in:
Boblet 2023-02-01 14:00:19 +01:00
parent e7a9fac26c
commit 1e1e2a51c9
29 changed files with 75 additions and 33 deletions

View File

@ -206,7 +206,7 @@ public class WeaponRecipes {
CraftingManager.addRecipeAuto(ModItems.ammo_dart.stackFromEnum(16, AmmoDart.NERF), new Object[] { "I", "I", 'I', ModItems.plate_polymer });
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_45, 32), " I", "GC", " P", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_44, 'P', ModItems.primer_44);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_308, 32), " I", "GC", " P", 'I', CU.ingot(), 'G', ANY_SMOKELESS.dust(), 'C', ModItems.casing_50, 'P', ModItems.primer_9);
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_luna_sniper, 4), new Object[] { " B ", "GCG", "GPG", 'B', ModItems.billet_u238, 'G', ModItems.powder_nitan_mix, 'C', ModItems.casing_50, 'P', ModItems.powder_power});
CraftingManager.addRecipeAuto(new ItemStack(ModItems.assembly_luna, 4), new Object[] { " B ", "GCG", "GPG", 'B', ModItems.billet_u238, 'G', ModItems.powder_nitan_mix, 'C', ModItems.casing_50, 'P', ModItems.powder_power});
//Folly shells
CraftingManager.addRecipeAuto(new ItemStack(ModItems.folly_bullet, 1), new Object[] { " S ", "STS", "SMS", 'S', STAR.ingot(), 'T', ModItems.powder_magic, 'M', ModBlocks.block_meteor });

View File

@ -185,6 +185,14 @@ public class BulletConfiguration implements Cloneable {
this.doesRicochet = false;
this.doesPenetrate = false;
this.vPFX = "greendust";
if(this.spentCasing != null) {
this.spentCasing = this.spentCasing.clone();
int[] colors = this.spentCasing.getColors();
colors[colors.length - 1] = 0x659750; // <- standard chlorophyte coloring in last place
//this.spentCasing.setColor(colors); //it's a reference type, dummy
}
return this;
}

View File

@ -29,15 +29,15 @@ import net.minecraft.util.Vec3;
public class Gun12GaugeFactory {
private static final CasingEjector CASING_SPAS, CASING_SPAS_ALT, CASING_BENELLI, CASING_UBOINIK, CASING_SSG;
private static final CasingEjector EJECTOR_SPAS, EJECTOR_SPAS_ALT, EJECTOR_BENELLI, EJECTOR_UBOINIK, EJECTOR_SSG;
private static final SpentCasing CASING12GAUGE;
static {
CASING_SPAS = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, 0, 0.5)).setAngleRange(0.01F, 0.03F).setDelay(10);
CASING_SPAS_ALT = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, 0, 0.5)).setAngleRange(0.01F, 0.03F).setDelay(10).setAmount(2);
CASING_BENELLI = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.3, 1, 0)).setAngleRange(0.01F, 0.03F);
CASING_UBOINIK = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, -0.3, 0.5)).setAngleRange(0.01F, 0.03F);
CASING_SSG = new CasingEjector().setMotion(Vec3.createVectorHelper(0.2, 0, -0.2)).setOffset(Vec3.createVectorHelper(0.8, 0, 0)).setAngleRange(0.05F, 0.02F).setDelay(20).setAmount(2);
EJECTOR_SPAS = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, 0, 0.5)).setAngleRange(0.01F, 0.03F).setDelay(10);
EJECTOR_SPAS_ALT = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, 0, 0.5)).setAngleRange(0.01F, 0.03F).setDelay(10).setAmount(2);
EJECTOR_BENELLI = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.3, 1, 0)).setAngleRange(0.01F, 0.03F);
EJECTOR_UBOINIK = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.1, 0)).setOffset(Vec3.createVectorHelper(-0.35, -0.3, 0.5)).setAngleRange(0.01F, 0.03F);
EJECTOR_SSG = new CasingEjector().setMotion(Vec3.createVectorHelper(0.2, 0, -0.2)).setOffset(Vec3.createVectorHelper(0.8, 0, 0)).setAngleRange(0.05F, 0.02F).setDelay(20).setAmount(2);
CASING12GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(1.5F).setBounceMotion(0.05F, 0.02F);
}
@ -83,7 +83,7 @@ public class Gun12GaugeFactory {
)
);
config.ejector = CASING_SPAS;
config.ejector = EJECTOR_SPAS;
return config;
}
@ -111,7 +111,7 @@ public class Gun12GaugeFactory {
config.config.add(BulletConfigSyncingUtil.G12_AM);
config.config.add(BulletConfigSyncingUtil.G12_SLEEK);
config.ejector = CASING_SPAS_ALT;
config.ejector = EJECTOR_SPAS_ALT;
return config;
}
@ -139,7 +139,7 @@ public class Gun12GaugeFactory {
config.config = HbmCollection.twelveGauge;
config.ejector = CASING_UBOINIK;
config.ejector = EJECTOR_UBOINIK;
return config;
}
@ -192,7 +192,7 @@ public class Gun12GaugeFactory {
config.config = HbmCollection.twelveGauge;
config.ejector = CASING_SSG;
config.ejector = EJECTOR_SSG;
return config;
}

View File

@ -10,6 +10,7 @@ import com.hbm.explosion.ExplosionNT.ExAttrib;
import com.hbm.explosion.ExplosionNukeSmall;
import com.hbm.handler.BulletConfigSyncingUtil;
import com.hbm.handler.BulletConfiguration;
import com.hbm.handler.CasingEjector;
import com.hbm.handler.GunConfiguration;
import com.hbm.interfaces.IBulletHurtBehavior;
import com.hbm.interfaces.IBulletImpactBehavior;
@ -22,6 +23,8 @@ 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.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.potion.HbmPotion;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe;
@ -36,10 +39,19 @@ 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 {
private static final CasingEjector EJECTOR_SHOTGUN;
private static final SpentCasing CASING4GAUGE;
static {
EJECTOR_SHOTGUN = new CasingEjector().setMotion(Vec3.createVectorHelper(-0.4, 0.4, 0)).setOffset(Vec3.createVectorHelper(-0.5, 0, 0.5)).setAngleRange(0.01F, 0.03F);
CASING4GAUGE = new SpentCasing(CasingType.SHOTGUN).setScale(2.5F).setBounceMotion(0.01F, 0.03F);
}
private static GunConfiguration getShotgunConfig() {
GunConfiguration config = new GunConfiguration();
@ -57,6 +69,8 @@ public class Gun4GaugeFactory {
config.crosshair = Crosshair.L_CIRCLE;
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
config.ejector = EJECTOR_SHOTGUN;
return config;
}
@ -132,6 +146,8 @@ public class Gun4GaugeFactory {
bullet.bulletsMin *= 2;
bullet.bulletsMax *= 2;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaStock").setColor(0xFFD800, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -145,6 +161,8 @@ public class Gun4GaugeFactory {
bullet.wear = 7;
bullet.style = BulletConfiguration.STYLE_NORMAL;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaSlug").setColor(0xE01A1A, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -162,6 +180,8 @@ public class Gun4GaugeFactory {
bullet.HBRC = 2;
bullet.LBRC = 95;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaFlech").setColor(0x1537FF, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -200,6 +220,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaPhos").setColor(0xF6871A, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -215,6 +237,8 @@ public class Gun4GaugeFactory {
bullet.wear = 25;
bullet.trail = 1;
bullet.spentCasing = CASING4GAUGE.clone().register("4GaExp").setColor(0x3F8243, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -249,6 +273,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaSem").setColor(0x5C5C5C, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -282,6 +308,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaBale").setColor(0x7BFF44, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -298,6 +326,8 @@ public class Gun4GaugeFactory {
bullet.trail = 4;
bullet.vPFX = "smoke";
bullet.spentCasing = CASING4GAUGE.clone().register("4GaKampf").setColor(0xE7BA48, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -336,6 +366,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaCan").setColor(0xCACACA, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -345,6 +377,8 @@ public class Gun4GaugeFactory {
bullet.ammo = new ComparableStack(ModItems.ammo_4gauge.stackFromEnum(Ammo4Gauge.SLEEK));
bullet.spentCasing = CASING4GAUGE.clone().register("4GaIF").setColor(0x1D1D1D, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -382,6 +416,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaClaw").setColor(0x5E38CC, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -420,6 +456,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaVamp").setColor(0x278400, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -451,6 +489,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaVoid").setColor(0x3F3F3F, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
@ -486,13 +526,6 @@ public class Gun4GaugeFactory {
bullet.worldObj.removeEntity(creature);
bullet.worldObj.unloadEntities(new ArrayList() {{ add(creature); }});
//creature.isDead = true;
/*try {
Method m = Class.forName("net.minecraft.entity.deity.EntityDeity").getDeclaredMethod("setTitanHealth", double.class);
m.setAccessible(true);
m.invoke(creature, 0.0D);
} catch (Exception ex) { }*/
}
}
@ -501,6 +534,8 @@ public class Gun4GaugeFactory {
}
};
bullet.spentCasing = CASING4GAUGE.clone().register("4GaDucc").setColor(0x1E1E1E, SpentCasing.COLOR_CASE_4GA);
return bullet;
}
}

View File

@ -45,7 +45,8 @@ public class Gun9mmFactory {
return config;
}
public static GunConfiguration getThompsonConfig() {
//rechambered to .45
/*public static GunConfiguration getThompsonConfig() {
GunConfiguration config = new GunConfiguration();
@ -75,7 +76,7 @@ public class Gun9mmFactory {
config.config.add(BulletConfigSyncingUtil.P9_ROCKET);
return config;
}
}*/
static float inaccuracy = 5;
public static BulletConfiguration get9mmConfig() {

View File

@ -105,7 +105,7 @@ public class PressRecipes {
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_calamity), ModItems.ammo_50bmg);
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_actionexpress), ModItems.ammo_50ae);
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_luna_sniper), ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_luna), ModItems.ammo_luna_sniper.stackFromEnum(AmmoLunaticSniper.SABOT));
makeRecipe(StampType.C50, new ComparableStack(ModItems.assembly_308), ModItems.ammo_762);
}

View File

@ -9,9 +9,9 @@ import com.hbm.lib.HbmCollection;
public class ItemAmmoEnums {
public enum AmmoLunaticSniper implements IAmmoItemEnum {
SABOT("ammo_lunar"),
INCENDIARY("ammo_lunar_incendiary"),
EXPLOSIVE("ammo_lunar_explosive");
SABOT("ammo_luna"),
INCENDIARY("ammo_luna_incendiary"),
EXPLOSIVE("ammo_luna_explosive");
private final Set<AmmoItemTrait> traits;
private final String unloc;

View File

@ -610,7 +610,7 @@ public class ModItems {
public static Item assembly_calamity;
public static Item assembly_lacunae;
public static Item assembly_nuke;
public static Item assembly_luna_sniper;
public static Item assembly_luna;
public static Item folly_shell;
public static Item folly_bullet;
@ -3274,7 +3274,7 @@ public class ModItems {
assembly_calamity = new Item().setUnlocalizedName("assembly_calamity").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_calamity");
assembly_lacunae = new Item().setUnlocalizedName("assembly_lacunae").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_lacunae");
assembly_nuke = new Item().setUnlocalizedName("assembly_nuke").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_nuke");
assembly_luna_sniper = new Item().setUnlocalizedName("assembly_luna_sniper").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_luna_sniper");
assembly_luna = new Item().setUnlocalizedName("assembly_luna").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":assembly_luna");
folly_shell = new Item().setUnlocalizedName("folly_shell").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_shell");
folly_bullet = new Item().setUnlocalizedName("folly_bullet").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet");
folly_bullet_nuclear = new Item().setUnlocalizedName("folly_bullet_nuclear").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":folly_bullet_nuclear");
@ -4520,7 +4520,7 @@ public class ModItems {
gun_chemthrower = new ItemGunChemthrower().setUnlocalizedName("gun_chemthrower").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_fatman");
//gun_mp40_ammo = new Item().setUnlocalizedName("gun_mp40_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_mp40_ammo");
gun_mp40 = new ItemGunBase(Gun9mmFactory.getMP40Config()).setUnlocalizedName("gun_mp40").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mp40");
gun_thompson = new ItemGunBase(Gun9mmFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
gun_thompson = new ItemGunBase(Gun45ACPFactory.getThompsonConfig()).setUnlocalizedName("gun_thompson").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_thompson");
//gun_uzi_ammo = new Item().setUnlocalizedName("gun_uzi_ammo").setCreativeTab(null).setTextureName(RefStrings.MODID + ":gun_uzi_ammo");
gun_uzi = new ItemGunBase(Gun22LRFactory.getUziConfig()).setUnlocalizedName("gun_uzi").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi");
gun_uzi_silencer = new ItemGunBase(Gun22LRFactory.getUziConfig().silenced()).setUnlocalizedName("gun_uzi_silencer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uzi_silencer");
@ -6511,7 +6511,7 @@ public class ModItems {
GameRegistry.registerItem(assembly_actionexpress, assembly_actionexpress.getUnlocalizedName());
GameRegistry.registerItem(assembly_calamity, assembly_calamity.getUnlocalizedName());
GameRegistry.registerItem(assembly_nuke, assembly_nuke.getUnlocalizedName());
GameRegistry.registerItem(assembly_luna_sniper, assembly_luna_sniper.getUnlocalizedName());
GameRegistry.registerItem(assembly_luna, assembly_luna.getUnlocalizedName());
//Folly Parts
GameRegistry.registerItem(folly_shell, folly_shell.getUnlocalizedName());

View File

@ -10,6 +10,7 @@ public class SpentCasing implements Cloneable {
public static final int COLOR_CASE_BRASS = 0xEBC35E;
public static final int COLOR_CASE_12GA = 0x757575;
public static final int COLOR_CASE_4GA = 0xD8D8D8;
public static final int COLOR_CASE_44 = 0x3E3E3E;
public static final HashMap<String, SpentCasing> casingMap = new HashMap();
@ -42,6 +43,7 @@ public class SpentCasing implements Cloneable {
this.type = type;
}
/** Separated from the ctor to allow for easy creation of new casings from templates that don't need to be registered */
public SpentCasing register(String name) {
this.registryName = name;
casingMap.put(name, this);
@ -62,6 +64,7 @@ public class SpentCasing implements Cloneable {
return this;
}
/** The number of colors has to match the number of objects of the chosen casing type. Brass/metal casing color has to come last to comply with the chorophyte coloring. */
public SpentCasing setColor(int... color) {
this.colors = color;
return this;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

View File

@ -1,5 +0,0 @@
{
"animation": {
}
}