This commit is contained in:
Bob 2025-03-02 22:49:29 +01:00
parent 3a5c943c0a
commit 1238933bca
23 changed files with 4336 additions and 4023 deletions

View File

@ -1,3 +1,6 @@
## Added
* A new legendary weapon
## Changed
* Updated russian localization
* Large deposits (hematite, malachite, bauxite) and caves (sulfur, asbestos) can now be toggled in the config
@ -10,6 +13,7 @@
* Reduced legendary 12 lever action's spread multiplier from x1.35 to x1.15
* Bullet casings now spawn with randomized angular velocity
* Bullet casings now correctly bounce off walls, and change angles when bouncing
* Two previously unobtainable legendaries are now in the red room loot pool (about 10x less common than most other items)
## Fixed
* Fixed an issue where `/ntmreload` would load fluids after recipes, meaning that recipes using newly added fluids would not work correctly, as the fluids don't exist by the time the recipe is loaded
@ -21,4 +25,5 @@
* Fixed RBMKs losing all their flux when reloading the world
* Fixed issue where DODD fuel item stats would only update when the GUI was open
* Fixed muzzle flashes not being fullbright
* Fixed guns having their name permanently visible over the toolbar
* Fixed guns having their name permanently visible over the toolbar
* Fixed hangman being absolutely gigantic when dropped

View File

@ -1,6 +1,6 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=5243
mod_build_number=5257
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\

View File

@ -30,6 +30,7 @@ public class ItemPoolsRedRoom {
weighted(ModItems.heart_container, 0, 1, 1, 10),
weighted(ModItems.black_diamond, 0, 1, 1, 10),
weighted(ModItems.scrumpy, 0, 1, 1, 10),
weighted(ModItems.wild_p, 0, 1, 1, 5),
weighted(ModItems.card_aos, 0, 1, 1, 5),
weighted(ModItems.card_qos, 0, 1, 1, 5),
@ -39,6 +40,9 @@ public class ItemPoolsRedRoom {
weighted(ModItems.flask_infusion, 0, 1, 1, 5),
weighted(ModBlocks.boxcar, 0, 1, 1, 5),
weighted(ModItems.book_of_, 0, 1, 1, 5),
weighted(ModItems.gun_hangman, 0, 1, 1, 1),
weighted(ModItems.gun_mas36, 0, 1, 1, 1),
};
}};

View File

@ -1494,6 +1494,7 @@ public class ModItems {
public static Item gun_lasrifle;
public static Item gun_coilgun;
public static Item gun_hangman;
public static Item gun_mas36;
public static Item gun_bolter;
public static Item gun_folly;
public static Item gun_aberrator;
@ -6481,6 +6482,7 @@ public class ModItems {
GameRegistry.registerItem(gun_lasrifle, gun_lasrifle.getUnlocalizedName());
GameRegistry.registerItem(gun_coilgun, gun_coilgun.getUnlocalizedName());
GameRegistry.registerItem(gun_hangman, gun_hangman.getUnlocalizedName());
GameRegistry.registerItem(gun_mas36, gun_mas36.getUnlocalizedName());
GameRegistry.registerItem(gun_bolter, gun_bolter.getUnlocalizedName());
GameRegistry.registerItem(gun_folly, gun_folly.getUnlocalizedName());
GameRegistry.registerItem(gun_aberrator, gun_aberrator.getUnlocalizedName());

View File

@ -81,6 +81,7 @@ public class GunFactoryClient {
MinecraftForgeClient.registerItemRenderer(ModItems.gun_lasrifle, new ItemRenderLasrifle());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_coilgun, new ItemRenderCoilgun());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_hangman, new ItemRenderHangman());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_mas36, new ItemRenderMAS36());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_bolter, new ItemRenderBolter());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_folly, new ItemRenderFolly());
MinecraftForgeClient.registerItemRenderer(ModItems.gun_aberrator, new ItemRenderAberrator());
@ -239,6 +240,7 @@ public class GunFactoryClient {
((ItemGunBaseNT) ModItems.gun_lasrifle) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_coilgun) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_hangman) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_mas36) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_bolter) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_DURABILITY, LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_folly) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);
((ItemGunBaseNT) ModItems.gun_aberrator) .getConfig(null, 0).hud(LegoClient.HUD_COMPONENT_AMMO);

View File

