Merge pull request #2440 from MellowArpeggiation/drilldo

This was an animated terra drill PR but the drill is getting axed so this is now just a bugfix and cleanup PR yay
This commit is contained in:
HbmMods 2025-09-19 08:09:56 +02:00 committed by GitHub
commit 94e3df1751
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
58 changed files with 1401 additions and 1197 deletions

View File

@ -253,36 +253,36 @@ public class EntityMappings {
addSpawn(EntityCreeperGold.class, 1, 1, 1, EnumCreatureType.monster, BiomeGenBase.getBiomeGenArray());
addSpawn(EntityPlasticBag.class, 1, 1, 3, EnumCreatureType.waterCreature, BiomeDictionary.getBiomesForType(Type.OCEAN));
addSpawn(EntityPigeon.class, 1, 5, 10, EnumCreatureType.creature, BiomeDictionary.getBiomesForType(Type.PLAINS));
int id = 0;
for(Quartet<Class<? extends Entity>, String, Integer, Boolean> entry : entityMappings) {
EntityRegistry.registerModEntity(entry.getW(), entry.getX(), id++, MainRegistry.instance, entry.getY(), 1, entry.getZ());
ModEntityList.registerEntity(entry.getW(), entry.getX(), id++, MainRegistry.instance, entry.getY(), 1, entry.getZ());
}
for(Quartet<Class<? extends Entity>, String, Integer, Integer> entry : mobMappings) {
EntityRegistry.registerGlobalEntityID(entry.getW(), entry.getX(), EntityRegistry.findGlobalUniqueEntityId(), entry.getY(), entry.getZ());
ModEntityList.registerEntity(entry.getW(), entry.getX(), id++, MainRegistry.instance, entry.getY(), entry.getZ());
}
}
private static void addEntity(Class<? extends Entity> clazz, String name, int trackingRange) {
addEntity(clazz, name, trackingRange, true);
}
private static void addEntity(Class<? extends Entity> clazz, String name, int trackingRange, boolean velocityUpdates) {
entityMappings.add(new Quartet(clazz, name, trackingRange, velocityUpdates));
}
private static void addMob(Class<? extends Entity> clazz, String name, int color1, int color2) {
mobMappings.add(new Quartet(clazz, name, color1, color2));
}
public static void addSpawn(Class<? extends EntityLiving> entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes) {
for(BiomeGenBase biome : biomes) {
if(biome == null) continue;
if(biome instanceof BiomeGenMushroomIsland) continue;
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
for(SpawnListEntry entry : spawns) {

View File

@ -0,0 +1,149 @@
package com.hbm.entity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityList.EntityEggInfo;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ModEntityList {
private static EntityData[] array = new EntityData[0];
private static final Map<Integer, Class<? extends Entity>> map = new HashMap<Integer, Class<? extends Entity>>();
public static List<Integer> eggIdList = new ArrayList<Integer>();
public static Map<Class<? extends Entity>, Integer> eggIdMap = new HashMap<Class<? extends Entity>, Integer>();
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod) {
registerEntity(entityClass, entityName, id, mod, 80, 3, true, -1, -1, false);
}
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int eggColor1, int eggColor2) {
registerEntity(entityClass, entityName, id, mod, 80, 3, true, eggColor1, eggColor2, true);
}
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates) {
registerEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates, -1, -1, false);
}
public static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColor1, int eggColor2) {
registerEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates, eggColor1, eggColor2, true);
}
private static void registerEntity(Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates, int eggColor1, int eggColor2, boolean hasEgg) {
EntityRegistry.registerModEntity(entityClass, entityName, id, mod, trackingRange, updateFrequency, sendsVelocityUpdates);
if(id >= array.length) {
EntityData[] newArray = new EntityData[id + 5];
System.arraycopy(array, 0, newArray, 0, array.length);
array = newArray;
}
if(array[id] != null)
throw new IllegalArgumentException("ID " + id + " is already being used! Please report this error!");
array[id] = new EntityData(entityName, id, eggColor1, eggColor2, hasEgg);
map.put(id, entityClass);
if(eggColor1 != -1)
registerEntityEgg(entityClass, eggColor1, eggColor2);
}
public static String getName(int id) {
EntityData data = getData(id);
if(data == null)
return null;
return RefStrings.MODID + "." + data.name;
}
public static EntityData getData(int id) {
if(id >= array.length)
return null;
return array[id];
}
public static boolean hasEntitiesWithEggs() {
for(EntityData data : array) {
if(data != null && data.hasEgg) return true;
}
return false;
}
public static Entity createEntityByID(int id, World world) {
EntityData data = getData(id);
if(data == null || !data.hasEgg)
return null;
try {
Class<? extends Entity> cls = map.get(id);
if(cls != null)
return cls.getConstructor(World.class).newInstance(world);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static EntityData[] getDatasWithEggs() {
List<EntityData> list = new LinkedList<EntityData>();
for(Integer id : map.keySet()) {
EntityData data = getData(id);
if(data != null && data.hasEgg)
list.add(data);
}
return list.toArray(new EntityData[list.size()]);
}
public static int eggIDCounter = 499;
@SuppressWarnings("unchecked")
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor) {
int id = getUniqueEntityEggId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
eggIdMap.put(entity, id);
}
public static ItemStack getEggFromEntity(Entity entity) {
return new ItemStack(Items.spawn_egg, 1, eggIdMap.get(entity.getClass()));
}
public static int getUniqueEntityEggId() {
while(EntityList.getClassFromID(++eggIDCounter) != null) {}
eggIdList.add(eggIDCounter);
return eggIDCounter;
}
public static class EntityData {
public final String name;
public final int id, eggColor1, eggColor2;
public final boolean hasEgg;
EntityData(String name, int id, int eggColor1, int eggColor2, boolean hasEgg) {
this.name = name;
this.id = id;
this.eggColor1 = eggColor1;
this.eggColor2 = eggColor2;
this.hasEgg = hasEgg;
}
}
}

View File

@ -7,14 +7,14 @@ import java.util.function.Consumer;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.util.ResourceLocation;
@Deprecated
public class GunConfiguration implements Cloneable {
/**
* alt function restrictions:
* alt can not be reloaded (reload type of 0, ammo cap of 0)
@ -35,9 +35,9 @@ public class GunConfiguration implements Cloneable {
public int firingMode;
//weapon won't fire after weapon breaks (main only)
public int durability;
//animations!
public HashMap<AnimType, BusAnimation> animations = new HashMap<AnimType, BusAnimation>();
public HashMap<GunAnimation, BusAnimation> animations = new HashMap<GunAnimation, BusAnimation>();
//lazy-ish loading for animations, required for loading animations from ResourceManager, since that occurs after we've initialised the guns
public Consumer<Void> loadAnimations;
public boolean animationsLoaded = false;
@ -47,7 +47,7 @@ public class GunConfiguration implements Cloneable {
public boolean isCentered;
//texture overlay when sneaking
public ResourceLocation scopeTexture;
//duration of every animation cycle, used also for how quickly a burst fire rifle can fire
public int firingDuration;
//sound path to the shooting sound
@ -65,7 +65,7 @@ public class GunConfiguration implements Cloneable {
//whether the reload sound should be played at the beginning or at the end of the reload
public boolean reloadSoundEnd = true;
public String equipSound = "";
//how much ammo the clip can hold, 0 if drawn from inventory
public int ammoCap;
//0 does not allow direct reload, 1 is full clip, 2 is single bullet
@ -76,7 +76,7 @@ public class GunConfiguration implements Cloneable {
public boolean allowsInfinity;
//whether the ammo count should be displayed
public boolean showAmmo = true;
//for electrically powered weapons:
//the Maximum capacity of the gun
public long maxCharge;
@ -84,7 +84,7 @@ public class GunConfiguration implements Cloneable {
public long chargeRate;
//how much energy is discharged per shot
public long dischargePerShot;
public String name = "";
public EnumGunManufacturer manufacturer = EnumGunManufacturer.NONE;
public List<String> comment = new ArrayList<String>();
@ -94,7 +94,7 @@ public class GunConfiguration implements Cloneable {
//crosshair
public Crosshair crosshair;
//casing eject behavior
public CasingEjector ejector = null;

View File

@ -3,10 +3,15 @@ package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.CompressorRecipes;
import net.minecraft.item.ItemStack;
public class CompressorHandler extends NEIUniversalHandler {
public CompressorHandler() {
super(ModBlocks.machine_compressor.getLocalizedName(), ModBlocks.machine_compressor, CompressorRecipes.getRecipes());
super(ModBlocks.machine_compressor.getLocalizedName(), new ItemStack[] {
new ItemStack(ModBlocks.machine_compressor),
new ItemStack(ModBlocks.machine_compressor_compact),
}, CompressorRecipes.getRecipes());
}
@Override

View File

@ -1,14 +1,29 @@
package com.hbm.items;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.HbmAnimationPacket;
import com.hbm.render.anim.BusAnimation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public interface IAnimatedItem {
public interface IAnimatedItem<T extends Enum<?>> {
/** Fetch the animation for a given type */
public BusAnimation getAnimation(T type, ItemStack stack);
/** Should a player holding this item aim it like a gun/bow? */
public boolean shouldPlayerModelAim(ItemStack stack);
// Runtime erasure means we have to explicitly give the class a second time :(
public Class<T> getEnum();
// Run a specified animation
public default void playAnimation(EntityPlayer player, T type) {
if(player instanceof EntityPlayerMP) {
PacketDispatcher.wrapper.sendTo(new HbmAnimationPacket(type.ordinal(), 0, 0), (EntityPlayerMP) player);
}
}
@SideOnly(Side.CLIENT)
public BusAnimation getAnimation(NBTTagCompound data, ItemStack stack);
}

View File

@ -7,6 +7,7 @@ import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.ToolAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.util.EntityDamageUtil;
@ -14,12 +15,9 @@ import com.hbm.util.EntityDamageUtil;
import api.hbm.block.IToolable;
import api.hbm.block.IToolable.ToolType;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -27,7 +25,7 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class ItemBoltgun extends Item implements IAnimatedItem {
public class ItemBoltgun extends Item implements IAnimatedItem<ToolAnimation> {
public ItemBoltgun() {
this.setMaxStackSize(1);
@ -73,13 +71,10 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
data.setFloat("size", 1F);
data.setByte("count", (byte)1);
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, entity.posX, entity.posY + entity.height / 2 - entity.yOffset, entity.posZ), new TargetPoint(world.provider.dimensionId, entity.posX, entity.posY, entity.posZ, 50));
} else {
// doing this on the client outright removes the packet delay and makes the animation silky-smooth
NBTTagCompound d0 = new NBTTagCompound();
d0.setString("type", "anim");
d0.setString("mode", "generic");
MainRegistry.proxy.effectNT(d0);
playAnimation(player, ToolAnimation.SWING);
}
return true;
}
}
@ -110,10 +105,7 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
data.setByte("count", (byte)1);
PacketThreading.createAllAroundThreadedPacket(new AuxParticlePacketNT(data, x + fX + dir.offsetX * off, y + fY + dir.offsetY * off, z + fZ + dir.offsetZ * off), new TargetPoint(world.provider.dimensionId, x, y, z, 50));
NBTTagCompound d0 = new NBTTagCompound();
d0.setString("type", "anim");
d0.setString("mode", "generic");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(d0, 0, 0, 0), (EntityPlayerMP) player);
playAnimation(player, ToolAnimation.SWING);
}
return false;
@ -123,11 +115,21 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
}
@Override
@SideOnly(Side.CLIENT)
public BusAnimation getAnimation(NBTTagCompound data, ItemStack stack) {
public Class<ToolAnimation> getEnum() {
return ToolAnimation.class;
}
@Override
public BusAnimation getAnimation(ToolAnimation type, ItemStack stack) {
return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence()
.addPos(1, 0, 1, 50)
.addPos(0, 0, 1, 100));
}
@Override
public boolean shouldPlayerModelAim(ItemStack stack) {
return false;
}
}

View File

@ -1,16 +1,19 @@
package com.hbm.items.tool;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.inventory.fluid.FluidType;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.IHeldSoundProvider;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.ToolAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class ItemChainsaw extends ItemToolAbilityFueled implements IHeldSoundProvider {
public class ItemChainsaw extends ItemToolAbilityFueled implements IHeldSoundProvider, IAnimatedItem<ToolAnimation> {
public ItemChainsaw(float damage, double movement, ToolMaterial material, EnumToolType type, int maxFuel, int consumption, int fillRate, FluidType... acceptedFuels) {
super(damage, movement, material, type, maxFuel, consumption, fillRate, acceptedFuels);
@ -25,11 +28,57 @@ public class ItemChainsaw extends ItemToolAbilityFueled implements IHeldSoundPro
if(stack.getItemDamage() >= stack.getMaxDamage())
return false;
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "anim");
nbt.setString("mode", "sSwing");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)entityLiving);
playAnimation((EntityPlayer) entityLiving, ToolAnimation.SWING);
return false;
}
@Override
public BusAnimation getAnimation(ToolAnimation type, ItemStack stack) {
int forward = 150;
int sideways = 100;
int retire = 200;
if(HbmAnimations.getRelevantAnim() == null) {
return new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(0, 0, 90, forward)
.addPos(45, 0, 90, sideways)
.addPos(0, 0, 0, retire))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(0, 0, 3, forward)
.addPos(2, 0, 2, sideways)
.addPos(0, 0, 0, retire));
} else {
double[] rot = HbmAnimations.getRelevantTransformation("SWING_ROT");
double[] trans = HbmAnimations.getRelevantTransformation("SWING_TRANS");
if(System.currentTimeMillis() - HbmAnimations.getRelevantAnim().startMillis < 50) return null;
return new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(rot[0], rot[1], rot[2], 0)
.addPos(0, 0, 90, forward)
.addPos(45, 0, 90, sideways)
.addPos(0, 0, 0, retire))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(trans[0], trans[1], trans[2], 0)
.addPos(0, 0, 3, forward)
.addPos(2, 0, 2, sideways)
.addPos(0, 0, 0, retire));
}
}
@Override
public Class<ToolAnimation> getEnum() {
return ToolAnimation.class;
}
@Override
public boolean shouldPlayerModelAim(ItemStack stack) {
return false;
}
}

View File

@ -1,19 +1,27 @@
package com.hbm.items.weapon;
import java.util.List;
import java.util.Random;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.IEquipReceiver;
import com.hbm.items.tool.ItemSwordAbility;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.ToolAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.util.ShadyUtil;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
@ -25,9 +33,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver, IAnimatedItem<ToolAnimation> {
public ItemCrucible(float damage, double movement, ToolMaterial material) {
super(damage, movement, material);
@ -44,10 +53,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
World world = player.worldObj;
world.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.cDeploy", 1.0F, 1.0F);
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "anim");
nbt.setString("mode", "crucible");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)player);
playAnimation(player, ToolAnimation.EQUIP);
}
}
@ -64,10 +70,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
if(stack.getItemDamage() >= stack.getMaxDamage())
return false;
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("type", "anim");
nbt.setString("mode", "cSwing");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)entityLiving);
playAnimation((EntityPlayerMP)entityLiving, ToolAnimation.SWING);
return false;
}
@ -132,4 +135,58 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
list.add(charge);
}
@Override
public BusAnimation getAnimation(ToolAnimation type, ItemStack stack) {
/* crucible deploy */
if(type == ToolAnimation.EQUIP) {
return new BusAnimation()
.addBus("GUARD_ROT", new BusAnimationSequence()
.addPos(90, 0, 1, 0)
.addPos(90, 0, 1, 800)
.addPos(0, 0, 1, 50));
}
/* crucible swing */
if(type == ToolAnimation.SWING) {
if(HbmAnimations.getRelevantTransformation("SWING_ROT")[0] == 0) {
int offset = itemRand.nextInt(80) - 20;
playSwing(0.8F + itemRand.nextFloat() * 0.2F);
return new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(90 - offset, 90 - offset, 35, 75)
.addPos(90 + offset, 90 - offset, -45, 150)
.addPos(0, 0, 0, 500))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(-3, 0, 0, 75)
.addPos(8, 0, 0, 150)
.addPos(0, 0, 0, 500));
}
}
return null;
}
// could do this better, but this preserves existing behaviour the closest with the least amount
// of effort, without crashing servers (I'm learning my lesson :o_ )
@SideOnly(Side.CLIENT)
private void playSwing(float pitchProbablyIDontFuckingCare) {
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:weapon.cSwing"), pitchProbablyIDontFuckingCare));
}
@Override
public Class<ToolAnimation> getEnum() {
return ToolAnimation.class;
}
@Override
public boolean shouldPlayerModelAim(ItemStack stack) {
return false;
}
}

View File

