waser wifle

This commit is contained in:
Bob 2025-03-30 23:08:05 +02:00
parent 6ae779cb23
commit 3323356c73
27 changed files with 583 additions and 23 deletions

View File

@ -14,4 +14,5 @@
* Fixed taint destroying bedrock
* Fixed ferrouranium plate not being castable
* Fixed bayonet not rendering properly in third person
* Fixed xenon poison gauge in the RBMK control panel not showing up on colums (oops)
* Fixed xenon poison gauge in the RBMK control panel not showing up on colums (oops)
* Fixed hitscan projectiles colliding with dead mobs

View File

@ -3,6 +3,7 @@ package com.hbm.commands;
import com.hbm.config.ItemPoolConfigJSON;
import com.hbm.inventory.fluid.Fluids;
import com.hbm.inventory.recipes.loader.SerializableRecipe;
import com.hbm.particle.helper.SkeletonCreator;
import com.hbm.util.ChatBuilder;
import com.hbm.util.DamageResistanceHandler;
@ -30,6 +31,7 @@ public class CommandReloadRecipes extends CommandBase {
SerializableRecipe.initialize();
ItemPoolConfigJSON.initialize();
DamageResistanceHandler.init();
SkeletonCreator.init();
sender.addChatMessage(new ChatComponentText(EnumChatFormatting.YELLOW + "Reload complete :)"));
} catch(Exception ex) {

View File

@ -67,7 +67,12 @@ public class EntityUndeadSoldier extends EntityMob {
this.setCurrentItemOrArmor(2, new ItemStack(ModItems.taurun_legs));
this.setCurrentItemOrArmor(1, new ItemStack(ModItems.taurun_boots));
this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_heavy_revolver));
int gun = rand.nextInt(5);
if(gun == 0) this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_heavy_revolver));
if(gun == 1) this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_light_revolver));
if(gun == 2) this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_carbine));
if(gun == 3) this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_maresleg));
if(gun == 4) this.setCurrentItemOrArmor(0, new ItemStack(ModItems.gun_greasegun));
}
@Override

View File

