mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and now for something completely different
This commit is contained in:
parent
bc8dfcaa99
commit
873e41558f
@ -15,6 +15,8 @@
|
||||
* Overcooling causes a penalty, so coolers cannot be spammed and need to be carefully spaced out
|
||||
* Allows for even more compact particle accelerator setups
|
||||
* Comes in two tiers, both tiers use a different cooling variable with different effectiveness, the higher tier will override the lower tier if both tiers of coolers are present
|
||||
* Benelli M4
|
||||
* Automatic 12 gauge shotgun with a drum mag
|
||||
|
||||
## Changed
|
||||
* The regular boiler now only holds 16k instead of 64k (which is still a lot)
|
||||
@ -22,6 +24,9 @@
|
||||
* Glyphid eggs can now be broken apart using an anvil, yielding glyphid meat, bones and experience bottles
|
||||
* The assembler now uses the new multiblock system, making it less annoying to playe and less ear-piercing to break
|
||||
* The conversion happens automatically so it's not necessary to remove the assemblers beforehand
|
||||
* Reload canceling is no longer possible if no rounds have been loaded yet, preventing single round weapons like dart guns to be reload canceled
|
||||
* The saturnite rifle now has a functional scope
|
||||
* Rechambered the bolt action rifles to 7.62mm, with a mag of 5 rounds
|
||||
|
||||
## Fixed
|
||||
* Fixed quantity of the fusion reactor's construction recipe not being displayed right
|
||||
|
||||
@ -2,7 +2,6 @@ package com.hbm.crafting;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.RecipesCommon;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
@ -17,7 +16,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
/**
|
||||
* For guns, ammo and the like
|
||||
@ -159,6 +157,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_spas12, 1), new Object[] { "TPS", "HHR", " L", 'T', ModItems.bolt_tungsten, 'P', STEEL.plate(), 'S', STEEL.ingot(), 'H', ModItems.hull_small_steel, 'R', ModItems.mechanism_rifle_1, 'L', ANY_PLASTIC.ingot()});
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_glass_cannon, 1), new Object[] { "GGC", "GTM", 'G', Item.getItemFromBlock(ModBlocks.glass_quartz), 'C', ModItems.battery_lithium_cell, 'T', ModItems.crt_display, 'M', ModItems.mechanism_special });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_remington, 1), new Object[] { "PPM", "S L", 'P', STEEL.plate(), 'M', ModItems.mechanism_rifle_1, 'S', KEY_SLAB, 'L', KEY_LOG });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_benelli), new Object[] { "HHP", "SSM", "AAP", 'H', ModItems.ingot_dura_steel, 'S', ModItems.hull_small_steel, 'A', ModItems.hull_small_aluminium, 'P', ModItems.ingot_polymer, 'M', ModItems.mechanism_rifle_2 });
|
||||
|
||||
//Ammo assemblies
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.pellet_flechette, 1), new Object[] { " L ", " L ", "LLL", 'L', PB.nugget() });
|
||||
|
||||
@ -234,6 +234,72 @@ public class Gun12GaugeFactory {
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBenelliConfig() {
|
||||
|
||||
GunConfiguration config = getUboinikConfig();
|
||||
|
||||
config.gunMode = 0;
|
||||
config.firingMode = 1;
|
||||
config.rateOfFire = 5;
|
||||
config.ammoCap = 8;
|
||||
config.reloadDuration = 8;
|
||||
config.crosshair = Crosshair.CIRCLE;
|
||||
config.hasSights = true;
|
||||
config.durability = 250000;
|
||||
config.allowsInfinity = true;
|
||||
config.firingSound = "hbm:weapon.autoshotgunFirePB3";
|
||||
config.reloadSound = "hbm:weapon.shotgunReloadPB3";
|
||||
config.reloadType = 2;
|
||||
config.reloadSoundEnd = true;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(6.25, 0.25, 2.5, 55))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 55))
|
||||
)
|
||||
.addBus("EJECT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(25, 0, 0, 100))
|
||||
)
|
||||
);
|
||||
|
||||
config.animations.put(AnimType.RELOAD, new BusAnimation()
|
||||
.addBus("RELOAD", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(60, 0, -10, 400))
|
||||
.addKeyframe(new BusAnimationKeyframe(60, 125, -10, 200))
|
||||
.addKeyframe(new BusAnimationKeyframe(60, 125, -10, 300))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 300))
|
||||
)
|
||||
.addBus("PUMP", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 900))
|
||||
.addKeyframe(new BusAnimationKeyframe(10, 0, 0, 200))
|
||||
.addKeyframe(new BusAnimationKeyframe())
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "benelli";
|
||||
config.manufacturer = EnumGunManufacturer.BENELLI;
|
||||
config.comment.add("Eat your heart out SPAS-12");
|
||||
config.config = HbmCollection.g12;
|
||||
|
||||
config.ejector = EJECTOR_BENELLI;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBenelliModConfig() {
|
||||
|
||||
GunConfiguration config = getBenelliConfig();
|
||||
|
||||
config.reloadType = 1;
|
||||
config.ammoCap = 24;
|
||||
config.reloadDuration = 20;
|
||||
config.reloadSound = config.RSOUND_MAG;
|
||||
config.reloadSoundEnd = true;
|
||||
config.name += "Drum";
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get12GaugeConfig() {
|
||||
|
||||
|
||||
@ -108,114 +108,6 @@ public class Gun20GaugeFactory {
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltConfig() {
|
||||
|
||||
GunConfiguration config = getShotgunConfig();
|
||||
|
||||
config.ammoCap = 1;
|
||||
config.durability = 3000;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Inox";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER;
|
||||
|
||||
config.config = HbmCollection.g20;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltGreenConfig() {
|
||||
|
||||
GunConfiguration config = getShotgunConfig();
|
||||
|
||||
config.ammoCap = 1;
|
||||
config.durability = 2500;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Poly";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER;
|
||||
|
||||
config.config = HbmCollection.g20;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltSaturniteConfig() {
|
||||
|
||||
GunConfiguration config = getShotgunConfig();
|
||||
|
||||
config.ammoCap = 1;
|
||||
config.durability = 4000;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Satur";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER_BIGMT;
|
||||
|
||||
config.config = HbmCollection.g20;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get20GaugeConfig() {
|
||||
|
||||
BulletConfiguration bullet = BulletConfigFactory.standardBuckshotConfig();
|
||||
|
||||
@ -9,6 +9,7 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemAmmoEnums.Ammo762NATO;
|
||||
import com.hbm.lib.HbmCollection;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||
import com.hbm.particle.SpentCasing;
|
||||
import com.hbm.particle.SpentCasing.CasingType;
|
||||
@ -20,14 +21,19 @@ import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class Gun762mmFactory {
|
||||
|
||||
public static final ResourceLocation scope_bolt = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_bolt.png");
|
||||
|
||||
private static final CasingEjector EJECTOR_RIFLE;
|
||||
private static final CasingEjector EJECTOR_BOLT;
|
||||
private static final SpentCasing CASING762NATO;
|
||||
|
||||
static {
|
||||
EJECTOR_RIFLE = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F);
|
||||
EJECTOR_BOLT = new CasingEjector().setMotion(-0.35, 0.6, 0).setOffset(-0.35, 0, 0.35).setAngleRange(0.01F, 0.03F).setDelay(15);
|
||||
CASING762NATO = new SpentCasing(CasingType.BOTTLENECK).setScale(1.7F).setBounceMotion(0.01F, 0.05F).setColor(SpentCasing.COLOR_CASE_BRASS);
|
||||
}
|
||||
|
||||
@ -157,6 +163,127 @@ public class Gun762mmFactory {
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltConfig() {
|
||||
|
||||
GunConfiguration config = Gun20GaugeFactory.getShotgunConfig();
|
||||
|
||||
config.ammoCap = 5;
|
||||
config.durability = 3000;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
config.crosshair = Crosshair.CIRCLE;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Inox";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER;
|
||||
|
||||
config.ejector = EJECTOR_BOLT;
|
||||
|
||||
config.config = HbmCollection.r762;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltGreenConfig() {
|
||||
|
||||
GunConfiguration config = Gun20GaugeFactory.getShotgunConfig();
|
||||
|
||||
config.ammoCap = 5;
|
||||
config.durability = 2500;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
config.crosshair = Crosshair.CIRCLE;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Poly";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER;
|
||||
|
||||
config.ejector = EJECTOR_BOLT;
|
||||
|
||||
config.config = HbmCollection.r762;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static GunConfiguration getBoltSaturniteConfig() {
|
||||
|
||||
GunConfiguration config = Gun20GaugeFactory.getShotgunConfig();
|
||||
|
||||
config.ammoCap = 5;
|
||||
config.durability = 4000;
|
||||
config.reloadSound = GunConfiguration.RSOUND_SHOTGUN;
|
||||
config.firingSound = "hbm:weapon.revolverShoot";
|
||||
config.firingPitch = 0.75F;
|
||||
config.hasSights = true;
|
||||
config.absoluteFOV = true;
|
||||
config.zoomFOV = 0.25F;
|
||||
config.scopeTexture = scope_bolt;
|
||||
config.crosshair = Crosshair.CIRCLE;
|
||||
|
||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 25))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 75))
|
||||
)
|
||||
.addBus("LEVER_PULL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //wait out recoil and lever flick
|
||||
.addKeyframe(new BusAnimationKeyframe(-1, 0, 0, 375)) //pull back bolt
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 375)) //release bolt
|
||||
)
|
||||
.addBus("LEVER_ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250)) //wait out recoil
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 125)) //flick up lever in 125ms
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 750)) //pull action
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 125)) //flick down lever again
|
||||
)
|
||||
);
|
||||
|
||||
config.name = "win20Satur";
|
||||
config.manufacturer = EnumGunManufacturer.WINCHESTER_BIGMT;
|
||||
|
||||
config.ejector = EJECTOR_BOLT;
|
||||
|
||||
config.config = HbmCollection.r762;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static BulletConfiguration get762NATOConfig() {
|
||||
final BulletConfiguration bullet = Gun556mmFactory.get556Config().clone();
|
||||
|
||||
@ -1560,6 +1560,7 @@ public class ModItems {
|
||||
public static Item gun_remington;
|
||||
public static Item gun_spas12;
|
||||
public static Item gun_supershotgun;
|
||||
public static Item gun_benelli;
|
||||
public static Item gun_ks23;
|
||||
public static Item gun_sauer;
|
||||
public static Item gun_lever_action;
|
||||
@ -4183,15 +4184,16 @@ public class ModItems {
|
||||
gun_uboinik = new ItemGunBase(Gun12GaugeFactory.getUboinikConfig()).setUnlocalizedName("gun_uboinik").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_remington = new ItemGunBase(Gun12GaugeFactory.getRemington870Config()).setUnlocalizedName("gun_remington").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
|
||||
gun_spas12 = new ItemGunBase(Gun12GaugeFactory.getSpas12Config(), Gun12GaugeFactory.getSpas12AltConfig()).setUnlocalizedName("gun_spas12").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
|
||||
gun_benelli = new ItemGunBase(Gun12GaugeFactory.getBenelliModConfig()).setUnlocalizedName("gun_benelli").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_spas12");
|
||||
gun_supershotgun = new ItemGunShotty(Gun12GaugeFactory.getShottyConfig()).setUnlocalizedName("gun_supershotgun").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_ks23 = new ItemGunBase(Gun4GaugeFactory.getKS23Config()).setUnlocalizedName("gun_ks23").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_sauer = new ItemGunBase(Gun4GaugeFactory.getSauerConfig()).setUnlocalizedName("gun_sauer").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_uboinik");
|
||||
gun_lever_action = new ItemGunBase(Gun20GaugeFactory.getMareConfig()).setUnlocalizedName("gun_lever_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action");
|
||||
gun_lever_action_dark = new ItemGunBase(Gun20GaugeFactory.getMareDarkConfig()).setUnlocalizedName("gun_lever_action_dark").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_dark");
|
||||
gun_lever_action_sonata = new GunLeverActionS().setUnlocalizedName("gun_lever_action_sonata").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_lever_action_sonata");
|
||||
gun_bolt_action = new ItemGunBase(Gun20GaugeFactory.getBoltConfig()).setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
|
||||
gun_bolt_action_green = new ItemGunBase(Gun20GaugeFactory.getBoltGreenConfig()).setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
|
||||
gun_bolt_action_saturnite = new ItemGunBase(Gun20GaugeFactory.getBoltSaturniteConfig()).setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
|
||||
gun_bolt_action = new ItemGunBase(Gun762mmFactory.getBoltConfig()).setUnlocalizedName("gun_bolt_action").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action");
|
||||
gun_bolt_action_green = new ItemGunBase(Gun762mmFactory.getBoltGreenConfig()).setUnlocalizedName("gun_bolt_action_green").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_green");
|
||||
gun_bolt_action_saturnite = new ItemGunBase(Gun762mmFactory.getBoltSaturniteConfig()).setUnlocalizedName("gun_bolt_action_saturnite").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_bolt_action_saturnite");
|
||||
gun_mymy = new ItemGunBase(GunDartFactory.getMymyConfig()).setUnlocalizedName("gun_mymy").setFull3D().setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_mymy");
|
||||
gun_b92_ammo = new GunB92Cell().setUnlocalizedName("gun_b92_ammo").setMaxStackSize(1).setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92_ammo_alt");
|
||||
gun_b92 = new GunB92().setUnlocalizedName("gun_b92").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_b92");
|
||||
@ -7004,6 +7006,7 @@ public class ModItems {
|
||||
GameRegistry.registerItem(gun_uboinik, gun_uboinik.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_remington, gun_remington.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_spas12, gun_spas12.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_benelli, gun_benelli.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_supershotgun, gun_supershotgun.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_ks23, gun_ks23.getUnlocalizedName());
|
||||
GameRegistry.registerItem(gun_sauer, gun_sauer.getUnlocalizedName());
|
||||
|
||||
@ -164,7 +164,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
//whether or not the gun can shoot in its current state
|
||||
protected boolean tryShoot(ItemStack stack, World world, EntityPlayer player, boolean main) {
|
||||
|
||||
if(getIsReloading(stack) && mainConfig.reloadType == mainConfig.RELOAD_SINGLE) {
|
||||
//cancel reload when trying to shoot if it's a single reload weapon and at least one round is loaded
|
||||
if(getIsReloading(stack) && mainConfig.reloadType == mainConfig.RELOAD_SINGLE && this.getMag(stack) > 0) {
|
||||
setReloadCycle(stack, 0);
|
||||
setIsReloading(stack, false);
|
||||
}
|
||||
|
||||
@ -520,6 +520,7 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lunatic_marksman, new ItemRenderLunaticSniper());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_benelli, new ItemRenderBenelli());
|
||||
//multitool
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_dig, new ItemRenderMultitool());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_silk, new ItemRenderMultitool());
|
||||
|
||||
@ -749,6 +749,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom m2 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/m2_browning.obj")).asDisplayList(); //large fella should be a display list
|
||||
public static final IModelCustom lunatic_sniper = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lunatic_sniper.obj")).asDisplayList();
|
||||
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj"));
|
||||
public static final IModelCustom benelli = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/benelli_new.obj"));
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
@ -839,6 +840,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation m2_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/m2_browning.png");
|
||||
public static final ResourceLocation lunatic_sniper_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lunatic_sniper.png");
|
||||
public static final ResourceLocation tau_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/tau.png");
|
||||
public static final ResourceLocation benelli_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/benelli_tex.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
|
||||
115
src/main/java/com/hbm/render/item/weapon/ItemRenderBenelli.java
Normal file
115
src/main/java/com/hbm/render/item/weapon/ItemRenderBenelli.java
Normal file
@ -0,0 +1,115 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.weapon.ItemGunBase;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderBenelli implements IItemRenderer
|
||||
{
|
||||
public ItemRenderBenelli() {}
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch (type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
static final String body = "Body.001_Cube.001";
|
||||
static final String frontGrip = "Pump_Cylinder.003";
|
||||
static final String slide = "Cylinder";
|
||||
static final String barrelAndTube = "Body_Cube.002";
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
int magSize = ItemGunBase.getMag(item);
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.benelli_tex);
|
||||
final float scale1 = 0.2F;
|
||||
final double scale2 = 0.065D;
|
||||
final double scale3 = 0.52D;
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] feedNew = HbmAnimations.getRelevantTransformation("PUMP");
|
||||
|
||||
switch (type) {
|
||||
case EQUIPPED_FIRST_PERSON:// In hand from POV
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
if (player.isSneaking()) {
|
||||
GL11.glRotatef(25.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-5F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.007F, 0F, -2.5F);
|
||||
}
|
||||
else {
|
||||
GL11.glRotatef(30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1F, -2.5F);
|
||||
}
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
// Move on recoil
|
||||
GL11.glTranslated(0, recoil[1], recoil[2]);
|
||||
GL11.glRotated(recoil[0], 1, 0, 0);
|
||||
// Move up for reload
|
||||
GL11.glPushMatrix();
|
||||
ResourceManager.benelli.renderAll();
|
||||
// Pump new round if empty
|
||||
if (magSize == 0)
|
||||
GL11.glTranslated(feedNew[0], feedNew[1], feedNew[2]);
|
||||
ResourceManager.benelli.renderPart(slide);
|
||||
GL11.glPopMatrix();
|
||||
// Eject spent shell
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case EQUIPPED:// In hand from other's POV
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(90.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.0F, -0.2F, -1.28F);
|
||||
GL11.glRotated(recoil[0], 1, 0, 0);
|
||||
GL11.glScaled(scale2 - scale2 * 2, scale2, scale2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPopMatrix();
|
||||
break;
|
||||
case ENTITY:// Dropped entity
|
||||
GL11.glScaled(0.0625D, 0.0625D, 0.0625D);
|
||||
break;
|
||||
case INVENTORY:// Inventory icon
|
||||
GL11.glScaled(scale3, scale3, -scale3);
|
||||
GL11.glTranslatef(14.4F, 15.0F, 0.0F);
|
||||
GL11.glRotatef(270.0F, 10.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(52.5F, 0.0F, 10.0F, 0.0F);
|
||||
GL11.glRotatef(270.0F, 0.0F, 0.0F, 10.0F);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
ResourceManager.benelli.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -41,6 +42,8 @@ public class ItemRenderWeaponFFBolt implements IItemRenderer {
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
if(item.getItem() == ModItems.gun_bolt_action_saturnite && Minecraft.getMinecraft().thePlayer.isSneaking()) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
5820
src/main/resources/assets/hbm/models/weapons/benelli_new.obj
Normal file
5820
src/main/resources/assets/hbm/models/weapons/benelli_new.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
src/main/resources/assets/hbm/textures/misc/scope_bolt.png
Normal file
BIN
src/main/resources/assets/hbm/textures/misc/scope_bolt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Loading…
x
Reference in New Issue
Block a user