@ -11,8 +11,8 @@ import com.hbm.items.weapon.sedna.factory.GunStateDecider;
import com.hbm.items.weapon.sedna.factory.Lego;
import com.hbm.items.weapon.sedna.hud.IHUDComponent;
import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -20,13 +20,13 @@ import net.minecraft.util.ResourceLocation;
/**
* Despite how complicated the GunConfig looks, it actually only exists to hold together a bunch of fields. Everything else is infrastructure for getting and setting.
* The gun config determines general gun specific stats like durability, crosshair, animations, receivers, click handling and the decider.
*
*
* @author hbm
* */
public class GunConfig {
public List<SmokeNode> smokeNodes = new ArrayList();
public List<SmokeNode> smokeNodes = new ArrayList<>();
public static final String O_RECEIVERS = "O_RECEIVERS";
public static final String F_DURABILITY = "F_DURABILITY";
public static final String I_DRAWDURATION = "I_DRAWDURATION";
@ -51,9 +51,9 @@ public class GunConfig {
public static final String CON_DECIDER = "CON_DECIDER";
public static final String FUN_ANIMNATIONS = "FUN_ANIMNATIONS";
public static final String O_HUDCOMPONENTS = "O_HUDCOMPONENTS";
/* FIELDS */
public int index;
/** List of receivers used by the gun, primary and secondary are usually indices 0 and 1 respectively, if applicable */
protected Receiver[] receivers_DNA;
@ -84,9 +84,9 @@ public class GunConfig {
/** The engine for the state machine that determines the gun's overall behavior */
protected BiConsumer<ItemStack, LambdaContext> decider_DNA;
/** Lambda that returns the relevant animation for the given params */
protected BiFunction<ItemStack, AnimType, BusAnimation> animations_DNA;
protected BiFunction<ItemStack, GunAnimation, BusAnimation> animations_DNA;
protected IHUDComponent[] hudComponents_DNA;
/* GETTERS */
public Receiver[] getReceivers(ItemStack stack) { return WeaponModManager.eval(receivers_DNA, stack, O_RECEIVERS, this, this.index); }
@ -112,14 +112,14 @@ public class GunConfig {
public BiConsumer<ItemStack, LambdaContext> getReleaseSecondary(ItemStack stack) { return WeaponModManager.eval(this.onReleaseSecondary_DNA, stack, CON_ONRELEASESECONDARY, this, this.index); }
public BiConsumer<ItemStack, LambdaContext> getReleaseTertiary(ItemStack stack) { return WeaponModManager.eval(this.onReleaseTertiary_DNA, stack, CON_ONRELEASETERTIARY, this, this.index); }
public BiConsumer<ItemStack, LambdaContext> getReleaseReload(ItemStack stack) { return WeaponModManager.eval(this.onReleaseReload_DNA, stack, CON_ONRELEASERELOAD, this, this.index); }
public BiConsumer<ItemStack, LambdaContext> getDecider(ItemStack stack) { return WeaponModManager.eval(this.decider_DNA, stack, CON_DECIDER, this, this.index); }
public BiFunction<ItemStack, AnimType, BusAnimation> getAnims(ItemStack stack) { return WeaponModManager.eval(this.animations_DNA, stack, FUN_ANIMNATIONS, this, this.index); }
public IHUDComponent[] getHUDComponents(ItemStack stack) { return WeaponModManager.eval(this.hudComponents_DNA, stack, O_HUDCOMPONENTS, this, this.index); }
public BiFunction<ItemStack, GunAnimation, BusAnimation> getAnims(ItemStack stack) { return WeaponModManager.eval(this.animations_DNA, stack, FUN_ANIMNATIONS, this, this.index); }
public IHUDComponent[] getHUDComponents(ItemStack stack) { return WeaponModManager.eval(this.hudComponents_DNA, stack, O_HUDCOMPONENTS, this, this.index); }
/* SETTERS */
public GunConfig rec(Receiver... receivers) { this.receivers_DNA = receivers; for(Receiver r : receivers_DNA) r.parent = this; return this; }
public GunConfig dura(float dura) { this.durability_DNA = dura; return this; }
public GunConfig draw(int draw) { this.drawDuration_DNA = draw; return this; }
@ -134,7 +134,7 @@ public class GunConfig {
public GunConfig smoke(BiConsumer<ItemStack, LambdaContext> smoke) { this.smokeHandler_DNA = smoke; return this; }
public GunConfig orchestra(BiConsumer<ItemStack, LambdaContext> orchestra) { this.orchestra_DNA = orchestra; return this; }
//press
public GunConfig pp(BiConsumer<ItemStack, LambdaContext> lambda) { this.onPressPrimary_DNA = lambda; return this; }
public GunConfig ps(BiConsumer<ItemStack, LambdaContext> lambda) { this.onPressSecondary_DNA = lambda; return this; }
@ -146,14 +146,14 @@ public class GunConfig {
public GunConfig rs(BiConsumer<ItemStack, LambdaContext> lambda) { this.onReleaseSecondary_DNA = lambda; return this; }
public GunConfig rt(BiConsumer<ItemStack, LambdaContext> lambda) { this.onReleaseTertiary_DNA = lambda; return this; }
public GunConfig rr(BiConsumer<ItemStack, LambdaContext> lambda) { this.onReleaseReload_DNA = lambda; return this; }
//decider
public GunConfig decider(BiConsumer<ItemStack, LambdaContext> lambda) { this.decider_DNA = lambda; return this; }
//client
public GunConfig anim(BiFunction<ItemStack, AnimType, BusAnimation> lambda) { this.animations_DNA = lambda; return this; }
public GunConfig hud(IHUDComponent... components) { this.hudComponents_DNA = components; return this; }
public GunConfig anim(BiFunction<ItemStack, GunAnimation, BusAnimation> lambda) { this.animations_DNA = lambda; return this; }
public GunConfig hud(IHUDComponent... components) { this.hudComponents_DNA = components; return this; }
/** Standard package for keybind handling and decider using LEGO prefabs: Primary fire on LMB,
* reload on R, aiming on MMB and the standard decider which includes jamming and auto fire handling*/
public GunConfig setupStandardConfiguration() {

View File

@ -24,8 +24,8 @@ import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.GunAnimationPacket;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.packet.toclient.HbmAnimationPacket;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.util.RenderScreenOverlay;
import com.hbm.sound.AudioWrapper;
import com.hbm.util.BobMathUtil;
@ -247,8 +247,8 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
@Override
public void onEquip(EntityPlayer player, ItemStack stack) {
for(int i = 0; i < this.configs_DNA.length; i++) {
if(this.getLastAnim(stack, i) == AnimType.EQUIP && this.getAnimTimer(stack, i) < 5) continue;
playAnimation(player, stack, AnimType.EQUIP, i);
if(this.getLastAnim(stack, i) == GunAnimation.EQUIP && this.getAnimTimer(stack, i) < 5) continue;
playAnimation(player, stack, GunAnimation.EQUIP, i);
this.setPrimary(stack, i, false);
this.setSecondary(stack, i, false);
this.setTertiary(stack, i, false);
@ -256,9 +256,9 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
}
}
public static void playAnimation(EntityPlayer player, ItemStack stack, AnimType type, int index) {
public static void playAnimation(EntityPlayer player, ItemStack stack, GunAnimation type, int index) {
if(player instanceof EntityPlayerMP) {
PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(type.ordinal(), 0, index), (EntityPlayerMP) player);
PacketDispatcher.wrapper.sendTo(new HbmAnimationPacket(type.ordinal(), 0, index), (EntityPlayerMP) player);
setLastAnim(stack, index, type);
setAnimTimer(stack, index, 0);
}
@ -327,7 +327,7 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
this.setState(stack, i, GunState.DRAWING);
this.setTimer(stack, i, configs[i].getDrawDuration(stack));
}
this.setLastAnim(stack, i, AnimType.CYCLE); //prevents new guns from initializing with DRAWING, 0
this.setLastAnim(stack, i, GunAnimation.CYCLE); //prevents new guns from initializing with DRAWING, 0
}
this.setIsAiming(stack, false);
this.setReloadCancel(stack, false);
@ -371,8 +371,8 @@ public class ItemGunBaseNT extends Item implements IKeybindReceiver, IItemHUD, I
public static boolean getIsLockedOn(ItemStack stack) { return getValueBool(stack, KEY_LOCKEDON); }
public static void setIsLockedOn(ItemStack stack, boolean value) { setValueBool(stack, KEY_LOCKEDON, value); }
// ANIM TRACKING //
public static AnimType getLastAnim(ItemStack stack, int index) { return EnumUtil.grabEnumSafely(AnimType.class, getValueInt(stack, KEY_LASTANIM + index)); }
public static void setLastAnim(ItemStack stack, int index, AnimType value) { setValueInt(stack, KEY_LASTANIM + index, value.ordinal()); }
public static GunAnimation getLastAnim(ItemStack stack, int index) { return EnumUtil.grabEnumSafely(GunAnimation.class, getValueInt(stack, KEY_LASTANIM + index)); }
public static void setLastAnim(ItemStack stack, int index, GunAnimation value) { setValueInt(stack, KEY_LASTANIM + index, value.ordinal()); }
public static int getAnimTimer(ItemStack stack, int index) { return getValueInt(stack, KEY_ANIMTIMER + index); }
public static void setAnimTimer(ItemStack stack, int index, int value) { setValueInt(stack, KEY_ANIMTIMER + index, value); }

View File

@ -7,17 +7,17 @@ import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class GunStateDecider {
/**
/**
* The meat and bones of the gun system's state machine.
* This standard decider can handle guns with an automatic primary receiver, as well as one receiver's reloading state.
* It supports draw delays as well as semi and auto fire
@ -30,83 +30,83 @@ public class GunStateDecider {
deciderStandardReload(stack, ctx, lastState, 0, index);
deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getPrimary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
};
/** Transitions the gun from DRAWING to IDLE */
public static void deciderStandardFinishDraw(ItemStack stack, GunState lastState, int index) {
//transition to idle
if(lastState == GunState.DRAWING) {
ItemGunBaseNT.setState(stack, index, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, index, 0);
}
}
/** Transitions the gun from DRAWING to IDLE */
public static void deciderStandardClearJam(ItemStack stack, GunState lastState, int index) {
//transition to idle
if(lastState == GunState.JAMMED) {
ItemGunBaseNT.setState(stack, index, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, index, 0);
}
}
/** Triggers a reload action on the first receiver. If the mag is not full and reloading is still possible, set to RELOADING, otherwise IDLE */
public static void deciderStandardReload(ItemStack stack, LambdaContext ctx, GunState lastState, int recIndex, int gunIndex) {
if(lastState == GunState.RELOADING) {
EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer();
GunConfig cfg = ctx.config;
Receiver rec = cfg.getReceivers(stack)[recIndex];
IMagazine mag = rec.getMagazine(stack);
mag.reloadAction(stack, ctx.inventory);
boolean cancel = ItemGunBaseNT.getReloadCancel(stack);
//if after reloading the gun can still reload, assume a tube mag and resume reloading
if(!cancel && mag.canReload(stack, ctx.inventory)) {
ItemGunBaseNT.setState(stack, gunIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getReloadCycleDuration(stack));
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD_CYCLE, gunIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.RELOAD_CYCLE, gunIndex);
//if no more reloading can be done, go idle
} else {
if(getStandardJamChance(stack, cfg, gunIndex) > entity.getRNG().nextFloat()) {
ItemGunBaseNT.setState(stack, gunIndex, GunState.JAMMED);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getJamDuration(stack));
ItemGunBaseNT.playAnimation(player, stack, AnimType.JAMMED, gunIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.JAMMED, gunIndex);
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.DRAWING);
int duration = rec.getReloadEndDuration(stack) + (mag.getAmountBeforeReload(stack) <= 0 ? rec.getReloadCockOnEmptyPost(stack) : 0);
ItemGunBaseNT.setTimer(stack, gunIndex, duration);
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD_END, gunIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.RELOAD_END, gunIndex);
}
ItemGunBaseNT.setReloadCancel(stack, false);
}
mag.setAmountAfterReload(stack, mag.getAmount(stack, ctx.inventory));
}
}
public static float getStandardJamChance(ItemStack stack, GunConfig config, int index) {
float percent = (float) ItemGunBaseNT.getWear(stack, index) / config.getDurability(stack);
if(percent < 0.66F) return 0F;
return Math.min((percent - 0.66F) * 4F, 1F);
}
/** Triggers a re-fire of the primary if the fire delay has expired, the left mouse button is down and re-firing is enabled, otherwise switches to IDLE */
public static void deciderAutoRefire(ItemStack stack, LambdaContext ctx, GunState lastState, int recIndex, int gunIndex, BooleanSupplier refireCondition) {
if(lastState == GunState.COOLDOWN) {
EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer();
GunConfig cfg = ctx.config;
Receiver rec = cfg.getReceivers(stack)[recIndex];
//if the gun supports re-fire (i.e. if it's an auto)
if(rec.getRefireOnHold(stack) && refireCondition.getAsBoolean()) {
//if there's a bullet loaded, fire again
@ -114,9 +114,9 @@ public class GunStateDecider {
rec.getOnFire(stack).accept(stack, ctx);
ItemGunBaseNT.setState(stack, gunIndex, GunState.COOLDOWN);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterFire(stack));
if(rec.getFireSound(stack) != null) entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
int remaining = rec.getRoundsPerCycle(stack) - 1;
for(int i = 0; i < remaining; i++) if(rec.getCanFire(stack).apply(stack, ctx)) rec.getOnFire(stack).accept(stack, ctx);
//if not, check if dry firing is allowed for refires
@ -124,7 +124,7 @@ public class GunStateDecider {
//if refire after dry is allowed, switch to COOLDOWN which will trigger a refire, otherwise switch to DRAWING
ItemGunBaseNT.setState(stack, gunIndex, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterDryFire(stack));
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, gunIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE_DRY, gunIndex);
//if not, revert to idle
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
@ -132,7 +132,7 @@ public class GunStateDecider {
}
//if not, go idle
} else {
//reload on empty, only for non-refiring guns
if(rec.getReloadOnEmpty(stack) && rec.getMagazine(stack).getAmount(stack, ctx.inventory) <= 0) {
ItemGunBaseNT.setIsAiming(stack, false);
@ -143,12 +143,12 @@ public class GunStateDecider {
mag.setAmountBeforeReload(stack, loaded);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0));
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD, ctx.configIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.RELOAD, ctx.configIndex);
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0);
}
} else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0);

View File

@ -25,9 +25,9 @@ import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.main.MainRegistry;
import com.hbm.particle.helper.BlackPowderCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -38,38 +38,38 @@ import net.minecraftforge.common.util.ForgeDirection;
/**
* "LEGO" - i.e. standardized building blocks which can be used to set up gun configs easily.
*
*
* small update, 24/11/03: this turned into fucking spaghetti. fuuuuuuuck.
*
*
* @author hbm
*/
@NotableComments
public class Lego {
public static final Random ANIM_RAND = new Random();
/**
* If IDLE and the mag of receiver 0 can be loaded, set state to RELOADING. Used by keybinds. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_RELOAD = (stack, ctx) -> {
EntityPlayer player = ctx.getPlayer();
Receiver rec = ctx.config.getReceivers(stack)[0];
GunState state = ItemGunBaseNT.getState(stack, ctx.configIndex);
if(state == GunState.IDLE) {
ItemGunBaseNT.setIsAiming(stack, false);
IMagazine mag = rec.getMagazine(stack);
if(mag.canReload(stack, ctx.inventory)) {
int loaded = mag.getAmount(stack, ctx.inventory);
mag.setAmountBeforeReload(stack, loaded);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0));
ItemGunBaseNT.playAnimation(player, stack, AnimType.RELOAD, ctx.configIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.RELOAD, ctx.configIndex);
if(ctx.config.getReloadChangesType(stack)) mag.initNewType(stack, ctx.inventory);
} else {
ItemGunBaseNT.playAnimation(player, stack, AnimType.INSPECT, ctx.configIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.INSPECT, ctx.configIndex);
if(!ctx.config.getInspectCancel(stack)) {
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack));
@ -77,10 +77,10 @@ public class Lego {
}
}
};
/** If IDLE and ammo is loaded, fire and set to JUST_FIRED. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_CLICK_PRIMARY = (stack, ctx) -> { clickReceiver(stack, ctx, 0); };
public static void clickReceiver(ItemStack stack, LambdaContext ctx, int receiver) {
EntityLivingBase entity = ctx.entity;
@ -88,42 +88,42 @@ public class Lego {
Receiver rec = ctx.config.getReceivers(stack)[receiver];
int index = ctx.configIndex;
GunState state = ItemGunBaseNT.getState(stack, index);
if(state == GunState.IDLE) {
if(rec.getCanFire(stack).apply(stack, ctx)) {
rec.getOnFire(stack).accept(stack, ctx);
if(rec.getFireSound(stack) != null)
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack));
int remaining = rec.getRoundsPerCycle(stack) - 1;
for(int i = 0; i < remaining; i++) if(rec.getCanFire(stack).apply(stack, ctx)) rec.getOnFire(stack).accept(stack, ctx);
ItemGunBaseNT.setState(stack, index, GunState.COOLDOWN);
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterFire(stack));
} else {
if(rec.getDoesDryFire(stack)) {
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, index);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE_DRY, index);
ItemGunBaseNT.setState(stack, index, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
}
}
}
if(state == GunState.RELOADING) {
ItemGunBaseNT.setReloadCancel(stack, true);
}
}
/** If IDLE, switch mode between 0 and 1. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_CLICK_SECONDARY = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
int index = ctx.configIndex;
GunState state = ItemGunBaseNT.getState(stack, index);
if(state == GunState.IDLE) {
int mode = ItemGunBaseNT.getMode(stack, 0);
ItemGunBaseNT.setMode(stack, index, 1 - mode);
@ -133,12 +133,12 @@ public class Lego {
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "hbm:weapon.switchmode2", 1F, 1F);
}
};
/** Default smoke. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_SMOKE = (stack, ctx) -> {
handleStandardSmoke(ctx.entity, stack, 2000, 0.025D, 1.15D, ctx.configIndex);
};
public static void handleStandardSmoke(EntityLivingBase entity, ItemStack stack, int smokeDuration, double alphaDecay, double widthGrowth, int index) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
long lastShot = gun.lastShot[index];
@ -146,14 +146,14 @@ public class Lego {
boolean smoking = lastShot + smokeDuration > System.currentTimeMillis();
if(!smoking && !smokeNodes.isEmpty()) smokeNodes.clear();
if(smoking) {
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
double accel = 15D;
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
double waggle = 0.025D;
for(SmokeNode node : smokeNodes) {
node.forward += -prev.zCoord * accel + entity.worldObj.rand.nextGaussian() * waggle;
node.lift += prev.yCoord + 1.5D;
@ -161,50 +161,50 @@ public class Lego {
if(node.alpha > 0) node.alpha -= alphaDecay;
node.width *= widthGrowth;
}
double alpha = (System.currentTimeMillis() - lastShot) / (double) smokeDuration;
alpha = (1 - alpha) * 0.5D;
if(gun.getState(stack, index) == GunState.RELOADING || smokeNodes.size() == 0) alpha = 0;
smokeNodes.add(new SmokeNode(alpha));
}
}
/** Toggles isAiming. Used by keybinds. */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TOGGLE_AIM = (stack, ctx) -> { ItemGunBaseNT.setIsAiming(stack, !ItemGunBaseNT.getIsAiming(stack)); };
/** Returns true if the mag has ammo in it. Used by keybind functions on whether to fire, and deciders on whether to trigger a refire. */
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_STANDARD_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0; };
/** Returns true if the mag has ammo in it, and the gun is in the locked on state */
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_LOCKON_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0 && ItemGunBaseNT.getIsLockedOn(stack); };
/** JUMPER - bypasses mag testing and just allows constant fire */
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_DEBUG_CAN_FIRE = (stack, ctx) -> { return true; };
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_FIRE = (stack, ctx) -> {
doStandardFire(stack, ctx, AnimType.CYCLE, true);
doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
};
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, ignores wear */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_NOWEAR_FIRE = (stack, ctx) -> {
doStandardFire(stack, ctx, AnimType.CYCLE, false);
doStandardFire(stack, ctx, GunAnimation.CYCLE, false);
};
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, then resets lockon progress */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_LOCKON_FIRE = (stack, ctx) -> {
doStandardFire(stack, ctx, AnimType.CYCLE, true);
doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
ItemGunBaseNT.setIsLockedOn(stack, false);
};
public static void doStandardFire(ItemStack stack, LambdaContext ctx, AnimType anim, boolean calcWear) {
public static void doStandardFire(ItemStack stack, LambdaContext ctx, GunAnimation anim, boolean calcWear) {
EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer();
int index = ctx.configIndex;
if(anim != null) ItemGunBaseNT.playAnimation(player, stack, anim, ctx.configIndex);
boolean aim = ItemGunBaseNT.getIsAiming(stack);
Receiver primary = ctx.config.getReceivers(stack)[0];
IMagazine mag = primary.getMagazine(stack);
@ -214,19 +214,19 @@ public class Lego {
double forwardOffset = offset.xCoord;
double heightOffset = offset.yCoord;
double sideOffset = offset.zCoord;
/*forwardOffset = 0.75;
heightOffset = -0.125;
sideOffset = -0.25D;*/
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);
float spread = calcSpread(ctx, stack, primary, config, calcWear, index, aim);
if(config.pType == ProjectileType.BULLET) {
EntityBulletBaseMK4 mk4 = new EntityBulletBaseMK4(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset);
if(ItemGunBaseNT.getIsLockedOn(stack)) mk4.lockonTarget = entity.worldObj.getEntityByID(ItemGunBaseNT.getLockonTarget(stack));
@ -242,18 +242,18 @@ public class Lego {
entity.worldObj.spawnEntityInWorld(mk4);
}
}
if(player != null) player.addStat(MainRegistry.statBullets, 1);
mag.useUpAmmo(stack, ctx.inventory, 1);
if(calcWear) ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear, ctx.config.getDurability(stack)));
}
public static float getStandardWearSpread(ItemStack stack, GunConfig config, int index) {
float percent = (float) ItemGunBaseNT.getWear(stack, index) / config.getDurability(stack);
if(percent < 0.5F) return 0F;
return (percent - 0.5F) * 2F;
}
/** Returns the standard multiplier for damage based on wear */
public static float getStandardWearDamage(ItemStack stack, GunConfig config, int index) {
float percent = (float) ItemGunBaseNT.getWear(stack, index) / config.getDurability(stack);
@ -265,7 +265,7 @@ public class Lego {
public static float calcDamage(LambdaContext ctx, ItemStack stack, Receiver primary, boolean calcWear, int index) {
return primary.getBaseDamage(stack) * (calcWear ? getStandardWearDamage(stack, ctx.config, index) : 1);
}
public static float calcSpread(LambdaContext ctx, ItemStack stack, Receiver primary, BulletConfig config, boolean calcWear, int index, boolean aim) {
// the gun's innate spread, SMGs will have poor accuracy no matter what
float spreadInnate = primary.getInnateSpread(stack);
@ -275,10 +275,10 @@ public class Lego {
float spreadHipfire = aim ? 0F : primary.getHipfireSpread(stack);
// extra spread caused by weapon durability, [0;0.125] by default
float spreadWear = !calcWear ? 0F : (getStandardWearSpread(stack, ctx.config, index) * primary.getDurabilitySpread(stack));
return spreadInnate + spreadAmmo + spreadHipfire + spreadWear;
}
public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range) { standardExplode(bullet, mop, range, 1F); }
public static void standardExplode(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float range, float damageMod) {
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, range, bullet.getThrower());
@ -301,9 +301,9 @@ public class Lego {
vnt.setSFX(new ExplosionEffectTiny());
vnt.explode();
}
/** anims for the DEBUG revolver, mostly a copy of the li'lpip but with some fixes regarding the cylinder movement */
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DEBUG_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_DEBUG_ANIMS = (stack, type) -> {
switch(type) {
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
@ -325,15 +325,15 @@ public class Lego {
.addBus("RELAOD_TILT", new BusAnimationSequence().addPos(-15, 0, 0, 100).addPos(65, 0, 0, 100).addPos(45, 0, 0, 50).addPos(0, 0, 0, 200).addPos(0, 0, 0, 200).addPos(-80, 0, 0, 100).addPos(-80, 0, 0, 100).addPos(0, 0, 0, 200))
.addBus("RELOAD_CYLINDER", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(90, 0, 0, 100).addPos(90, 0, 0, 450).addPos(0, 0, 0, 70));
}
return null;
};
/*
* Be honest. Do you genuinely think posting a random screenshot of your game with absolutely ZERO context of what modpack, what
* Shaders if any or literally any context at all would come to a magic solution?
* For all we know you accidentally rubbed Vaseline all over your monitor and jizzed in the hdmi socket of your pc
*
*
* ~ u/Wolfyy47_, 2024
*/
}

View File

@ -17,10 +17,10 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
@ -32,7 +32,7 @@ public class XFactory10ga {
public static BulletConfig g10_du;
public static BulletConfig g10_slug;
public static BulletConfig g10_explosive;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 1.5F); bullet.setDead();
@ -79,12 +79,12 @@ public class XFactory10ga {
.anim(XFactory12ga.LAMBDA_SEXY_ANIMS).orchestra(Orchestras.ORCHESTRA_SHREDDER_SEXY)
).setUnlocalizedName("gun_autoshotgun_heretic");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_DOUBLE_BARREL = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DOUBLE_BARREL_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_DOUBLE_BARREL_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
@ -148,7 +148,7 @@ public class XFactory10ga {
.addPos(-5, 0, 0, 150, IType.SIN_DOWN)
.addPos(0, 0, 0, 100, IType.SIN_FULL));
}
return null;
};
}

View File

@ -32,10 +32,10 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.BobMathUtil;
import com.hbm.util.TrackerUtil;
import com.hbm.util.Vec3NT;
@ -86,11 +86,11 @@ public class XFactory12ga {
public static BulletConfig g12_sub_magnum;
public static BulletConfig g12_sub_explosive;
public static BulletConfig g12_sub_phosphorus;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
Lego.standardExplode(bullet, mop, 2F); bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BOAT = (bullet, mop) -> {
EntityDuchessGambit pippo = new EntityDuchessGambit(bullet.worldObj);
pippo.posX = mop.hitVec.xCoord;
@ -100,13 +100,13 @@ public class XFactory12ga {
bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:weapon.boat", 100F, 1F);
bullet.setDead();
};
public static BulletConfig makeShredderConfig(BulletConfig original, BulletConfig submunition) {
BulletConfig cfg = new BulletConfig().setBeam().setRenderRotations(false).setLife(5).setDamage(original.damageMult * original.projectilesMax).setupDamageClass(DamageClass.LASER);
cfg.setItem(original.ammo);
cfg.setCasing(original.casing);
cfg.setOnBeamImpact((beam, mop) -> {
int projectiles = submunition.projectilesMin;
if(submunition.projectilesMax > submunition.projectilesMin) projectiles += beam.worldObj.rand.nextInt(submunition.projectilesMax - submunition.projectilesMin + 1);
@ -117,9 +117,9 @@ public class XFactory12ga {
mop.hitVec.xCoord += dir.offsetX * 0.1;
mop.hitVec.yCoord += dir.offsetY * 0.1;
mop.hitVec.zCoord += dir.offsetZ * 0.1;
spawnPulse(beam.worldObj, mop, beam.rotationYaw, beam.rotationPitch);
List<Entity> blast = beam.worldObj.getEntitiesWithinAABBExcludingEntity(beam, AxisAlignedBB.getBoundingBox(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord).expand(0.75, 0.75, 0.75));
DamageSource source = BulletConfig.getDamage(beam, beam.getThrower(), DamageClass.LASER);
@ -132,17 +132,17 @@ public class XFactory12ga {
e.attackEntityFrom(source, beam.damage);
}
}
for(int i = 0; i < projectiles; i++) {
EntityBulletBaseMK4 bullet = new EntityBulletBaseMK4(beam.worldObj, beam.thrower, submunition, beam.damage * submunition.damageMult, 0.2F, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, dir.offsetX, dir.offsetY, dir.offsetZ);
bullet.worldObj.spawnEntityInWorld(bullet);
}
}
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
spawnPulse(beam.worldObj, mop, beam.rotationYaw, beam.rotationPitch);
for(int i = 0; i < projectiles; i++) {
Vec3NT vec = new Vec3NT(beam.worldObj.rand.nextGaussian(), beam.worldObj.rand.nextGaussian(), beam.worldObj.rand.nextGaussian()).normalizeSelf();
EntityBulletBaseMK4 bullet = new EntityBulletBaseMK4(beam.worldObj, beam.thrower, submunition, beam.damage * submunition.damageMult, 0.2F, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, vec.xCoord, vec.yCoord, vec.zCoord);
@ -152,18 +152,18 @@ public class XFactory12ga {
});
return cfg;
}
public static BulletConfig makeShredderSubmunition(BulletConfig original) {
BulletConfig cfg = original.clone();
cfg.setRicochetAngle(90).setRicochetCount(3).setVel(0.5F).setLife(50).setupDamageClass(DamageClass.LASER).setOnRicochet(LAMBDA_SHREDDER_RICOCHET);
return cfg;
}
//this sucks
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_SHREDDER_RICOCHET = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
Block b = bullet.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ);
if(b.getMaterial() == Material.glass) {
bullet.worldObj.func_147480_a(mop.blockX, mop.blockY, mop.blockZ, false);
@ -185,12 +185,12 @@ public class XFactory12ga {
double angle = Math.abs(BobMathUtil.getCrossAngle(vel, face) - 90);
if(angle <= bullet.config.ricochetAngle) {
spawnPulse(bullet.worldObj, mop, bullet.rotationYaw, bullet.rotationPitch);
List<Entity> blast = bullet.worldObj.getEntitiesWithinAABBExcludingEntity(bullet, AxisAlignedBB.getBoundingBox(bullet.posX, bullet.posY, bullet.posZ, bullet.posX, bullet.posY, bullet.posZ).expand(0.5, 0.5, 0.5));
DamageSource source = BulletConfig.getDamage(bullet, bullet.getThrower(), DamageClass.LASER);
for(Entity e : blast) {
if(!e.isEntityAlive()) continue;
if(e instanceof EntityLivingBase) {
@ -200,13 +200,13 @@ public class XFactory12ga {
e.attackEntityFrom(source, bullet.damage);
}
}
bullet.ricochets++;
if(bullet.ricochets > bullet.config.maxRicochetCount) {
bullet.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
bullet.setDead();
}
switch(mop.sideHit) {
case 0: case 1: bullet.motionY *= -1; break;
case 2: case 3: bullet.motionZ *= -1; break;
@ -223,13 +223,13 @@ public class XFactory12ga {
}
}
};
public static void spawnPulse(World world, MovingObjectPosition mop, float yaw, float pitch) {
double x = mop.hitVec.xCoord;
double y = mop.hitVec.yCoord;
double z = mop.hitVec.zCoord;
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
if(mop.sideHit == ForgeDirection.UP.ordinal()) { yaw = 0F; pitch = 0F; }
if(mop.sideHit == ForgeDirection.DOWN.ordinal()) { yaw = 0F; pitch = 0F; }
@ -255,7 +255,7 @@ public class XFactory12ga {
data.setFloat("scale", 0.75F);
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, x, y, z), new TargetPoint(world.provider.dimensionId, x, y, z, 100));
}
public static void init() {
float buckshotSpread = 0.035F;
@ -288,7 +288,7 @@ public class XFactory12ga {
g12_shredder_magnum = makeShredderConfig(g12_magnum, g12_sub_magnum);
g12_shredder_explosive = makeShredderConfig(g12_explosive, g12_sub_explosive);
g12_shredder_phosphorus = makeShredderConfig(g12_phosphorus, g12_sub_phosphorus);
ModItems.gun_maresleg = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(600).draw(10).inspect(39).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -330,7 +330,7 @@ public class XFactory12ga {
.setupStandardConfiguration()
.anim(LAMBDA_MARESLEG_SHORT_ANIMS).orchestra(Orchestras.ORCHESTRA_MARESLEG_SHORT)
).setUnlocalizedName("gun_maresleg_broken");
ModItems.gun_liberator = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(200).draw(20).inspect(21).reloadSequential(true).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -373,7 +373,7 @@ public class XFactory12ga {
.setupStandardConfiguration()
.anim(LAMBDA_SHREDDER_ANIMS).orchestra(Orchestras.ORCHESTRA_SHREDDER)
).setUnlocalizedName("gun_autoshotgun_shredder");
ModItems.gun_autoshotgun_sexy = new ItemGunBaseNT(WeaponQuality.LEGENDARY, new GunConfig()
.dura(5_000).draw(20).inspect(65).reloadSequential(true).inspectCancel(false).crosshair(Crosshair.L_CIRCLE).hideCrosshair(false).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -385,28 +385,28 @@ public class XFactory12ga {
.anim(LAMBDA_SEXY_ANIMS).orchestra(Orchestras.ORCHESTRA_SHREDDER_SEXY)
).setUnlocalizedName("gun_autoshotgun_sexy");
}
public static Function<ItemStack, String> LAMBDA_NAME_MARESLEG = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SAWED_OFF)) return stack.getUnlocalizedName() + "_short";
return null;
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_MARESLEG = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_LIBERATOR = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_AUTOSHOTGUN = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5) + 1.5F, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_SEXY = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SPAS_SECONDARY = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer();
@ -429,7 +429,7 @@ public class XFactory12ga {
ItemGunBaseNT.setTimer(stack, index, 20);
} else {
if(rec.getDoesDryFire(stack)) {
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE_DRY, index);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE_DRY, index);
ItemGunBaseNT.setState(stack, index, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
}
@ -440,7 +440,7 @@ public class XFactory12ga {
}
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MARESLEG_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MARESLEG_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
@ -479,11 +479,11 @@ public class XFactory12ga {
.addBus("LIFT", new BusAnimationSequence().addPos(-35, 0, 0, 300, IType.SIN_FULL).addPos(-35, 0, 0, 1150).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, 0, 450).addPos(0, 0, -90, 500, IType.SIN_FULL).addPos(0, 0, -90, 500).addPos(0, 0, 0, 500, IType.SIN_FULL));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MARESLEG_SHORT_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MARESLEG_SHORT_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 250, IType.SIN_DOWN));
@ -504,12 +504,12 @@ public class XFactory12ga {
.addBus("LEVER", new BusAnimationSequence().addPos(-85, 0, 0, 0).addPos(-15, 0, 0, 200).addPos(-15, 0, 0, 650).addPos(-85, 0, 0, 200).addPos(-15, 0, 0, 200).addPos(-15, 0, 0, 200).addPos(-85, 0, 0, 200).addPos(0, 0, 0, 200))
.addBus("FLAG", new BusAnimationSequence().addPos(1, 1, 1, 0));
}
return LAMBDA_MARESLEG_ANIMS.apply(stack, type);
};
/** This fucking sucks */
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) {
case EQUIP: return new BusAnimation()
@ -602,11 +602,11 @@ public class XFactory12ga {
.addBus(ammo < 3 ? "SHELL3" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0))
.addBus(ammo < 4 ? "SHELL4" : "NULL", new BusAnimationSequence().addPos(2, -8, -2, 0));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_SPAS_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_SPAS_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
@ -621,11 +621,11 @@ public class XFactory12ga {
case JAMMED: return ResourceManager.spas_12_anim.get("Jammed");
case INSPECT: return ResourceManager.spas_12_anim.get("Inspect");
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_SHREDDER_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_SHREDDER_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -647,11 +647,11 @@ public class XFactory12ga {
.addBus("SPEEN", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(360, 0, 0, 700))
.addBus("LIFT", new BusAnimationSequence().addPos(0, 0, 0, 1450).addPos(-2, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_SEXY_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_SEXY_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN));
@ -676,7 +676,7 @@ public class XFactory12ga {
.addBus("BOTTLE", new BusAnimationSequence().setPos(8, -8, -2).addPos(6, -4, -2, 500, IType.SIN_DOWN).addPos(3, -3, -5, 500, IType.SIN_FULL).addPos(3, -2, -5, 1000).addPos(4, -6, -2, 750, IType.SIN_FULL).addPos(6, -8, -2, 500, IType.SIN_UP))
.addBus("SIP", new BusAnimationSequence().setPos(25, 0, 0).hold(500).addPos(-90, 0, 0, 500, IType.SIN_FULL).addPos(-110, 0, 0, 1000).addPos(25, 0, 0, 750, IType.SIN_FULL));
}
return null;
};
}

View File

@ -20,10 +20,10 @@ import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
@ -57,21 +57,21 @@ public class XFactory22lr {
).setNameMutator(LAMBDA_NAME_AM180)
.setUnlocalizedName("gun_am180");
}
public static Function<ItemStack, String> LAMBDA_NAME_AM180 = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER)) return stack.getUnlocalizedName() + "_silenced";
return null;
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 3000, 0.05D, 1.1D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_AM180 = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_AM180_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_AM180_ANIMS = (stack, type) -> {
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
switch(type) {
case EQUIP: return new BusAnimation()
@ -106,7 +106,7 @@ public class XFactory22lr {
case INSPECT: return ResourceManager.am180_anim.get("Inspect");
}
}
return null;
};
}