@ -374,7 +374,7 @@ public class Orchestras {
}
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_CARBIBE = (stack, ctx) -> {
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_CARBINE = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
@ -1306,4 +1306,53 @@ public class Orchestras {
if(timer == 9) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.pistolCock", 1F, 0.75F);
}
};
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_MAS36 = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
if(type == AnimType.EQUIP) {
if(timer == 10) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.openLatch", 1F, 1F);
if(timer == 18) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.revolverClose", 1F, 1F);
}
if(type == AnimType.CYCLE) {
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
if(timer == 12) {
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity,
0.375, aiming ? 0 : -0.125, aiming ? 0 : -0.25D,
-0.05, 0.2, -0.025,
0.01, -10F + (float) entity.getRNG().nextGaussian() * 10F, (float) entity.getRNG().nextGaussian() * 12.5F, casing.getName());
}
}
if(type == AnimType.CYCLE_DRY) {
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.dryFireClick", 1F, 0.75F);
if(timer == 7) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
}
if(type == AnimType.RELOAD) {
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 1F, 1F);
if(timer == 20) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.rifleCock", 1F, 1F);
if(timer == 36) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 1F, 1F);
}
if(type == AnimType.JAMMED) {
if(timer == 5) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
if(timer == 12) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
if(timer == 16) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
if(timer == 23) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
}
if(type == AnimType.INSPECT) {
if(timer == 0) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltOpen", 0.5F, 1F);
if(timer == 17) entity.worldObj.playSoundAtEntity(entity, "hbm:weapon.reload.boltClose", 0.5F, 1F);
}
};
}

View File

@ -63,7 +63,7 @@ public class XFactory762mm {
.offset(1, -0.0625 * 2.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_CARBINE))
.setupStandardConfiguration()
.anim(LAMBDA_CARBINE_ANIMS).orchestra(Orchestras.ORCHESTRA_CARBIBE)
.anim(LAMBDA_CARBINE_ANIMS).orchestra(Orchestras.ORCHESTRA_CARBINE)
).setUnlocalizedName("gun_carbine");
ModItems.gun_minigun = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
@ -86,6 +86,17 @@ public class XFactory762mm {
.setupStandardConfiguration()
.anim(LAMBDA_MINIGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_MINIGUN)
).setUnlocalizedName("gun_minigun_lacunae");
ModItems.gun_mas36 = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
.dura(5_000).draw(20).inspect(31).reloadSequential(true).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
.dmg(30F).delay(25).dry(25).spread(0.0F).reload(43).jam(43).sound("hbm:weapon.fire.rifleHeavy", 1.0F, 1.0F)
.mag(new MagazineFullReload(0, 7).addConfigs(r762_sp, r762_fmj, r762_jhp, r762_ap, r762_du))
.offset(1, -0.0625 * 1.5, -0.25D)
.setupStandardFire().recoil(LAMBDA_RECOIL_CARBINE))
.setupStandardConfiguration()
.anim(LAMBDA_MAS36_ANIMS).orchestra(Orchestras.ORCHESTRA_MAS36)
).setUnlocalizedName("gun_mas36");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
@ -153,4 +164,45 @@ public class XFactory762mm {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MAS36_ANIMS = (stack, type) -> {
int mag = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
double turn = -90;
double pullAmount = ItemGunBaseNT.getIsAiming(stack) ? -1F : -1.5D;
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("STOCK", new BusAnimationSequence().setPos(-158, 0, 0).hold(500).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("EQUIP", new BusAnimationSequence().setPos(45, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL).hold(500).addPos(1, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL));
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.5, 50, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).hold(700).addPos(0, 0, 0, 150))
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 200, IType.LINEAR))
.addBus("LIFT", new BusAnimationSequence().hold(600).addPos(-3, 0, 0, 150, IType.SIN_DOWN).hold(300).addPos(0, 0, 0, 250, IType.SIN_FULL))
.addBus("BULLET", mag <= 1 ? new BusAnimationSequence().setPos(-100, 0, 0) : new BusAnimationSequence().hold(850).addPos(0, 0.1875, 1.5, 200, IType.LINEAR));
case CYCLE_DRY: return new BusAnimation()
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).hold(700).addPos(0, 0, 0, 150))
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 200, IType.LINEAR))
.addBus("LIFT", new BusAnimationSequence().hold(600).addPos(-3, 0, 0, 150, IType.SIN_DOWN).hold(300).addPos(0, 0, 0, 250, IType.SIN_FULL))
.addBus("BULLET", new BusAnimationSequence().setPos(-100, 0, 0));
case RELOAD: return new BusAnimation()
.addBus("BOLT_TURN", new BusAnimationSequence().addPos(0, 0, turn, 150).holdUntil(2000).addPos(0, 0, 0, 150))
.addBus("BOLT_PULL", new BusAnimationSequence().hold(100).addPos(0, 0, -1.5D, 250, IType.SIN_UP).holdUntil(1800).addPos(0, 0, 0, 200, IType.LINEAR))
.addBus("BULLET", new BusAnimationSequence().setPos(-100, 0, 0).holdUntil(1200).setPos(0, 0, 0).hold(600).addPos(0, 0.1875, 1.5, 200, IType.LINEAR))
.addBus("LIFT", new BusAnimationSequence().hold(200).addPos(30, 0, 0, 500, IType.SIN_FULL).holdUntil(1200).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("SHOW_CLIP", new BusAnimationSequence().setPos(1, 1, 1))
.addBus("CLIP", new BusAnimationSequence().setPos(2, -3, 0).hold(250).addPos(0.5, 1, 0, 500, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL).hold(400).addPos(-0.5, 0.5, 0, 150).addPos(-3, -3, 0, 250, IType.SIN_UP))
.addBus("BULLETS", new BusAnimationSequence().setPos(2, -4, 0).hold(250).addPos(0.5, 1, 0, 500, IType.SIN_DOWN).addPos(0, 0, 0, 250, IType.SIN_FULL).hold(150).addPos(0, -1.5, 0, 250, IType.SIN_DOWN));
case JAMMED: return new BusAnimation()
.addBus("LIFT", new BusAnimationSequence().hold(250).addPos(-15, 0, 0, 500, IType.SIN_FULL).holdUntil(1650).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("BOLT_TURN", new BusAnimationSequence().hold(250).addPos(0, 0, turn, 150).holdUntil(1250).addPos(0, 0, 0, 150))
.addBus("BOLT_PULL", new BusAnimationSequence().hold(350).addPos(0, 0, pullAmount, 250, IType.SIN_UP).addPos(0, 0, 0, 200, IType.LINEAR).addPos(0, 0, pullAmount, 250, IType.SIN_UP).addPos(0, 0, 0, 200, IType.LINEAR));
case INSPECT: return new BusAnimation()
.addBus("LIFT", new BusAnimationSequence().hold(350).addPos(-3, 0, 0, 150, IType.SIN_DOWN).holdUntil(1050).addPos(0, 0, 0, 250, IType.SIN_FULL))
.addBus("BOLT_TURN", new BusAnimationSequence().addPos(0, 0, turn, 150).holdUntil(1050).addPos(0, 0, 0, 150))
.addBus("BOLT_PULL", new BusAnimationSequence().hold(100).addPos(0, 0, -1D, 250, IType.SIN_UP).hold(500).addPos(0, 0, 0, 200, IType.LINEAR))
.addBus("BULLET", mag == 0 ? new BusAnimationSequence().setPos(-100, 0, 0) : new BusAnimationSequence().setPos(0, 0.1875, 1.5).hold(100).addPos(0, 0.125, 0.5, 250, IType.SIN_UP).hold(500).addPos(0, 0.1875, 1.5, 200, IType.LINEAR));
}
return null;
};
}

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (5243)";
public static final String VERSION = "1.0.27 BETA (5257)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -889,6 +889,7 @@ public class ResourceManager {
public static final IModelCustom folly = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/folly.obj")).asVBO();
public static final IModelCustom double_barrel = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/sacred_dragon.obj")).asVBO();
public static final IModelCustom aberrator = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/aberrator.obj")).asVBO();
public static final IModelCustom mas36 = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/mas36.obj")).asVBO();
public static final HashMap<String, BusAnimation> python_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/python.json"));
public static final HashMap<String, BusAnimation> cursed_anim = AnimationLoader.load(new ResourceLocation(RefStrings.MODID, "models/weapons/animations/cursed.json"));
@ -1039,6 +1040,7 @@ public class ResourceManager {
public static final ResourceLocation double_barrel_sacred_dragon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/double_barrel_sacred_dragon.png");
public static final ResourceLocation aberrator_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/aberrator.png");
public static final ResourceLocation eott_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/eott.png");
public static final ResourceLocation mas36_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/mas36.png");
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");

View File

@ -148,7 +148,6 @@ public class ParticleSpentCasing extends EntityFX {
double initMoX = motionX;
double initMoY = motionY;
double initMoZ = motionZ;
AxisAlignedBB axisalignedbb = this.boundingBox.copy();
List list = this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox.addCoord(motionX, motionY, motionZ));

View File

@ -29,20 +29,16 @@ public class BusAnimationSequence {
// swizzle me timbers
public double[] rotMode = new double[] { 0, 1, 2 };
public BusAnimationSequence() {
// Initialise our keyframe storage, since it's multidimensional
for(int i = 0; i < 9; i++) {
transformKeyframes.add(new ArrayList<BusAnimationKeyframe>());
}
}
// Adds a keyframe to the given dimension
public BusAnimationSequence addKeyframe(Dimension dimension, BusAnimationKeyframe keyframe) {
transformKeyframes.get(dimension.ordinal()).add(keyframe);
return this;
}
@ -50,11 +46,17 @@ public class BusAnimationSequence {
return addKeyframe(dimension, new BusAnimationKeyframe(value, duration));
}
/** Adds a position with a duration of 0 */
public BusAnimationSequence setPos(double x, double y, double z) {
return addPos(x, y, z, 0, IType.LINEAR);
}
// Two helper methods for the old hard-coded animations
/** Adds a position with the desired duration and lininterp */
public BusAnimationSequence addPos(double x, double y, double z, int duration) {
return addPos(x, y, z, duration, IType.LINEAR);
}
/** Adds a position with the desired duration and interpolation type */
public BusAnimationSequence addPos(double x, double y, double z, int duration, IType type) {
addKeyframe(Dimension.TX, new BusAnimationKeyframe(x, duration, type));
addKeyframe(Dimension.TY, new BusAnimationKeyframe(y, duration, type));
@ -69,6 +71,27 @@ public class BusAnimationSequence {
return this;
}
/** Repeats the previous keyframe with the same values using lininterp. Effectively makes the animation frame pause for the desired amount of milliseconds. */
public BusAnimationSequence hold(int duration) {
addKeyframe(Dimension.TX, new BusAnimationKeyframe(getLast(Dimension.TX), duration));
addKeyframe(Dimension.TY, new BusAnimationKeyframe(getLast(Dimension.TY), duration));
addKeyframe(Dimension.TZ, new BusAnimationKeyframe(getLast(Dimension.TZ), duration));
return this;
}
/** Repeats the previous keyframe for a duration depending on the previous keyframes. Useful for getting different buses to sync up. */
public BusAnimationSequence holdUntil(int end) {
int duration = end - getTotalTime();
return hold(duration);
}
/** Grabs the numerical value for the most recent keyframe on the given dimension */
private double getLast(Dimension dim) {
List<BusAnimationKeyframe> keyframes = transformKeyframes.get(dim.ordinal());
if(keyframes.isEmpty()) return 0D;
return keyframes.get(keyframes.size() - 1).value;
}
//all transformation data is absolute, additive transformations have not yet been implemented
public double[] getTransformation(int millis) {
double[] transform = new double[15];

View File

@ -120,6 +120,12 @@ public class ItemRenderHangman extends ItemRenderWeaponBase {
GL11.glTranslated(-0.5, 2.5, 0);
}
@Override
public void setupEntity(ItemStack stack) {
double scale = 0.0625D;
GL11.glScaled(scale, scale, scale);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);

View File

@ -0,0 +1,161 @@
package com.hbm.render.item.weapon.sedna;
import java.nio.DoubleBuffer;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.item.ItemStack;
public class ItemRenderMAS36 extends ItemRenderWeaponBase {
@Override
protected float getTurnMagnitude(ItemStack stack) { return ItemGunBaseNT.getIsAiming(stack) ? 2.5F : -0.5F; }
@Override
public float getViewFOV(ItemStack stack, float fov) {
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
return fov * (1 - aimingProgress * 0.33F);
}
@Override
public void setupFirstPerson(ItemStack stack) {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.5F * offset, -1.25F * offset, 1.75F * offset,
0, -4.6825 / 8D, 0.75);
/*standardAimingTransform(stack,
-1.5F * offset, -1.25F * offset, 1.75F * offset,
-0.2, -5.875 / 8D, 1.125);*/
}
private static DoubleBuffer buf = null;
@Override
public void renderFirstPerson(ItemStack stack) {
if(buf == null) buf = GLAllocation.createDirectByteBuffer(8*4).asDoubleBuffer();
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mas36_tex);
double scale = 0.375D;
GL11.glScaled(scale, scale, scale);
double[] equip = HbmAnimations.getRelevantTransformation("EQUIP");
double[] lift = HbmAnimations.getRelevantTransformation("LIFT");
double[] stock = HbmAnimations.getRelevantTransformation("STOCK");
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
double[] boltTurn = HbmAnimations.getRelevantTransformation("BOLT_TURN");
double[] boltPull = HbmAnimations.getRelevantTransformation("BOLT_PULL");
double[] bullet = HbmAnimations.getRelevantTransformation("BULLET");
double[] showClip = HbmAnimations.getRelevantTransformation("SHOW_CLIP");
double[] clip = HbmAnimations.getRelevantTransformation("CLIP");
double[] bullets = HbmAnimations.getRelevantTransformation("BULLETS");
GL11.glTranslated(0, -3, -3);
GL11.glRotated(equip[0], 1, 0, 0);
GL11.glRotated(lift[0], 1, 0, 0);
GL11.glTranslated(0, 3, 3);
GL11.glTranslated(0, 0, recoil[2]);
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.mas36.renderPart("Gun");
GL11.glPushMatrix();
GL11.glTranslated(0, 0.3125, -2.125);
GL11.glRotated(stock[0], 1, 0, 0);
GL11.glTranslated(0, -0.3125, 2.125);
ResourceManager.mas36.renderPart("Stock");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(0, 1.125, 0);
GL11.glRotated(boltTurn[2], 0, 0, 1);
GL11.glTranslated(0, -1.125, 0);
GL11.glTranslated(0, 0, boltPull[2]);
ResourceManager.mas36.renderPart("Bolt");
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated(bullet[0], bullet[1], bullet[2]);
ResourceManager.mas36.renderPart("Bullet");
GL11.glPopMatrix();
//ResourceManager.mas36.renderPart("Scope");
if(showClip[0] != 0) {
GL11.glPushMatrix();
GL11.glTranslated(clip[0], clip[1], clip[2]);
ResourceManager.mas36.renderPart("Clip");
GL11.glPopMatrix();
GL11.glPushMatrix();
if(bullets[0] == 0) GL11.glEnable(GL11.GL_CLIP_PLANE0);
buf.put(new double[] { 0, 1, 0, -0.5} );
buf.rewind();
GL11.glClipPlane(GL11.GL_CLIP_PLANE0, buf);
GL11.glTranslated(bullets[0], bullets[1], bullets[2]);
ResourceManager.mas36.renderPart("Bullets");
GL11.glDisable(GL11.GL_CLIP_PLANE0);
GL11.glPopMatrix();
}
double smokeScale = 0.25;
GL11.glPushMatrix();
GL11.glTranslated(0, 1.125, 8);
GL11.glRotated(90, 0, 1, 0);
GL11.glScaled(smokeScale, smokeScale, smokeScale);
this.renderSmokeNodes(gun.getConfig(stack, 0).smokeNodes, 1D);
GL11.glPopMatrix();
GL11.glShadeModel(GL11.GL_FLAT);
GL11.glPushMatrix();
GL11.glTranslated(0, 1, 8);
GL11.glRotated(90, 0, 1, 0);
GL11.glRotated(90 * gun.shotRand, 1, 0, 0);
GL11.glScaled(0.5, 0.5, 0.5);
this.renderMuzzleFlash(gun.lastShot[0], 75, 7.5);
GL11.glPopMatrix();
}
@Override
public void setupThirdPerson(ItemStack stack) {
super.setupThirdPerson(stack);
double scale = 1.5D;
GL11.glScaled(scale, scale, scale);
GL11.glTranslated(0, 0.5, 3);
}
@Override
public void setupInv(ItemStack stack) {
super.setupInv(stack);
double scale = 1.5D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(25, 1, 0, 0);
GL11.glRotated(45, 0, 1, 0);
GL11.glTranslated(-0.5, 0.5, 0);
}
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.mas36_tex);
ResourceManager.mas36.renderPart("Gun");
ResourceManager.mas36.renderPart("Stock");
ResourceManager.mas36.renderPart("Bolt");
//ResourceManager.mas36.renderPart("Scope");
GL11.glTranslated(0, -1, -6);
//ResourceManager.mas36.renderPart("Bayonet");
GL11.glShadeModel(GL11.GL_FLAT);
}
}

View File

@ -2286,6 +2286,7 @@ item.gun_m2.name=üsMG
item.gun_maresleg.name=Repetierflinte
item.gun_maresleg_akimbo.name=Repetierflinten
item.gun_maresleg_broken.name=Broken
item.gun_mas36.name=Südstern
item.gun_minigun.name=Minigun
item.gun_minigun_lacunae.name=Lacunae
item.gun_mirv.name=M42 Nukleares Katapult "Experimentelles MIRV"

View File

@ -3096,6 +3096,7 @@ item.gun_m2.name=Ma Deuce
item.gun_maresleg.name=Lever Action Shotgun
item.gun_maresleg_akimbo.name=Lever Action Shotguns
item.gun_maresleg_broken.name=Broken
item.gun_mas36.name=South Star
item.gun_minigun.name=Minigun
item.gun_minigun_lacunae.name=Lacunae
item.gun_mirv.name=M42 Nuclear Catapult "Experimental MIRV"

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 B