@ -126,7 +126,7 @@ public class EntityBulletBeamBase extends Entity implements IEntityAdditionalSpa
for(int j = 0; j < list.size(); ++j) {
Entity entity = (Entity) list.get(j);
if(entity.canBeCollidedWith() && entity != thrower) {
if(entity.canBeCollidedWith() && entity != thrower && entity.isEntityAlive()) {
double hitbox = 0.3F;
AxisAlignedBB aabb = entity.boundingBox.expand(hitbox, hitbox, hitbox);
MovingObjectPosition hitMop = aabb.calculateIntercept(pos, nextPos);

View File

@ -174,7 +174,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD {
list.add("Base Damage: " + FORMAT_DMG.format(dmg));
if(mag.getType(stack, player.inventory) instanceof BulletConfig) {
BulletConfig bullet = (BulletConfig) mag.getType(stack, player.inventory);
list.add("Damage with current ammo: " + FORMAT_DMG.format(dmg * bullet.damageMult) + (bullet.projectilesMin > 1 ? (" x" + (bullet.projectilesMin != bullet.projectilesMax ? (bullet.projectilesMin + "-" + bullet.projectilesMax) : bullet.projectilesMin)) : ""));
int min = (int) (bullet.projectilesMin * rec.getSplitProjectiles(stack));
int max = (int) (bullet.projectilesMax * rec.getSplitProjectiles(stack));
list.add("Damage with current ammo: " + FORMAT_DMG.format(dmg * bullet.damageMult) + (min > 1 ? (" x" + (min != max ? (min + "-" + max) : min)) : ""));
}
}

View File

@ -23,6 +23,7 @@ public class Receiver {
public static final String I_DELAYAFTERFIRE = "I_DELAYAFTERFIRE";
public static final String I_DELAYAFTERDRYFIRE = "I_DELAYAFTERDRYFIRE";
public static final String I_ROUNDSPERCYCLE = "I_ROUNDSPERCYCLE";
public static final String F_SPLITPROJECTILES = "F_SPLITPROJECTILES";
public static final String F_SPREADINNATE = "F_SPREADINNATE";
public static final String F_SPREADAMMO = "F_SPREADAMMO";
public static final String F_SPREADHIPFIRE = "F_SPREADHIPFIRE";
@ -59,6 +60,7 @@ public class Receiver {
protected int delayAfterFire_DNA;
protected int delayAfterDryFire_DNA;
protected int roundsPerCycle_DNA = 1;
protected float splitProjectiles_DNA = 1;
protected float spreadInnate_DNA = 0F;
protected float spreadMultAmmo_DNA = 1F;
protected float spreadPenaltyHipfire_DNA = 0.025F;
@ -90,6 +92,7 @@ public class Receiver {
public int getDelayAfterFire(ItemStack stack) { return WeaponModManager.eval(this.delayAfterFire_DNA, stack, I_DELAYAFTERFIRE, this, parent.index); }
public int getDelayAfterDryFire(ItemStack stack) { return WeaponModManager.eval(this.delayAfterDryFire_DNA, stack, I_DELAYAFTERDRYFIRE, this, parent.index); }
public int getRoundsPerCycle(ItemStack stack) { return WeaponModManager.eval(this.roundsPerCycle_DNA, stack, I_ROUNDSPERCYCLE, this, parent.index); }
public float getSplitProjectiles(ItemStack stack) { return WeaponModManager.eval(this.splitProjectiles_DNA, stack, F_SPLITPROJECTILES, this, parent.index); }
public float getInnateSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadInnate_DNA, stack, F_SPREADINNATE, this, parent.index); }
public float getAmmoSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadMultAmmo_DNA, stack, F_SPREADAMMO, this, parent.index); }
public float getHipfireSpread(ItemStack stack) { return WeaponModManager.eval(this.spreadPenaltyHipfire_DNA, stack, F_SPREADHIPFIRE, this, parent.index); }
@ -122,6 +125,7 @@ public class Receiver {
public Receiver delay(int delay) { this.delayAfterFire_DNA = this.delayAfterDryFire_DNA = delay; return this; }
public Receiver dry(int delay) { this.delayAfterDryFire_DNA = delay; return this; }
public Receiver rounds(int rounds) { this.roundsPerCycle_DNA = rounds; return this; }
public Receiver split(float rounds) { this.splitProjectiles_DNA = rounds; return this; }
public Receiver spread(float spread) { this.spreadInnate_DNA = spread; return this; }
public Receiver spreadAmmo(float spread) { this.spreadMultAmmo_DNA = spread; return this; }
public Receiver spreadHipfire(float spread) { this.spreadPenaltyHipfire_DNA = spread; return this; }

View File

@ -159,7 +159,8 @@ public class GunFactory {
SILENCER, SCOPE, SAW, GREASEGUN, SLOWDOWN,
SPEEDUP, CHOKE, SPEEDLOADER,
FURNITURE_GREEN, FURNITURE_BLACK, BAYONET,
STACK_MAG, SKIN_SATURNITE,
STACK_MAG, SKIN_SATURNITE, LAS_SHOTGUN,
LAS_CAPACITOR, LAS_AUTO
}
public static enum EnumModCaliber {

View File

@ -220,6 +220,7 @@ public class Lego {
int projectiles = config.projectilesMin;
if(config.projectilesMax > config.projectilesMin) projectiles += entity.getRNG().nextInt(config.projectilesMax - config.projectilesMin + 1);
projectiles = (int) (projectiles * primary.getSplitProjectiles(stack));
for(int i = 0; i < projectiles; i++) {
float damage = calcDamage(ctx, stack, primary, calcWear, index);

View File

@ -0,0 +1,23 @@
package com.hbm.items.weapon.sedna.mods;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.Receiver;
import net.minecraft.item.ItemStack;
public class WeaponModLasAuto extends WeaponModBase {
public WeaponModLasAuto(int id) {
super(id, "RECEIVER");
this.setPriority(PRIORITY_SET);
}
@Override
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
if(key == Receiver.F_BASEDAMAGE) return cast((Float) base * 0.66F, base);
if(key == Receiver.B_REFIREONHOLD) return cast(true, base);
if(key == Receiver.I_DELAYAFTERFIRE) return cast(5, base);
if(key == GunConfig.O_SCOPETEXTURE) return cast(null, base);
return base;
}
}

View File

@ -0,0 +1,27 @@
package com.hbm.items.weapon.sedna.mods;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import net.minecraft.item.ItemStack;
public class WeaponModLasCapacitor extends WeaponModBase {
public WeaponModLasCapacitor(int id) {
super(id, "UNDERBARREL");
this.setPriority(PRIORITY_MULTIPLICATIVE);
}
@Override
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
if(key == Receiver.F_BASEDAMAGE) return cast((Float) base * 1.05F, base);
if(key == Receiver.O_MAGAZINE) {
MagazineFullReload original = (MagazineFullReload) base;
WeaponModStackMag.DUMMY_FULL.acceptedBullets = original.acceptedBullets;
WeaponModStackMag.DUMMY_FULL.capacity = original.capacity * 3 / 2;
WeaponModStackMag.DUMMY_FULL.index = original.index;
return (T) WeaponModStackMag.DUMMY_FULL;
}
return base;
}
}

View File

@ -0,0 +1,25 @@
package com.hbm.items.weapon.sedna.mods;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.Receiver;
import net.minecraft.item.ItemStack;
public class WeaponModLasShotgun extends WeaponModBase {
public WeaponModLasShotgun(int id) {
super(id, "BARREL");
this.setPriority(PRIORITY_MULTIPLICATIVE);
}
@Override
public <T> T eval(T base, ItemStack gun, String key, Object parent) {
if(key == Receiver.F_BASEDAMAGE) return cast((Float) base * 0.35F, base);
if(key == Receiver.F_SPLITPROJECTILES) return cast((Float) base * 3F, base);
if(key == Receiver.F_SPREADINNATE) return cast((Float) base + 3F, base);
if(key == Receiver.F_SPREADHIPFIRE) return cast(0F, base);
if(key == GunConfig.O_CROSSHAIR) return cast(Crosshair.L_CIRCLE, base);
return base;
}
}

View File

@ -142,6 +142,9 @@ public class WeaponModManager {
new WeaponModDefinition(EnumModSpecial.BAYONET).addMod(ModItems.gun_mas36, new WeaponModMASBayonet(ID_MAS_BAYONET));
new WeaponModDefinition(EnumModSpecial.STACK_MAG).addMod(new Item[] {ModItems.gun_greasegun, ModItems.gun_uzi, ModItems.gun_uzi_akimbo, ModItems.gun_aberrator, ModItems.gun_aberrator_eott}, new WeaponModStackMag(214));
new WeaponModDefinition(EnumModSpecial.SKIN_SATURNITE).addMod(new Item[] {ModItems.gun_uzi, ModItems.gun_uzi_akimbo}, new WeaponModUziSaturnite(ID_UZI_SATURN));
new WeaponModDefinition(EnumModSpecial.LAS_SHOTGUN).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasShotgun(ID_LAS_SHOTGUN));
new WeaponModDefinition(EnumModSpecial.LAS_CAPACITOR).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasCapacitor(ID_LAS_CAPACITOR));
new WeaponModDefinition(EnumModSpecial.LAS_AUTO).addMod(new Item[] {ModItems.gun_lasrifle}, new WeaponModLasAuto(ID_LAS_AUTO));
BulletConfig[] p9 = new BulletConfig[] {XFactory9mm.p9_sp, XFactory9mm.p9_fmj, XFactory9mm.p9_jhp, XFactory9mm.p9_ap};
BulletConfig[] p45 = new BulletConfig[] {XFactory45.p45_sp, XFactory45.p45_fmj, XFactory45.p45_jhp, XFactory45.p45_ap, XFactory45.p45_du};
@ -191,6 +194,9 @@ public class WeaponModManager {
public static final int ID_FURNITURE_BLACK = 212;
public static final int ID_MAS_BAYONET = 213;
public static final int ID_UZI_SATURN = 215;
public static final int ID_LAS_SHOTGUN = 216;
public static final int ID_LAS_CAPACITOR = 217;
public static final int ID_LAS_AUTO = 218;
public static ItemStack[] getUpgradeItems(ItemStack stack, int cfg) {
if(!stack.hasTagCompound()) return new ItemStack[0];

View File

@ -18,5 +18,4 @@ public class WeaponModUziSaturnite extends WeaponModBase {
if(key == Receiver.F_BASEDAMAGE) return cast((Float) base + 3F, base);
return base;
}
}

View File

@ -269,7 +269,7 @@ public class MainRegistry {
polaroidID = rand.nextInt(18) + 1;
}
//ShadyUtil.test();
ShadyUtil.test();
loadConfig(PreEvent);
HbmPotion.init();

View File

@ -867,6 +867,7 @@ public class ResourceManager {
public static final IModelCustom tau = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/tau.obj")).asVBO();
public static final IModelCustom fatman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/fatman.obj")).asVBO();
public static final IModelCustom lasrifle = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lasrifle.obj")).asVBO();
public static final IModelCustom lasrifle_mods = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lasrifle_mods.obj")).asVBO();
public static final IModelCustom hangman = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/hangman.obj")).asVBO();
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();
@ -985,6 +986,7 @@ public class ResourceManager {
public static final ResourceLocation fatman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman.png");
public static final ResourceLocation fatman_mininuke_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/fatman_mininuke.png");
public static final ResourceLocation lasrifle_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle.png");
public static final ResourceLocation lasrifle_mods_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lasrifle_mods.png");
public static final ResourceLocation hangman_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/hangman.png");
public static final ResourceLocation folly_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/moonlight.png");
public static final ResourceLocation double_barrel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/double_barrel.png");

View File

@ -5,6 +5,7 @@ import java.util.Random;
import java.util.function.Function;
import com.hbm.entity.mob.EntityDummy;
import com.hbm.entity.mob.EntityUndeadSoldier;
import com.hbm.main.ClientProxy;
import com.hbm.particle.ParticleSkeleton;
import com.hbm.util.Vec3NT;
@ -152,6 +153,7 @@ public class SkeletonCreator implements IParticleCreator {
skullanizer.put(EntityZombie.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntitySkeleton.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntityPigZombie.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntityUndeadSoldier.class.getSimpleName(), BONES_ZOMBIE);
skullanizer.put(EntityVillager.class.getSimpleName(), BONES_VILLAGER);
skullanizer.put(EntityWitch.class.getSimpleName(), BONES_VILLAGER);

View File

@ -3,6 +3,7 @@ package com.hbm.render.item.weapon.sedna;
import org.lwjgl.opengl.GL11;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.main.ResourceManager;
import com.hbm.render.anim.HbmAnimations;
@ -17,7 +18,7 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
@Override
public float getViewFOV(ItemStack stack, float fov) {
float aimingProgress = ItemGunBaseNT.prevAimingProgress + (ItemGunBaseNT.aimingProgress - ItemGunBaseNT.prevAimingProgress) * interp;
return fov * (1 - aimingProgress * 0.75F);
return fov * (1 - aimingProgress * (hasScope(stack) ? 0.75F : 0.66F));
}
@Override
@ -25,15 +26,22 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.5F * offset, -1.5F * offset, 2.5F * offset,
0, -7.375 / 8D, 0.75);
if(hasScope(stack)) {
standardAimingTransform(stack,
-1.5F * offset, -1.5F * offset, 2.5F * offset,
0, -7.375 / 8D, 0.75);
} else {
standardAimingTransform(stack,
-1.5F * offset, -1.5F * offset, 2.5F * offset,
0, -5.25 / 8D, 1);
}
}
@Override
public void renderFirstPerson(ItemStack stack) {
if(ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
if(hasScope(stack) && ItemGunBaseNT.prevAimingProgress == 1 && ItemGunBaseNT.aimingProgress == 1) return;
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lasrifle_tex);
double scale = 0.3125D;
GL11.glScaled(scale, scale, scale);
@ -52,9 +60,8 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
GL11.glShadeModel(GL11.GL_SMOOTH);
ResourceManager.lasrifle.renderPart("Gun");
ResourceManager.lasrifle.renderPart("Barrel");
ResourceManager.lasrifle.renderPart("Stock");
ResourceManager.lasrifle.renderPart("Scope");
if(hasScope(stack)) ResourceManager.lasrifle.renderPart("Scope");
GL11.glPushMatrix();
GL11.glTranslated(0, -0.375, 2.375);
@ -68,6 +75,11 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
ResourceManager.lasrifle.renderPart("Battery");
GL11.glPopMatrix();
if(!hasShotgun(stack)) ResourceManager.lasrifle.renderPart("Barrel");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lasrifle_mods_tex);
if(hasShotgun(stack)) ResourceManager.lasrifle_mods.renderPart("BarrelShotgun");
if(hasCapacitor(stack)) ResourceManager.lasrifle_mods.renderPart("UnderBarrel");
GL11.glShadeModel(GL11.GL_FLAT);
}
@ -83,11 +95,11 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
@Override
public void setupInv(ItemStack stack) {
super.setupInv(stack);
double scale = 1.0625D;
double scale = 1.03125D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(25, 1, 0, 0);
GL11.glRotated(45, 0, 1, 0);
GL11.glTranslated(0.5, 0, 0);
GL11.glTranslated(0.75, 0, 0);
}
@Override
@ -95,7 +107,7 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
double scale = -6.25D;
GL11.glScaled(scale, scale, scale);
GL11.glRotated(90, 0, 1, 0);
GL11.glTranslated(0, -1, 0);
GL11.glTranslated(0, -1, -1);
}
@Override
@ -105,11 +117,26 @@ public class ItemRenderLasrifle extends ItemRenderWeaponBase {
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lasrifle_tex);
ResourceManager.lasrifle.renderPart("Gun");
ResourceManager.lasrifle.renderPart("Barrel");
ResourceManager.lasrifle.renderPart("Stock");
ResourceManager.lasrifle.renderPart("Scope");
if(hasScope(stack)) ResourceManager.lasrifle.renderPart("Scope");
ResourceManager.lasrifle.renderPart("Lever");
ResourceManager.lasrifle.renderPart("Battery");
if(!hasShotgun(stack)) ResourceManager.lasrifle.renderPart("Barrel");
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lasrifle_mods_tex);
if(hasShotgun(stack)) ResourceManager.lasrifle_mods.renderPart("BarrelShotgun");
if(hasCapacitor(stack)) ResourceManager.lasrifle_mods.renderPart("UnderBarrel");
GL11.glShadeModel(GL11.GL_FLAT);
}
public boolean hasScope(ItemStack stack) {
return !WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_LAS_AUTO);
}
public boolean hasShotgun(ItemStack stack) {
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_LAS_SHOTGUN);
}
public boolean hasCapacitor(ItemStack stack) {
return WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_LAS_CAPACITOR);
}
}