View File

@ -14,10 +14,10 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
@ -37,7 +37,7 @@ public class XFactory357 {
m357_jhp = new BulletConfig().setItem(EnumAmmo.M357_JHP).setCasing(EnumCasingType.SMALL, 8).setDamage(1.5F).setHeadshot(1.5F).setArmorPiercing(-0.25F);
m357_ap = new BulletConfig().setItem(EnumAmmo.M357_AP).setCasing(EnumCasingType.SMALL_STEEL, 8).setDoesPenetrate(true).setDamageFalloffByPen(false).setDamage(1.25F).setThresholdNegation(5F).setArmorPiercing(0.15F);
m357_express = new BulletConfig().setItem(EnumAmmo.M357_EXPRESS).setCasing(EnumCasingType.SMALL, 8).setDoesPenetrate(true).setDamage(1.5F).setThresholdNegation(2F).setArmorPiercing(0.1F).setWear(1.5F);
ModItems.gun_light_revolver = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -79,16 +79,16 @@ public class XFactory357 {
.anim(LAMBDA_DANI_ANIMS).orchestra(Orchestras.ORCHESTRA_DANI)
).setUnlocalizedName("gun_light_revolver_dani");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ATLAS = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_DANI = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.75));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_ATLAS_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_ATLAS_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -116,15 +116,15 @@ public class XFactory357 {
.addBus("RELOAD_ROT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 0, 300).addPos(45, 0, 0, 500, IType.SIN_FULL).addPos(45, 0, 0, 500).addPos(-45, 0, 0, 50).addPos(-45, 0, 0, 100).addPos(0, 0, 0, 300))
.addBus("RELOAD_MOVE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 0, 300).addPos(0, -2.5, 0, 500, IType.SIN_FULL).addPos(0, -2.5, 0, 500).addPos(0, 0, 0, 350));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_DANI_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_DANI_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(360 * 3, 0, 0, 1000, IType.SIN_DOWN));
}
return LAMBDA_ATLAS_ANIMS.apply(stack, type);
};
}

View File

@ -18,10 +18,10 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -32,7 +32,7 @@ public class XFactory35800 {
public static BulletConfig p35800;
public static BulletConfig p35800_bl;
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_BLACK_IMPACT = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY) {
Entity hit = mop.entityHit;
@ -45,10 +45,10 @@ public class XFactory35800 {
fire.setPosition(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord);
bullet.worldObj.spawnEntityInWorld(fire);
}
BulletConfig.LAMBDA_STANDARD_BEAM_HIT.accept(bullet, mop);
};
public static void init() {
p35800 = new BulletConfig().setItem(EnumAmmoSecret.P35_800).setArmorPiercing(0.5F).setThresholdNegation(50F).setBeam().setSpread(0.0F).setLife(3).setRenderRotations(false)
@ -66,7 +66,7 @@ public class XFactory35800 {
.setupStandardConfiguration()
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR)
).setUnlocalizedName("gun_aberrator");
ModItems.gun_aberrator_eott = new ItemGunBaseNT(WeaponQuality.SECRET,
new GunConfig().dura(2_000).draw(10).inspect(26).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -88,12 +88,12 @@ public class XFactory35800 {
.anim(LAMBDA_ABERRATOR).orchestra(Orchestras.ORCHESTRA_ABERRATOR)
).setUnlocalizedName("gun_aberrator_eott");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ABERRATOR = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_ABERRATOR = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_ABERRATOR = (stack, type) -> {
boolean aim = ItemGunBaseNT.getIsAiming(stack);
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null);
switch(type) {
@ -122,7 +122,7 @@ public class XFactory35800 {
case INSPECT: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 0).addPos(-720, 0, 0, 1000, IType.SIN_FULL).addPos(-720, 0, 0, 250).addPos(0, 0, 0, 1000, IType.SIN_FULL));
}
return null;
};
}

View File

@ -30,10 +30,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import com.hbm.util.TrackerUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -52,7 +52,7 @@ public class XFactory40mm {
public static BulletConfig g26_flare;
public static BulletConfig g26_flare_supply;
public static BulletConfig g26_flare_weapon;
public static BulletConfig g40_he;
public static BulletConfig g40_heat;
public static BulletConfig g40_demo;
@ -97,7 +97,7 @@ public class XFactory40mm {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE_PHOSPHORUS = (bullet, mop) -> {
spawnFire(bullet, mop, true, 400);
};
public static void spawnFire(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, boolean phosphorus, int duration) {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
World world = bullet.worldObj;
@ -125,7 +125,7 @@ public class XFactory40mm {
public static Consumer<Entity> LAMBDA_SPAWN_C130_SUPPLIESS = (entity) -> { spawnPlane(entity, C130PayloadType.SUPPLIES); };
public static Consumer<Entity> LAMBDA_SPAWN_C130_WEAPONS = (entity) -> { spawnPlane(entity, C130PayloadType.WEAPONS); };
public static void spawnPlane(Entity entity, C130PayloadType payload) {
if(!entity.worldObj.isRemote && entity.ticksExisted == 40) {
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
@ -139,13 +139,13 @@ public class XFactory40mm {
TrackerUtil.setTrackingRange(bullet.worldObj, c130, 250);
}
}
public static void init() {
g26_flare = new BulletConfig().setItem(EnumAmmo.G26_FLARE).setCasing(EnumCasingType.LARGE, 4).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x9E1616).setScale(2F).register("g26Flare"));
g26_flare_supply = new BulletConfig().setItem(EnumAmmo.G26_FLARE_SUPPLY).setCasing(EnumCasingType.LARGE, 4).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setOnUpdate(LAMBDA_SPAWN_C130_SUPPLIESS).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x3C80F0).setScale(2F).register("g26FlareSupply"));
g26_flare_weapon = new BulletConfig().setItem(EnumAmmo.G26_FLARE_WEAPON).setCasing(EnumCasingType.LARGE, 4).setLife(100).setVel(2F).setGrav(0.015D).setRenderRotations(false).setOnImpact(LAMBDA_STANDARD_IGNITE).setOnUpdate(LAMBDA_SPAWN_C130_WEAPONS).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x278400).setScale(2F).register("g26FlareWeapon"));
BulletConfig g40_base = new BulletConfig().setLife(200).setVel(2F).setGrav(0.035D);
g40_he = g40_base.clone().setItem(EnumAmmo.G40_HE).setCasing(EnumCasingType.LARGE, 4).setOnImpact(LAMBDA_STANDARD_EXPLODE).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x777777).setScale(2, 2F, 1.5F).register("g40"));
g40_heat = g40_base.clone().setItem(EnumAmmo.G40_HEAT).setCasing(EnumCasingType.LARGE, 4).setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT).setDamage(0.5F).setCasing(new SpentCasing(CasingType.STRAIGHT).setColor(0x5E6854).setScale(2, 2F, 1.5F).register("g40heat"));
@ -163,7 +163,7 @@ public class XFactory40mm {
.setupStandardConfiguration()
.anim(LAMBDA_FLAREGUN_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAREGUN)
).setUnlocalizedName("gun_flaregun");
ModItems.gun_congolake = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(400).draw(7).inspect(39).reloadSequential(true).reloadChangeType(true).crosshair(Crosshair.L_CIRCUMFLEX).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
@ -175,16 +175,16 @@ public class XFactory40mm {
.anim(LAMBDA_CONGOLAKE_ANIMS).orchestra(Orchestras.ORCHESTRA_CONGOLAKE)
).setUnlocalizedName("gun_congolake");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.025D, 1.05D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_GL = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FLAREGUN_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_FLAREGUN_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -203,11 +203,11 @@ public class XFactory40mm {
case INSPECT: return new BusAnimation()
.addBus("FLIP", new BusAnimationSequence().addPos(-360 * 3, 0, 0, 1500, IType.SIN_FULL));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CONGOLAKE_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_CONGOLAKE_ANIMS = (stack, type) -> {
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) {
case EQUIP: return ResourceManager.congolake_anim.get("Equip");
@ -218,7 +218,7 @@ public class XFactory40mm {
case JAMMED: return ResourceManager.congolake_anim.get("Jammed");
case INSPECT: return ResourceManager.congolake_anim.get("Inspect");
}
return null;
};
}

View File

@ -25,10 +25,10 @@ import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.lib.RefStrings;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
@ -37,7 +37,7 @@ import net.minecraft.util.ResourceLocation;
public class XFactory44 {
public static final ResourceLocation scope_lilmac = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_44.png");
public static BulletConfig m44_bp;
public static BulletConfig m44_sp;
public static BulletConfig m44_fmj;
@ -46,7 +46,7 @@ public class XFactory44 {
public static BulletConfig m44_express;
public static BulletConfig m44_equestrian_pip;
public static BulletConfig m44_equestrian_mn7;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BOXCAR = (bullet, mop) -> {
EntityBoxcar pippo = new EntityBoxcar(bullet.worldObj);
pippo.posX = mop.hitVec.xCoord;
@ -56,7 +56,7 @@ public class XFactory44 {
bullet.worldObj.playSoundEffect(pippo.posX, pippo.posY + 50, pippo.posZ, "hbm:alarm.trainHorn", 100F, 1F);
bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TORPEDO = (bullet, mop) -> {
EntityTorpedo murky = new EntityTorpedo(bullet.worldObj);
murky.posX = mop.hitVec.xCoord;
@ -149,34 +149,34 @@ public class XFactory44 {
.anim(LAMBDA_HANGMAN_ANIMS).orchestra(Orchestras.ORCHESTRA_HANGMAN)
).setUnlocalizedName("gun_hangman");
}
public static Function<ItemStack, String> LAMBDA_NAME_NOPIP = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE)) return stack.getUnlocalizedName() + "_scoped";
return null;
};
public static BiConsumer<ItemStack, LambdaContext> SMACK_A_FUCKER = (stack, ctx) -> {
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE || ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == AnimType.CYCLE) {
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE || ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == GunAnimation.CYCLE) {
ItemGunBaseNT.setIsAiming(stack, false);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack));
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.INSPECT, ctx.configIndex);
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.INSPECT, ctx.configIndex);
}
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_HENRY = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_NOPIP = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_HANGMAN = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_HENRY_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_HENRY_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, -3, 350, IType.SIN_DOWN))
@ -215,11 +215,11 @@ public class XFactory44 {
.addBus("YEET", new BusAnimationSequence().addPos(0, 2, 0, 200, IType.SIN_DOWN).addPos(0, 0, 0, 200, IType.SIN_UP))
.addBus("ROLL", new BusAnimationSequence().addPos(0, 0, 360, 400));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_NOPIP_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_NOPIP_ANIMS = (stack, type) -> {
switch(type) {
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
@ -241,18 +241,18 @@ public class XFactory44 {
.addBus("RELAOD_TILT", new BusAnimationSequence().addPos(-15, 0, 0, 100).addPos(65, 0, 0, 100).addPos(45, 0, 0, 50).addPos(0, 0, 0, 200).addPos(0, 0, 0, 200).addPos(-80, 0, 0, 100).addPos(-80, 0, 0, 100).addPos(0, 0, 0, 200))
.addBus("RELOAD_CYLINDER", new BusAnimationSequence().addPos(0, 0, 0, 200).addPos(90, 0, 0, 100).addPos(90, 0, 0, 450).addPos(0, 0, 0, 70));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LILMAC_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LILMAC_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation().addBus("SPIN", new BusAnimationSequence().addPos(-360, 0, 0, 350));
}
return LAMBDA_NOPIP_ANIMS.apply(stack, type);
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_HANGMAN_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_HANGMAN_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
case CYCLE: return new BusAnimation()
@ -273,7 +273,7 @@ public class XFactory44 {
.addBus("EQUIP", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(-10, 0, 0, 100, IType.SIN_DOWN).addPos(0, 0, 0, 350, IType.SIN_FULL))
.addBus("ROLL", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, 25, 250, IType.SIN_FULL).addPos(0, 0, 25, 300).addPos(0, 0, 0, 250, IType.SIN_FULL));
}
return null;
};
}

View File

@ -21,10 +21,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.lib.RefStrings;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
@ -34,7 +34,7 @@ public class XFactory50 {
public static final ResourceLocation scope = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_amat.png");
public static final ResourceLocation scope_thermal = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_penance.png");
public static BulletConfig bmg50_sp;
public static BulletConfig bmg50_fmj;
public static BulletConfig bmg50_jhp;
@ -44,7 +44,7 @@ public class XFactory50 {
public static BulletConfig bmg50_sm;
public static BulletConfig bmg50_black;
public static BulletConfig bmg50_equestrian;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_BUILDING = (bullet, mop) -> {
EntityBuilding silver = new EntityBuilding(bullet.worldObj);
silver.posX = mop.hitVec.xCoord;
@ -53,7 +53,7 @@ public class XFactory50 {
bullet.worldObj.spawnEntityInWorld(silver);
bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 2F); bullet.setDead();
@ -79,7 +79,7 @@ public class XFactory50 {
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("bmg50black"));
bmg50_equestrian = new BulletConfig().setItem(EnumAmmoSecret.BMG50_EQUESTRIAN).setDamage(0F).setOnImpact(LAMBDA_BUILDING)
.setCasing(casing50.clone().setColor(SpentCasing.COLOR_CASE_EQUESTRIAN).register("bmg50equestrian"));
ModItems.gun_amat = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(350).draw(20).inspect(50).crosshair(Crosshair.CIRCLE).scopeTexture(scope).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
@ -110,7 +110,7 @@ public class XFactory50 {
.setupStandardConfiguration()
.anim(LAMBDA_AMAT_ANIMS).orchestra(Orchestras.ORCHESTRA_AMAT)
).setUnlocalizedName("gun_amat_penance");
ModItems.gun_m2 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(3_000).draw(10).inspect(31).crosshair(Crosshair.L_CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
@ -122,27 +122,27 @@ public class XFactory50 {
.anim(LAMBDA_M2_ANIMS).orchestra(Orchestras.ORCHESTRA_M2)
).setUnlocalizedName("gun_m2");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_AMAT = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(12.5F, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_M2 = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_AMAT_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_AMAT_ANIMS = (stack, type) -> {
double turn = -60;
double pullAmount = -2.5;
double side = 4;
double down = -2;
double detach = 0.5;
double apex = 7;
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL))
@ -169,18 +169,18 @@ public class XFactory50 {
.addBus("SCOPE_THROW", new BusAnimationSequence().addPos(0, detach, 0, 100, IType.SIN_FULL).addPos(side, down, 0, 500, IType.SIN_FULL).addPos(side, down - 0.5, 0, 100).addPos(side, apex, 0, 350, IType.SIN_FULL).addPos(side, down - 0.5, 0, 350, IType.SIN_DOWN).addPos(side, down, 0, 100).hold(250).addPos(0, detach, 0, 500, IType.SIN_FULL).addPos(0, 0, 0, 250, IType.SIN_FULL))
.addBus("SCOPE_SPIN", new BusAnimationSequence().hold(700).addPos(-360, 0, 0, 700));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_M2_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_M2_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, -0.25, 25).addPos(0, 0, 0, 75));
}
return null;
};
}

View File

@ -25,10 +25,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
@ -43,12 +43,12 @@ public class XFactory556mm {
public static BulletConfig r556_fmj;
public static BulletConfig r556_jhp;
public static BulletConfig r556_ap;
public static BulletConfig r556_inc_sp;
public static BulletConfig r556_inc_fmj;
public static BulletConfig r556_inc_jhp;
public static BulletConfig r556_inc_ap;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> INCENDIARY = (bullet, mop) -> {
if(mop.entityHit != null && mop.entityHit instanceof EntityLivingBase) {
HbmLivingProps data = HbmLivingProps.getData((EntityLivingBase) mop.entityHit);
@ -71,7 +71,7 @@ public class XFactory556mm {
r556_inc_fmj = r556_fmj.clone().setOnImpact(INCENDIARY);
r556_inc_jhp = r556_jhp.clone().setOnImpact(INCENDIARY);
r556_inc_ap = r556_ap.clone().setOnImpact(INCENDIARY);
ModItems.gun_g3 = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(3_000).draw(10).inspect(33).crosshair(Crosshair.CIRCLE).smoke(LAMBDA_SMOKE)
.rec(new Receiver(0)
@ -105,21 +105,21 @@ public class XFactory556mm {
.anim(LAMBDA_STG77_ANIMS).orchestra(Orchestras.ORCHESTRA_STG77)
).setUnlocalizedName("gun_stg77");
}
public static Function<ItemStack, String> LAMBDA_NAME_G3 = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_BLACK) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_BLACK) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SCOPE)) return stack.getUnlocalizedName() + "_infiltrator";
if(!WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
if(!WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_NO_STOCK) &&
WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_FURNITURE_GREEN)) return stack.getUnlocalizedName() + "_a3";
return null;
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.075D, 1.1D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STG77_DECIDER = (stack, ctx) -> {
int index = ctx.configIndex;
GunState lastState = ItemGunBaseNT.getState(stack, index);
@ -128,18 +128,18 @@ public class XFactory556mm {
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 0, index);
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getSecondary(stack, index); });
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_G3 = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ZEBRA = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.125), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.125));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_STG = (stack, ctx) -> { };
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
switch(type) {
case EQUIP: return new BusAnimation()
@ -206,11 +206,11 @@ public class XFactory556mm {
.addBus("BOLT", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100).addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100))
.addBus("PLUG", new BusAnimationSequence().addPos(0, 0, 0, 1000).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100).addPos(0, 0, 0, 250).addPos(0, 0, -3.25, 150).addPos(0, 0, 0, 100));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_STG77_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_STG77_ANIMS = (stack, type) -> {
if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
switch(type) {
case EQUIP: return new BusAnimation()
@ -245,8 +245,8 @@ public class XFactory556mm {
case INSPECT: return ResourceManager.stg77_anim.get("Inspect");
}
}
return null;
};
}

View File

@ -17,9 +17,9 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
@ -47,7 +47,7 @@ public class XFactory75Bolt {
public static void init() {
SpentCasing casing75 = new SpentCasing(CasingType.STRAIGHT).setColor(SpentCasing.COLOR_CASE_BRASS).setScale(2F, 2F, 1.5F);
b75 = new BulletConfig().setItem(EnumAmmo.B75)
.setCasing(casing75.clone().register("b75")).setOnImpact(LAMBDA_TINY_EXPLODE);
b75_inc = new BulletConfig().setItem(EnumAmmo.B75_INC).setDamage(0.8F).setArmorPiercing(0.1F)
@ -66,16 +66,16 @@ public class XFactory75Bolt {
.anim(LAMBDA_BOLTER_ANIMS).orchestra(Orchestras.ORCHESTRA_BOLTER)
).setUnlocalizedName("gun_bolter");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_BOLT = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_BOLTER_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_BOLTER_ANIMS = (stack, type) -> {
switch(type) {
case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(1, 0, 0, 25).addPos(0, 0, 0, 75));
@ -86,7 +86,7 @@ public class XFactory75Bolt {
.addBus("TILT", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(1, 0, 0, 250).addPos(1, 0, 0, 700).addPos(0, 0, 0, 250))
.addBus("MAG", new BusAnimationSequence().addPos(0, 0, 0, 750).addPos(0.6, 0, 0, 250).addPos(0, 0, 0, 250));
}
return null;
};
}

View File

@ -20,10 +20,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.item.ItemStack;
@ -41,7 +41,7 @@ public class XFactory762mm {
public static BulletConfig energy_lacunae;
public static BulletConfig energy_lacunae_overcharge;
public static BulletConfig energy_lacunae_ir;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_TINY_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
Lego.tinyExplode(bullet, mop, 1.5F); bullet.setDead();
@ -61,7 +61,7 @@ public class XFactory762mm {
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762du"));
r762_he = new BulletConfig().setItem(EnumAmmo.R762_HE).setCasing(EnumCasingType.SMALL_STEEL, 6).setWear(3F).setDamage(1.75F).setOnImpact(LAMBDA_TINY_EXPLODE)
.setCasing(casing762.clone().setColor(SpentCasing.COLOR_CASE_44).register("r762he"));
energy_lacunae = new BulletConfig().setItem(EnumAmmo.CAPACITOR).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4 * 40).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_lacunae_overcharge = new BulletConfig().setItem(EnumAmmo.CAPACITOR_OVERCHARGE).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4 * 40).setupDamageClass(DamageClass.LASER).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setDoesPenetrate(true).setOnBeamImpact(BulletConfig.LAMBDA_STANDARD_BEAM_HIT);
energy_lacunae_ir = new BulletConfig().setItem(EnumAmmo.CAPACITOR_IR).setCasing(new ItemStack(ModItems.ingot_polymer, 2), 4 * 40).setupDamageClass(DamageClass.FIRE).setBeam().setReloadCount(40).setSpread(0.0F).setLife(5).setRenderRotations(false).setOnBeamImpact(XFactoryEnergy.LAMBDA_IR_HIT);
@ -131,7 +131,7 @@ public class XFactory762mm {
.anim(LAMBDA_MAS36_ANIMS).orchestra(Orchestras.ORCHESTRA_MAS36)
).setUnlocalizedName("gun_mas36");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SECOND_MINIGUN = (stack, ctx) -> {
int index = ctx.configIndex;
GunState lastState = ItemGunBaseNT.getState(stack, index);
@ -140,22 +140,22 @@ public class XFactory762mm {
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 0, index);
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getSecondary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 1500, 0.075D, 1.1D, 0);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_CARBINE = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_MINIGUN = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_LACUNAE = (stack, ctx) -> { };
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CARBINE_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_CARBINE_ANIMS = (stack, type) -> {
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) {
case EQUIP: return new BusAnimation()
@ -183,11 +183,11 @@ public class XFactory762mm {
.addBus("SLIDE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, 0, -0.75, 150, IType.SIN_DOWN).addPos(0, 0, -0.75, 1000).addPos(0, 0, 0, 100, IType.SIN_UP))
.addBus(ammo == 0 ? "NULL" : "REL", new BusAnimationSequence().addPos(0, 0.125, 1.25, 0).addPos(0, 0.125, 1.25, 500).addPos(0, 0.125, 0.5, 150, IType.SIN_DOWN).addPos(0, 0.125, 0.5, 1000).addPos(0, 0.125, 1.25, 100, IType.SIN_UP));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MINIGUN_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MINIGUN_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_FULL));
@ -203,11 +203,11 @@ public class XFactory762mm {
.addBus("EQUIP", new BusAnimationSequence().addPos(3, 0, 0, 150, IType.SIN_DOWN).addPos(0, 0, 0, 100, IType.SIN_FULL))
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, -720, 1000, IType.SIN_DOWN));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MAS36_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, 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;
@ -244,7 +244,7 @@ public class XFactory762mm {
.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

@ -22,10 +22,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -105,29 +105,29 @@ public class XFactory9mm {
.anim(LAMBDA_UZI_ANIMS).orchestra(Orchestras.ORCHESTRA_UZI_AKIMBO)
).setUnlocalizedName("gun_uzi_akimbo");
}
public static Function<ItemStack, String> LAMBDA_NAME_GREASEGUN = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_GREASEGUN_CLEAN)) return stack.getUnlocalizedName() + "_m3";
return null;
};
public static Function<ItemStack, String> LAMBDA_NAME_UZI = (stack) -> {
if(WeaponModManager.hasUpgrade(stack, 0, WeaponModManager.ID_SILENCER)) return stack.getUnlocalizedName() + "_richter";
return null;
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_GREASEGUN = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(2, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_LAG = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_UZI = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(1, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25));
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SECOND_UZI = (stack, ctx) -> {
int index = ctx.configIndex;
GunState lastState = ItemGunBaseNT.getState(stack, index);
@ -136,12 +136,12 @@ public class XFactory9mm {
GunStateDecider.deciderStandardReload(stack, ctx, lastState, 0, index);
GunStateDecider.deciderAutoRefire(stack, ctx, lastState, 0, index, () -> { return ItemGunBaseNT.getSecondary(stack, index) && ItemGunBaseNT.getMode(stack, ctx.configIndex) == 0; });
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE_LAG = (stack, ctx) -> {
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
EntityPlayer player = ctx.getPlayer();
if(player != null && type == AnimType.INSPECT && timer > 20 && timer < 60) {
if(player != null && type == GunAnimation.INSPECT && timer > 20 && timer < 60) {
int index = ctx.configIndex;
Receiver primary = ctx.config.getReceivers(stack)[0];
IMagazine mag = primary.getMagazine(stack);
@ -154,15 +154,15 @@ public class XFactory9mm {
ItemGunBaseNT.setTimer(stack, index, primary.getDelayAfterFire(stack));
EntityDamageUtil.attackEntityFromNT(player, BulletConfig.getDamage(player, player, DamageClass.PHYSICAL), 1_000F, true, false, 1D, 5F, 0F);
} else {
Lego.doStandardFire(stack, ctx, AnimType.CYCLE, true);
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
}
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_SMOKE = (stack, ctx) -> {
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, ctx.configIndex);
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_GREASEGUN_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_GREASEGUN_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(80, 0, 0, 500).addPos(0, 0, 0, 500, IType.SIN_FULL))
@ -190,11 +190,11 @@ public class XFactory9mm {
.addBus("TURN", new BusAnimationSequence().addPos(0, 0, -45, 150).addPos(0, 0, 45, 150).addPos(0, 0, 45, 50).addPos(0, 0, 0, 250).addPos(0, 0, 0, 500).addPos(0, 0, 45, 150).addPos(0, 0, -45, 150).addPos(0, 0, 0, 150))
.addBus("FLAP", new BusAnimationSequence().addPos(0, 0, 0, 300).addPos(0, 0, 180, 150).addPos(0, 0, 180, 850).addPos(0, 0, 0, 150));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LAG_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LAG_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -207,11 +207,11 @@ public class XFactory9mm {
.addBus("ADD_TRANS", new BusAnimationSequence().addPos(-4, 0, -3, 500).addPos(-4, 0, -3, 2000).addPos(0, 0, 0, 500))
.addBus("ADD_ROT", new BusAnimationSequence().addPos(0, -2, 5, 500).addPos(0, -2, 5, 2000).addPos(0, 0, 0, 500));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_UZI_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_UZI_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(80, 0, 0, 500).addPos(0, 0, 0, 500, IType.SIN_FULL))

View File

@ -20,10 +20,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineBelt;
import com.hbm.items.weapon.sedna.mags.MagazineInfinite;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.main.MainRegistry;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import com.hbm.util.Vec3NT;
@ -37,7 +37,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.Vec3;
public class XFactoryAccelerator {
public static MagazineBelt tauChargeMag = new MagazineBelt();
public static BulletConfig tau_uranium;
@ -50,13 +50,13 @@ public class XFactoryAccelerator {
public static Consumer<Entity> LAMBDA_UPDATE_TUNGSTEN = (entity) -> {breakInPath(entity, 1.25F); };
public static Consumer<Entity> LAMBDA_UPDATE_FERRO = (entity) -> { breakInPath(entity, 2.5F); };
public static void breakInPath(Entity entity, float threshold) {
Vec3 vec = Vec3.createVectorHelper(entity.posX - entity.prevPosX, entity.posY - entity.prevPosY, entity.posZ - entity.prevPosZ);
double motion = Math.max(vec.lengthVector(), 0.1);
vec = vec.normalize();
for(double d = 0; d < motion; d += 0.5) {
double dX = entity.posX - vec.xCoord * d;
@ -71,7 +71,7 @@ public class XFactoryAccelerator {
nbt.setDouble("posY", dY);
nbt.setDouble("posZ", dZ);
MainRegistry.proxy.effectNT(nbt);
} else {
int x = (int) Math.floor(dX);
int y = (int) Math.floor(dY);
@ -84,7 +84,7 @@ public class XFactoryAccelerator {
}
}
}
public static void init() {
tau_uranium = new BulletConfig().setItem(EnumAmmo.TAU_URANIUM).setCasing(new ItemStack(ModItems.plate_lead, 2), 16).setupDamageClass(DamageClass.SUBATOMIC).setBeam().setLife(5).setRenderRotations(false).setDoesPenetrate(true).setDamageFalloffByPen(false)
@ -99,7 +99,7 @@ public class XFactoryAccelerator {
ni4ni_arc = new BulletConfig().setupDamageClass(DamageClass.PHYSICAL).setBeam().setLife(5).setThresholdNegation(10F).setArmorPiercing(0.2F).setRenderRotations(false).setDoesPenetrate(false)
.setOnBeamImpact(BulletConfig.LAMBDA_BEAM_HIT);
tauChargeMag.addConfigs(tau_uranium_charge);
ModItems.gun_tau = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
@ -141,54 +141,54 @@ public class XFactoryAccelerator {
.anim(LAMBDA_NI4NI_ANIMS).orchestra(Orchestras.ORCHESTRA_COILGUN)
).setUnlocalizedName("gun_n_i_4_n_i");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_PRIMARY_RELEASE = (stack, ctx) -> {
if(ctx.getPlayer() == null || ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != AnimType.CYCLE) return;
if(ctx.getPlayer() == null || ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != GunAnimation.CYCLE) return;
ctx.getPlayer().worldObj.playSoundEffect(ctx.getPlayer().posX, ctx.getPlayer().posY, ctx.getPlayer().posZ, "hbm:weapon.fire.tauRelease", 1F, 1F);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_SECONDARY_PRESS = (stack, ctx) -> {
if(ctx.getPlayer() == null) return;
if(ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) <= 0) return;
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.SPINUP, ctx.configIndex);
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.SPINUP, ctx.configIndex);
tauChargeMag.getMagType(stack); //caches the last loaded ammo
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_SECONDARY_RELEASE = (stack, ctx) -> {
if(ctx.getPlayer() == null) return;
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(timer >= 10 && ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == AnimType.SPINUP) {
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.ALT_CYCLE, ctx.configIndex);
if(timer >= 10 && ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == GunAnimation.SPINUP) {
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.ALT_CYCLE, ctx.configIndex);
int unitsUsed = 1 + Math.min(12, timer / 10);
EntityLivingBase entity = ctx.entity;
int index = ctx.configIndex;
Receiver primary = ctx.config.getReceivers(stack)[0];
BulletConfig config = tauChargeMag.getFirstConfig(stack, ctx.inventory);
Vec3 offset = primary.getProjectileOffset(stack);
double forwardOffset = offset.xCoord;
double heightOffset = offset.yCoord;
double sideOffset = offset.zCoord;
float damage = Lego.getStandardWearDamage(stack, ctx.config, index) * unitsUsed * 5;
float spread = Lego.calcSpread(ctx, stack, primary, config, true, index, false);
EntityBulletBeamBase mk4 = new EntityBulletBeamBase(entity, config, damage, spread, sideOffset, heightOffset, forwardOffset);
entity.worldObj.spawnEntityInWorld(mk4);
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear * unitsUsed, ctx.config.getDurability(stack)));
} else {
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.CYCLE_DRY, ctx.configIndex);
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.CYCLE_DRY, ctx.configIndex);
}
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_NI4NI_SECONDARY_PRESS = (stack, ctx) -> {
if(ctx.getPlayer() == null) return;
EntityPlayer player = ctx.getPlayer();
if(ItemGunNI4NI.getCoinCount(stack) > 0) {
Vec3NT vec = new Vec3NT(player.getLookVec()).multiply(0.8D);
EntityCoin coin = new EntityCoin(player.worldObj);
@ -199,20 +199,20 @@ public class XFactoryAccelerator {
coin.rotationYaw = player.rotationYaw;
coin.setThrower(player);
player.worldObj.spawnEntityInWorld(coin);
player.worldObj.playSoundAtEntity(player, "random.orb", 1.0F, 1F + player.getRNG().nextFloat() * 0.25F);
ItemGunNI4NI.setCoinCount(stack, ItemGunNI4NI.getCoinCount(stack) - 1);
}
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_TAU = (stack, ctx) -> { };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_COILGUN = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_TAU_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_TAU_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
@ -229,18 +229,18 @@ public class XFactoryAccelerator {
case SPINUP: return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 360 * 6, 3000, IType.SIN_UP).addPos(0, 0, 0, 0).addPos(0, 0, 360 * 40, 500 * 20));
}
return null;
};
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_COILGUN_ANIMS = (stack, type) -> {
if(type == AnimType.EQUIP) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 0).addPos(0, 0, 0, 250));
if(type == AnimType.CYCLE) return new BusAnimation().addBus("RECOIL", new BusAnimationSequence().addPos(ItemGunBaseNT.getIsAiming(stack) ? 0.5 : 1, 0, 0, 100).addPos(0, 0, 0, 200));
if(type == AnimType.RELOAD) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 250).addPos(1, 0, 0, 500).addPos(0, 0, 0, 250));
public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_COILGUN_ANIMS = (stack, type) -> {
if(type == GunAnimation.EQUIP) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 0).addPos(0, 0, 0, 250));
if(type == GunAnimation.CYCLE) return new BusAnimation().addBus("RECOIL", new BusAnimationSequence().addPos(ItemGunBaseNT.getIsAiming(stack) ? 0.5 : 1, 0, 0, 100).addPos(0, 0, 0, 200));
if(type == GunAnimation.RELOAD) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 250).addPos(1, 0, 0, 500).addPos(0, 0, 0, 250));
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_NI4NI_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_NI4NI_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-360 * 2, 0, 0, 500));
@ -252,7 +252,7 @@ public class XFactoryAccelerator {
case INSPECT: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-360 * 3, 0, 0, 750).hold(100).addPos(0, 0, 0, 750));
}
return null;
};
}

View File

@ -13,10 +13,10 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
@ -28,7 +28,7 @@ public class XFactoryBlackPowder {
public static BulletConfig shot = new BulletConfig().setItem(EnumAmmo.STONE_SHOT).setBlackPowder(true).setHeadshot(1F).setSpread(0.1F).setRicochetAngle(45).setProjectiles(6, 6).setDamage(1F/6F);
public static void init() {
ModItems.gun_pepperbox = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(300).draw(4).inspect(23).crosshair(Crosshair.CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -40,12 +40,12 @@ public class XFactoryBlackPowder {
.anim(LAMBDA_PEPPERBOX_ANIMS).orchestra(Orchestras.ORCHESTRA_PEPPERBOX)
).setUnlocalizedName("gun_pepperbox");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_PEPPERBOX = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PEPPERBOX_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_PEPPERBOX_ANIMS = (stack, type) -> {
switch(type) {
case CYCLE: return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 0, 1025).addPos(60, 0, 0, 250))
@ -72,7 +72,7 @@ public class XFactoryBlackPowder {
.addBus("TRANSLATE", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(0, -6, 0, 400, IType.SIN_FULL).addPos(0, -6, 0, 2000).addPos(0, 0, 0, 400, IType.SIN_FULL))
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 500).addPos(45, 0, 0, 400, IType.SIN_FULL).addPos(45, 0, 0, 2000).addPos(0, 0, 0, 400, IType.SIN_FULL));
}
return null;
};
}

View File

@ -28,10 +28,10 @@ import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.item.ItemStack;
@ -99,7 +99,7 @@ public class XFactoryCatapult {
vnt.explode();
incrementRad(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 1.5F);
bullet.worldObj.playSoundEffect(mop.hitVec.xCoord, mop.hitVec.yCoord + 0.5, mop.hitVec.zCoord, "hbm:weapon.mukeExplosion", 15.0F, 1.0F);
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "muke");
@ -176,7 +176,7 @@ public class XFactoryCatapult {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_FATMAN = (stack, ctx) -> { };
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FATMAN_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_FATMAN_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN));

View File

@ -26,10 +26,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -104,15 +104,15 @@ public class XFactoryEnergy {
public static BiConsumer<EntityBulletBeamBase, MovingObjectPosition> LAMBDA_LIGHTNING_SPLIT = (beam, mop) -> {
LAMBDA_LIGHTNING_HIT.accept(beam, mop);
if(mop.typeOfHit != mop.typeOfHit.ENTITY) return;
double range = 20;
List<EntityLivingBase> potentialTargets = beam.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord).expand(range, range, range));
Collections.shuffle(potentialTargets);
for(EntityLivingBase target : potentialTargets) {
if(target == beam.thrower) continue;
if(target == mop.entityHit) continue;
Vec3 delta = Vec3.createVectorHelper(target.posX - mop.hitVec.xCoord, target.posY + target.height / 2 - mop.hitVec.yCoord, target.posZ - mop.hitVec.zCoord);
if(delta.lengthVector() > 20) continue;
EntityBulletBeamBase sub = new EntityBulletBeamBase(beam.thrower, energy_tesla_ir_sub, beam.damage);
@ -169,7 +169,7 @@ public class XFactoryEnergy {
energy_emerald = energy_las.clone().setArmorPiercing(0.5F).setThresholdNegation(10F);
energy_emerald_overcharge = energy_las_overcharge.clone().setArmorPiercing(0.5F).setThresholdNegation(15F);
energy_emerald_ir = energy_las_ir.clone().setArmorPiercing(0.5F).setThresholdNegation(10F);
ModItems.gun_tesla_cannon = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(1_000).draw(10).inspect(33).crosshair(Crosshair.CIRCLE)
.rec(new Receiver(0)
@ -226,7 +226,7 @@ public class XFactoryEnergy {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ENERGY = (stack, ctx) -> { };
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_TESLA_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_TESLA_ANIMS = (stack, type) -> {
int amount = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) {
case EQUIP: return new BusAnimation()
@ -245,7 +245,7 @@ public class XFactoryEnergy {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASER_PISTOL = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LASER_PISTOL = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -266,7 +266,7 @@ public class XFactoryEnergy {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LASRIFLE = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LASRIFLE = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));

View File

@ -22,10 +22,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.particle.helper.FlameCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.block.Block;
@ -42,7 +42,7 @@ public class XFactoryFlamer {
public static BulletConfig flame_nograv;
public static BulletConfig flame_nograv_bf;
public static BulletConfig flame_diesel;
public static BulletConfig flame_gas;
public static BulletConfig flame_napalm;
@ -80,7 +80,7 @@ public class XFactoryFlamer {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_GAS = (bullet, mop) -> { igniteIfPossible(bullet, mop); };
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_NAPALM = (bullet, mop) -> { if(!igniteIfPossible(bullet, mop)) spawnFire(bullet, mop, 2.5F, 1F, 200, EntityFireLingering.TYPE_DIESEL); };
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_LINGER_BALEFIRE = (bullet, mop) -> { spawnFire(bullet, mop, 3F, 1F, 300, EntityFireLingering.TYPE_BALEFIRE); };
public static boolean igniteIfPossible(EntityBulletBaseMK4 bullet, MovingObjectPosition mop) {
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
World world = bullet.worldObj;
@ -96,7 +96,7 @@ public class XFactoryFlamer {
}
return false;
}
public static void spawnFire(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, float width, float height, int duration, int type) {
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
List<EntityFireLingering> fires = bullet.worldObj.getEntitiesWithinAABB(EntityFireLingering.class,
@ -119,15 +119,15 @@ public class XFactoryFlamer {
.setOnUpdate(LAMBDA_FIRE).setOnRicochet(LAMBDA_LINGER_NAPALM);
flame_balefire = new BulletConfig().setItem(EnumAmmo.FLAME_BALEFIRE).setCasing(new ItemStack(ModItems.plate_steel, 2), 500).setupDamageClass(DamageClass.FIRE).setLife(200).setVel(1F).setGrav(0.02D).setReloadCount(500).setSelfDamageDelay(20).setKnockback(0F)
.setOnUpdate(LAMBDA_BALEFIRE).setOnRicochet(LAMBDA_LINGER_BALEFIRE);
flame_nograv = flame_diesel.clone().setGrav(0);
flame_nograv_bf = flame_balefire.clone().setGrav(0).setLife(100);
flame_topaz_diesel = flame_diesel .clone().setProjectiles(2).setSpread(0.05F).setLife(60).setGrav(0.0D);
flame_topaz_gas = flame_gas .clone().setProjectiles(2).setSpread(0.05F);
flame_topaz_napalm = flame_napalm .clone().setProjectiles(2).setSpread(0.05F).setLife(60).setGrav(0.0D);
flame_topaz_balefire = flame_balefire .clone().setProjectiles(2).setSpread(0.05F).setLife(60).setGrav(0.0D);
flame_daybreaker_diesel = flame_diesel.clone().setLife(200).setVel(2F).setGrav(0.035D)
.setOnImpact((bullet, mop) -> { Lego.standardExplode(bullet, mop, 5F); spawnFire(bullet, mop, 6F, 2F, 200, EntityFireLingering.TYPE_DIESEL); bullet.setDead(); });
flame_daybreaker_gas = flame_gas.clone().setLife(200).setVel(2F).setGrav(0.035D)
@ -136,7 +136,7 @@ public class XFactoryFlamer {
.setOnImpact((bullet, mop) -> { Lego.standardExplode(bullet, mop, 7.5F); spawnFire(bullet, mop, 6F, 2F, 300, EntityFireLingering.TYPE_DIESEL); bullet.setDead(); });
flame_daybreaker_balefire = flame_balefire.clone().setLife(200).setVel(2F).setGrav(0.035D)
.setOnImpact((bullet, mop) -> { Lego.standardExplode(bullet, mop, 5F); spawnFire(bullet, mop, 7.5F, 2.5F, 400, EntityFireLingering.TYPE_BALEFIRE); bullet.setDead(); });
ModItems.gun_flamer = new ItemGunBaseNT(WeaponQuality.A_SIDE, new GunConfig()
.dura(20_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE)
.rec(new Receiver(0)
@ -167,7 +167,7 @@ public class XFactoryFlamer {
.setupStandardConfiguration()
.anim(LAMBDA_FLAMER_ANIMS).orchestra(Orchestras.ORCHESTRA_FLAMER_DAYBREAKER)
).setUnlocalizedName("gun_flamer_daybreaker");
ModItems.gun_chemthrower = new ItemGunChemthrower(WeaponQuality.A_SIDE, new GunConfig()
.dura(90_000).draw(10).inspect(17).crosshair(Crosshair.L_CIRCLE).smoke(Lego.LAMBDA_STANDARD_SMOKE)
.rec(new Receiver(0)
@ -180,7 +180,7 @@ public class XFactoryFlamer {
).setUnlocalizedName("gun_chemthrower");
}
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FLAMER_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_FLAMER_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -189,16 +189,16 @@ public class XFactoryFlamer {
case JAMMED: return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 45, 250, IType.SIN_FULL).addPos(0, 0, 45, 350).addPos(0, 0, -15, 150, IType.SIN_FULL).addPos(0, 0, 0, 100, IType.SIN_FULL));
}
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CHEMTHROWER_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_CHEMTHROWER_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
}
return null;
};
}

View File

@ -22,10 +22,10 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.EntityDamageUtil;
import com.hbm.util.Vec3NT;
@ -119,17 +119,17 @@ public class XFactoryFolly {
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE) {
boolean wasAiming = ItemGunBaseNT.getIsAiming(stack);
ItemGunBaseNT.setIsAiming(stack, !wasAiming);
if(!wasAiming) ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.SPINUP, ctx.configIndex);
if(!wasAiming) ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.SPINUP, ctx.configIndex);
}
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
Lego.doStandardFire(stack, ctx, AnimType.CYCLE, false);
Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, false);
};
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> {
if(!ItemGunBaseNT.getIsAiming(stack)) return false;
if(ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != AnimType.SPINUP) return false;
if(ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) != GunAnimation.SPINUP) return false;
if(ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex) < 100) return false;
return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0;
};
@ -138,7 +138,7 @@ public class XFactoryFolly {
ItemGunBaseNT.setupRecoil(25, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_FOLLY_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_FOLLY_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(5, 0, 0, 1500, IType.SIN_DOWN).addPos(0, 0, 0, 500, IType.SIN_FULL));

View File

@ -26,10 +26,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -46,7 +46,7 @@ import net.minecraftforge.common.util.ForgeDirection;
public class XFactoryRocket {
public static BulletConfig[] rocket_template;
public static BulletConfig[] rocket_rpzb;
public static BulletConfig[] rocket_qd;
public static BulletConfig[] rocket_ml;
@ -60,24 +60,24 @@ public class XFactoryRocket {
EntityBulletBaseMK4 bullet = (EntityBulletBaseMK4) entity;
if(bullet.accel < 4) bullet.accel += 0.4D;
if(bullet.getThrower() == null || !(bullet.getThrower() instanceof EntityPlayer)) return;
EntityPlayer player = (EntityPlayer) bullet.getThrower();
if(Vec3.createVectorHelper(bullet.posX - player.posX, bullet.posY - player.posY, bullet.posZ - player.posZ).lengthVector() > 100) return;
if(player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ItemGunBaseNT) || !ItemGunBaseNT.getIsAiming(player.getHeldItem())) return;
MovingObjectPosition mop = Library.rayTrace(player, 200, 1);
if(mop == null || mop.hitVec == null) return;
Vec3 vec = Vec3.createVectorHelper(mop.hitVec.xCoord - bullet.posX, mop.hitVec.yCoord - bullet.posY, mop.hitVec.zCoord - bullet.posZ);
if(vec.lengthVector() < 3) return;
vec = vec.normalize();
double speed = Vec3.createVectorHelper(bullet.motionX, bullet.motionY, bullet.motionZ).lengthVector();
bullet.motionX = vec.xCoord * speed;
bullet.motionY = vec.yCoord * speed;
bullet.motionZ = vec.zCoord * speed;
};
// IMPACT
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
@ -110,7 +110,7 @@ public class XFactoryRocket {
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_STANDARD_EXPLODE_PHOSPHORUS = (bullet, mop) -> {
spawnFire(bullet, mop, true, 600);
};
public static void spawnFire(EntityBulletBaseMK4 bullet, MovingObjectPosition mop, boolean phosphorus, int duration) {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3) return;
World world = bullet.worldObj;
@ -135,18 +135,18 @@ public class XFactoryRocket {
}
}
}
public static BulletConfig makeRPZB(BulletConfig original) { return original.clone(); }
public static BulletConfig makeQD(BulletConfig original) { return original.clone().setLife(400).setOnUpdate(LAMBDA_STEERING_ACCELERATE); }
public static BulletConfig makeML(BulletConfig original) { return original.clone(); }
//this is starting to get messy but we need to put this crap *somewhere* and fragmenting it into a billion classes with two methods each just isn't gonna help
public static void init() {
rocket_template = new BulletConfig[5];
BulletConfig baseRocket = new BulletConfig().setLife(300).setSelfDamageDelay(10).setVel(0F).setGrav(0D).setOnEntityHit(null).setOnRicochet(null).setOnUpdate(LAMBDA_STANDARD_ACCELERATE);
rocket_template[0] = baseRocket.clone().setItem(EnumAmmo.ROCKET_HE).setOnImpact(LAMBDA_STANDARD_EXPLODE);
rocket_template[1] = baseRocket.clone().setItem(EnumAmmo.ROCKET_HEAT).setDamage(0.5F).setOnImpact(LAMBDA_STANDARD_EXPLODE_HEAT);
rocket_template[2] = baseRocket.clone().setItem(EnumAmmo.ROCKET_DEMO).setDamage(0.75F).setOnImpact(LAMBDA_STANDARD_EXPLODE_DEMO);
@ -156,7 +156,7 @@ public class XFactoryRocket {
rocket_rpzb = new BulletConfig[rocket_template.length];
rocket_qd = new BulletConfig[rocket_template.length];
rocket_ml = new BulletConfig[rocket_template.length];
for(int i = 0; i < rocket_template.length; i++) {
rocket_rpzb[i] = makeRPZB(rocket_template[i]);
rocket_qd[i] = makeQD(rocket_template[i]);
@ -210,7 +210,7 @@ public class XFactoryRocket {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STINGER_SECONDARY_PRESS = (stack, ctx) -> { ItemGunStinger.setIsLockingOn(stack, true); };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STINGER_SECONDARY_RELEASE = (stack, ctx) -> { ItemGunStinger.setIsLockingOn(stack, false); };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_MISSILE_LAUNCHER_PRIMARY_PRESS = (stack, ctx) -> {
if(ItemGunBaseNT.getIsAiming(stack)) {
int target = ItemGunStinger.getLockonTarget(ctx.getPlayer(), 150D, 20D);
@ -222,10 +222,10 @@ public class XFactoryRocket {
Lego.LAMBDA_STANDARD_CLICK_PRIMARY.accept(stack, ctx);
ItemGunBaseNT.setIsLockedOn(stack, false);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ROCKET = (stack, ctx) -> { };
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
switch(type) {
case EQUIP: return new BusAnimation()
@ -242,7 +242,7 @@ public class XFactoryRocket {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_QUADRO_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_QUADRO_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -258,7 +258,7 @@ public class XFactoryRocket {
return null;
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MISSILE_LAUNCHER_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MISSILE_LAUNCHER_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN));

View File

@ -28,10 +28,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
import com.hbm.particle.helper.ExplosionCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.tileentity.IRepairable;
import com.hbm.tileentity.IRepairable.EnumExtinguishType;
import com.hbm.util.CompatExternal;
@ -52,15 +52,15 @@ import net.minecraftforge.common.util.ForgeDirection;
public class XFactoryTool {
public static final ResourceLocation scope = new ResourceLocation(RefStrings.MODID, "textures/misc/scope_tool.png");
public static BulletConfig fext_water;
public static BulletConfig fext_foam;
public static BulletConfig fext_sand;
public static BulletConfig ct_hook;
public static BulletConfig ct_mortar;
public static BulletConfig ct_mortar_charge;
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_WATER_HIT = (bullet, mop) -> {
if(!bullet.worldObj.isRemote) {
int ix = mop.blockX;
@ -80,7 +80,7 @@ public class XFactoryTool {
bullet.setDead();
}
};
public static Consumer<Entity> LAMBDA_WATER_UPDATE = (bullet) -> {
if(bullet.worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
@ -102,7 +102,7 @@ public class XFactoryTool {
}
}
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_FOAM_HIT = (bullet, mop) -> {
if(!bullet.worldObj.isRemote) {
int ix = mop.blockX;
@ -135,7 +135,7 @@ public class XFactoryTool {
if(fizz) bullet.worldObj.playSoundEffect(bullet.posX, bullet.posY, bullet.posZ, "random.fizz", 1.0F, 1.5F + bullet.worldObj.rand.nextFloat() * 0.5F);
}
};
public static Consumer<Entity> LAMBDA_FOAM_UPDATE = (bullet) -> {
if(bullet.worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
@ -149,7 +149,7 @@ public class XFactoryTool {
MainRegistry.proxy.effectNT(data);
}
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_SAND_HIT = (bullet, mop) -> {
if(!bullet.worldObj.isRemote) {
int ix = mop.blockX;
@ -174,7 +174,7 @@ public class XFactoryTool {
}
}
};
public static Consumer<Entity> LAMBDA_SAND_UPDATE = (bullet) -> {
if(bullet.worldObj.isRemote) {
NBTTagCompound data = new NBTTagCompound();
@ -199,7 +199,7 @@ public class XFactoryTool {
}
bullet.ignoreFrustumCheck = true;
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_HOOK = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.BLOCK) {
Vec3NT vec = new Vec3NT(-bullet.motionX, -bullet.motionY, -bullet.motionZ).normalizeSelf().multiply(0.05);
@ -207,7 +207,7 @@ public class XFactoryTool {
bullet.getStuck(mop.blockX, mop.blockY, mop.blockZ, mop.sideHit);
}
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_MORTAR = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 5, bullet.getThrower());
@ -219,7 +219,7 @@ public class XFactoryTool {
vnt.explode();
bullet.setDead();
};
public static BiConsumer<EntityBulletBaseMK4, MovingObjectPosition> LAMBDA_MORTAR_CHARGE = (bullet, mop) -> {
if(mop.typeOfHit == mop.typeOfHit.ENTITY && bullet.ticksExisted < 3 && mop.entityHit == bullet.getThrower()) return;
ExplosionVNT vnt = new ExplosionVNT(bullet.worldObj, mop.hitVec.xCoord, mop.hitVec.yCoord, mop.hitVec.zCoord, 15, bullet.getThrower());
@ -246,14 +246,14 @@ public class XFactoryTool {
.setOnUpdate(LAMBDA_SAND_UPDATE)
.setOnEntityHit((bulletEntity, target) -> { if(target.entityHit != null) target.entityHit.extinguish(); })
.setOnRicochet(LAMBDA_SAND_HIT);
ct_hook = new BulletConfig().setItem(EnumAmmo.CT_HOOK).setRenderRotations(false).setLife(6_000).setVel(3F).setGrav(0.035D).setDoesPenetrate(true).setDamageFalloffByPen(false)
.setOnUpdate(LAMBDA_SET_HOOK).setOnImpact(LAMBDA_HOOK);
ct_mortar = new BulletConfig().setItem(EnumAmmo.CT_MORTAR).setDamage(2.5F).setLife(200).setVel(3F).setGrav(0.035D)
.setOnImpact(LAMBDA_MORTAR);
ct_mortar_charge = new BulletConfig().setItem(EnumAmmo.CT_MORTAR_CHARGE).setDamage(5F).setLife(200).setVel(3F).setGrav(0.035D)
.setOnImpact(LAMBDA_MORTAR_CHARGE);
ModItems.gun_fireext = new ItemGunBaseNT(WeaponQuality.UTILITY, new GunConfig()
.dura(5_000).draw(10).inspect(55).reloadChangeType(true).hideCrosshair(false).crosshair(Crosshair.L_CIRCLE)
.rec(new Receiver(0)
@ -264,7 +264,7 @@ public class XFactoryTool {
.setupStandardConfiguration()
.orchestra(Orchestras.ORCHESTRA_FIREEXT)
).setUnlocalizedName("gun_fireext");
ModItems.gun_charge_thrower = new ItemGunChargeThrower(WeaponQuality.UTILITY, new GunConfig()
.dura(3_000).draw(10).inspect(55).reloadChangeType(true).hideCrosshair(false).crosshair(Crosshair.L_CIRCUMFLEX)
.rec(new Receiver(0)
@ -276,12 +276,12 @@ public class XFactoryTool {
.anim(LAMBDA_CT_ANIMS).orchestra(Orchestras.ORCHESTRA_CHARGE_THROWER)
).setUnlocalizedName("gun_charge_thrower");
}
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_CT = (stack, ctx) -> {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5));
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CT_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_CT_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -295,7 +295,7 @@ public class XFactoryTool {
.addBus("TURN", new BusAnimationSequence().addPos(0, 60, 0, 500, IType.SIN_FULL).hold(1750).addPos(0, 0, 0, 500, IType.SIN_FULL))
.addBus("ROLL", new BusAnimationSequence().hold(750).addPos(0, 0, -90, 500, IType.SIN_FULL).hold(1000).addPos(0, 0, 0, 500, IType.SIN_FULL));
}
return null;
};
}

View File

@ -11,7 +11,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.items.weapon.sedna.mags.MagazineFluid;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import api.hbm.fluidmk2.IFillableItem;
import net.minecraft.entity.EntityLivingBase;
@ -20,35 +20,35 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.Vec3;
public class ItemGunChemthrower extends ItemGunBaseNT implements IFillableItem {
public static final int CONSUMPTION = 3;
public ItemGunChemthrower(WeaponQuality quality, GunConfig... cfg) {
super(quality, cfg);
}
@Override
public boolean acceptsFluid(FluidType type, ItemStack stack) {
return getFluidType(stack) == type || this.getMagCount(stack) == 0;
}
public static final int transferSpeed = 50;
@Override
public int tryFill(FluidType type, int amount, ItemStack stack) {
if(!acceptsFluid(type, stack)) return amount;
if(this.getMagCount(stack) == 0) this.setMagType(stack, type.getID());
int fill = this.getMagCount(stack);
int req = this.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getCapacity(stack) - fill;
int toFill = Math.min(amount, req);
toFill = Math.min(toFill, transferSpeed);
this.setMagCount(stack, fill + toFill);
return amount - toFill;
}
public FluidType getFluidType(ItemStack stack) {
return Fluids.fromID(this.getMagType(stack));
}
@ -69,32 +69,32 @@ public class ItemGunChemthrower extends ItemGunBaseNT implements IFillableItem {
@Override public FluidType getFirstFluidType(ItemStack stack) { return Fluids.fromID(this.getMagType(stack)); }
@Override public int getFill(ItemStack stack) { return this.getMagCount(stack); }
public static int getMagType(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, MagazineFluid.KEY_MAG_TYPE + 0); }
public static void setMagType(ItemStack stack, int value) { ItemGunBaseNT.setValueInt(stack, MagazineFluid.KEY_MAG_TYPE + 0, value); }
public static int getMagCount(ItemStack stack) { return ItemGunBaseNT.getValueInt(stack, MagazineFluid.KEY_MAG_COUNT + 0); }
public static void setMagCount(ItemStack stack, int value) { ItemGunBaseNT.setValueInt(stack, MagazineFluid.KEY_MAG_COUNT + 0, value); }
public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> { return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) >= CONSUMPTION; };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer();
int index = ctx.configIndex;
ItemGunBaseNT.playAnimation(player, stack, AnimType.CYCLE, ctx.configIndex);
ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE, ctx.configIndex);
Receiver primary = ctx.config.getReceivers(stack)[0];
IMagazine mag = primary.getMagazine(stack);
Vec3 offset = primary.getProjectileOffset(stack);
double forwardOffset = offset.xCoord;
double heightOffset = offset.yCoord;
double sideOffset = offset.zCoord;
EntityChemical chem = new EntityChemical(entity.worldObj, entity, sideOffset, heightOffset, forwardOffset);
chem.setFluid((FluidType) mag.getType(stack, ctx.inventory));
entity.worldObj.spawnEntityInWorld(chem);
mag.useUpAmmo(stack, ctx.inventory, CONSUMPTION);
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + 1F, ctx.config.getDurability(stack)));
};

View File

@ -4,10 +4,10 @@ import java.util.function.BiFunction;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.factory.XFactory556mm;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
@ -23,8 +23,8 @@ public class WeapnModG3SawedOff extends WeaponModBase {
if(key == GunConfig.FUN_ANIMNATIONS) return (T) LAMBDA_G3_ANIMS;
return base;
}
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_G3_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_FULL));
}

View File

@ -9,10 +9,10 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.factory.Orchestras;
import com.hbm.items.weapon.sedna.factory.XFactory44;
import com.hbm.items.weapon.sedna.factory.XFactory762mm;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import net.minecraft.block.Block;
@ -36,15 +36,15 @@ public class WeaponModCarbineBayonet extends WeaponModBase {
if(key == GunConfig.I_INSPECTCANCEL) return cast(false, base);
return base;
}
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);
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(type == AnimType.INSPECT) {
if(type == GunAnimation.INSPECT) {
if(timer == 15 && ctx.getPlayer() != null) {
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D);
if(mop != null) {
@ -63,16 +63,16 @@ public class WeaponModCarbineBayonet extends WeaponModBase {
}
return;
}
Orchestras.ORCHESTRA_CARBINE.accept(stack, ctx);
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_CARBINE_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_CARBINE_ANIMS = (stack, type) -> {
switch(type) {
case INSPECT: return new BusAnimation()
.addBus("STAB", new BusAnimationSequence().addPos(0, 1, -2, 250, IType.SIN_DOWN).hold(250).addPos(0, 1, 5, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 500, IType.SIN_FULL));
}
return XFactory762mm.LAMBDA_CARBINE_ANIMS.apply(stack, type);
};
}

View File

@ -9,7 +9,7 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.factory.Orchestras;
import com.hbm.particle.SpentCasing;
import com.hbm.particle.helper.CasingCreator;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack;
@ -30,15 +30,15 @@ public class WeaponModGreasegun extends WeaponModBase {
if(key == GunConfig.CON_ORCHESTRA) return (T) ORCHESTRA_GREASEGUN;
return base;
}
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_GREASEGUN = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return;
AnimType type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
boolean aiming = ItemGunBaseNT.getIsAiming(stack);
if(type == AnimType.CYCLE) {
if(type == GunAnimation.CYCLE) {
if(timer == 1) {
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory);
if(casing != null) CasingCreator.composeEffect(entity.worldObj, entity, 0.55, aiming ? 0 : -0.125, aiming ? 0 : -0.25D, 0, 0.18, -0.12, 0.01, -7.5F + (float)entity.getRNG().nextGaussian() * 5F, 12F + (float)entity.getRNG().nextGaussian() * 5F, casing.getName());

View File

@ -8,15 +8,15 @@ import com.hbm.items.weapon.sedna.factory.XFactory12ga;
import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack;
public class WeaponModLiberatorSpeedloader extends WeaponModBase {
public static MagazineFullReload MAG = new MagazineFullReload(0, 4);
public WeaponModLiberatorSpeedloader(int id) {
@ -31,11 +31,11 @@ public class WeaponModLiberatorSpeedloader extends WeaponModBase {
if(MAG.acceptedBullets.isEmpty()) MAG.acceptedBullets.addAll(originalMag.acceptedBullets);
return (T) MAG;
}
return base;
}
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_LIBERATOR_ANIMS = (stack, type) -> {
switch(type) {
case RELOAD: return new BusAnimation()
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))
@ -51,7 +51,7 @@ public class WeaponModLiberatorSpeedloader extends WeaponModBase {
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 0).addPos(15, 0, 0, 250).addPos(0, 0, 0, 50).addPos(0, 0, 0, 550).addPos(15, 0, 0, 100).addPos(15, 0, 0, 600).addPos(0, 0, 0, 50))
.addBus("BREAK", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_UP).addPos(0, 0, 0, 600).addPos(45, 0, 0, 250, IType.SIN_DOWN).addPos(45, 0, 0, 300).addPos(0, 0, 0, 150, IType.SIN_UP));
}
return XFactory12ga.LAMBDA_LIBERATOR_ANIMS.apply(stack, type);
};
}

View File

@ -9,10 +9,10 @@ import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.factory.Orchestras;
import com.hbm.items.weapon.sedna.factory.XFactory44;
import com.hbm.items.weapon.sedna.factory.XFactory762mm;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import net.minecraft.block.Block;
@ -36,15 +36,15 @@ public class WeaponModMASBayonet extends WeaponModBase {
if(key == GunConfig.I_INSPECTCANCEL) return cast(false, base);
return base;
}
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);
GunAnimation type = ItemGunBaseNT.getLastAnim(stack, ctx.configIndex);
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(type == AnimType.INSPECT) {
if(type == GunAnimation.INSPECT) {
if(timer == 15 && ctx.getPlayer() != null) {
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D);
if(mop != null) {
@ -63,16 +63,16 @@ public class WeaponModMASBayonet extends WeaponModBase {
}
return;
}
Orchestras.ORCHESTRA_MAS36.accept(stack, ctx);
};
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_MAS36_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_MAS36_ANIMS = (stack, type) -> {
switch(type) {
case INSPECT: return new BusAnimation()
.addBus("STAB", new BusAnimationSequence().addPos(0, 1, -2, 250, IType.SIN_DOWN).hold(250).addPos(0, 1, 5, 250, IType.SIN_UP).hold(250).addPos(0, 0, 0, 500, IType.SIN_FULL));
}
return XFactory762mm.LAMBDA_MAS36_ANIMS.apply(stack, type);
};
}

View File

@ -10,10 +10,10 @@ import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.factory.Lego;
import com.hbm.items.weapon.sedna.factory.XFactoryRocket;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -32,13 +32,13 @@ public class WeaponModPanzerschreckSawedOff extends WeaponModBase {
return base;
}
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
@SuppressWarnings("incomplete-switch") public static BiFunction<ItemStack, GunAnimation, BusAnimation> LAMBDA_PANZERSCHRECK_ANIMS = (stack, type) -> {
switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_DOWN));
}
return XFactoryRocket.LAMBDA_PANZERSCHRECK_ANIMS.apply(stack, type);
};
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE = (stack, ctx) -> {
Lego.LAMBDA_STANDARD_FIRE.accept(stack, ctx);
if(ctx.entity != null) {

View File

@ -1788,105 +1788,6 @@ public class ClientProxy extends ServerProxy {
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleDeadLeaf(man, world, x, y, z));
}
if("anim".equals(type)) {
String mode = data.getString("mode");
/* crucible deploy */
if("crucible".equals(mode) && player.getHeldItem() != null) {
BusAnimation animation = new BusAnimation()
.addBus("GUARD_ROT", new BusAnimationSequence()
.addPos(90, 0, 1, 0)
.addPos(90, 0, 1, 800)
.addPos(0, 0, 1, 50));
String id = ModItems.crucible.getUnlocalizedName();
HbmAnimations.hotbar[player.inventory.currentItem][0] = new Animation(id, System.currentTimeMillis(), animation, null);
}
/* crucible swing */
if("cSwing".equals(mode)) {
if(HbmAnimations.getRelevantTransformation("SWING_ROT")[0] == 0) {
int offset = rand.nextInt(80) - 20;
BusAnimation animation = new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(90 - offset, 90 - offset, 35, 75)
.addPos(90 + offset, 90 - offset, -45, 150)
.addPos(0, 0, 0, 500))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(-3, 0, 0, 75)
.addPos(8, 0, 0, 150)
.addPos(0, 0, 0, 500));
Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("hbm:weapon.cSwing"), 0.8F + player.getRNG().nextFloat() * 0.2F));
String id = ModItems.crucible.getUnlocalizedName();
HbmAnimations.hotbar[player.inventory.currentItem][0] = new Animation(id, System.currentTimeMillis(), animation, null);
}
}
/* chainsaw swing */
if("sSwing".equals(mode) || "lSwing".equals(mode)) { //temp for lance
int forward = 150;
int sideways = 100;
int retire = 200;
if(HbmAnimations.getRelevantAnim() == null) {
BusAnimation animation = new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(0, 0, 90, forward)
.addPos(45, 0, 90, sideways)
.addPos(0, 0, 0, retire))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(0, 0, 3, forward)
.addPos(2, 0, 2, sideways)
.addPos(0, 0, 0, retire));
HbmAnimations.hotbar[player.inventory.currentItem][0] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation, null);
} else {
double[] rot = HbmAnimations.getRelevantTransformation("SWING_ROT");
double[] trans = HbmAnimations.getRelevantTransformation("SWING_TRANS");
if(System.currentTimeMillis() - HbmAnimations.getRelevantAnim().startMillis < 50) return;
BusAnimation animation = new BusAnimation()
.addBus("SWING_ROT", new BusAnimationSequence()
.addPos(rot[0], rot[1], rot[2], 0)
.addPos(0, 0, 90, forward)
.addPos(45, 0, 90, sideways)
.addPos(0, 0, 0, retire))
.addBus("SWING_TRANS", new BusAnimationSequence()
.addPos(trans[0], trans[1], trans[2], 0)
.addPos(0, 0, 3, forward)
.addPos(2, 0, 2, sideways)
.addPos(0, 0, 0, retire));
HbmAnimations.hotbar[player.inventory.currentItem][0] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation, null);
}
}
if("generic".equals(mode)) {
ItemStack stack = player.getHeldItem();
if(stack != null && stack.getItem() instanceof IAnimatedItem) {
IAnimatedItem item = (IAnimatedItem) stack.getItem();
BusAnimation anim = item.getAnimation(data, stack);
if(anim != null) {
HbmAnimations.hotbar[player.inventory.currentItem][0] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), anim, null);
}
}
}
}
if("tau".equals(type)) {
for(int i = 0; i < data.getByte("count"); i++)

View File

@ -4,6 +4,7 @@ import com.hbm.blocks.ICustomBlockHighlight;
import com.hbm.config.ClientConfig;
import com.hbm.config.RadiationConfig;
import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.armor.IArmorDisableModel;
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
@ -55,7 +56,7 @@ public class ModEventHandlerRenderer {
private static ModelMan manlyModel;
private static boolean[] partsHidden = new boolean[7];
@SubscribeEvent
public void onRenderTickPre(TickEvent.RenderTickEvent event) { }
@ -210,7 +211,17 @@ public class ModEventHandlerRenderer {
RenderPlayer renderer = event.renderer;
ItemStack held = player.getHeldItem();
if(held != null && player.getHeldItem().getItem() instanceof ItemGunBaseNT) {
if(held == null) return;
if(held.getItem() instanceof IAnimatedItem) {
if(((IAnimatedItem<?>) held.getItem()).shouldPlayerModelAim(held)) {
renderer.modelBipedMain.aimedBow = true;
renderer.modelArmor.aimedBow = true;
renderer.modelArmorChestplate.aimedBow = true;
}
}
if(held.getItem() instanceof ItemGunBaseNT) {
renderer.modelBipedMain.aimedBow = true;
renderer.modelArmor.aimedBow = true;
renderer.modelArmorChestplate.aimedBow = true;

View File

@ -44,7 +44,7 @@ public class PacketDispatcher {
//Signals server to do coord based satellite stuff
wrapper.registerMessage(SatCoordPacket.Handler.class, SatCoordPacket.class, i++, Side.SERVER);
//Triggers gun animations of the client
wrapper.registerMessage(GunAnimationPacket.Handler.class, GunAnimationPacket.class, i++, Side.CLIENT);
wrapper.registerMessage(HbmAnimationPacket.Handler.class, HbmAnimationPacket.class, i++, Side.CLIENT);
//Sends a funi text to display like a music disc announcement
wrapper.registerMessage(PlayerInformPacket.Handler.class, PlayerInformPacket.class, i++, Side.CLIENT);
//Universal keybind packet

View File

@ -3,15 +3,17 @@ package com.hbm.packet.toclient;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.armor.ArmorTrenchmaster;
import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.anim.HbmAnimations.Animation;
import com.hbm.util.EnumUtil;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@ -23,74 +25,76 @@ import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public class GunAnimationPacket implements IMessage {
public class HbmAnimationPacket implements IMessage {
public short type;
public int receiverIndex;
public int gunIndex;
public int itemIndex;
public GunAnimationPacket() { }
public HbmAnimationPacket() { }
public GunAnimationPacket(int type) {
public HbmAnimationPacket(int type) {
this.type = (short) type;
this.receiverIndex = 0;
this.gunIndex = 0;
this.itemIndex = 0;
}
public GunAnimationPacket(int type, int rec) {
public HbmAnimationPacket(int type, int rec) {
this.type = (short) type;
this.receiverIndex = rec;
this.gunIndex = 0;
this.itemIndex = 0;
}
public GunAnimationPacket(int type, int rec, int gun) {
public HbmAnimationPacket(int type, int rec, int gun) {
this.type = (short) type;
this.receiverIndex = rec;
this.gunIndex = gun;
this.itemIndex = gun;
}
@Override
public void fromBytes(ByteBuf buf) {
type = buf.readShort();
receiverIndex = buf.readInt();
gunIndex = buf.readInt();
itemIndex = buf.readInt();
}
@Override
public void toBytes(ByteBuf buf) {
buf.writeShort(type);
buf.writeInt(receiverIndex);
buf.writeInt(gunIndex);
buf.writeInt(itemIndex);
}
public static class Handler implements IMessageHandler<GunAnimationPacket, IMessage> {
public static class Handler implements IMessageHandler<HbmAnimationPacket, IMessage> {
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(GunAnimationPacket m, MessageContext ctx) {
public IMessage onMessage(HbmAnimationPacket m, MessageContext ctx) {
try {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
ItemStack stack = player.getHeldItem();
int slot = player.inventory.currentItem;
if(stack == null) return null;
if(stack.getItem() instanceof ItemGunBaseNT) {
handleSedna(player, stack, slot, AnimType.values()[m.type], m.receiverIndex, m.gunIndex);
handleSedna(player, stack, slot, GunAnimation.values()[m.type], m.receiverIndex, m.itemIndex);
} else if(stack.getItem() instanceof IAnimatedItem) {
handleItem(player, stack, slot, m.type, m.receiverIndex, m.itemIndex);
}
} catch(Exception x) { }
return null;
}
public static void handleSedna(EntityPlayer player, ItemStack stack, int slot, AnimType type, int receiverIndex, int gunIndex) {
public static void handleSedna(EntityPlayer player, ItemStack stack, int slot, GunAnimation type, int receiverIndex, int gunIndex) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
GunConfig config = gun.getConfig(stack, gunIndex);
if(type == AnimType.CYCLE) {
if(type == GunAnimation.CYCLE) {
if(gunIndex < gun.lastShot.length) gun.lastShot[gunIndex] = System.currentTimeMillis();
gun.shotRand = player.worldObj.rand.nextDouble();
@ -101,24 +105,33 @@ public class GunAnimationPacket implements IMessage {
if(onRecoil != null) onRecoil.accept(stack, new LambdaContext(config, player, player.inventory, receiverIndex));
}
}
BiFunction<ItemStack, AnimType, BusAnimation> anims = config.getAnims(stack);
BiFunction<ItemStack, GunAnimation, BusAnimation> anims = config.getAnims(stack);
BusAnimation animation = anims.apply(stack, type);
if(animation == null && type == AnimType.RELOAD_EMPTY) {
animation = anims.apply(stack, AnimType.RELOAD);
if(animation == null && (type == GunAnimation.ALT_CYCLE || type == GunAnimation.CYCLE_EMPTY)) {
animation = anims.apply(stack, GunAnimation.CYCLE);
}
if(animation == null && (type == AnimType.ALT_CYCLE || type == AnimType.CYCLE_EMPTY)) {
animation = anims.apply(stack, AnimType.CYCLE);
}
if(animation != null) {
Minecraft.getMinecraft().entityRenderer.itemRenderer.resetEquippedProgress();
Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender = stack;
boolean isReloadAnimation = type == AnimType.RELOAD || type == AnimType.RELOAD_CYCLE || type == AnimType.RELOAD_EMPTY;
boolean isReloadAnimation = type == GunAnimation.RELOAD || type == GunAnimation.RELOAD_CYCLE;
if(isReloadAnimation && ArmorTrenchmaster.isTrenchMaster(player)) animation.setTimeMult(0.5D);
HbmAnimations.hotbar[slot][gunIndex] = new Animation(stack.getItem().getUnlocalizedName(), System.currentTimeMillis(), animation, type, isReloadAnimation && config.getReloadAnimSequential(stack));
HbmAnimations.hotbar[slot][gunIndex] = new Animation(stack.getItem().getUnlocalizedName(), System.currentTimeMillis(), animation, isReloadAnimation && config.getReloadAnimSequential(stack));
}
}
public static void handleItem(EntityPlayer player, ItemStack stack, int slot, short type, int receiverIndex, int itemIndex) {
IAnimatedItem<?> item = (IAnimatedItem<?>) stack.getItem();
Class<? extends Enum<?>> animClass = item.getEnum();
BusAnimation animation = item.getAnimation(EnumUtil.grabEnumSafely(animClass, type), stack);
if(animation != null) {
HbmAnimations.hotbar[slot][itemIndex] = new Animation(stack.getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
}
}
}
}

View File

@ -0,0 +1,27 @@
package com.hbm.render.anim;
public class AnimationEnums {
// A NOTE ON SHOTGUN STYLE RELOADS
// Make sure the RELOAD adds shells, not just RELOAD_CYCLE, they all proc once for each loaded shell
public static enum GunAnimation {
RELOAD, //either a full reload or start of a reload
RELOAD_CYCLE, //animation that plays for every individual round (for shotguns and similar single round loading weapons)
RELOAD_END, //animation for transitioning from our RELOAD_CYCLE to idle
CYCLE, //animation for every firing cycle
CYCLE_EMPTY, //animation for the final shot in the magazine
CYCLE_DRY, //animation for trying to fire, but no round is available
ALT_CYCLE, //animation for alt fire cycles
SPINUP, //animation for actionstart
SPINDOWN, //animation for actionend
EQUIP, //animation for drawing the weapon
INSPECT, //animation for inspecting the weapon
JAMMED, //animation for jammed weapons
}
public static enum ToolAnimation {
SWING,
EQUIP,
}
}

View File

@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
public class HbmAnimations {
//in flans mod and afaik also MW, there's an issue that there is only one
//single animation timer for each client. this is fine for the most part,
//but once you reload and switch weapons while the animation plays, the
@ -17,28 +17,9 @@ public class HbmAnimations {
//"trick" the system by putting a weapon into a different slot while an
//animation is playing, though this will cancel the animation entirely.
public static final Animation[][] hotbar = new Animation[9][8]; //now with 8 parallel rails per slot! time to get railed!
public static enum AnimType {
RELOAD, //either a full reload or start of a reload
@Deprecated RELOAD_EMPTY, //same as reload, but the mag is completely empty
RELOAD_CYCLE, //animation that plays for every individual round (for shotguns and similar single round loading weapons)
RELOAD_END, //animation for transitioning from our RELOAD_CYCLE to idle
CYCLE, //animation for every firing cycle
CYCLE_EMPTY, //animation for the final shot in the magazine
CYCLE_DRY, //animation for trying to fire, but no round is available
ALT_CYCLE, //animation for alt fire cycles
SPINUP, //animation for actionstart
SPINDOWN, //animation for actionend
EQUIP, //animation for drawing the weapon
INSPECT, //animation for inspecting the weapon
JAMMED //animation for jammed weapons
}
// A NOTE ON SHOTGUN STYLE RELOADS
// Make sure the RELOAD and RELOAD_EMPTY adds shells, not just RELOAD_CYCLE, they all proc once for each loaded shell
public static class Animation {
//the "name" of the animation slot. if the item has a different key than
//the animation, the animation will be canceled.
public String key;
@ -48,64 +29,58 @@ public class HbmAnimations {
public BusAnimation animation;
// If set, don't cancel this animation when the timer ends, instead wait for the next to start
public boolean holdLastFrame = false;
// so we know what type of animation we're playing, only used rarely
public AnimType type;
public Animation(String key, long startMillis, BusAnimation animation, AnimType type) {
public Animation(String key, long startMillis, BusAnimation animation) {
this.key = key;
this.startMillis = startMillis;
this.animation = animation;
this.type = type;
}
public Animation(String key, long startMillis, BusAnimation animation, AnimType type, boolean holdLastFrame) {
this.key = key;
this.startMillis = startMillis;
this.animation = animation;
public Animation(String key, long startMillis, BusAnimation animation, boolean holdLastFrame) {
this(key, startMillis, animation);
this.holdLastFrame = holdLastFrame;
this.type = type;
}
}
public static Animation getRelevantAnim() { return getRelevantAnim(0); }
public static Animation getRelevantAnim(int index) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
int slot = player.inventory.currentItem;
ItemStack stack = player.getHeldItem();
if(stack == null)
return null;
if(slot < 0 || slot > 8) { //for freak of nature hotbars, probably won't work right but at least it doesn't crash
slot = Math.abs(slot) % 9;
}
if(hotbar[slot][index] == null)
return null;
if(hotbar[slot][index].key.equals(stack.getItem().getUnlocalizedName())) {
return hotbar[slot][index];
}
return null;
}
public static double[] getRelevantTransformation(String bus) { return getRelevantTransformation(bus, 0); }
public static double[] getRelevantTransformation(String bus, int index) {
Animation anim = HbmAnimations.getRelevantAnim(index);
if(anim != null) {
BusAnimation buses = anim.animation;
int millis = (int)(Clock.get_ms() - anim.startMillis);
BusAnimationSequence seq = buses.getBus(bus);
if(seq != null) {
double[] trans = seq.getTransformation(millis);
if(trans != null)
return trans;
}
@ -124,7 +99,7 @@ public class HbmAnimations {
public static void applyRelevantTransformation(String bus, int index) {
double[] transform = getRelevantTransformation(bus, index);
int[] rot = new int[] { (int)transform[12], (int)transform[13], (int)transform[14] };
GL11.glTranslated(transform[0], transform[1], transform[2]);
GL11.glRotated(transform[3 + rot[0]], rot[0] == 0 ? 1 : 0, rot[0] == 1 ? 1 : 0, rot[0] == 2 ? 1 : 0);
GL11.glRotated(transform[3 + rot[1]], rot[1] == 0 ? 1 : 0, rot[1] == 1 ? 1 : 0, rot[1] == 2 ? 1 : 0);

View File

@ -9,8 +9,8 @@ import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
@ -29,7 +29,7 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
@Override
public void setupFirstPerson(ItemStack stack) {
GL11.glTranslated(0, 0, 0.875);
float offset = 0.8F;
standardAimingTransform(stack,
-1.5F * offset, -2F * offset, 1.25F * offset,
@ -38,12 +38,12 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
@Override
public void renderFirstPerson(ItemStack stack) {
ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.congolake_tex);
double scale = 0.5D;
GL11.glScaled(scale, scale, scale);
HbmAnimations.applyRelevantTransformation("Gun");
ResourceManager.congolake.renderPart("Gun");
@ -94,30 +94,30 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
GL11.glPushMatrix();
{
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack);
if(gun.getLastAnim(stack, 0) != AnimType.INSPECT || mag.getAmount(stack, MainRegistry.proxy.me().inventory) > 0) { //omit when inspecting and no shell is loaded
if(gun.getLastAnim(stack, 0) != GunAnimation.INSPECT || mag.getAmount(stack, MainRegistry.proxy.me().inventory) > 0) { //omit when inspecting and no shell is loaded
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);
HbmAnimations.applyRelevantTransformation("Shell");
SpentCasing casing = mag.getCasing(stack, MainRegistry.proxy.me().inventory);
int[] colors = casing != null ? casing.getColors() : new int[] { SpentCasing.COLOR_CASE_40MM };
Color shellColor = new Color(colors[0]);
GL11.glColor3f(shellColor.getRed() / 255F, shellColor.getGreen() / 255F, shellColor.getBlue() / 255F);
ResourceManager.congolake.renderPart("Shell");
Color shellForeColor = new Color(colors.length > 1 ? colors[1] : colors[0]);
GL11.glColor3f(shellForeColor.getRed() / 255F, shellForeColor.getGreen() / 255F, shellForeColor.getBlue() / 255F);
ResourceManager.congolake.renderPart("ShellFore");
GL11.glColor3f(1F, 1F, 1F);
}
}
GL11.glPopMatrix();
double smokeScale = 0.25;
GL11.glShadeModel(GL11.GL_SMOOTH);
GL11.glPushMatrix();
GL11.glTranslated(0, 1.75, 4.25);
@ -170,7 +170,7 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
@Override
public void renderOther(ItemStack stack, ItemRenderType type) {
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glShadeModel(GL11.GL_SMOOTH);
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.congolake_tex);
ResourceManager.congolake.renderAll();

View File

@ -266,12 +266,8 @@ public class TileEntityElectrolyser extends TileEntityMachineBase implements IEn
for(int i = 0; i < 4; i++) tanks[i].deserialize(buf);
boolean left = buf.readBoolean();
boolean right = buf.readBoolean();
if(left) {
this.leftStack = new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt());
}
if(right) {
this.rightStack = new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt());
}
this.leftStack = left ? new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt()) : null;
this.rightStack = right ? new MaterialStack(Mats.matById.get(buf.readInt()), buf.readInt()) : null;
this.lastSelectedGUI = buf.readInt();
}

View File

@ -5,6 +5,7 @@ import java.util.*;
import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockDepth;
import com.hbm.blocks.generic.BlockBedrockOreTE.TileEntityBedrockOre;
import com.hbm.blocks.network.CraneInserter;
import com.hbm.entity.item.EntityMovingItem;
@ -270,7 +271,12 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
break;
}
if(shouldIgnoreBlock(b, x, y ,z)) continue;
// if hitting depth rock, turn off the drill
if(b instanceof BlockDepth) {
this.enableDrill = false;
}
if(shouldIgnoreBlock(b, x, y, z)) continue;
ignoreAll = false;

View File

@ -1098,9 +1098,7 @@ public class NBTStructure {
private SpawnCondition nextSpawn;
public void generateStructures(World world, Random rand, IChunkProvider chunkProvider, int chunkX, int chunkZ) {
Block[] ablock = new Block[65536];
func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock);
func_151539_a(chunkProvider, world, chunkX, chunkZ, null);
generateStructuresInChunk(world, rand, chunkX, chunkZ);
}

View File

@ -614,34 +614,34 @@ digamma.playerHealth=Digammaeinfluss:
digamma.playerRes=Digammaresistenz:
digamma.title=DIGAMMA-DIAGNOSEGERÄT
entity.entity_cyber_crab.name=Cyber-Krabbe
entity.entity_elder_one.name=Quackos der Älteste
entity.entity_fucc_a_ducc.name=Ente
entity.entity_glyphid.name=Glyphid
entity.entity_glyphid_behemoth.name=Glyphid-Behemoth
entity.entity_glyphid_blaster.name=Glyphid-Blaster
entity.entity_glyphid_bombardier.name=Glyphid-Bombardierer
entity.entity_glyphid_brawler.name=Glyphid-Schläger
entity.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_digger.name=Glyphid-Gräber
entity.entity_glyphid_nuclear.name=Der dicke Johnson
entity.entity_glyphid_scout.name=Glyphid-Späher
entity.entity_ntm_fbi.name=FBI Agent
entity.entity_ntm_fbi_drone.name=FBI Drone
entity.entity_ntm_radiation_blaze.name=Kernschmelze-Elementar
entity.hbm.entity_cyber_crab.name=Cyber-Krabbe
entity.hbm.entity_elder_one.name=Quackos der Älteste
entity.hbm.entity_fucc_a_ducc.name=Ente
entity.hbm.entity_glyphid.name=Glyphid
entity.hbm.entity_glyphid_behemoth.name=Glyphid-Behemoth
entity.hbm.entity_glyphid_blaster.name=Glyphid-Blaster
entity.hbm.entity_glyphid_bombardier.name=Glyphid-Bombardierer
entity.hbm.entity_glyphid_brawler.name=Glyphid-Schläger
entity.hbm.entity_glyphid_brenda.name=Brenda
entity.hbm.entity_glyphid_digger.name=Glyphid-Gräber
entity.hbm.entity_glyphid_nuclear.name=Der dicke Johnson
entity.hbm.entity_glyphid_scout.name=Glyphid-Späher
entity.hbm.entity_ntm_fbi.name=FBI Agent
entity.hbm.entity_ntm_fbi_drone.name=FBI Drone
entity.hbm.entity_ntm_radiation_blaze.name=Kernschmelze-Elementar
entity.hbm.entity_ntm_ufo.name=Marsianisches Invasionsschiff
entity.entity_mob_hunter_chopper.name=Jagdschrauber
entity.entity_mob_mask_man.name=Maskenmann
entity.entity_mob_gold_creeper.name=Goldener Creeper
entity.entity_mob_nuclear_creeper.name=Nuklearer Creeper
entity.entity_mob_phosgene_creeper.name=Phosgen-Creeper
entity.entity_mob_tainted_creeper.name=Verseuchter Creeper
entity.entity_mob_volatile_creeper.name=Instabiler Creeper
entity.entity_parasite_maggot.name=Parasitische Made
entity.entity_pigeon.name=Taube
entity.entity_plastic_bag.name=Plastiktüte
entity.entity_taint_crab.name=Verseuchte Krabbe
entity.entity_tesla_crab.name=Tesla-Krabbe
entity.hbm.entity_mob_hunter_chopper.name=Jagdschrauber
entity.hbm.entity_mob_mask_man.name=Maskenmann
entity.hbm.entity_mob_gold_creeper.name=Goldener Creeper
entity.hbm.entity_mob_nuclear_creeper.name=Nuklearer Creeper
entity.hbm.entity_mob_phosgene_creeper.name=Phosgen-Creeper
entity.hbm.entity_mob_tainted_creeper.name=Verseuchter Creeper
entity.hbm.entity_mob_volatile_creeper.name=Instabiler Creeper
entity.hbm.entity_parasite_maggot.name=Parasitische Made
entity.hbm.entity_pigeon.name=Taube
entity.hbm.entity_plastic_bag.name=Plastiktüte
entity.hbm.entity_taint_crab.name=Verseuchte Krabbe
entity.hbm.entity_tesla_crab.name=Tesla-Krabbe
entity.hbm.entity_balls_o_tron.name=Balls-O-Tron Prime
entity.hbm.entity_balls_o_tron_seg.name=Balls-O-Tron Segment
entity.hbm.entity_bullet.name=Patrone

View File

@ -1197,34 +1197,34 @@ digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Cyber Crab
entity.entity_elder_one.name=Quackos The Elder One
entity.entity_fucc_a_ducc.name=Duck
entity.entity_glyphid.name=Glyphid
entity.entity_glyphid_behemoth.name=Glyphid Behemoth
entity.entity_glyphid_blaster.name=Glyphid Blaster
entity.entity_glyphid_bombardier.name=Glyphid Bombardier
entity.entity_glyphid_brawler.name=Glyphid Brawler
entity.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_digger.name=Glyphid Digger
entity.entity_glyphid_nuclear.name=Big Man Johnson
entity.entity_glyphid_scout.name=Glyphid Scout
entity.entity_ntm_fbi.name=FBI Agent
entity.entity_ntm_fbi_drone.name=FBI Drone
entity.entity_ntm_radiation_blaze.name=Meltdown Elemental
entity.hbm.entity_cyber_crab.name=Cyber Crab
entity.hbm.entity_elder_one.name=Quackos The Elder One
entity.hbm.entity_fucc_a_ducc.name=Duck
entity.hbm.entity_glyphid.name=Glyphid
entity.hbm.entity_glyphid_behemoth.name=Glyphid Behemoth
entity.hbm.entity_glyphid_blaster.name=Glyphid Blaster
entity.hbm.entity_glyphid_bombardier.name=Glyphid Bombardier
entity.hbm.entity_glyphid_brawler.name=Glyphid Brawler
entity.hbm.entity_glyphid_brenda.name=Brenda
entity.hbm.entity_glyphid_digger.name=Glyphid Digger
entity.hbm.entity_glyphid_nuclear.name=Big Man Johnson
entity.hbm.entity_glyphid_scout.name=Glyphid Scout
entity.hbm.entity_ntm_fbi.name=FBI Agent
entity.hbm.entity_ntm_fbi_drone.name=FBI Drone
entity.hbm.entity_ntm_radiation_blaze.name=Meltdown Elemental
entity.hbm.entity_ntm_ufo.name=Martian Invasion Ship
entity.entity_mob_hunter_chopper.name=Hunter Chopper
entity.entity_mob_mask_man.name=Mask Man
entity.entity_mob_gold_creeper.name=Golden Creeper
entity.entity_mob_nuclear_creeper.name=Nuclear Creeper
entity.entity_mob_phosgene_creeper.name=Phosgene Creeper
entity.entity_mob_tainted_creeper.name=Tainted Creeper
entity.entity_mob_volatile_creeper.name=Volatile Creeper
entity.entity_parasite_maggot.name=Parasitic Maggot
entity.entity_pigeon.name=Pigeon
entity.entity_plastic_bag.name=Plastic Bag
entity.entity_taint_crab.name=Taint Crab
entity.entity_tesla_crab.name=Tesla Crab
entity.hbm.entity_mob_hunter_chopper.name=Hunter Chopper
entity.hbm.entity_mob_mask_man.name=Mask Man
entity.hbm.entity_mob_gold_creeper.name=Golden Creeper
entity.hbm.entity_mob_nuclear_creeper.name=Nuclear Creeper
entity.hbm.entity_mob_phosgene_creeper.name=Phosgene Creeper
entity.hbm.entity_mob_tainted_creeper.name=Tainted Creeper
entity.hbm.entity_mob_volatile_creeper.name=Volatile Creeper
entity.hbm.entity_parasite_maggot.name=Parasitic Maggot
entity.hbm.entity_pigeon.name=Pigeon
entity.hbm.entity_plastic_bag.name=Plastic Bag
entity.hbm.entity_taint_crab.name=Taint Crab
entity.hbm.entity_tesla_crab.name=Tesla Crab
entity.hbm.entity_balls_o_tron.name=Balls-O-Tron Prime
entity.hbm.entity_balls_o_tron_seg.name=Balls-O-Tron Segment
entity.hbm.entity_bullet.name=Bullet

View File

@ -1127,9 +1127,9 @@ item.stealth_boy.name=Module de furtiviter
entity.hbm.entity_bullet.name=Balle
entity.hbm.entity_rocket.name=Roquettes
entity.hbm.entity_schrabnel.name=Shrapnel
entity.entity_mob_nuclear_creeper.name=Creeper nucléaire
entity.entity_mob_hunter_chopper.name=Hélicoptère de chasse
entity.entity_cyber_crab.name=Cyber-crabe
entity.hbm.entity_mob_nuclear_creeper.name=Creeper nucléaire
entity.hbm.entity_mob_hunter_chopper.name=Hélicoptère de chasse
entity.hbm.entity_cyber_crab.name=Cyber-crabe
item.cap_aluminium.name=Capuchon en aluminium
item.hull_small_steel.name=Petite coque en acier

View File

@ -243,7 +243,7 @@ book.rbmk.title1=Introduzione
book.rbmk.page1=§lRBMK§r è un reattore nucleare completamente modulare. A differenza degli altri reattori, non c'è nessun nucleo o limite di costruzione, piuttosto il comportamento e l'efficienza e data da com'è costruito il reattore e come interagiscono le parti tra loro.
book.rbmk.title2=Calore
book.rbmk.page2=Come il reattore va, tende a generare §lcalore§r. Il calore si diffonderà tra le parti, diminuendo lentamente nel processo di fissione. L'obiettivo è quello di generare più calore possibile senza fondere il reattore, e trasferire esso nelle caldaie per raffreddate il reattore e produrre vapore.
book.rbmk.title3=Barre di combustibile
book.rbmk.title3=Barre di combustibile
book.rbmk.page3=Le §lbarre di combustibile§r tendono a catturare il flusso di neutroni, causando al combustibile di reagire, rilasciando neutroni nel processo. I neutroni sono rilasciati in tutte e 4 le principali vie per un massimo di 5 blocchi. Il quantitativo di neutroni rilasciati, dipende dal combustibile usato.
book.rbmk.title4=Barre di regolazione
book.rbmk.page4=Le §lbarre di regolazione§r tendono a ridurre il numero di neutroni durante il passaggio. Quando sono completamente inserite, bloccano il passaggio di neutroni; Quando sono le barre sono parzialmente inserite, ne bloccano la metà di essi. Le barre di controllo sono un metodo per regolare i neutroni e anche per spengere il reattore.
@ -467,14 +467,14 @@ book_lore.bf_bomb_2.page.1=Eppure non posso nemmeno biasimarli. Swirlmat non ha
book_lore.bf_bomb_2.page.2=Ancora peggio, questa cosa è una fonte di energia. L'esistenza del nostro campione è una violazione dell'ALARA: il laboratorio è stato lasciato vuoto al suo arrivo e l'unica persona abbastanza coraggiosa (un certo dottor Melfyn) ha indossato un materiale ignifugo di livello A solo per trasportarlo per 20 metri.
book_lore.bf_bomb_2.page.3=I dati empirici non sono migliori, poiché stiamo infrangendo la prima legge della termodinamica con quanta energia irradia. Trovarsi vicino a quella cosa, anche dietro un metro di piombo, era terrificante. Siamo corsi fuori dalla camera al termine della spettroscopia
book_lore.bf_bomb_2.page.4=e non ne abbiamo ricavato nulla di nuovo. Quegli idioti del team scientifico, Dio, non hanno vacillato nemmeno dopo tutto quello. Assistere a quelle "discussioni" era orribile; quel ciarlatano del capo ricercatore diceva addirittura che il divieto di test sarebbe stato revocato, che avremmo potuto esserlo
book_lore.bf_bomb_2.page.5=costruire bombe dalla merda nelle prossime settimane, chi sano di mente ci lavorerebbe? Diavolo, l'unico assistente sano di mente (un certo Andrew) l'ha soprannominato "balefire" - perché bruciare a morte su una pira funeraria sarebbe indolore in confronto.
book_lore.bf_bomb_2.page.5=costruire bombe dalla merda nelle prossime settimane, chi sano di mente ci lavorerebbe? Diavolo, l'unico assistente sano di mente (un certo Andrew) l'ha soprannominato "balefire" - perché bruciare a morte su una pira funeraria sarebbe indolore in confronto.
book_lore.bf_bomb_3.name=Note private
book_lore.bf_bomb_3.author=M. Porter
book_lore.bf_bomb_3.page.0=Io e la squadra abbiamo fatto dei passi avanti. L'enfasi sulla separazione: isolarmi dai più devoti ha reso il lavoro lì molto più sopportabile. Anche se non abbiamo ancora idea delle effettive proprietà del balefire (è difficile da analizzare
book_lore.bf_bomb_3.page.1=un campione che frigge la tua attrezzatura) le sue interazioni con altra materia si sono rivelate fruttuose. In particolare, hanno sintetizzato una forma "gassosa": Andrew, tra tutti, mi ha informato che si trattava in realtà di un colloide costituito da microscopiche particelle di fuoco funebre, sospese in alcuni
book_lore.bf_bomb_3.page.2=gas nobile. Ogni particella è avvolta da una "bolla" di gas ionizzato carica positivamente, che ne impedisce la sedimentazione. Chi avrebbe potuto immaginare che le radiazioni gamma fatali avessero un beneficio? Non me. $ Scelgo di non pensare a come hanno trasformato il campione
book_lore.bf_bomb_3.page.3=particolato, ma non posso sottovalutare l'utilità di questo fuoco gassoso: ha reso molto più sicuro fare esperimenti. $ A proposito di sicurezza, il capo ricercatore (in un atto di insensibile disprezzo) ha fatto una scoperta che gli ha quasi staccato la testa.
book_lore.bf_bomb_3.page.3=particolato, ma non posso sottovalutare l'utilità di questo fuoco gassoso: ha reso molto più sicuro fare esperimenti. $ A proposito di sicurezza, il capo ricercatore (in un atto di insensibile disprezzo) ha fatto una scoperta che gli ha quasi staccato la testa.
book_lore.bf_bomb_3.page.4=Decise di "sporcarsi" lasciando che una cellula del nostro nuovo colloide interagisse direttamente con un po' di antimateria molto costosa: l'esplosione risultante trasformò il tavolo su cui si trovava in un pezzo di scorie sbiancate dalle radiazioni, scolpito un emisfero quasi perfetto attraverso
book_lore.bf_bomb_3.page.5=la parte superiore e ha dato alla testa una buona dose di ARS. Immagino che ora sappiamo come farlo esplodere, ma Dio, alcune persone...
@ -688,14 +688,14 @@ book_lore.bf_bomb_2.page.1=And yet I can't even blame them. Swirlmat makes no go
book_lore.bf_bomb_2.page.2=Even worse, this thing is an energy source. The existence of our sample is a violation of ALARA: the lab was vacated when it arrived, and the only person brave enough (one Dr. Melfyn) donned a level A hazmat just to carry it 20 meters.
book_lore.bf_bomb_2.page.3=The empirical data isn't better, as we're breaking the first law of thermodynamics with how much energy it radiates. Being anywhere near that thing - even behind a meter of lead - was terrifying. We sprinted out of the chamber upon conclusion of the spectroscopy
book_lore.bf_bomb_2.page.4=and we got nothing new out of it. Those idiots in the science team, god, did not even waver after all that. Sitting through those "discussions" was horrible; that quack of a head researcher even rumored that the test ban would be lifted, that we could be
book_lore.bf_bomb_2.page.5=building bombs out of the shit in the coming weeks, who in their right mind would work on that? Hell, the one sane assistant (an Andrew) nicknamed it "balefire" - because burning to death on a funeral pyre would be painless by comparison.
book_lore.bf_bomb_2.page.5=building bombs out of the shit in the coming weeks, who in their right mind would work on that? Hell, the one sane assistant (an Andrew) nicknamed it "balefire" - because burning to death on a funeral pyre would be painless by comparison.
book_lore.bf_bomb_3.name=Private Notes
book_lore.bf_bomb_3.author=M. Porter
book_lore.bf_bomb_3.page.0=The team and I have made some breakthroughs. Emphasis on the separation - isolating myself from the more devout has made working there so much more bearable. While we still have no idea about the actual properties of balefire (it's difficult to analyze
book_lore.bf_bomb_3.page.1=a sample that fries your equipment) its interactions with other matter has proved fruitful. Notably, they synthesized a "gaseous" form: Andrew, of all people, informed me that it was really a colloid consisting of microscopic balefire particles, suspended in some
book_lore.bf_bomb_3.page.2=noble gas. Each particle is enveloped by a positively-charged 'bubble' of ionized gas, preventing it from settling. Who could've guessed that fatal gamma radiation had a benefit? Not me. $ I'm choosing not to think about how they transformed the sample into
book_lore.bf_bomb_3.page.3=particulate, but I can't understate the utility of this gaseous balefire - it's made it much safer to experiment on. $ Speaking of safety, the head researcher (in an act of callous disregard) made a discovery that also nearly took his head off.
book_lore.bf_bomb_3.page.3=particulate, but I can't understate the utility of this gaseous balefire - it's made it much safer to experiment on. $ Speaking of safety, the head researcher (in an act of callous disregard) made a discovery that also nearly took his head off.
book_lore.bf_bomb_3.page.4=He decided to get "dirty" by letting a cell of our new colloid interact directly with some very expensive antimatter: the resulting explosion turned the table it was on into a piece of radiation-bleached slag, carved a near-perfect hemisphere through
book_lore.bf_bomb_3.page.5=the top, and gave the head a healthy dose of ARS. I guess we know how to make it explode now, but god, some people...
@ -1379,34 +1379,34 @@ digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Cyber Crab
entity.entity_elder_one.name=Quackos The Elder One
entity.entity_fucc_a_ducc.name=Duck
entity.entity_glyphid.name=Glyphid
entity.entity_glyphid_behemoth.name=Glyphid Behemoth
entity.entity_glyphid_blaster.name=Glyphid Blaster
entity.entity_glyphid_bombardier.name=Glyphid Bombardier
entity.entity_glyphid_brawler.name=Glyphid Brawler
entity.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_digger.name=Glyphid Digger
entity.entity_glyphid_nuclear.name=Big Man Johnson
entity.entity_glyphid_scout.name=Glyphid Scout
entity.entity_ntm_fbi.name=FBI Agent
entity.entity_ntm_fbi_drone.name=FBI Drone
entity.entity_ntm_radiation_blaze.name=Meltdown Elemental
entity.hbm.entity_cyber_crab.name=Cyber Crab
entity.hbm.entity_elder_one.name=Quackos The Elder One
entity.hbm.entity_fucc_a_ducc.name=Duck
entity.hbm.entity_glyphid.name=Glyphid
entity.hbm.entity_glyphid_behemoth.name=Glyphid Behemoth
entity.hbm.entity_glyphid_blaster.name=Glyphid Blaster
entity.hbm.entity_glyphid_bombardier.name=Glyphid Bombardier
entity.hbm.entity_glyphid_brawler.name=Glyphid Brawler
entity.hbm.entity_glyphid_brenda.name=Brenda
entity.hbm.entity_glyphid_digger.name=Glyphid Digger
entity.hbm.entity_glyphid_nuclear.name=Big Man Johnson
entity.hbm.entity_glyphid_scout.name=Glyphid Scout
entity.hbm.entity_ntm_fbi.name=FBI Agent
entity.hbm.entity_ntm_fbi_drone.name=FBI Drone
entity.hbm.entity_ntm_radiation_blaze.name=Meltdown Elemental
entity.hbm.entity_ntm_ufo.name=Martian Invasion Ship
entity.entity_mob_hunter_chopper.name=Hunter Chopper
entity.entity_mob_mask_man.name=Mask Man
entity.entity_mob_gold_creeper.name=Golden Creeper
entity.entity_mob_nuclear_creeper.name=Nuclear Creeper
entity.entity_mob_phosgene_creeper.name=Phosgene Creeper
entity.entity_mob_tainted_creeper.name=Tainted Creeper
entity.entity_mob_volatile_creeper.name=Volatile Creeper
entity.entity_parasite_maggot.name=Parasitic Maggot
entity.entity_pigeon.name=Pigeon
entity.entity_plastic_bag.name=Plastic Bag
entity.entity_taint_crab.name=Taint Crab
entity.entity_tesla_crab.name=Tesla Crab
entity.hbm.entity_mob_hunter_chopper.name=Hunter Chopper
entity.hbm.entity_mob_mask_man.name=Mask Man
entity.hbm.entity_mob_gold_creeper.name=Golden Creeper
entity.hbm.entity_mob_nuclear_creeper.name=Nuclear Creeper
entity.hbm.entity_mob_phosgene_creeper.name=Phosgene Creeper
entity.hbm.entity_mob_tainted_creeper.name=Tainted Creeper
entity.hbm.entity_mob_volatile_creeper.name=Volatile Creeper
entity.hbm.entity_parasite_maggot.name=Parasitic Maggot
entity.hbm.entity_pigeon.name=Pigeon
entity.hbm.entity_plastic_bag.name=Plastic Bag
entity.hbm.entity_taint_crab.name=Taint Crab
entity.hbm.entity_tesla_crab.name=Tesla Crab
entity.hbm.entity_balls_o_tron.name=Balls-O-Tron Prime
entity.hbm.entity_balls_o_tron_seg.name=Balls-O-Tron Segment
entity.hbm.entity_bullet.name=Bullet

View File

@ -352,7 +352,7 @@ book_lore.book_mercury.page.2=wszystkie rzeczy, kiedy są replikowane przez cia
book_lore.book_flower.name=Notatka
book_lore.book_flower.author=Dave
book_lore.book_flower.page.1=pamiętasz, jak wspomniałem w mojej pierwszej notatce, że związek jest w większości nieorganiczny? zgadnij co, starzec podzielił się czwartym składnikiem: ipomoea nil, rodzaj kwiatu. powój! może to być spowodowane niską zawartością
book_lore.book_flower.page.1=pamiętasz, jak wspomniałem w mojej pierwszej notatce, że związek jest w większości nieorganiczny? zgadnij co, starzec podzielił się czwartym składnikiem: ipomoea nil, rodzaj kwiatu. powój! może to być spowodowane niską zawartością
book_lore.book_flower.page.2=siarki, cokolwiek by nie było, nie działa z innymi kwiatami. Powój trafia do slotu %d
book_lore.book_syringe.name=Notatka
@ -523,7 +523,7 @@ chem.BP_BIOFUEL=Transestryfikacja biopaliw
chem.BP_BIOGAS=Produkcja biogazu
chem.C4=Synteza C-4
chem.CC_CENTRIFUGE=Separacja chlorokalcytu
chem.CC_ELECTROLYSIS=Elektroliza chlorku wapnia
chem.CC_ELECTROLYSIS=Elektroliza chlorku wapnia
chem.CC_HEATING=Zaawansowane upłynnianie węgla
chem.CC_HEAVY=Podstawowe upłynnianie węgla
chem.CC_I=Ulepszone upłynnianie węgla
@ -575,7 +575,7 @@ chem.NITAN=Mieszanie superpaliwa NITAN
chem.NITRIC_ACID=Produkcja kwasu azotowego
chem.OIL_SAND=Ekstrakcja piasku smołowego
chem.OSMIRIDIUM_DEATH=Produkcja roztworu osmirydowego
chem.PC_ELECTROLYSIS=Elektroliza chlorku potasu
chem.PC_ELECTROLYSIS=Elektroliza chlorku potasu
chem.PEROXIDE=Produkcja nadtlenku wodoru
chem.PET=Synteza PET
chem.PETROIL_LEADED=Mieszanie benzyny ołowiowej
@ -620,7 +620,7 @@ commands.satellite.no_satellite=Nie znaleziono satelity o tej częstotliwości!
commands.satellite.not_a_satellite=Trzymany przedmiot nie jest satelitą!
commands.satellite.satellite_descended=Satelita zszedł pomyślnie.
commands.satellite.satellite_orbited=Satelita wystrzelony.
commands.satellite.should_be_run_as_player=Ta komenda powinna być uruchomiona przez gracza!
commands.satellite.should_be_run_as_player=Ta komenda powinna być uruchomiona przez gracza!
container.amsBase=Podstawa AMS (Dekoracja)
container.amsEmitter=AMS Emitter (Dekoracja)
container.amsLimiter=AMS Stabilizer (Dekoracja)
@ -646,7 +646,7 @@ container.craneUnboxer=Rozpakowywacz konwejerowy
container.crateDesh=Deshowa skrzynia
container.crateIron=Żelazna skrzynia
container.crateSteel=Stalowa skrzynia
container.crateTemplate=Skrzynia szablonowa
container.crateTemplate=Skrzynia szablonowa
container.crateTungsten=Tungstenowa skrzynia
container.crystallizer=Zakwaszacz rud
container.cyclotron=Cyklotron
@ -783,7 +783,7 @@ container.zirnox=Reaktor jądrowy ZIRNOX
crucible.aa=Produkcja zaawansowanych stopów
crucible.cdalloy=Produkcja stali kadmowej
crucible.cmb=Produkcja stali CMB
crucible.ferro=Produkcja ferrouranu
crucible.ferro=Produkcja ferrouranu
crucible.hematite=Produkcja żelaza z hematytu
crucible.hss=Produkcja stali szybkotnącej
crucible.malachite=Produkcja miedzi z malachitu
@ -1013,29 +1013,29 @@ digamma.playerHealth=Wpływ Digammy:
digamma.playerRes=Odporność na digamę:
digamma.title=DIAGNOSTYKA DIGAMMY
entity.entity_cyber_crab.name=Cyberkrab
entity.entity_elder_one.name=Quackos Starszy
entity.entity_fucc_a_ducc.name=Kaczka
entity.entity_glyphid.name=Glyfid
entity.entity_glyphid_behemoth.name=Glyfid Behemot
entity.entity_glyphid_blaster.name=Glyfid Blaster
entity.entity_glyphid_bombardier.name=Glyfid Bombardier
entity.entity_glyphid_brawler.name=Glyfid Awanturnik
entity.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_nuclear.name=Big Men Dżonson
entity.entity_glyphid_scout.name=Glyfid Skaut
entity.entity_ntm_fbi.name=Agent FBI
entity.entity_ntm_radiation_blaze.name=Żywiołak stopienia
entity.hbm.entity_cyber_crab.name=Cyberkrab
entity.hbm.entity_elder_one.name=Quackos Starszy
entity.hbm.entity_fucc_a_ducc.name=Kaczka
entity.hbm.entity_glyphid.name=Glyfid
entity.hbm.entity_glyphid_behemoth.name=Glyfid Behemot
entity.hbm.entity_glyphid_blaster.name=Glyfid Blaster
entity.hbm.entity_glyphid_bombardier.name=Glyfid Bombardier
entity.hbm.entity_glyphid_brawler.name=Glyfid Awanturnik
entity.hbm.entity_glyphid_brenda.name=Brenda
entity.hbm.entity_glyphid_nuclear.name=Big Men Dżonson
entity.hbm.entity_glyphid_scout.name=Glyfid Skaut
entity.hbm.entity_ntm_fbi.name=Agent FBI
entity.hbm.entity_ntm_radiation_blaze.name=Żywiołak stopienia
entity.hbm.entity_ntm_ufo.name=Statek Inwazji Marsjan
entity.entity_mob_hunter_chopper.name=Chopper Myśliwy
entity.entity_mob_mask_man.name=Pan w Masce
entity.entity_mob_gold_creeper.name=Złoty Creeper
entity.entity_mob_nuclear_creeper.name=Jądrowy creeper
entity.entity_mob_phosgene_creeper.name=Fosgenowy Creeper
entity.entity_mob_tainted_creeper.name=Skażony creeper
entity.entity_mob_volatile_creeper.name=Lotny Creeper
entity.entity_taint_crab.name=Skażony krab
entity.entity_tesla_crab.name=Krab Tesli
entity.hbm.entity_mob_hunter_chopper.name=Chopper Myśliwy
entity.hbm.entity_mob_mask_man.name=Pan w Masce
entity.hbm.entity_mob_gold_creeper.name=Złoty Creeper
entity.hbm.entity_mob_nuclear_creeper.name=Jądrowy creeper
entity.hbm.entity_mob_phosgene_creeper.name=Fosgenowy Creeper
entity.hbm.entity_mob_tainted_creeper.name=Skażony creeper
entity.hbm.entity_mob_volatile_creeper.name=Lotny Creeper
entity.hbm.entity_taint_crab.name=Skażony krab
entity.hbm.entity_tesla_crab.name=Krab Tesli
entity.hbm.entity_balls_o_tron.name=Jądro-Tron
entity.hbm.entity_balls_o_tron_seg.name=Segment Jądro-Trona
entity.hbm.entity_bullet.name=Pocisk
@ -1050,7 +1050,7 @@ excavator.walling=Przełącz murowanie
flare.ignition=Zapłon
flare.valve=Zawór przepływowy
fluid.acid_fluid=Kwas
fluid.corium_fluid=Korium
@ -1265,7 +1265,7 @@ hbmfluid.chlorocalcite_mix=Mieszany roztwór chlorokalcytu
hbmfluid.chlorocalcite_solution=Roztwór chlorokalcytu
hbmfluid.cholesterol=Roztwór cholesterolu
hbmfluid.coalcreosote=Kreozot ze smoły węglowej
hbmfluid.coalgas=Gazolina węglowa
hbmfluid.coalgas=Gazolina węglowa
hbmfluid.coalgas_leaded=Gazolina węglowa z ołowiem
hbmfluid.coaloil=Olej węglowy
hbmfluid.colloid=Koloid
@ -1336,7 +1336,7 @@ hbmfluid.plasma_dt=Plazma deuterowo-trytowa
hbmfluid.plasma_hd=Plazma wodorowo-deuterowa
hbmfluid.plasma_ht=Plazma wodorowo-trytowa
hbmfluid.plasma_xm=Plazma ksenonowo-rtęciowa
hbmfluid.potassium_chloride=Roztwór chlorku potasu
hbmfluid.potassium_chloride=Roztwór chlorku potasu
hbmfluid.puf6=Heksafluorek plutonu
hbmfluid.radiosolvent=Rozpuszczalnik o wysokiej wydajności
hbmfluid.reclaimed=Olej przemysłowy z odzysku
@ -1351,7 +1351,7 @@ hbmfluid.smear=Olej przemysłowy
hbmfluid.smoke=Dym
hbmfluid.smoke_leaded=Ołowiany dym
hbmfluid.smoke_poison=Trujący dym
hbmfluid.solvent=Rozpuszczalnik
hbmfluid.solvent=Rozpuszczalnik
hbmfluid.sourgas=Kwaśny gaz
hbmfluid.spentsteam=Para niskociśnieniowa
hbmfluid.steam=Para
@ -1613,7 +1613,7 @@ item.ammo_9mm_du.name=9mm Round (DU)
item.ammo_9mm_rocket.name=9mm Rocket
item.ammo_arty.name=16" Artillery Shell
item.ammo_arty_cargo.name=16" Express Delivery Artillery Shell
item.ammo_arty_chlorine.name=16" Chlorine Gas Artil
item.ammo_arty_chlorine.name=16" Chlorine Gas Artil
item.ammo_arty_classic.name=16" Artillery Shell (The Factorio Special)
item.ammo_arty_he.name=16" High Explosive Artillery Shell
item.ammo_arty_mini_nuke.name=16" Micro Nuclear Artillery Shell

View File

@ -1193,34 +1193,34 @@ digamma.playerHealth=Влияние дигаммы:
digamma.playerRes=Сопротивление к дигамме:
digamma.title=ДИАГНОСТИКА ДИГАММЫ
entity.entity_cyber_crab.name=Киберкраб
entity.entity_elder_one.name=Крякос Старший
entity.entity_fucc_a_ducc.name=Утка
entity.entity_glyphid.name=Глифид
entity.entity_glyphid_behemoth.name=Глифид-страж
entity.entity_glyphid_blaster.name=Глифид-стрелок
entity.entity_glyphid_bombardier.name=Глифид-бомбардир
entity.entity_glyphid_brawler.name=Глифид-солдат
entity.entity_glyphid_brenda.name=Бренда
entity.entity_glyphid_digger.name=Глифид-копатель
entity.entity_glyphid_nuclear.name=Чмяк
entity.entity_glyphid_scout.name=Глифид-скаут
entity.entity_ntm_fbi.name=Агент ФБР
entity.entity_ntm_fbi_drone.name=Дрон ФБР
entity.entity_ntm_radiation_blaze.name=Элементаль Расплавления
entity.hbm.entity_cyber_crab.name=Киберкраб
entity.hbm.entity_elder_one.name=Крякос Старший
entity.hbm.entity_fucc_a_ducc.name=Утка
entity.hbm.entity_glyphid.name=Глифид
entity.hbm.entity_glyphid_behemoth.name=Глифид-страж
entity.hbm.entity_glyphid_blaster.name=Глифид-стрелок
entity.hbm.entity_glyphid_bombardier.name=Глифид-бомбардир
entity.hbm.entity_glyphid_brawler.name=Глифид-солдат
entity.hbm.entity_glyphid_brenda.name=Бренда
entity.hbm.entity_glyphid_digger.name=Глифид-копатель
entity.hbm.entity_glyphid_nuclear.name=Чмяк
entity.hbm.entity_glyphid_scout.name=Глифид-скаут
entity.hbm.entity_ntm_fbi.name=Агент ФБР
entity.hbm.entity_ntm_fbi_drone.name=Дрон ФБР
entity.hbm.entity_ntm_radiation_blaze.name=Элементаль Расплавления
entity.hbm.entity_ntm_ufo.name=Марсианский корабль вторжения
entity.entity_mob_hunter_chopper.name=Вертолёт-охотник
entity.entity_mob_mask_man.name=Маскмен
entity.entity_mob_gold_creeper.name=Золотой крипер
entity.entity_mob_nuclear_creeper.name=Ядерный крипер
entity.entity_mob_phosgene_creeper.name=Фосгеновый крипер
entity.entity_mob_tainted_creeper.name=Заражённый порчей крипер
entity.entity_mob_volatile_creeper.name=Возгораемый крипер
entity.entity_parasite_maggot.name=Паразитическая личинка
entity.entity_pigeon.name=Голубь
entity.entity_plastic_bag.name=Пластиковый пакетик
entity.entity_taint_crab.name=Заражённый порчей теслакраб
entity.entity_tesla_crab.name=Теслакраб
entity.hbm.entity_mob_hunter_chopper.name=Вертолёт-охотник
entity.hbm.entity_mob_mask_man.name=Маскмен
entity.hbm.entity_mob_gold_creeper.name=Золотой крипер
entity.hbm.entity_mob_nuclear_creeper.name=Ядерный крипер
entity.hbm.entity_mob_phosgene_creeper.name=Фосгеновый крипер
entity.hbm.entity_mob_tainted_creeper.name=Заражённый порчей крипер
entity.hbm.entity_mob_volatile_creeper.name=Возгораемый крипер
entity.hbm.entity_parasite_maggot.name=Паразитическая личинка
entity.hbm.entity_pigeon.name=Голубь
entity.hbm.entity_plastic_bag.name=Пластиковый пакетик
entity.hbm.entity_taint_crab.name=Заражённый порчей теслакраб
entity.hbm.entity_tesla_crab.name=Теслакраб
entity.hbm.entity_balls_o_tron.name=Баллс-О-Трон Прайм
entity.hbm.entity_balls_o_tron_seg.name=Баллс-О-Трон Сегмент
entity.hbm.entity_bullet.name=Пуля

View File

@ -282,7 +282,7 @@ book.starter.page4=Щоб штампувати метал у корисні фо
book.starter.title5=Збирання сміття
book.starter.page5=Залежно від того, наскільки поганою була початкова апокаліптична подія для існуючих структур світу, існує вірогідність того, що багато корисних матеріалів і машин можна врятувати безпосередньо серед них. На вас можуть чекати: металеві сплави, такі як сталь, деталі, такі як схеми і навіть ізотопи матеріалів з атомної електростанції. Однак остерігайтеся певних руїн, оскільки там може ховатися надмірна небезпека, як змія в траві; вона чекає, щоб вразити вас радіацією, пастками чи невимовними жахами...
book.starter.title6=Ранні машини
book.starter.page6a=Дві перші машини, які вам слід зібрати, це §lДоменна піч§r та §lЗбиральна машина§r.Перша дозволить вам створювати такі сплави, як §lсталь§r, §lчервона мідь§r та §удосконалений сплав§r; вам знадобляться ці метали для корпусів машин, з'єднання схем, вдосконалених електромагнітів тощо.
book.starter.page6a=Дві перші машини, які вам слід зібрати, це §lДоменна піч§r та §lЗбиральна машина§r.Перша дозволить вам створювати такі сплави, як §lсталь§r, §lчервона мідь§r та §удосконалений сплав§r; вам знадобляться ці метали для корпусів машин, з'єднання схем, вдосконалених електромагнітів тощо.
book.starter.page6b=Збиральна машина використовуватиметься для створення практично будь-якої іншої машини, описаної в цьому посібнику. Вам знадобиться джерело живлення, наприклад §lДров'яна піч§r або §lБойлер сонячної вежі§r.
book.starter.page7a=§lПодрібнювач§r разом із парою лез подрібнювача буде дуже корисним для подвоєння виходу більшості руд шляхом подрібнення їх на плавильні порошки. Ці порошки також є важливими для початку створення схем для різних машин, таких як §lПокращена§r та §lРозігнана§r мікросхеми.
book.starter.page7b=Використовуючи своє нове обладнання, ви можете створити §lХімічний завод§r, який використовується для синтезу кращих схем, бетону, переробки нафтохімічних продуктів тощо.
@ -470,11 +470,11 @@ book_lore.beacon.page.11=Chapter 5: Warranty $ [ page intentionally left blank ]
cannery.f1=[ Натисніть F1 для довідки ]
cannery.centrifuge=Газова центрифуга
cannery.centrifuge=Газова центрифуга
cannery.centrifuge.0=Газові центрифуги можуть постачатися рідиною за допомогою звичайних трубопроводів для рідини.
cannery.centrifuge.1=Для більшості рецептів потрібно кілька центрифуг. Проміжні продукти не можуть транспортуватися трубопроводами.
cannery.centrifuge.2=Ця сторона передає проміжний продукт в наступну центрифугу.
cannery.centrifuge.3=Гексафторид урану можна переробляти за допомогою двох центрифуг, але ви отримаєте лише Уранове паливо та Уран-238.
cannery.centrifuge.3=Гексафторид урану можна переробляти за допомогою двох центрифуг, але ви отримаєте лише Уранове паливо та Уран-238.
cannery.centrifuge.4=Для повного відділення Урану-235 від Урану-238 потрібно чотири центрифуги.
cannery.centrifuge.5=Деякі рецепти також вимагають покращення "Розгін газової центрифуги".
@ -790,7 +790,7 @@ container.machineBoiler=Нагрівач нафти
container.machineChemicalFactory=Хімічна фабрика
container.machineChemicalPlant=Хімічний завод
container.machineCMB=CMB Steel Furnace
container.machineCoal=Твердопаливний генератор
container.machineCoal=Твердопаливний генератор
container.machineCoker=Коксова установка
container.machineCompressor=Компресор
container.machineCrucible=Ливарня
@ -851,7 +851,7 @@ container.puf6_tank=Цистерна гексафториду плутонію
container.pumpjack=Верстат-гойдалка
container.radGen=Радіаційний двигун
container.radar=Радар
container.radiobox=FM-передавач
container.radiobox=FM-передавач
container.radiolysis=РІТЕГ та радіолізна камера
container.radiorec=FM радіо
container.rbmkAutoloader=Автозавантажувач РБМК
@ -985,7 +985,7 @@ death.attack.microwave=%1$s вибухнув під дією мікрохвил
death.attack.mku=%1$s помер з невідомих причин.
death.attack.monoxide=%1$s забув замінити батарейки у своєму детекторі чадного газу.
death.attack.mudPoisoning=%1$s помер в токсичних відходах
death.attack.nuclearBlast=%1$s був стертий ядерним вибухом
death.attack.nuclearBlast=%1$s був стертий ядерним вибухом
death.attack.overdose=%1$s отримав передозування та задухнувся.
death.attack.pc=%1$s перетворився на калюжу в рожевій хмарі.
death.attack.plasma=%1$s був спалений %2$s.
@ -1196,34 +1196,34 @@ digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Кіберкраб
entity.entity_elder_one.name=Крякос Старший
entity.entity_fucc_a_ducc.name=Качка
entity.entity_glyphid.name=Гліфід
entity.entity_glyphid_behemoth.name=Гліфід Бегемот
entity.entity_glyphid_blaster.name=Гліфід Бластер
entity.entity_glyphid_bombardier.name=Гліфід Бомбардир
entity.entity_glyphid_brawler.name=Гліфід Боєць
entity.entity_glyphid_brenda.name=Бренда
entity.entity_glyphid_digger.name=Гліфід Копач
entity.entity_glyphid_nuclear.name=Великий Джонсон
entity.entity_glyphid_scout.name=Гліфід Розвідник
entity.entity_ntm_fbi.name=Агент ФБР
entity.entity_ntm_fbi_drone.name=Дрон ФБР
entity.entity_ntm_radiation_blaze.name=Елементаль Розплавлення
entity.hbm.entity_cyber_crab.name=Кіберкраб
entity.hbm.entity_elder_one.name=Крякос Старший
entity.hbm.entity_fucc_a_ducc.name=Качка
entity.hbm.entity_glyphid.name=Гліфід
entity.hbm.entity_glyphid_behemoth.name=Гліфід Бегемот
entity.hbm.entity_glyphid_blaster.name=Гліфід Бластер
entity.hbm.entity_glyphid_bombardier.name=Гліфід Бомбардир
entity.hbm.entity_glyphid_brawler.name=Гліфід Боєць
entity.hbm.entity_glyphid_brenda.name=Бренда
entity.hbm.entity_glyphid_digger.name=Гліфід Копач
entity.hbm.entity_glyphid_nuclear.name=Великий Джонсон
entity.hbm.entity_glyphid_scout.name=Гліфід Розвідник
entity.hbm.entity_ntm_fbi.name=Агент ФБР
entity.hbm.entity_ntm_fbi_drone.name=Дрон ФБР
entity.hbm.entity_ntm_radiation_blaze.name=Елементаль Розплавлення
entity.hbm.entity_ntm_ufo.name=Марсіанький корабель НЛО
entity.entity_mob_hunter_chopper.name=Гвинтокрил Мислиивець
entity.entity_mob_mask_man.name=Маскмен
entity.entity_mob_gold_creeper.name=Золотий Кріпер
entity.entity_mob_nuclear_creeper.name=Ядерний Кріпер
entity.entity_mob_phosgene_creeper.name=Фосгений Кріпер
entity.entity_mob_tainted_creeper.name=Інфікований Кріпер
entity.entity_mob_volatile_creeper.name=Шлаковий Кріпер
entity.entity_parasite_maggot.name=Паразитична личинка
entity.entity_pigeon.name=Голуб
entity.entity_plastic_bag.name=Пластиковий пакет
entity.entity_taint_crab.name=Інфікований Краб
entity.entity_tesla_crab.name=Тесла Краб
entity.hbm.entity_mob_hunter_chopper.name=Гвинтокрил Мислиивець
entity.hbm.entity_mob_mask_man.name=Маскмен
entity.hbm.entity_mob_gold_creeper.name=Золотий Кріпер
entity.hbm.entity_mob_nuclear_creeper.name=Ядерний Кріпер
entity.hbm.entity_mob_phosgene_creeper.name=Фосгений Кріпер
entity.hbm.entity_mob_tainted_creeper.name=Інфікований Кріпер
entity.hbm.entity_mob_volatile_creeper.name=Шлаковий Кріпер
entity.hbm.entity_parasite_maggot.name=Паразитична личинка
entity.hbm.entity_pigeon.name=Голуб
entity.hbm.entity_plastic_bag.name=Пластиковий пакет
entity.hbm.entity_taint_crab.name=Інфікований Краб
entity.hbm.entity_tesla_crab.name=Тесла Краб
entity.hbm.entity_balls_o_tron.name=Баллс-О-Трон Прайм
entity.hbm.entity_balls_o_tron_seg.name=Баллс-О-Трон Сегмент
entity.hbm.entity_bullet.name=Куля
@ -1814,7 +1814,7 @@ item.ammo_shell.name=240-мм снаряд
item.ammo_shell_apfsds_du.name=240-мм БОПС-ЗУ
item.ammo_shell_apfsds_t.name=240-мм БОПС-В
item.ammo_shell_explosive.name=240-мм фугасний снаряд
item.ammo_shell_w9.name=240-мм ядерний снаряд W9
item.ammo_shell_w9.name=240-мм ядерний снаряд W9
item.ammo_secret.bmg50_equestrian.name=.50 BMG Винищувач
item.ammo_secret.bmg50_black.name=.50 BMG обхідний набій
item.ammo_secret.folly_nuke.name=Срібна куля, ядерна
@ -2108,7 +2108,7 @@ item.billet_australium_lesser.name=Заготовка низькозбагаче
item.billet_balefire_gold.name=Заготовка флешголду
item.billet_beryllium.name=Заготовка берилію
item.billet_bismuth.name=Заготовка вісмуту
item.billet_co60.name=Заготовка кобальту-60
item.billet_co60.name=Заготовка кобальту-60
item.billet_cobalt.name=Заготовка кобальту
item.billet_flashlead.name=Заготовка флешліду
item.billet_flashlead.desc=Розпад ґратки викликає реакцію анігіляції$антиматерії та матерії, що призводить до$вивільнення піонів, що розпадаються на мюони, $що каталізують синтез ядер створюючи новий елемент.$Будь ласка, намагайтеся не відставати.
@ -2162,7 +2162,7 @@ item.bismuth_axe.name=Вісмутова сокира
item.bismuth_pickaxe.name=Вісмутове кайло
item.bismuth_plate.name=Вісмутові наплічники, намисто та пов'язка на стегнах
item.bismuth_tool.name=Магнітний екстрактор
item.bj_boots.name=Місячні шиповані чоботи
item.bj_boots.name=Місячні шиповані чоботи
item.bj_helmet.name=Пов'язка на око з термодатчиком
item.bj_legs.name=Місячні кібернетичні протези ніг
item.bj_plate.name=Місячна кібернетична обшивка
@ -2354,7 +2354,7 @@ item.casing.small_steel.name=Мала сталева гільза
item.casing.large.name=Велика бронзова гільза
item.casing.large_steel.name=Велика сталева гільза
item.casing.shotshell.name=Гільза для набоїв з чорним порохом
item.casing.buckshot.name=Пластикова дробова гільза
item.casing.buckshot.name=Пластикова дробова гільза
item.casing.buckshot_advanced.name=Удосконалена дробова гільза
item.catalyst_clay.name=Глиняний каталізатор
item.catalytic_converter.name=Каталітичний нейтралізатор
@ -2473,7 +2473,7 @@ item.circuit_star_piece.mem_16k_c.name=SC - 16k Memory Stick Slot C
item.circuit_star_piece.mem_16k_d.name=SC - 16k Memory Stick Slot D
item.circuit_tantalium.name=Конденсаторна плата
item.circuit_tantalium_raw.name=Capacitor Board Assembly
item.circuit_targeting_tier1.name=Військова друкована плата (Tier 1)
item.circuit_targeting_tier1.name=Військова друкована плата (Tier 1)
item.circuit_targeting_tier2.name=Військова друкована плата (Tier 2)
item.circuit_targeting_tier3.name=Військова друкована плата (Tier 3)
item.circuit_targeting_tier4.name=Військова друкована плата (Tier 4)
@ -2699,7 +2699,7 @@ item.drillbit_desh.name=Деш бурильна головка
item.drillbit_desh_diamond.name=Деш бурильна головка (з алмазним покриттям)
item.drillbit_ferro.name=Фероуранова бурильна головка
item.drillbit_ferro_diamond.name=Фероуранова бурильна головка (з алмазним покриттям)
item.drillbit_hss.name=Бурильна головка зі швидкорізальної сталі
item.drillbit_hss.name=Бурильна головка зі швидкорізальної сталі
item.drillbit_hss_diamond.name=Бурильна головка зі швидкорізальної сталі (з алмазним покриттям)
item.drillbit_steel.name=Сталева бурильна головка
item.drillbit_steel_diamond.name=Сталева бурильна головка (з алмазним покриттям)
@ -3099,7 +3099,7 @@ item.ingot_gh336.desc=Колега Сіборгіума.
item.ingot_graphite.name=Графітовий зливок
item.ingot_gunmetal.name=Зливок гарматної бронзи
item.ingot_hes.name=Зливок високозбагаченого шрабідієвого палива
item.ingot_lanthanium.name=Напівстабільний лантановий зливок
item.ingot_lanthanium.name=Напівстабільний лантановий зливок
item.ingot_lanthanium.desc='Лантаній'
item.ingot_lanthanium.desc.P11=Насправді лантаній, але як би там не було.
item.ingot_lead.name=Свинцевий зливок
@ -3162,7 +3162,7 @@ item.ingot_tantalium.desc='Танталій'
item.ingot_tantalium.desc.P11=AKA Танталій.
item.ingot_tcalloy.name=Зливок технецієвої сталі
item.ingot_technetium.name=Зливок технецію-99
item.ingot_th232.name=Зливок торію-232
item.ingot_th232.name=Зливок торію-232
item.ingot_thorium_fuel.name=Зливок торієвого палива
item.ingot_titanium.name=Титановий зливок
item.ingot_tungsten.name=Вольфрамовий зливок
@ -3235,9 +3235,9 @@ item.laser_crystal_co2.name=CO2-деш лазерний кристал
item.laser_crystal_digamma.name=Дігамма лазерний кристал
item.laser_crystal_dnt.desc=Суперкристал динейтронієвого спарк ферміону
item.laser_crystal_dnt.name=Спарк лазерний кристал
item.launch_code.name=Код запуску судного дня
item.launch_code_piece.name=Частина коду запуску судного дня
item.launch_key.name=Ключ запуску судного дня
item.launch_code.name=Код запуску судного дня
item.launch_code_piece.name=Частина коду запуску судного дня
item.launch_key.name=Ключ запуску судного дня
item.lead_gavel.name=Свинцевий молот
item.lemon.name="Лимон"
item.letter.name=Швидкісна пошта
@ -3405,21 +3405,21 @@ item.mp_fuselage_15_20_solid.name=Твердопаливний фюзеляж 15
item.mp_fuselage_15_balefire.name=BF фюзеляж 15 розміру
item.mp_fuselage_15_hydrogen.name=Водневий фюзеляж 15 розміру
item.mp_fuselage_15_hydrogen_cathedral.name=Водневий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_blackjack.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_camo.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_decorated.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_desert.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_insulation.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_lambda.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_metal.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_minuteman.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_pip.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_polite.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_sky.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_steampunk.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_taint.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_yuck.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_blackjack.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_camo.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_decorated.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_desert.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_insulation.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_lambda.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_metal.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_minuteman.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_pip.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_polite.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_sky.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_steampunk.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_taint.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_kerosene_yuck.name=Гасовий фюзеляж 15 розміру
item.mp_fuselage_15_solid.name=Твердопаливний фюзеляж 15 розміру
item.mp_fuselage_15_solid_desh.name=Твердопаливний фюзеляж 15 розміру
item.mp_fuselage_15_solid_faust.name=Твердопаливний фюзеляж 15 розміру
@ -3513,7 +3513,7 @@ item.nuclear_waste_vitrified.name=Заскловані ядерні відход
item.nuclear_waste_vitrified_tiny.name=Крихітна купа засклованих ядерних відходів
item.nugget.name=Курячий Нагетс
item.nugget_actinium.name=Самородок актинію-227
item.nugget_am_mix.name=Самородок реакторного америцію
item.nugget_am_mix.name=Самородок реакторного америцію
item.nugget_am241.name=Самородок америцію-241
item.nugget_am242.name=Самородок америцію-242
item.nugget_americium_fuel.name=Самородок америцієвого палива
@ -3647,7 +3647,7 @@ item.pa_coil.bscco.name=Велика вісмут стронцій кальці
item.pa_coil.chlorophyte.name=Велика хлорофітова котушка
item.pa_coil.gold.name=Велика золота котушка
item.pa_coil.niobium.name=Велика ніобієво-титанова котушка
item.paa_boots.name="старі добрі черевики" PaA
item.paa_boots.name="старі добрі черевики" PaA
item.paa_legs.name=Посилення ніг PaA
item.paa_plate.name=Захисна пластина для грудей PaA
item.padlock.name=Замок
@ -3681,7 +3681,7 @@ item.part_grip.name=Рукоятка %s
item.part_lithium.name=Коробка з літієвим пилом
item.part_mechanism.name=Механізм %s
item.part_plutonium.name=Коробка з плутонієвим пилом
item.part_receiver_heavy.name=Важкий ресивер %s
item.part_receiver_heavy.name=Важкий ресивер %s
item.part_receiver_light.name=Легкий ресивер %s
item.part_stock.name=Приклад %s
item.particle_aelectron.name=Капсула з позитронами
@ -3690,7 +3690,7 @@ item.particle_aproton.name=Капсула з антипротонами
item.particle_aschrab.name=Капсула з антишрабідієм
item.particle_copper.name=Капсула з іонами міді
item.particle_dark.name=Капсула з темною матерією
item.particle_digamma.name=§cЧастинка Дігамма§r
item.particle_digamma.name=§cЧастинка Дігамма§r
item.particle_empty.name=Порожня капсула для частинок
item.particle_higgs.name=Капсула з бозоном Хіггса
item.particle_hydrogen.name=Капсула з іонами водню
@ -4024,7 +4024,7 @@ item.rag.name=Тканина
item.rag_damp.name=Волога тканина
item.rag_piss.name=Просочена сечею ганчірка
item.rangefinder.name=Прилад для вимірювання відстані
item.rbmk_fuel_balefire.name=Паливний стрижень РБМК BF
item.rbmk_fuel_balefire.name=Паливний стрижень РБМК BF
item.rbmk_fuel_balefire_gold.name=Паливний стрижень РБМК флешголду
item.rbmk_fuel_drx.name=§cПаливний стрижень РБМК Дігамма§r
item.rbmk_fuel_empty.name=Порожній паливний стрижень РБМК
@ -4309,7 +4309,7 @@ item.sat_base.name=Супутникова основа
item.sat_chip.name=Супутниковий ID-чіп
item.sat_coord.name=Цілевказівник супутника
item.sat_designator.name=Лазерний цілевказівник супутника
item.sat_relay.name=Супутниковий радарний передачик
item.sat_relay.name=Супутниковий радарний передачик
item.sat_foeq.name=PEAF - Mk.I FOEQ Duna з експериментальним ядерним двигуном
item.sat_gerald.name=Геральд, Будівельний Андроїд
item.sat_head_laser.name=Промінь смерті
@ -6132,7 +6132,7 @@ tile.zirnox_destroyed.name=Знищений ЦИРНОКС
tile.large_vehicle_door.name=Великі двері для транспортного засобу
tile.water_door.name=Герметичні двері
tile.qe_containment.name=QE Стримуючі двері
tile.qe_sliding_door.name=QE Розсувні двері
tile.qe_sliding_door.name=QE Розсувні двері
tile.round_airlock_door.name=Круглі двері гідрошлюзу
tile.secure_access_door.name=Двері доступу персоналу
tile.sliding_seal_door.name=Розсувні герметичні двері
@ -6188,7 +6188,7 @@ trait.rbmx.xenon=Свинцеве отруєння: %s
trait.rbmx.xenonBurn=Функція руйнування свинцю: %s
trait.rbmx.xenonGen=Функція створення свинцю: %s
trait.tile.cluster=Випадає лише тоді, коли зламав гравець
trait.tile.cluster=Випадає лише тоді, коли зламав гравець
trait.tile.depth=Можна зламати тільки вибухом
tool.ability.centrifuge=Автоцентрифуга

View File

@ -1067,34 +1067,34 @@ digamma.playerDigamma=玩家F-迪伽马辐照水平:
digamma.playerHealth=玩家所受F-迪伽马辐照影响:
digamma.playerRes=玩家F-迪伽马防护水平:
digamma.title=玩家F-迪伽马辐射自检器
entity.entity_cyber_crab.name=赛博螃蟹
entity.entity_elder_one.name=上古鸭神
entity.entity_fucc_a_ducc.name=鸭子
entity.entity_glyphid.name=异虫
entity.entity_glyphid_behemoth.name=巨兽异虫
entity.entity_glyphid_blaster.name=爆破异虫
entity.entity_glyphid_bombardier.name=投弹手异虫
entity.entity_glyphid_brawler.name=狂战士异虫
entity.entity_glyphid_brenda.name=布伦达
entity.entity_glyphid_digger.name=掘地异虫
entity.entity_glyphid_nuclear.name=大个子强森
entity.entity_glyphid_scout.name=侦察异虫
entity.entity_ntm_fbi.name=FBI探员
entity.entity_ntm_fbi_drone.name=FBI无人机
entity.entity_ntm_radiation_blaze.name=核融元素
entity.hbm.entity_cyber_crab.name=赛博螃蟹
entity.hbm.entity_elder_one.name=上古鸭神
entity.hbm.entity_fucc_a_ducc.name=鸭子
entity.hbm.entity_glyphid.name=异虫
entity.hbm.entity_glyphid_behemoth.name=巨兽异虫
entity.hbm.entity_glyphid_blaster.name=爆破异虫
entity.hbm.entity_glyphid_bombardier.name=投弹手异虫
entity.hbm.entity_glyphid_brawler.name=狂战士异虫
entity.hbm.entity_glyphid_brenda.name=布伦达
entity.hbm.entity_glyphid_digger.name=掘地异虫
entity.hbm.entity_glyphid_nuclear.name=大个子强森
entity.hbm.entity_glyphid_scout.name=侦察异虫
entity.hbm.entity_ntm_fbi.name=FBI探员
entity.hbm.entity_ntm_fbi_drone.name=FBI无人机
entity.hbm.entity_ntm_radiation_blaze.name=核融元素
entity.hbm.entity_ntm_ufo.name=火星入侵者飞船
entity.entity_mob_hunter_chopper.name=猎人直升机
entity.entity_mob_mask_man.name=面具人
entity.entity_mob_gold_creeper.name=黄金爬行者
entity.entity_mob_nuclear_creeper.name=核爆爬行者
entity.entity_mob_phosgene_creeper.name=光气爬行者
entity.entity_mob_tainted_creeper.name=污染爬行者
entity.entity_mob_volatile_creeper.name=不稳定爬行者
entity.entity_parasite_maggot.name=寄生虫
entity.entity_pigeon.name=鸽子
entity.entity_plastic_bag.name=塑料袋
entity.entity_taint_crab.name=污染螃蟹
entity.entity_tesla_crab.name=磁暴螃蟹
entity.hbm.entity_mob_hunter_chopper.name=猎人直升机
entity.hbm.entity_mob_mask_man.name=面具人
entity.hbm.entity_mob_gold_creeper.name=黄金爬行者
entity.hbm.entity_mob_nuclear_creeper.name=核爆爬行者
entity.hbm.entity_mob_phosgene_creeper.name=光气爬行者
entity.hbm.entity_mob_tainted_creeper.name=污染爬行者
entity.hbm.entity_mob_volatile_creeper.name=不稳定爬行者
entity.hbm.entity_parasite_maggot.name=寄生虫
entity.hbm.entity_pigeon.name=鸽子
entity.hbm.entity_plastic_bag.name=塑料袋
entity.hbm.entity_taint_crab.name=污染螃蟹
entity.hbm.entity_tesla_crab.name=磁暴螃蟹
entity.hbm.entity_balls_o_tron.name=机械蠕虫
entity.hbm.entity_balls_o_tron_seg.name=机械蠕虫
entity.hbm.entity_bullet.name=子弹