View File

@ -7,14 +7,12 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.main.ResourceManager;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -44,7 +42,6 @@ public class RenderSkeletonHolder extends TileEntitySpecialRenderer {
if(pedestal.item != null) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ItemStack stack = pedestal.item.copy();
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);

View File

@ -2,6 +2,7 @@ package com.hbm.util;
import com.google.common.collect.Sets;
import com.hbm.config.GeneralConfig;
import com.hbm.main.MainRegistry;
import com.hbm.main.ModEventHandler;
import cpw.mods.fml.relauncher.ReflectionHelper;
@ -67,6 +68,10 @@ public class ShadyUtil {
public static String checksum = "dpXt\\Xnr\\Yzm";
public static String testCase = "dYPq\\YzrNm3FUH;P[ZTq";
public static String testValue = "WGm?";
public static String smTest1 = "hgwS";
public static String smTest2 = "8Sfw";
public static String smTest3 = "j11D";
public static String smTest4 = "s783";
public static Set<String> contributors = Sets.newHashSet(new String[] {
"06ab7c03-55ce-43f8-9d3c-2850e3c652de", //mustang_rudolf
@ -131,6 +136,9 @@ public class ShadyUtil {
public static void test() {
if(!GeneralConfig.enableDebugMode) return; //only run in debug mode
//unit test for smooshing
MainRegistry.logger.debug(smoosh(smTest1, smTest2, smTest3, smTest4));
try {
Class test = Class.forName(decode(offset(signature, -2)));
@ -139,7 +147,7 @@ public class ShadyUtil {
System.out.println("TEST SECTION START");
Class toLoad = Class.forName(decode(offset(testCase, -2)));
Field toRead = ReflectionHelper.findField(toLoad, decode(offset(testValue, -2)));
if(new Random(System.currentTimeMillis()).nextInt(4) == 0) ModEventHandler.reference = toRead;
if(new Random(System.currentTimeMillis()).nextInt(10) == 0) ModEventHandler.reference = toRead;
System.out.println("TEST SECTION END");
}
} catch(Throwable e) { }

View File

@ -3729,6 +3729,9 @@ item.weapon_mod_special.choke.name=Choke
item.weapon_mod_special.furniture_black.name=Polymergriff (Schwarz)
item.weapon_mod_special.furniture_green.name=Polymergriff (Grün)
item.weapon_mod_special.greasegun.name=Grease Gun Modernisierungskit
item.weapon_mod_special.las_auto.name=Lasergewehr - Autommatischer Verschluss
item.weapon_mod_special.las_capacitor.name=Lasergewehr - Erweiterter Kondensator
item.weapon_mod_special.las_shotgun.name=Lasergewehr - Strahlteiler
item.weapon_mod_special.saw.name=Bügelsäge
item.weapon_mod_special.scope.name=Ziehlvorrichtung
item.weapon_mod_special.silencer.name=Schalldämpfer

View File

@ -4756,6 +4756,9 @@ item.weapon_mod_special.choke.name=Choke
item.weapon_mod_special.furniture_black.name=Polymer Furniture (Black)
item.weapon_mod_special.furniture_green.name=Polymer Furniture (Green)
item.weapon_mod_special.greasegun.name=Grease Gun Modernization Kit
item.weapon_mod_special.las_auto.name=Laser Rifle Automatic Receiver
item.weapon_mod_special.las_capacitor.name=Laser Rifle Extended Capacitor
item.weapon_mod_special.las_shotgun.name=Laser Rifle Beam Splitter
item.weapon_mod_special.saw.name=Hacksaw
item.weapon_mod_special.scope.name=Scope
item.weapon_mod_special.silencer.name=Silencer

View File

@ -0,0 +1,422 @@
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
o UnderBarrel
v -0.562500 -0.750000 4.000000
v 0.562500 -0.750000 4.000000
v 0.562500 -0.750000 3.000000
v 0.562500 0.750000 4.000000
v -0.562500 0.750000 4.000000
v -0.562500 0.750000 3.000000
v 0.562500 0.750000 3.000000
v -0.562500 -0.750000 3.000000
v 0.562500 0.500000 4.500000
v -0.562500 0.500000 4.500000
v -0.562500 -0.500000 5.000000
v 0.562500 0.500000 5.000000
v -0.562500 0.500000 5.000000
v 0.562500 -0.500000 5.000000
v -0.562500 -0.250000 9.000000
v 0.562500 -0.250000 9.000000
v 0.562500 0.500000 9.000000
v -0.562500 0.500000 9.000000
v -0.437500 -0.500000 5.000000
v -0.437500 -0.500000 9.000000
v 0.437500 -0.500000 5.000000
v 0.437500 -0.500000 9.000000
v 0.437500 0.500000 9.000000
v -0.437500 0.500000 9.000000
v 0.437500 -0.500000 11.000000
v 0.437500 0.500000 11.000000
v -0.437500 0.500000 11.000000
v -0.437500 -0.500000 11.000000
v 0.375000 0.499999 11.750000
v -0.375000 0.499999 11.750000
v 0.375000 -0.250001 11.750000
v -0.375000 -0.250001 11.750000
vt 0.078947 0.080000
vt 0.144737 0.000000
vt 0.144737 0.080000
vt 0.289474 0.080000
vt 0.223684 0.000000
vt 0.223684 0.080000
vt 0.289474 0.000000
vt 0.223684 0.000000
vt 0.223684 0.080000
vt 0.078947 0.000000
vt 0.000000 0.080000
vt 0.000000 0.000000
vt 0.289474 0.120000
vt 0.223684 0.120000
vt 0.078947 0.160000
vt 0.289474 0.160000
vt 0.223684 0.160000
vt 0.144737 0.160000
vt 0.157895 0.160000
vt 0.210526 0.160000
vt 0.210526 0.120000
vt 0.013158 0.120000
vt 0.013158 0.160000
vt 0.065789 0.160000
vt 0.078947 0.480000
vt 0.144737 0.480000
vt 0.210526 0.480000
vt 0.171053 0.480000
vt 0.289474 0.480000
vt 0.223684 0.480000
vt 0.078947 0.480000
vt 0.144737 0.480000
vt 0.144737 0.540000
vt 0.078947 0.540000
vt 0.052632 0.480000
vt 0.013158 0.480000
vt 0.394737 0.160000
vt 0.447368 0.160000
vt 0.394737 0.480000
vt 0.447368 0.480000
vt 0.289474 0.480000
vt 0.289474 0.160000
vt 0.342105 0.480000
vt 0.342105 0.480000
vt 0.289474 0.620000
vt 0.342105 0.620000
vt 0.500000 0.480000
vt 0.447368 0.620000
vt 0.447368 0.480000
vt 0.500000 0.620000
vt 0.394737 0.620000
vt 0.342105 0.620000
vt 0.447368 0.620000
vt 0.447368 0.680000
vt 0.500000 0.680000
vt 0.302632 0.680000
vt 0.342105 0.680000
vt 0.342105 0.680000
vt 0.381579 0.680000
vt 0.381579 0.740000
vt 0.342105 0.740000
vt 0.342105 0.680000
vt 0.381579 0.680000
vt 0.401316 0.680000
vt 0.440789 0.680000
vn 0.0000 -1.0000 -0.0000
vn 0.0000 0.9732 0.2298
vn 0.0000 1.0000 0.0000
vn 1.0000 0.0000 0.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 -0.9701 0.2425
vn 0.0000 -0.9882 0.1531
vn 0.0000 -0.9981 0.0624
vn 0.0000 0.0000 1.0000
vn 0.9993 0.0000 0.0368
vn 0.9991 0.0000 0.0416
vn -0.9993 0.0000 0.0368
vn -0.9991 0.0000 0.0416
vn 0.0000 -0.9877 0.1561
vn 0.9965 0.0000 0.0830
vn -0.9965 0.0000 0.0830
vn 0.0000 -0.9487 0.3162
s 1
f 1/1/1 3/2/1 2/3/1
f 4/4/2 6/5/3 5/6/2
f 7/7/3 6/5/3 4/4/2
f 2/3/4 7/8/4 4/9/4
f 3/2/4 7/8/4 2/3/4
f 3/2/1 1/1/1 8/10/1
f 5/11/5 8/10/5 1/1/5
f 5/11/5 6/12/5 8/10/5
f 4/4/2 5/6/2 9/13/2
f 10/14/2 9/13/2 5/6/2
f 1/1/6 2/3/6 11/15/7
f 9/13/2 10/14/2 12/16/3
f 13/17/3 12/16/3 10/14/2
f 11/15/7 2/3/6 14/18/7
f 14/19/4 2/3/4 12/20/4
f 2/3/4 4/9/4 9/21/4
f 12/20/4 2/3/4 9/21/4
f 1/1/5 10/22/5 5/11/5
f 10/22/5 1/1/5 13/23/5
f 1/1/5 11/24/5 13/23/5
f 15/25/8 14/18/7 16/26/8
f 14/18/7 15/25/8 11/15/7
f 17/27/4 16/28/4 12/20/4
f 16/28/4 14/19/4 12/20/4
f 12/16/3 13/17/3 17/29/3
f 18/30/3 17/29/3 13/17/3
f 17/31/9 18/32/9 15/33/9
f 16/34/9 17/31/9 15/33/9
f 15/35/5 18/36/5 11/24/5
f 18/36/5 13/23/5 11/24/5
f 19/37/1 21/38/1 20/39/1
f 22/40/1 20/39/1 21/38/1
f 22/41/4 21/42/4 23/43/4
f 20/39/5 24/44/5 19/37/5
f 25/45/10 23/43/4 26/46/11
f 23/43/4 25/45/10 22/41/4
f 24/47/3 26/48/3 23/49/3
f 27/50/3 26/48/3 24/47/3
f 20/39/5 28/51/12 24/44/5
f 27/52/13 24/44/5 28/51/12
f 20/39/1 22/40/1 25/53/14
f 28/51/14 20/39/1 25/53/14
f 26/48/3 27/50/3 29/54/3
f 30/55/3 29/54/3 27/50/3
f 25/45/10 26/46/11 31/56/15
f 29/57/15 31/56/15 26/46/11
f 32/58/9 31/59/9 29/60/9
f 29/60/9 30/61/9 32/58/9
f 30/62/16 27/52/13 32/63/16
f 28/51/12 32/63/16 27/52/13
f 32/64/17 28/51/14 31/65/17
f 25/53/14 31/65/17 28/51/14
o BarrelShotgun
v -0.500000 1.375000 4.000000
v -0.433012 1.625000 4.000000
v -0.649518 1.750000 4.500000
v 0.433013 1.625000 4.000000
v 0.500000 1.375000 4.000000
v 0.750000 1.375000 4.500000
v 0.250000 0.941987 4.000000
v 0.000000 0.875000 4.000000
v 0.000000 0.625000 4.500000
v -0.433012 1.125000 4.000000
v -0.750000 1.375000 4.500000
v 0.250000 1.808012 4.000000
v 0.649519 1.750000 4.500000
v -0.250000 1.808013 4.000000
v 0.000000 1.875000 4.000000
v 0.000000 2.125000 4.500000
v 0.433012 1.125000 4.000000
v 0.375000 0.725481 4.500000
v -0.250000 0.941987 4.000000
v -0.649518 1.000000 4.500000
v 0.375000 2.024518 4.500000
v -0.375000 2.024520 4.500000
v 0.649518 1.000000 4.500000
v -0.375000 0.725481 4.500000
v -0.375000 2.024520 5.500000
v -0.649518 1.750000 5.375000
v -0.750000 1.375000 5.375000
v -0.649518 1.000000 5.375000
v 0.000000 2.125000 5.500000
v 0.375000 2.024518 5.500000
v 0.649519 1.750000 5.375000
v 0.750000 1.375000 5.375000
v 0.649518 1.000000 5.375000
v 0.375000 0.725481 5.500000
v 0.000000 0.625000 5.500000
v -0.375000 0.725481 5.500000
v -0.375000 2.000000 12.000000
v 0.000000 2.062500 12.000000
v 0.375000 2.000000 12.000000
v 0.375000 2.000000 5.500000
v 0.000000 2.062500 5.500000
v -0.375000 2.000000 5.500000
v -0.375000 0.750000 12.000000
v 0.375000 0.750000 12.000000
v 0.000000 0.687500 12.000000
v -0.375000 0.750000 5.500000
v 0.000000 0.687500 5.500000
v 0.375000 0.750000 5.500000
v 0.750000 1.375000 4.500000
vt 0.631579 0.560000
vt 0.618421 0.540000
vt 0.618421 0.560000
vt 0.565789 0.560000
vt 0.552632 0.540000
vt 0.552632 0.560000
vt 0.526316 0.560000
vt 0.513158 0.540000
vt 0.513158 0.560000
vt 0.644737 0.560000
vt 0.631579 0.540000
vt 0.578947 0.560000
vt 0.565789 0.540000
vt 0.605263 0.560000
vt 0.592105 0.540000
vt 0.592105 0.560000
vt 0.539474 0.560000
vt 0.526316 0.540000
vt 0.657895 0.560000
vt 0.644737 0.540000
vt 0.578947 0.540000
vt 0.605263 0.540000
vt 0.539474 0.540000
vt 0.671053 0.560000
vt 0.657895 0.540000
vt 0.671053 0.540000
vt 0.605263 0.480000
vt 0.618421 0.490000
vt 0.631579 0.490000
vt 0.644737 0.490000
vt 0.592105 0.480000
vt 0.578947 0.480000
vt 0.565789 0.490000
vt 0.552632 0.490000
vt 0.539474 0.490000
vt 0.526316 0.480000
vt 0.513158 0.480000
vt 0.671053 0.480000
vt 0.657895 0.480000
vt 0.427632 0.080000
vt 0.427632 0.110000
vt 0.440789 0.130000
vt 0.427632 0.080000
vt 0.427632 0.050000
vt 0.440789 0.030000
vt 0.453947 0.440000
vt 0.493421 0.440000
vt 0.473684 0.460000
vt 0.565789 0.460000
vt 0.578947 0.460000
vt 0.565789 0.000000
vt 0.578947 0.000000
vt 0.592105 0.460000
vt 0.592105 0.000000
vt 0.453947 0.340000
vt 0.473684 0.320000
vt 0.493421 0.340000
vt 0.657895 0.000000
vt 0.657895 0.460000
vt 0.671053 0.000000
vt 0.671053 0.460000
vt 0.684211 0.460000
vt 0.684211 0.000000
vt 0.500000 0.000000
vt 0.500000 0.460000
vt 0.440789 0.130000
vt 0.480263 0.130000
vt 0.493421 0.110000
vt 0.493421 0.080000
vt 0.480263 0.030000
vt 0.493421 0.050000
vt 0.493421 0.080000
vt 0.480263 0.130000
vt 0.460526 0.140000
vt 0.460526 0.020000
vn -0.8944 0.0000 -0.4472
vn -0.8445 0.4876 -0.2217
vn -0.7746 0.4472 -0.4472
vn 0.7746 0.4472 -0.4472
vn 0.9751 -0.0000 -0.2217
vn 0.8944 -0.0000 -0.4472
vn 0.4472 -0.7746 -0.4472
vn -0.0000 -0.9751 -0.2217
vn -0.0000 -0.8944 -0.4472
vn -0.7746 -0.4472 -0.4472
vn -0.9751 -0.0000 -0.2217
vn 0.4472 0.7746 -0.4472
vn 0.8445 0.4876 -0.2217
vn -0.4472 0.7746 -0.4472
vn 0.0000 0.9751 -0.2217
vn 0.0000 0.8944 -0.4472
vn 0.7746 -0.4472 -0.4472
vn 0.4876 -0.8445 -0.2217
vn -0.4472 -0.7746 -0.4472
vn -0.8445 -0.4876 -0.2217
vn 0.4876 0.8445 -0.2217
vn -0.4876 0.8445 -0.2217
vn 0.8445 -0.4876 -0.2217
vn -0.4876 -0.8445 -0.2217
vn -0.4743 0.8804 0.0000
vn -0.8537 0.5208 0.0000
vn -1.0000 0.0000 0.0000
vn -0.8537 -0.5208 0.0000
vn 0.0000 1.0000 0.0000
vn 0.4743 0.8804 0.0000
vn 0.8537 0.5208 0.0000
vn 1.0000 -0.0000 0.0000
vn 0.8537 -0.5208 0.0000
vn 0.4743 -0.8804 0.0000
vn 0.0000 -1.0000 0.0000
vn -0.4743 -0.8804 0.0000
vn -0.1246 0.0157 0.9921
vn -0.5230 0.1401 0.8408
vn -0.3667 -0.0000 0.9303
vn -0.5230 -0.1401 0.8408
vn -0.1246 -0.0157 0.9921
vn 0.0000 0.0000 1.0000
vn 0.1644 0.9864 -0.0000
vn -0.1644 0.9864 -0.0000
vn -0.1644 -0.9864 0.0000
vn 0.1644 -0.9864 0.0000
vn 0.3667 -0.0000 0.9303
vn 0.5230 0.1401 0.8408
vn 0.1246 0.0157 0.9921
vn 0.1246 -0.0157 0.9921
vn 0.5230 -0.1401 0.8408
s 1
f 33/66/18 35/67/19 34/68/20
f 36/69/21 38/70/22 37/71/23
f 39/72/24 41/73/25 40/74/26
f 42/75/27 43/76/28 33/66/18
f 44/77/29 45/78/30 36/69/21
f 46/79/31 48/80/32 47/81/33
f 49/82/34 50/83/35 39/72/24
f 51/84/36 52/85/37 42/75/27
f 47/81/33 53/86/38 44/77/29
f 34/68/20 54/87/39 46/79/31
f 37/71/23 55/88/40 49/82/34
f 40/89/26 56/90/41 51/84/36
f 33/66/18 43/76/28 35/67/19
f 36/69/21 45/78/30 38/70/22
f 39/72/24 50/83/35 41/73/25
f 42/75/27 52/85/37 43/76/28
f 44/77/29 53/86/38 45/78/30
f 46/79/31 54/87/39 48/80/32
f 49/82/34 55/88/40 50/83/35
f 51/84/36 56/90/41 52/85/37
f 47/81/33 48/80/32 53/86/38
f 34/68/20 35/67/19 54/87/39
f 37/71/23 38/70/22 55/88/40
f 40/89/26 41/91/25 56/90/41
f 54/87/39 35/67/19 57/92/42
f 58/93/43 43/76/28 59/94/44
f 57/92/42 35/67/19 58/93/43
f 60/95/45 59/94/44 52/85/37
f 52/85/37 59/94/44 43/76/28
f 43/76/28 58/93/43 35/67/19
f 57/92/42 61/96/46 54/87/39
f 54/87/39 61/96/46 48/80/32
f 53/86/38 48/80/32 62/97/47
f 61/96/46 62/97/47 48/80/32
f 53/86/38 63/98/48 45/78/30
f 63/98/48 53/86/38 62/97/47
f 63/98/48 64/99/49 45/78/30
f 45/78/30 64/99/49 38/70/22
f 64/99/49 65/100/50 38/70/22
f 38/70/22 65/100/50 55/88/40
f 65/100/50 66/101/51 55/88/40
f 50/83/35 55/88/40 66/101/51
f 66/101/51 67/102/52 50/83/35
f 50/83/35 67/102/52 41/73/25
f 67/103/52 68/104/53 41/91/25
f 68/104/53 60/95/45 56/90/41
f 52/85/37 56/90/41 60/95/45
f 41/91/25 68/104/53 56/90/41
f 57/105/54 58/106/55 59/107/56
f 59/108/56 60/109/57 68/110/58
f 69/111/59 71/112/59 70/113/59
f 72/114/60 73/115/46 71/116/60
f 73/115/46 70/117/46 71/116/60
f 70/117/46 73/115/46 74/118/61
f 69/119/61 70/117/46 74/118/61
f 75/120/59 77/121/59 76/122/59
f 71/112/59 75/120/59 76/122/59
f 75/120/59 71/112/59 69/111/59
f 75/123/44 69/119/44 78/124/44
f 69/119/44 74/118/44 78/124/44
f 77/125/52 75/123/62 79/126/52
f 75/123/62 78/124/62 79/126/52
f 79/126/52 80/127/63 77/125/52
f 76/128/63 77/125/52 80/127/63
f 76/129/49 80/130/49 72/114/49
f 72/114/49 71/116/49 76/129/49
f 57/131/54 59/108/56 68/110/58
f 64/132/64 63/133/65 62/134/66
f 66/135/67 65/136/68 64/137/64
f 64/137/64 62/138/66 66/135/67
f 57/131/54 68/110/58 62/138/66
f 62/138/66 68/110/58 66/135/67
f 57/131/54 62/138/66 61/139/59
f 67/140/59 66/135/67 68/110/58
l 38 81

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB