Merge branch 'HbmMods:master' into master

This commit is contained in:
Bufka2011 2025-09-20 10:15:44 -06:00 committed by GitHub
commit 072f226181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
66 changed files with 1610 additions and 1409 deletions

View File

@ -4,6 +4,9 @@
* All dual wielded guns now render more accurately when dropped instead of only showing one gun * All dual wielded guns now render more accurately when dropped instead of only showing one gun
* Added support for left handed guns (currently unused)* * Added support for left handed guns (currently unused)*
* Removed the presentations for the old particle accelerator and schottky diode * Removed the presentations for the old particle accelerator and schottky diode
* Gibbing NPCs now also spawns bones, if supported by the skeletonizer
* Gibbed bones only have a 50% chance of spawning and come with a unique red texture
* Gibbed bones have a way shorter lifetime and higher gravity to match the gib particles
## Fixed ## Fixed
* Fixed wood burner only being able to create one ash pile per item burned, even when that item yields more, creating a backlog in the internal ash value * Fixed wood burner only being able to create one ash pile per item burned, even when that item yields more, creating a backlog in the internal ash value

View File

@ -17,6 +17,50 @@ public class StructureConfig {
public static boolean debugStructures = false; public static boolean debugStructures = false;
public static boolean enableRuins = true;
public static boolean enableOceanStructures = true;
public static int ruinsASpawnWeight = 10;
public static int ruinsBSpawnWeight = 12;
public static int ruinsCSpawnWeight = 12;
public static int ruinsDSpawnWeight = 12;
public static int ruinsESpawnWeight = 12;
public static int ruinsFSpawnWeight = 12;
public static int ruinsGSpawnWeight = 12;
public static int ruinsHSpawnWeight = 12;
public static int ruinsISpawnWeight = 12;
public static int ruinsJSpawnWeight = 12; // Total 120 (used to be 220)
public static int plane1SpawnWeight = 25;
public static int plane2SpawnWeight = 25;
public static int desertShack1SpawnWeight = 18;
public static int desertShack2SpawnWeight = 20;
public static int desertShack3SpawnWeight = 22;
public static int laboratorySpawnWeight = 20;
public static int lighthouseSpawnWeight = 4;
public static int oilRigSpawnWeight = 5;
public static int beachedPatrolSpawnWeight = 15;
public static int vertibirdSpawnWeight = 6;
public static int vertibirdCrashedSpawnWeight = 10;
public static int factorySpawnWeight = 40;
public static int radioSpawnWeight = 30;
public static int forestChemSpawnWeight = 30;
public static int forestPostSpawnWeight = 30;
public static int spireSpawnWeight = 2;
public static int bunkerSpawnWeight = 6;
public static int dishSpawnWeight = 20;
public static int featuresSpawnWeight = 50;
public static int aircraftCarrierSpawnWeight = 3;
// --- Null weights
public static int plainsNullWeight = 4;
public static int oceanNullWeight = 15;
public static void loadFromConfig(Configuration config) { public static void loadFromConfig(Configuration config) {
final String CATEGORY_STRUCTURES = CommonConfig.CATEGORY_STRUCTURES; final String CATEGORY_STRUCTURES = CommonConfig.CATEGORY_STRUCTURES;
@ -32,6 +76,44 @@ public class StructureConfig {
debugStructures = CommonConfig.createConfigBool(config, CATEGORY_STRUCTURES, "5.04_debugStructures", "If enabled, special structure blocks like jigsaw blocks will not be transformed after generating", false); debugStructures = CommonConfig.createConfigBool(config, CATEGORY_STRUCTURES, "5.04_debugStructures", "If enabled, special structure blocks like jigsaw blocks will not be transformed after generating", false);
enableRuins = CommonConfig.createConfigBool(config, CATEGORY_STRUCTURES, "5.05_enableRuins", "Toggle for all ruin structures (A through J)", true);
enableOceanStructures = CommonConfig.createConfigBool(config, CATEGORY_STRUCTURES, "5.06_enableOceanStructures", "Toggle for ocean structures. (Aircraft carrier, oil rig, lighthouse.)", true);
spireSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.07_spireSpawnWeight", "Spawn weight for spire structure.", 2);
featuresSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.08_featuresSpawnWeight", "Spawn weight for misc structures (ex. Houses, offices.)", 50);
bunkerSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.09_bunkerSpawnWeight", "Spawn weight for bunker structure.", 6);
vertibirdSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.10_vertibirdSpawnWeight", "Spawn weight for vertibird structure.", 6);
vertibirdCrashedSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.11_crashedVertibirdSpawnWeight", "Spawn weight for crashed vertibird structure.", 10);
aircraftCarrierSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.12_aircraftCarrierSpawnWeight", "Spawn weight for aircraft carrier structure.", 3);
oilRigSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.13_oilRigSpawnWeight", "Spawn weight for oil rig structure.", 5);
lighthouseSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.14_lighthouseSpawnWeight", "Spawn weight for lighthouse structure.", 1);
beachedPatrolSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.15_beachedPatrolSpawnWeight", "Spawn weight for beached patrol structure.", 15);
dishSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.16_dishSpawnWeight", "Spawn weight for dish structures.", 10);
forestChemSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.17_forestChemSpawnWeight", "Spawn weight for forest chemical plant structure.", 30);
plane1SpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.18_plane1SpawnWeight", "Spawn weight for crashed plane 1 structure.", 25);
plane2SpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.19_plane2SpawnWeight", "Spawn weight for crashed plane 2 structure.", 25);
desertShack1SpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.20_desertShack1SpawnWeight", "Spawn weight for desert shack 1 structure.", 18);
desertShack2SpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.21_desertShack2SpawnWeight", "Spawn weight for desert shack 2 structure.", 20);
desertShack3SpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.22_desertShack3SpawnWeight", "Spawn weight for desert shack 3 structure.", 22);
laboratorySpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.23_laboratorySpawnWeight", "Spawn weight for laboratory structure/", 20);
forestPostSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.24_forestPostSpawnWeight", "Spawn weight for forest post structure.", 30);
ruinsASpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.25_ruinASpawnWeight", "Spawn weight for ruin A structure.", 10);
ruinsBSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.26_ruinBSpawnWeight", "Spawn weight for ruin B structure.", 12);
ruinsCSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.27_ruinCSpawnWeight", "Spawn weight for ruin C structure.", 12);
ruinsDSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.28_ruinDSpawnWeight", "Spawn weight for ruin D structure.", 12);
ruinsESpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.29_ruinESpawnWeight", "Spawn weight for ruin E structure.", 12);
ruinsFSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.30_ruinFSpawnWeight", "Spawn weight for ruin F structure.", 12);
ruinsGSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.31_ruinGSpawnWeight", "Spawn weight for ruin G structure.", 12);
ruinsHSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.32_ruinHSpawnWeight", "Spawn weight for ruin H structure.", 12);
ruinsISpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.33_ruinISpawnWeight", "Spawn weight for ruin I structure.", 12);
ruinsJSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.34_ruinJSpawnWeight", "Spawn weight for ruin J structure.", 12);
radioSpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.35_radioSpawnWeight", "Spawn weight for radio structure.", 25);
factorySpawnWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.36_factorySpawnWeight", "Spawn weight for factory structure.", 40);
plainsNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.37_plainsNullWeight", "Null spawn weight for plains biome", 20);
oceanNullWeight = CommonConfig.createConfigInt(config, CATEGORY_STRUCTURES, "5.38_oceanNullWeight", "Null spawn weight for ocean biomes", 35);
structureMinChunks = CommonConfig.setDef(structureMinChunks, 4); structureMinChunks = CommonConfig.setDef(structureMinChunks, 4);
structureMaxChunks = CommonConfig.setDef(structureMaxChunks, 12); structureMaxChunks = CommonConfig.setDef(structureMaxChunks, 12);

View File

@ -25,7 +25,6 @@ import com.hbm.entity.train.*;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.util.Tuple.Quartet; import com.hbm.util.Tuple.Quartet;
import cpw.mods.fml.common.registry.EntityRegistry;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.EnumCreatureType;
@ -256,11 +255,11 @@ public class EntityMappings {
int id = 0; int id = 0;
for(Quartet<Class<? extends Entity>, String, Integer, Boolean> entry : entityMappings) { 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) { 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());
} }
} }

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

@ -1,123 +0,0 @@
package com.hbm.handler;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.function.Consumer;
import com.hbm.items.weapon.sedna.Crosshair;
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
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)
* alt cooldown and main cooldown are shared (alt cooldown will almoast always be greater or equal)
* alt is always the lower priority, mouse2 will be canceled then mouse1 is activated at the same time
* restrictions must be applied in gun's logic, mechanism may be dysfunctional if these rules are ignored
*/
//amount of ticks between each bullet
public int rateOfFire;
//amount of bullets fired per delay passed
public int roundsPerCycle;
/** Amount of rounds per burst, irrelevant if not a burst fire weapon**/
public int roundsPerBurst;
//0 = normal, 1 = release, 2 = both
public int gunMode;
//0 = manual, 1 = automatic
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>();
//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;
//when sneaking, disables crosshair and centers the bullet spawn point
public boolean hasSights;
//does this weapon behave like fully sick old-school boomer shooters
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
public String firingSound = "";
public String firingSoundEmpty = null;
public float firingVolume = 1.0F;
public float firingPitch = 1.0F;
//how long the reload animation will play
//MUST BE GREATER THAN ZERO ! ! !
public int reloadDuration;
public int emptyReloadAdditionalDuration;
//sound path to the reload sound
public String reloadSound = "";
public String reloadSoundEmpty = null;
//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
public int reloadType;
// If the animations are designed to be sequential, the last frame will be held until the next anmiation starts
public boolean reloadAnimationsSequential = false;
//whether or not the infinity enchantment should work
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;
//the rate at which the gun is charged
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>();
//bullet configs for main and alt fire
public List<Integer> config = new ArrayList<Integer>();
//crosshair
public Crosshair crosshair;
//casing eject behavior
public CasingEjector ejector = null;
public static final int MODE_NORMAL = 0;
public static final int MODE_RELEASE = 1;
public static final int MODE_BOTH = 1;
public static final int FIRE_MANUAL = 0;
public static final int FIRE_AUTO = 1;
public static final int FIRE_BURST = 2;
public static final int RELOAD_NONE = 0;
public static final int RELOAD_FULL = 1;
public static final int RELOAD_SINGLE = 2;
public static final String RSOUND_REVOLVER = "hbm:weapon.revolverReload";
public static final String RSOUND_RIFLE = "";
public static final String RSOUND_MAG = "hbm:weapon.magReload";
public static final String RSOUND_MAG_BOLT = "hbm:weapon.magReloadBolt";
public static final String RSOUND_SHOTGUN = "hbm:weapon.shotgunReload";
public static final String RSOUND_LAUNCHER = "hbm:weapon.rpgReload";
public static final String RSOUND_GRENADE = "hbm:weapon.hkReload";
public static final String RSOUND_GRENADE_NEW = "hbm:weapon.glReload";
public static final String RSOUND_FATMAN = "hbm:weapon.fatmanReload";
}

View File

@ -3,10 +3,15 @@ package com.hbm.handler.nei;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.inventory.recipes.CompressorRecipes; import com.hbm.inventory.recipes.CompressorRecipes;
import net.minecraft.item.ItemStack;
public class CompressorHandler extends NEIUniversalHandler { public class CompressorHandler extends NEIUniversalHandler {
public CompressorHandler() { 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 @Override

View File

@ -1,14 +1,29 @@
package com.hbm.items; package com.hbm.items;
import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.HbmAnimationPacket;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import cpw.mods.fml.relauncher.Side; import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack; 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.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.ToolAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
@ -14,12 +15,9 @@ import com.hbm.util.EntityDamageUtil;
import api.hbm.block.IToolable; import api.hbm.block.IToolable;
import api.hbm.block.IToolable.ToolType; import api.hbm.block.IToolable.ToolType;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; 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.block.Block;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -27,7 +25,7 @@ import net.minecraft.util.DamageSource;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
public class ItemBoltgun extends Item implements IAnimatedItem { public class ItemBoltgun extends Item implements IAnimatedItem<ToolAnimation> {
public ItemBoltgun() { public ItemBoltgun() {
this.setMaxStackSize(1); this.setMaxStackSize(1);
@ -73,13 +71,10 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
data.setFloat("size", 1F); data.setFloat("size", 1F);
data.setByte("count", (byte)1); 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)); 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 playAnimation(player, ToolAnimation.SWING);
NBTTagCompound d0 = new NBTTagCompound();
d0.setString("type", "anim");
d0.setString("mode", "generic");
MainRegistry.proxy.effectNT(d0);
} }
return true; return true;
} }
} }
@ -110,10 +105,7 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
data.setByte("count", (byte)1); 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)); 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(); playAnimation(player, ToolAnimation.SWING);
d0.setString("type", "anim");
d0.setString("mode", "generic");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(d0, 0, 0, 0), (EntityPlayerMP) player);
} }
return false; return false;
@ -123,11 +115,21 @@ public class ItemBoltgun extends Item implements IAnimatedItem {
} }
@Override @Override
@SideOnly(Side.CLIENT) public Class<ToolAnimation> getEnum() {
public BusAnimation getAnimation(NBTTagCompound data, ItemStack stack) { return ToolAnimation.class;
}
@Override
public BusAnimation getAnimation(ToolAnimation type, ItemStack stack) {
return new BusAnimation() return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence() .addBus("RECOIL", new BusAnimationSequence()
.addPos(1, 0, 1, 50) .addPos(1, 0, 1, 50)
.addPos(0, 0, 1, 100)); .addPos(0, 0, 1, 100));
} }
@Override
public boolean shouldPlayerModelAim(ItemStack stack) {
return false;
}
} }

View File

@ -1,16 +1,19 @@
package com.hbm.items.tool; package com.hbm.items.tool;
import com.hbm.handler.threading.PacketThreading;
import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.FluidType;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.IHeldSoundProvider; 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.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack; 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) { 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); 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()) if(stack.getItemDamage() >= stack.getMaxDamage())
return false; return false;
NBTTagCompound nbt = new NBTTagCompound(); playAnimation((EntityPlayer) entityLiving, ToolAnimation.SWING);
nbt.setString("type", "anim");
nbt.setString("mode", "sSwing");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)entityLiving);
return false; 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

@ -5,15 +5,22 @@ import java.util.List;
import com.google.common.collect.HashMultimap; import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
import com.hbm.handler.threading.PacketThreading; import com.hbm.handler.threading.PacketThreading;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.IEquipReceiver; import com.hbm.items.IEquipReceiver;
import com.hbm.items.tool.ItemSwordAbility; import com.hbm.items.tool.ItemSwordAbility;
import com.hbm.packet.toclient.AuxParticlePacketNT; 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 com.hbm.util.ShadyUtil;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block; 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.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.ai.attributes.AttributeModifier;
@ -25,9 +32,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle; import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World; 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) { public ItemCrucible(float damage, double movement, ToolMaterial material) {
super(damage, movement, material); super(damage, movement, material);
@ -44,10 +52,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
World world = player.worldObj; World world = player.worldObj;
world.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.cDeploy", 1.0F, 1.0F); world.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:weapon.cDeploy", 1.0F, 1.0F);
NBTTagCompound nbt = new NBTTagCompound(); playAnimation(player, ToolAnimation.EQUIP);
nbt.setString("type", "anim");
nbt.setString("mode", "crucible");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)player);
} }
} }
@ -64,10 +69,7 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
if(stack.getItemDamage() >= stack.getMaxDamage()) if(stack.getItemDamage() >= stack.getMaxDamage())
return false; return false;
NBTTagCompound nbt = new NBTTagCompound(); playAnimation((EntityPlayerMP)entityLiving, ToolAnimation.SWING);
nbt.setString("type", "anim");
nbt.setString("mode", "cSwing");
PacketThreading.createSendToThreadedPacket(new AuxParticlePacketNT(nbt, 0, 0, 0), (EntityPlayerMP)entityLiving);
return false; return false;
} }
@ -132,4 +134,58 @@ public class ItemCrucible extends ItemSwordAbility implements IEquipReceiver {
list.add(charge); 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.factory.Lego;
import com.hbm.items.weapon.sedna.hud.IHUDComponent; import com.hbm.items.weapon.sedna.hud.IHUDComponent;
import com.hbm.items.weapon.sedna.mods.WeaponModManager; 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.BusAnimation;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -25,7 +25,7 @@ import net.minecraft.util.ResourceLocation;
* */ * */
public class GunConfig { 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 O_RECEIVERS = "O_RECEIVERS";
public static final String F_DURABILITY = "F_DURABILITY"; public static final String F_DURABILITY = "F_DURABILITY";
@ -84,7 +84,7 @@ public class GunConfig {
/** The engine for the state machine that determines the gun's overall behavior */ /** The engine for the state machine that determines the gun's overall behavior */
protected BiConsumer<ItemStack, LambdaContext> decider_DNA; protected BiConsumer<ItemStack, LambdaContext> decider_DNA;
/** Lambda that returns the relevant animation for the given params */ /** 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; protected IHUDComponent[] hudComponents_DNA;
/* GETTERS */ /* GETTERS */
@ -115,7 +115,7 @@ public class GunConfig {
public BiConsumer<ItemStack, LambdaContext> getDecider(ItemStack stack) { return WeaponModManager.eval(this.decider_DNA, stack, CON_DECIDER, 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 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); } public IHUDComponent[] getHUDComponents(ItemStack stack) { return WeaponModManager.eval(this.hudComponents_DNA, stack, O_HUDCOMPONENTS, this, this.index); }
/* SETTERS */ /* SETTERS */
@ -151,7 +151,7 @@ public class GunConfig {
public GunConfig decider(BiConsumer<ItemStack, LambdaContext> lambda) { this.decider_DNA = lambda; return this; } public GunConfig decider(BiConsumer<ItemStack, LambdaContext> lambda) { this.decider_DNA = lambda; return this; }
//client //client
public GunConfig anim(BiFunction<ItemStack, AnimType, BusAnimation> lambda) { this.animations_DNA = lambda; 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; } 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, /** Standard package for keybind handling and decider using LEGO prefabs: Primary fire on LMB,

View File

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

View File

@ -48,6 +48,8 @@ public class ConfettiUtil {
if(entity instanceof EntitySkeleton) return; if(entity instanceof EntitySkeleton) return;
if(entity instanceof EntitySlime) return; if(entity instanceof EntitySlime) return;
SkeletonCreator.composeEffectGib(entity.worldObj, entity, 0.25F);
NBTTagCompound vdat = new NBTTagCompound(); NBTTagCompound vdat = new NBTTagCompound();
vdat.setString("type", "giblets"); vdat.setString("type", "giblets");
vdat.setInteger("ent", entity.getEntityId()); vdat.setInteger("ent", entity.getEntityId());

View File

@ -7,9 +7,9 @@ import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver; import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.mags.IMagazine; 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.GunState;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext; import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -69,19 +69,19 @@ public class GunStateDecider {
if(!cancel && mag.canReload(stack, ctx.inventory)) { if(!cancel && mag.canReload(stack, ctx.inventory)) {
ItemGunBaseNT.setState(stack, gunIndex, GunState.RELOADING); ItemGunBaseNT.setState(stack, gunIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getReloadCycleDuration(stack)); 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 //if no more reloading can be done, go idle
} else { } else {
if(getStandardJamChance(stack, cfg, gunIndex) > entity.getRNG().nextFloat()) { if(getStandardJamChance(stack, cfg, gunIndex) > entity.getRNG().nextFloat()) {
ItemGunBaseNT.setState(stack, gunIndex, GunState.JAMMED); ItemGunBaseNT.setState(stack, gunIndex, GunState.JAMMED);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getJamDuration(stack)); ItemGunBaseNT.setTimer(stack, gunIndex, rec.getJamDuration(stack));
ItemGunBaseNT.playAnimation(player, stack, AnimType.JAMMED, gunIndex); ItemGunBaseNT.playAnimation(player, stack, GunAnimation.JAMMED, gunIndex);
} else { } else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.DRAWING); ItemGunBaseNT.setState(stack, gunIndex, GunState.DRAWING);
int duration = rec.getReloadEndDuration(stack) + (mag.getAmountBeforeReload(stack) <= 0 ? rec.getReloadCockOnEmptyPost(stack) : 0); int duration = rec.getReloadEndDuration(stack) + (mag.getAmountBeforeReload(stack) <= 0 ? rec.getReloadCockOnEmptyPost(stack) : 0);
ItemGunBaseNT.setTimer(stack, gunIndex, duration); 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); ItemGunBaseNT.setReloadCancel(stack, false);
@ -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 //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.setState(stack, gunIndex, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, gunIndex, rec.getDelayAfterDryFire(stack)); 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 //if not, revert to idle
} else { } else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE); ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
@ -143,7 +143,7 @@ public class GunStateDecider {
mag.setAmountBeforeReload(stack, loaded); mag.setAmountBeforeReload(stack, loaded);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING); ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0)); 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 { } else {
ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE); ItemGunBaseNT.setState(stack, gunIndex, GunState.IDLE);
ItemGunBaseNT.setTimer(stack, gunIndex, 0); 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.items.weapon.sedna.mags.IMagazine;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.particle.helper.BlackPowderCreator; import com.hbm.particle.helper.BlackPowderCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -66,10 +66,10 @@ public class Lego {
mag.setAmountBeforeReload(stack, loaded); mag.setAmountBeforeReload(stack, loaded);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING); ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.RELOADING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, rec.getReloadBeginDuration(stack) + (loaded <= 0 ? rec.getReloadCockOnEmptyPre(stack) : 0)); 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); if(ctx.config.getReloadChangesType(stack)) mag.initNewType(stack, ctx.inventory);
} else { } else {
ItemGunBaseNT.playAnimation(player, stack, AnimType.INSPECT, ctx.configIndex); ItemGunBaseNT.playAnimation(player, stack, GunAnimation.INSPECT, ctx.configIndex);
if(!ctx.config.getInspectCancel(stack)) { if(!ctx.config.getInspectCancel(stack)) {
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING); ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack)); ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack));
@ -105,7 +105,7 @@ public class Lego {
} else { } else {
if(rec.getDoesDryFire(stack)) { 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.setState(stack, index, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack)); ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack));
} }
@ -187,19 +187,19 @@ public class Lego {
/** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg */ /** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_STANDARD_FIRE = (stack, ctx) -> { 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 */ /** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, ignores wear */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_NOWEAR_FIRE = (stack, ctx) -> { 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 */ /** Spawns an EntityBulletBaseMK4 with the loaded bulletcfg, then resets lockon progress */
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_LOCKON_FIRE = (stack, ctx) -> { 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); 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; EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer(); EntityPlayer player = ctx.getPlayer();
int index = ctx.configIndex; int index = ctx.configIndex;
@ -303,7 +303,7 @@ public class Lego {
} }
/** anims for the DEBUG revolver, mostly a copy of the li'lpip but with some fixes regarding the cylinder movement */ /** 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) { switch(type) {
case CYCLE: return new BusAnimation() case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250)) .addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))

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.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
@ -84,7 +84,7 @@ public class XFactory10ga {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));

View File

@ -32,10 +32,10 @@ import com.hbm.packet.PacketDispatcher;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.BobMathUtil; import com.hbm.util.BobMathUtil;
import com.hbm.util.TrackerUtil; import com.hbm.util.TrackerUtil;
import com.hbm.util.Vec3NT; import com.hbm.util.Vec3NT;
@ -429,7 +429,7 @@ public class XFactory12ga {
ItemGunBaseNT.setTimer(stack, index, 20); ItemGunBaseNT.setTimer(stack, index, 20);
} else { } else {
if(rec.getDoesDryFire(stack)) { 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.setState(stack, index, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
@ -483,7 +483,7 @@ public class XFactory12ga {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 250, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 250, IType.SIN_DOWN));
@ -509,7 +509,7 @@ public class XFactory12ga {
}; };
/** This fucking sucks */ /** 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); int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
@ -606,7 +606,7 @@ public class XFactory12ga {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-60, 0, 0, 0).addPos(0, 0, -3, 500, IType.SIN_DOWN));
@ -625,7 +625,7 @@ public class XFactory12ga {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -651,7 +651,7 @@ public class XFactory12ga {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN));

View File

@ -20,10 +20,10 @@ import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -71,7 +71,7 @@ public class XFactory22lr {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.25)); 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()) { if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()

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.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -88,7 +88,7 @@ public class XFactory357 {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.75)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -120,7 +120,7 @@ public class XFactory357 {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(360 * 3, 0, 0, 1000, IType.SIN_DOWN)); case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(360 * 3, 0, 0, 1000, IType.SIN_DOWN));
} }

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.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -93,7 +93,7 @@ public class XFactory35800 {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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); boolean aim = ItemGunBaseNT.getIsAiming(stack);
int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null); int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, null);
switch(type) { switch(type) {

View File

@ -30,10 +30,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import com.hbm.util.TrackerUtil; import com.hbm.util.TrackerUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -184,7 +184,7 @@ public class XFactory40mm {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -207,7 +207,7 @@ public class XFactory40mm {
return null; 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); int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) { switch(type) {
case EQUIP: return ResourceManager.congolake_anim.get("Equip"); case EQUIP: return ResourceManager.congolake_anim.get("Equip");

View File

@ -25,10 +25,10 @@ import com.hbm.items.weapon.sedna.mods.WeaponModManager;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
@ -156,11 +156,11 @@ public class XFactory44 {
}; };
public static BiConsumer<ItemStack, LambdaContext> SMACK_A_FUCKER = (stack, ctx) -> { 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.setIsAiming(stack, false);
ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING); ItemGunBaseNT.setState(stack, ctx.configIndex, GunState.DRAWING);
ItemGunBaseNT.setTimer(stack, ctx.configIndex, ctx.config.getInspectDuration(stack)); 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);
} }
}; };
@ -176,7 +176,7 @@ public class XFactory44 {
ItemGunBaseNT.setupRecoil(5, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, -3, 350, IType.SIN_DOWN)) .addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, -3, 350, IType.SIN_DOWN))
@ -219,7 +219,7 @@ public class XFactory44 {
return null; 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) { switch(type) {
case CYCLE: return new BusAnimation() case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250)) .addBus("RECOIL", new BusAnimationSequence().addPos(0, 0, 0, 50).addPos(0, 0, -3, 50).addPos(0, 0, 0, 250))
@ -244,7 +244,7 @@ public class XFactory44 {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation().addBus("SPIN", new BusAnimationSequence().addPos(-360, 0, 0, 350)); case EQUIP: return new BusAnimation().addBus("SPIN", new BusAnimationSequence().addPos(-360, 0, 0, 350));
} }
@ -252,7 +252,7 @@ public class XFactory44 {
return LAMBDA_NOPIP_ANIMS.apply(stack, type); 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) { 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 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() case CYCLE: return new BusAnimation()

View File

@ -21,10 +21,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.MovingObjectPosition;
@ -135,7 +135,7 @@ public class XFactory50 {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 0.5)); 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 turn = -60;
double pullAmount = -2.5; double pullAmount = -2.5;
double side = 4; double side = 4;
@ -173,7 +173,7 @@ public class XFactory50 {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL)); .addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));

View File

@ -25,10 +25,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -139,7 +139,7 @@ public class XFactory556mm {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_STG = (stack, ctx) -> { }; 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; boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
@ -210,7 +210,7 @@ public class XFactory556mm {
return null; 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()) { if(ClientConfig.GUN_ANIMS_LEGACY.get()) {
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()

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.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -75,7 +75,7 @@ public class XFactory75Bolt {
ItemGunBaseNT.setupRecoil((float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5), (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case CYCLE: return new BusAnimation() case CYCLE: return new BusAnimation()
.addBus("RECOIL", new BusAnimationSequence().addPos(1, 0, 0, 25).addPos(0, 0, 0, 75)); .addBus("RECOIL", new BusAnimationSequence().addPos(1, 0, 0, 25).addPos(0, 0, 0, 75));

View File

@ -20,10 +20,10 @@ import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -155,7 +155,7 @@ public class XFactory762mm {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_LACUNAE = (stack, ctx) -> { }; 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); int ammo = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
@ -187,7 +187,7 @@ public class XFactory762mm {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_FULL)); .addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_FULL));
@ -207,7 +207,7 @@ public class XFactory762mm {
return null; 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); int mag = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
double turn = -90; double turn = -90;
double pullAmount = ItemGunBaseNT.getIsAiming(stack) ? -1F : -1.5D; double pullAmount = ItemGunBaseNT.getIsAiming(stack) ? -1F : -1.5D;

View File

@ -22,10 +22,10 @@ import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.SpentCasing.CasingType; import com.hbm.particle.SpentCasing.CasingType;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -138,10 +138,10 @@ public class XFactory9mm {
}; };
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_FIRE_LAG = (stack, ctx) -> { 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); int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
EntityPlayer player = ctx.getPlayer(); 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; int index = ctx.configIndex;
Receiver primary = ctx.config.getReceivers(stack)[0]; Receiver primary = ctx.config.getReceivers(stack)[0];
IMagazine mag = primary.getMagazine(stack); IMagazine mag = primary.getMagazine(stack);
@ -154,7 +154,7 @@ public class XFactory9mm {
ItemGunBaseNT.setTimer(stack, index, primary.getDelayAfterFire(stack)); ItemGunBaseNT.setTimer(stack, index, primary.getDelayAfterFire(stack));
EntityDamageUtil.attackEntityFromNT(player, BulletConfig.getDamage(player, player, DamageClass.PHYSICAL), 1_000F, true, false, 1D, 5F, 0F); EntityDamageUtil.attackEntityFromNT(player, BulletConfig.getDamage(player, player, DamageClass.PHYSICAL), 1_000F, true, false, 1D, 5F, 0F);
} else { } else {
Lego.doStandardFire(stack, ctx, AnimType.CYCLE, true); Lego.doStandardFire(stack, ctx, GunAnimation.CYCLE, true);
} }
}; };
@ -162,7 +162,7 @@ public class XFactory9mm {
Lego.handleStandardSmoke(ctx.entity, stack, 2000, 0.05D, 1.1D, ctx.configIndex); 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) { switch(type) {
case EQUIP: return new BusAnimation() 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)) .addBus("EQUIP", new BusAnimationSequence().addPos(80, 0, 0, 0).addPos(80, 0, 0, 500).addPos(0, 0, 0, 500, IType.SIN_FULL))
@ -194,7 +194,7 @@ public class XFactory9mm {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-90, 0, 0, 0).addPos(0, 0, 0, 350, IType.SIN_DOWN));
@ -211,7 +211,7 @@ public class XFactory9mm {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() 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)) .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.MagazineInfinite;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload; import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
import com.hbm.util.Vec3NT; import com.hbm.util.Vec3NT;
@ -143,14 +143,14 @@ public class XFactoryAccelerator {
} }
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_PRIMARY_RELEASE = (stack, ctx) -> { 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); 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) -> { public static BiConsumer<ItemStack, LambdaContext> LAMBDA_TAU_SECONDARY_PRESS = (stack, ctx) -> {
if(ctx.getPlayer() == null) return; if(ctx.getPlayer() == null) return;
if(ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) <= 0) 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 tauChargeMag.getMagType(stack); //caches the last loaded ammo
}; };
@ -158,8 +158,8 @@ public class XFactoryAccelerator {
if(ctx.getPlayer() == null) return; if(ctx.getPlayer() == null) return;
int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex); int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(timer >= 10 && ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == AnimType.SPINUP) { if(timer >= 10 && ItemGunBaseNT.getLastAnim(stack, ctx.configIndex) == GunAnimation.SPINUP) {
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.ALT_CYCLE, ctx.configIndex); ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.ALT_CYCLE, ctx.configIndex);
int unitsUsed = 1 + Math.min(12, timer / 10); int unitsUsed = 1 + Math.min(12, timer / 10);
EntityLivingBase entity = ctx.entity; EntityLivingBase entity = ctx.entity;
@ -181,7 +181,7 @@ public class XFactoryAccelerator {
ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear * unitsUsed, ctx.config.getDurability(stack))); ItemGunBaseNT.setWear(stack, index, Math.min(ItemGunBaseNT.getWear(stack, index) + config.wear * unitsUsed, ctx.config.getDurability(stack)));
} else { } else {
ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, AnimType.CYCLE_DRY, ctx.configIndex); ItemGunBaseNT.playAnimation(ctx.getPlayer(), stack, GunAnimation.CYCLE_DRY, ctx.configIndex);
} }
}; };
@ -212,7 +212,7 @@ public class XFactoryAccelerator {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL)); .addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_FULL));
@ -233,14 +233,14 @@ public class XFactoryAccelerator {
return null; return null;
}; };
public static BiFunction<ItemStack, AnimType, BusAnimation> LAMBDA_COILGUN_ANIMS = (stack, type) -> { public static BiFunction<ItemStack, GunAnimation, 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 == GunAnimation.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 == 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 == AnimType.RELOAD) return new BusAnimation().addBus("RELOAD", new BusAnimationSequence().addPos(1, 0, 0, 250).addPos(1, 0, 0, 500).addPos(0, 0, 0, 250)); 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; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-360 * 2, 0, 0, 500)); .addBus("EQUIP", new BusAnimationSequence().addPos(-360 * 2, 0, 0, 500));

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.ItemGunBaseNT.WeaponQuality;
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -45,7 +45,7 @@ public class XFactoryBlackPowder {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case CYCLE: return new BusAnimation() case CYCLE: return new BusAnimation()
.addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 0, 1025).addPos(60, 0, 0, 250)) .addBus("ROTATE", new BusAnimationSequence().addPos(0, 0, 0, 1025).addPos(60, 0, 0, 250))

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.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -176,7 +176,7 @@ public class XFactoryCatapult {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_FATMAN = (stack, ctx) -> { }; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN)); .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.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
@ -226,7 +226,7 @@ public class XFactoryEnergy {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ENERGY = (stack, ctx) -> { }; 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); int amount = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory);
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
@ -245,7 +245,7 @@ public class XFactoryEnergy {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .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; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .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.MainRegistry;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.helper.FlameCreator; import com.hbm.particle.helper.FlameCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -180,7 +180,7 @@ public class XFactoryFlamer {
).setUnlocalizedName("gun_chemthrower"); ).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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));
@ -193,7 +193,7 @@ public class XFactoryFlamer {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));

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.factory.GunFactory.EnumAmmoSecret;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload; import com.hbm.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.packet.toclient.AuxParticlePacketNT; import com.hbm.packet.toclient.AuxParticlePacketNT;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.ContaminationUtil; import com.hbm.util.ContaminationUtil;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import com.hbm.util.Vec3NT; import com.hbm.util.Vec3NT;
@ -119,17 +119,17 @@ public class XFactoryFolly {
if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE) { if(ItemGunBaseNT.getState(stack, ctx.configIndex) == GunState.IDLE) {
boolean wasAiming = ItemGunBaseNT.getIsAiming(stack); boolean wasAiming = ItemGunBaseNT.getIsAiming(stack);
ItemGunBaseNT.setIsAiming(stack, !wasAiming); 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) -> { 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) -> { public static BiFunction<ItemStack, LambdaContext, Boolean> LAMBDA_CAN_FIRE = (stack, ctx) -> {
if(!ItemGunBaseNT.getIsAiming(stack)) return false; 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; if(ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex) < 100) return false;
return ctx.config.getReceivers(stack)[0].getMagazine(stack).getAmount(stack, ctx.inventory) > 0; 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)); 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) { switch(type) {
case EQUIP: return new BusAnimation() 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)); .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.items.weapon.sedna.mags.MagazineSingleReload;
import com.hbm.lib.Library; import com.hbm.lib.Library;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -225,7 +225,7 @@ public class XFactoryRocket {
public static BiConsumer<ItemStack, LambdaContext> LAMBDA_RECOIL_ROCKET = (stack, ctx) -> { }; 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; boolean empty = ((ItemGunBaseNT) stack.getItem()).getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack).getAmount(stack, MainRegistry.proxy.me().inventory) <= 0;
switch(type) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
@ -242,7 +242,7 @@ public class XFactoryRocket {
return null; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .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; 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 1000, IType.SIN_DOWN)); .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.lib.RefStrings;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.particle.helper.ExplosionCreator; import com.hbm.particle.helper.ExplosionCreator;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.tileentity.IRepairable; import com.hbm.tileentity.IRepairable;
import com.hbm.tileentity.IRepairable.EnumExtinguishType; import com.hbm.tileentity.IRepairable.EnumExtinguishType;
import com.hbm.util.CompatExternal; import com.hbm.util.CompatExternal;
@ -281,7 +281,7 @@ public class XFactoryTool {
ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); 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) { switch(type) {
case EQUIP: return new BusAnimation() case EQUIP: return new BusAnimation()
.addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN)); .addBus("EQUIP", new BusAnimationSequence().addPos(-45, 0, 0, 0).addPos(0, 0, 0, 500, IType.SIN_DOWN));

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.Receiver;
import com.hbm.items.weapon.sedna.mags.IMagazine; import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.items.weapon.sedna.mags.MagazineFluid; 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 api.hbm.fluidmk2.IFillableItem;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -81,7 +81,7 @@ public class ItemGunChemthrower extends ItemGunBaseNT implements IFillableItem {
EntityLivingBase entity = ctx.entity; EntityLivingBase entity = ctx.entity;
EntityPlayer player = ctx.getPlayer(); EntityPlayer player = ctx.getPlayer();
int index = ctx.configIndex; 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]; Receiver primary = ctx.config.getReceivers(stack)[0];
IMagazine mag = primary.getMagazine(stack); IMagazine mag = primary.getMagazine(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.GunConfig;
import com.hbm.items.weapon.sedna.factory.XFactory556mm; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -24,7 +24,7 @@ public class WeapnModG3SawedOff extends WeaponModBase {
return base; 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) { switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(45, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_FULL)); 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.Orchestras;
import com.hbm.items.weapon.sedna.factory.XFactory44; import com.hbm.items.weapon.sedna.factory.XFactory44;
import com.hbm.items.weapon.sedna.factory.XFactory762mm; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -40,10 +40,10 @@ public class WeaponModCarbineBayonet extends WeaponModBase {
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_CARBINE = (stack, ctx) -> { public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_CARBINE = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity; EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return; 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); int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(type == AnimType.INSPECT) { if(type == GunAnimation.INSPECT) {
if(timer == 15 && ctx.getPlayer() != null) { if(timer == 15 && ctx.getPlayer() != null) {
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D); MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D);
@ -67,7 +67,7 @@ public class WeaponModCarbineBayonet extends WeaponModBase {
Orchestras.ORCHESTRA_CARBINE.accept(stack, ctx); 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) { switch(type) {
case INSPECT: return new BusAnimation() 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)); .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));

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.items.weapon.sedna.factory.Orchestras;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.particle.helper.CasingCreator; 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.entity.EntityLivingBase;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -34,11 +34,11 @@ public class WeaponModGreasegun extends WeaponModBase {
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_GREASEGUN = (stack, ctx) -> { public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_GREASEGUN = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity; EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return; 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); int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
boolean aiming = ItemGunBaseNT.getIsAiming(stack); boolean aiming = ItemGunBaseNT.getIsAiming(stack);
if(type == AnimType.CYCLE) { if(type == GunAnimation.CYCLE) {
if(timer == 1) { if(timer == 1) {
SpentCasing casing = ctx.config.getReceivers(stack)[0].getMagazine(stack).getCasing(stack, ctx.inventory); 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()); 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,10 +8,10 @@ import com.hbm.items.weapon.sedna.factory.XFactory12ga;
import com.hbm.items.weapon.sedna.mags.IMagazine; import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.items.weapon.sedna.mags.MagazineFullReload; import com.hbm.items.weapon.sedna.mags.MagazineFullReload;
import com.hbm.items.weapon.sedna.mags.MagazineSingleReload; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -35,7 +35,7 @@ public class WeaponModLiberatorSpeedloader extends WeaponModBase {
return base; 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) { switch(type) {
case RELOAD: return new BusAnimation() case RELOAD: return new BusAnimation()
.addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100)) .addBus("LATCH", new BusAnimationSequence().addPos(15, 0, 0, 100))

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.Orchestras;
import com.hbm.items.weapon.sedna.factory.XFactory44; import com.hbm.items.weapon.sedna.factory.XFactory44;
import com.hbm.items.weapon.sedna.factory.XFactory762mm; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -40,10 +40,10 @@ public class WeaponModMASBayonet extends WeaponModBase {
public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_MAS36 = (stack, ctx) -> { public static BiConsumer<ItemStack, LambdaContext> ORCHESTRA_MAS36 = (stack, ctx) -> {
EntityLivingBase entity = ctx.entity; EntityLivingBase entity = ctx.entity;
if(entity.worldObj.isRemote) return; 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); int timer = ItemGunBaseNT.getAnimTimer(stack, ctx.configIndex);
if(type == AnimType.INSPECT) { if(type == GunAnimation.INSPECT) {
if(timer == 15 && ctx.getPlayer() != null) { if(timer == 15 && ctx.getPlayer() != null) {
MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D); MovingObjectPosition mop = EntityDamageUtil.getMouseOver(ctx.getPlayer(), 3.0D);
@ -67,7 +67,7 @@ public class WeaponModMASBayonet extends WeaponModBase {
Orchestras.ORCHESTRA_MAS36.accept(stack, ctx); 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) { switch(type) {
case INSPECT: return new BusAnimation() 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)); .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));

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.ItemGunBaseNT.LambdaContext;
import com.hbm.items.weapon.sedna.factory.Lego; import com.hbm.items.weapon.sedna.factory.Lego;
import com.hbm.items.weapon.sedna.factory.XFactoryRocket; 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.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.BusAnimationKeyframe.IType; import com.hbm.render.anim.BusAnimationKeyframe.IType;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.util.EntityDamageUtil; import com.hbm.util.EntityDamageUtil;
import com.hbm.util.DamageResistanceHandler.DamageClass; import com.hbm.util.DamageResistanceHandler.DamageClass;
@ -32,7 +32,7 @@ public class WeaponModPanzerschreckSawedOff extends WeaponModBase {
return base; 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) { switch(type) {
case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_DOWN)); case EQUIP: return new BusAnimation().addBus("EQUIP", new BusAnimationSequence().addPos(60, 0, 0, 0).addPos(0, 0, 0, 250, IType.SIN_DOWN));
} }

View File

@ -41,7 +41,6 @@ import com.hbm.handler.HbmKeybinds;
import com.hbm.handler.HbmKeybinds.EnumKeybind; import com.hbm.handler.HbmKeybinds.EnumKeybind;
import com.hbm.handler.ImpactWorldHandler; import com.hbm.handler.ImpactWorldHandler;
import com.hbm.handler.imc.IMCHandlerNHNEI; import com.hbm.handler.imc.IMCHandlerNHNEI;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.ModItems; import com.hbm.items.ModItems;
import com.hbm.items.weapon.sedna.factory.GunFactoryClient; import com.hbm.items.weapon.sedna.factory.GunFactoryClient;
import com.hbm.lib.RefStrings; import com.hbm.lib.RefStrings;
@ -49,10 +48,6 @@ import com.hbm.particle.*;
import com.hbm.particle.helper.ParticleCreators; import com.hbm.particle.helper.ParticleCreators;
import com.hbm.particle.psys.engine.EventHandlerParticleEngine; import com.hbm.particle.psys.engine.EventHandlerParticleEngine;
import com.hbm.qmaw.QMAWLoader; import com.hbm.qmaw.QMAWLoader;
import com.hbm.render.anim.BusAnimation;
import com.hbm.render.anim.BusAnimationSequence;
import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.Animation;
import com.hbm.render.block.*; import com.hbm.render.block.*;
import com.hbm.render.entity.RenderEmpty; import com.hbm.render.entity.RenderEmpty;
import com.hbm.render.entity.effect.*; import com.hbm.render.entity.effect.*;
@ -1788,105 +1783,6 @@ public class ClientProxy extends ServerProxy {
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleDeadLeaf(man, world, x, y, z)); 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)) { if("tau".equals(type)) {
for(int i = 0; i < data.getByte("count"); i++) 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.ClientConfig;
import com.hbm.config.RadiationConfig; import com.hbm.config.RadiationConfig;
import com.hbm.handler.pollution.PollutionHandler.PollutionType; import com.hbm.handler.pollution.PollutionHandler.PollutionType;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.armor.IArmorDisableModel; import com.hbm.items.armor.IArmorDisableModel;
import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart; import com.hbm.items.armor.IArmorDisableModel.EnumPlayerPart;
import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.items.weapon.sedna.ItemGunBaseNT;
@ -210,7 +211,17 @@ public class ModEventHandlerRenderer {
RenderPlayer renderer = event.renderer; RenderPlayer renderer = event.renderer;
ItemStack held = player.getHeldItem(); 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.modelBipedMain.aimedBow = true;
renderer.modelArmor.aimedBow = true; renderer.modelArmor.aimedBow = true;
renderer.modelArmorChestplate.aimedBow = true; renderer.modelArmorChestplate.aimedBow = true;

View File

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

View File

@ -3,15 +3,17 @@ package com.hbm.packet.toclient;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.BiFunction; import java.util.function.BiFunction;
import com.hbm.items.IAnimatedItem;
import com.hbm.items.armor.ArmorTrenchmaster; import com.hbm.items.armor.ArmorTrenchmaster;
import com.hbm.items.weapon.sedna.GunConfig; import com.hbm.items.weapon.sedna.GunConfig;
import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.items.weapon.sedna.ItemGunBaseNT;
import com.hbm.items.weapon.sedna.Receiver; import com.hbm.items.weapon.sedna.Receiver;
import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext; 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.BusAnimation;
import com.hbm.render.anim.HbmAnimations; import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.AnimType;
import com.hbm.render.anim.HbmAnimations.Animation; 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.IMessage;
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
@ -23,51 +25,51 @@ import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class GunAnimationPacket implements IMessage { public class HbmAnimationPacket implements IMessage {
public short type; public short type;
public int receiverIndex; 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.type = (short) type;
this.receiverIndex = 0; 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.type = (short) type;
this.receiverIndex = rec; 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.type = (short) type;
this.receiverIndex = rec; this.receiverIndex = rec;
this.gunIndex = gun; this.itemIndex = gun;
} }
@Override @Override
public void fromBytes(ByteBuf buf) { public void fromBytes(ByteBuf buf) {
type = buf.readShort(); type = buf.readShort();
receiverIndex = buf.readInt(); receiverIndex = buf.readInt();
gunIndex = buf.readInt(); itemIndex = buf.readInt();
} }
@Override @Override
public void toBytes(ByteBuf buf) { public void toBytes(ByteBuf buf) {
buf.writeShort(type); buf.writeShort(type);
buf.writeInt(receiverIndex); 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 @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IMessage onMessage(GunAnimationPacket m, MessageContext ctx) { public IMessage onMessage(HbmAnimationPacket m, MessageContext ctx) {
try { try {
@ -78,7 +80,9 @@ public class GunAnimationPacket implements IMessage {
if(stack == null) return null; if(stack == null) return null;
if(stack.getItem() instanceof ItemGunBaseNT) { 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) { } } catch(Exception x) { }
@ -86,11 +90,11 @@ public class GunAnimationPacket implements IMessage {
return null; 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(); ItemGunBaseNT gun = (ItemGunBaseNT) stack.getItem();
GunConfig config = gun.getConfig(stack, gunIndex); GunConfig config = gun.getConfig(stack, gunIndex);
if(type == AnimType.CYCLE) { if(type == GunAnimation.CYCLE) {
if(gunIndex < gun.lastShot.length) gun.lastShot[gunIndex] = System.currentTimeMillis(); if(gunIndex < gun.lastShot.length) gun.lastShot[gunIndex] = System.currentTimeMillis();
gun.shotRand = player.worldObj.rand.nextDouble(); gun.shotRand = player.worldObj.rand.nextDouble();
@ -102,23 +106,32 @@ public class GunAnimationPacket implements IMessage {
} }
} }
BiFunction<ItemStack, AnimType, BusAnimation> anims = config.getAnims(stack); BiFunction<ItemStack, GunAnimation, BusAnimation> anims = config.getAnims(stack);
BusAnimation animation = anims.apply(stack, type); BusAnimation animation = anims.apply(stack, type);
if(animation == null && type == AnimType.RELOAD_EMPTY) { if(animation == null && (type == GunAnimation.ALT_CYCLE || type == GunAnimation.CYCLE_EMPTY)) {
animation = anims.apply(stack, AnimType.RELOAD); 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) { if(animation != null) {
Minecraft.getMinecraft().entityRenderer.itemRenderer.resetEquippedProgress(); Minecraft.getMinecraft().entityRenderer.itemRenderer.resetEquippedProgress();
Minecraft.getMinecraft().entityRenderer.itemRenderer.itemToRender = stack; 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); 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

@ -26,9 +26,14 @@ public class ParticleSkeleton extends EntityFX {
public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/skeleton.png"); public static final ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/particle/skeleton.png");
public static final ResourceLocation texture_ext = new ResourceLocation(RefStrings.MODID + ":textures/particle/skoilet.png"); public static final ResourceLocation texture_ext = new ResourceLocation(RefStrings.MODID + ":textures/particle/skoilet.png");
public static final ResourceLocation texture_blood = new ResourceLocation(RefStrings.MODID + ":textures/particle/skeleton_blood.png");
public static final ResourceLocation texture_blood_ext = new ResourceLocation(RefStrings.MODID + ":textures/particle/skoilet_blood.png");
public static final IModelCustom skeleton = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/effect/skeleton.obj"), false).asVBO(); public static final IModelCustom skeleton = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/effect/skeleton.obj"), false).asVBO();
protected EnumSkeletonType type; protected EnumSkeletonType type;
public ResourceLocation useTexture;
public ResourceLocation useTextureExt;
private float momentumYaw; private float momentumYaw;
private float momentumPitch; private float momentumPitch;
private int initialDelay; private int initialDelay;
@ -50,6 +55,18 @@ public class ParticleSkeleton extends EntityFX {
this.momentumPitch = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1); this.momentumPitch = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1);
this.momentumYaw = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1); this.momentumYaw = rand.nextFloat() * 5 * (rand.nextBoolean() ? 1 : -1);
this.useTexture = texture;
this.useTextureExt = texture_ext;
}
public ParticleSkeleton makeGib() {
this.initialDelay = -2; // skip post delay motion randomization
this.useTexture = texture_blood;
this.useTextureExt = texture_blood_ext;
this.particleGravity = 0.04F;
this.particleMaxAge = 600 + rand.nextInt(20);
return this;
} }
@Override @Override
@ -139,16 +156,16 @@ public class ParticleSkeleton extends EntityFX {
switch(type) { switch(type) {
case SKULL: case SKULL:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Skull"); break; skeleton.renderPart("Skull"); break;
case TORSO: case TORSO:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Torso"); break; skeleton.renderPart("Torso"); break;
case LIMB: case LIMB:
this.textureManager.bindTexture(texture); this.textureManager.bindTexture(useTexture);
skeleton.renderPart("Limb"); break; skeleton.renderPart("Limb"); break;
case SKULL_VILLAGER: case SKULL_VILLAGER:
this.textureManager.bindTexture(texture_ext); this.textureManager.bindTexture(useTextureExt);
skeleton.renderPart("SkullVillager"); break; skeleton.renderPart("SkullVillager"); break;
} }

View File

@ -33,7 +33,6 @@ public class SkeletonCreator implements IParticleCreator {
public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap(); public static HashMap<String, Function<EntityLivingBase, BoneDefinition[]>> skullanizer = new HashMap();
public static void composeEffect(World world, Entity toSkeletonize, float brightness) { public static void composeEffect(World world, Entity toSkeletonize, float brightness) {
NBTTagCompound data = new NBTTagCompound(); NBTTagCompound data = new NBTTagCompound();
data.setString("type", "skeleton"); data.setString("type", "skeleton");
data.setInteger("entityID", toSkeletonize.getEntityId()); data.setInteger("entityID", toSkeletonize.getEntityId());
@ -41,12 +40,24 @@ public class SkeletonCreator implements IParticleCreator {
IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data); IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data);
} }
public static void composeEffectGib(World world, Entity toSkeletonize, float force) {
NBTTagCompound data = new NBTTagCompound();
data.setString("type", "skeleton");
data.setInteger("entityID", toSkeletonize.getEntityId());
data.setFloat("brightness", 1F);
data.setFloat("force", force);
data.setBoolean("gib", true);
IParticleCreator.sendPacket(world, toSkeletonize.posX, toSkeletonize.posY, toSkeletonize.posZ, 100, data);
}
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) { public void makeParticle(World world, EntityPlayer player, TextureManager texman, Random rand, double x, double y, double z, NBTTagCompound data) {
if(skullanizer.isEmpty()) init(); if(skullanizer.isEmpty()) init();
boolean gib = data.getBoolean("gib");
float force = data.getFloat("force");
int entityID = data.getInteger("entityID"); int entityID = data.getInteger("entityID");
Entity entity = world.getEntityByID(entityID); Entity entity = world.getEntityByID(entityID);
if(!(entity instanceof EntityLivingBase)) return; if(!(entity instanceof EntityLivingBase)) return;
@ -61,9 +72,16 @@ public class SkeletonCreator implements IParticleCreator {
if(bonealizer != null) { if(bonealizer != null) {
BoneDefinition[] bones = bonealizer.apply(living); BoneDefinition[] bones = bonealizer.apply(living);
for(BoneDefinition bone : bones) { for(BoneDefinition bone : bones) {
if(gib && rand.nextBoolean()) continue;
ParticleSkeleton skeleton = new ParticleSkeleton(Minecraft.getMinecraft().getTextureManager(), world, bone.x, bone.y, bone.z, brightness, brightness, brightness, bone.type); ParticleSkeleton skeleton = new ParticleSkeleton(Minecraft.getMinecraft().getTextureManager(), world, bone.x, bone.y, bone.z, brightness, brightness, brightness, bone.type);
skeleton.prevRotationYaw = skeleton.rotationYaw = bone.yaw; skeleton.prevRotationYaw = skeleton.rotationYaw = bone.yaw;
skeleton.prevRotationPitch = skeleton.rotationPitch = bone.pitch; skeleton.prevRotationPitch = skeleton.rotationPitch = bone.pitch;
if(gib) {
skeleton.makeGib();
skeleton.motionX = rand.nextGaussian() * force;
skeleton.motionY = (rand.nextGaussian() + 1) * force;
skeleton.motionZ = rand.nextGaussian() * force;
}
Minecraft.getMinecraft().effectRenderer.addEffect(skeleton); Minecraft.getMinecraft().effectRenderer.addEffect(skeleton);
} }
} }
@ -161,7 +179,7 @@ public class SkeletonCreator implements IParticleCreator {
skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY); skullanizer.put(EntityDummy.class.getSimpleName(), BONES_DUMMY);
//techguns compat, for some reason //techguns compat, for some reason
//not alwayss accurate because of variable arm position, but better than nothing //not always accurate because of variable arm position, but better than nothing
skullanizer.put("ArmySoldier", BONES_ZOMBIE); skullanizer.put("ArmySoldier", BONES_ZOMBIE);
skullanizer.put("PsychoSteve", BONES_ZOMBIE); skullanizer.put("PsychoSteve", BONES_ZOMBIE);
skullanizer.put("SkeletonSoldier", BONES_ZOMBIE); skullanizer.put("SkeletonSoldier", BONES_ZOMBIE);

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

@ -18,25 +18,6 @@ public class HbmAnimations {
//animation is playing, though this will cancel the animation entirely. //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 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 { public static class Animation {
//the "name" of the animation slot. if the item has a different key than //the "name" of the animation slot. if the item has a different key than
@ -48,22 +29,16 @@ public class HbmAnimations {
public BusAnimation animation; public BusAnimation animation;
// If set, don't cancel this animation when the timer ends, instead wait for the next to start // If set, don't cancel this animation when the timer ends, instead wait for the next to start
public boolean holdLastFrame = false; 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.key = key;
this.startMillis = startMillis; this.startMillis = startMillis;
this.animation = animation; this.animation = animation;
this.type = type;
} }
public Animation(String key, long startMillis, BusAnimation animation, AnimType type, boolean holdLastFrame) { public Animation(String key, long startMillis, BusAnimation animation, boolean holdLastFrame) {
this.key = key; this(key, startMillis, animation);
this.startMillis = startMillis;
this.animation = animation;
this.holdLastFrame = holdLastFrame; this.holdLastFrame = holdLastFrame;
this.type = type;
} }
} }

View File

@ -9,8 +9,8 @@ import com.hbm.items.weapon.sedna.mags.IMagazine;
import com.hbm.main.MainRegistry; import com.hbm.main.MainRegistry;
import com.hbm.main.ResourceManager; import com.hbm.main.ResourceManager;
import com.hbm.particle.SpentCasing; import com.hbm.particle.SpentCasing;
import com.hbm.render.anim.AnimationEnums.GunAnimation;
import com.hbm.render.anim.HbmAnimations; import com.hbm.render.anim.HbmAnimations;
import com.hbm.render.anim.HbmAnimations.AnimType;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -94,7 +94,7 @@ public class ItemRenderCongoLake extends ItemRenderWeaponBase {
GL11.glPushMatrix(); GL11.glPushMatrix();
{ {
IMagazine mag = gun.getConfig(stack, 0).getReceivers(stack)[0].getMagazine(stack); 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); Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.casings_tex);

View File

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

View File

@ -5,6 +5,7 @@ import java.util.*;
import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.BlockDummyable;
import com.hbm.blocks.ModBlocks; import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.generic.BlockDepth;
import com.hbm.blocks.generic.BlockBedrockOreTE.TileEntityBedrockOre; import com.hbm.blocks.generic.BlockBedrockOreTE.TileEntityBedrockOre;
import com.hbm.blocks.network.CraneInserter; import com.hbm.blocks.network.CraneInserter;
import com.hbm.entity.item.EntityMovingItem; import com.hbm.entity.item.EntityMovingItem;
@ -270,7 +271,12 @@ public class TileEntityMachineExcavator extends TileEntityMachineBase implements
break; 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; ignoreAll = false;

View File

@ -40,60 +40,38 @@ public class NTMWorldGenerator implements IWorldGenerator {
final List<BiomeGenBase> oceanBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean }); final List<BiomeGenBase> oceanBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean });
final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach }); final List<BiomeGenBase> beachBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
final List<BiomeGenBase> lighthouseBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach }); final List<BiomeGenBase> lighthouseBiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.ocean, BiomeGenBase.deepOcean, BiomeGenBase.beach, BiomeGenBase.stoneBeach, BiomeGenBase.coldBeach });
final List<BiomeGenBase> flatbiomes = Arrays.asList(new BiomeGenBase[] { BiomeGenBase.plains, BiomeGenBase.icePlains, BiomeGenBase.desert }); final List<BiomeGenBase> flatbiomes = Arrays.asList(BiomeGenBase.plains,BiomeGenBase.icePlains,BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.taiga, BiomeGenBase.coldTaiga, BiomeGenBase.savanna, BiomeGenBase.savannaPlateau, BiomeGenBase.birchForest);
/// SPIRE /// /// SPIRE ///
NBTStructure.registerStructure(0, new SpawnCondition("spire") {{ NBTStructure.registerStructure(0, new SpawnCondition("spire") {{
canSpawn = biome -> biome.heightVariation <= 0.05F && !invalidBiomes.contains(biome); canSpawn = biome -> biome.heightVariation <= 0.05F && !invalidBiomes.contains(biome);
structure = new JigsawPiece("spire", StructureManager.spire, -1); structure = new JigsawPiece("spire", StructureManager.spire, -1);
spawnWeight = 2; spawnWeight = StructureConfig.spireSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("features") {{ NBTStructure.registerStructure(0, new SpawnCondition("features") {{
canSpawn = biome -> !invalidBiomes.contains(biome); canSpawn = biome -> !invalidBiomes.contains(biome);
start = d -> new MapGenNTMFeatures.Start(d.getW(), d.getX(), d.getY(), d.getZ()); start = d -> new MapGenNTMFeatures.Start(d.getW(), d.getX(), d.getY(), d.getZ());
spawnWeight = 14 * 4; spawnWeight = StructureConfig.featuresSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("bunker") {{ NBTStructure.registerStructure(0, new SpawnCondition("bunker") {{
canSpawn = biome -> !invalidBiomes.contains(biome); canSpawn = biome -> !invalidBiomes.contains(biome);
start = d -> new BunkerStart(d.getW(), d.getX(), d.getY(), d.getZ()); start = d -> new BunkerStart(d.getW(), d.getX(), d.getY(), d.getZ());
spawnWeight = 1 * 4; spawnWeight = StructureConfig.bunkerSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("vertibird") {{ NBTStructure.registerStructure(0, new SpawnCondition("vertibird") {{
canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F; canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F;
structure = new JigsawPiece("vertibird", StructureManager.vertibird, -3); structure = new JigsawPiece("vertibird", StructureManager.vertibird, -3);
spawnWeight = 3 * 4; spawnWeight = StructureConfig.vertibirdSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("crashed_vertibird") {{ NBTStructure.registerStructure(0, new SpawnCondition("crashed_vertibird") {{
canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F; canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F;
structure = new JigsawPiece("crashed_vertibird", StructureManager.crashed_vertibird, -10); structure = new JigsawPiece("crashed_vertibird", StructureManager.crashed_vertibird, -10);
spawnWeight = 3 * 4; spawnWeight = StructureConfig.vertibirdCrashedSpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("aircraft_carrier") {{
canSpawn = oceanBiomes::contains;
structure = new JigsawPiece("aircraft_carrier", StructureManager.aircraft_carrier, -6);
maxHeight = 42;
spawnWeight = 1;
}});
NBTStructure.registerStructure(0, new SpawnCondition("oil_rig") {{
canSpawn = biome -> biome == BiomeGenBase.deepOcean;
structure = new JigsawPiece("oil_rig", StructureManager.oil_rig, -20);
maxHeight = 12;
minHeight = 11;
spawnWeight = 2;
}});
NBTStructure.registerStructure(0, new SpawnCondition("lighthouse") {{
canSpawn = lighthouseBiomes::contains;
structure = new JigsawPiece("lighthouse", StructureManager.lighthouse, -40);
maxHeight = 29;
minHeight = 28;
spawnWeight = 2;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("beached_patrol") {{ NBTStructure.registerStructure(0, new SpawnCondition("beached_patrol") {{
@ -101,7 +79,30 @@ public class NTMWorldGenerator implements IWorldGenerator {
structure = new JigsawPiece("beached_patrol", StructureManager.beached_patrol, -5); structure = new JigsawPiece("beached_patrol", StructureManager.beached_patrol, -5);
minHeight = 58; minHeight = 58;
maxHeight = 67; maxHeight = 67;
spawnWeight = 8; spawnWeight = StructureConfig.beachedPatrolSpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("aircraft_carrier") {{
canSpawn = oceanBiomes::contains;
structure = new JigsawPiece("aircraft_carrier", StructureManager.aircraft_carrier, -6);
maxHeight = 42;
spawnWeight = StructureConfig.enableOceanStructures ? StructureConfig.aircraftCarrierSpawnWeight : 0;
}});
NBTStructure.registerStructure(0, new SpawnCondition("oil_rig") {{
canSpawn = biome -> biome == BiomeGenBase.deepOcean;
structure = new JigsawPiece("oil_rig", StructureManager.oil_rig, -20);
maxHeight = 12;
minHeight = 11;
spawnWeight = StructureConfig.enableOceanStructures ? StructureConfig.oilRigSpawnWeight : 0;
}});
NBTStructure.registerStructure(0, new SpawnCondition("lighthouse") {{
canSpawn = lighthouseBiomes::contains;
structure = new JigsawPiece("lighthouse", StructureManager.lighthouse, -40);
maxHeight = 29;
minHeight = 28;
spawnWeight = StructureConfig.enableOceanStructures ? StructureConfig.lighthouseSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("dish") {{ NBTStructure.registerStructure(0, new SpawnCondition("dish") {{
@ -109,120 +110,124 @@ public class NTMWorldGenerator implements IWorldGenerator {
structure = new JigsawPiece("dish", StructureManager.dish, -10); structure = new JigsawPiece("dish", StructureManager.dish, -10);
minHeight = 53; minHeight = 53;
maxHeight = 65; maxHeight = 65;
spawnWeight = 1; spawnWeight = StructureConfig.dishSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("forestchem") {{ NBTStructure.registerStructure(0, new SpawnCondition("forestchem") {{
canSpawn = biome -> biome == BiomeGenBase.forest; canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("forest_chem", StructureManager.forest_chem, -9); structure = new JigsawPiece("forest_chem", StructureManager.forest_chem, -9);
spawnWeight = 50; spawnWeight = StructureConfig.forestChemSpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("labolatory") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("laboratory", StructureManager.laboratory, -10);
minHeight = 53;
maxHeight = 65;
spawnWeight = StructureConfig.laboratorySpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("forest_post") {{
canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("forest_post", StructureManager.forest_post, -9);
spawnWeight = StructureConfig.forestPostSpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("radio") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("radio_house", StructureManager.radio_house, -6);
spawnWeight = StructureConfig.radioSpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("factory") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("factory", StructureManager.factory, -10);
spawnWeight = StructureConfig.factorySpawnWeight;
}});
NBTStructure.registerStructure(0, new SpawnCondition("plane1") {{ NBTStructure.registerStructure(0, new SpawnCondition("plane1") {{
canSpawn = biome -> biome == BiomeGenBase.forest || biome == BiomeGenBase.plains; canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("crashed_plane_1", StructureManager.plane1, -5); structure = new JigsawPiece("crashed_plane_1", StructureManager.plane1, -5);
spawnWeight = 50; spawnWeight = StructureConfig.plane1SpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("plane2") {{ NBTStructure.registerStructure(0, new SpawnCondition("plane2") {{
canSpawn = biome -> biome == BiomeGenBase.forest || biome == BiomeGenBase.plains; canSpawn = biome -> biome.heightVariation <= 0.3F;
structure = new JigsawPiece("crashed_plane_2", StructureManager.plane2, -8); structure = new JigsawPiece("crashed_plane_2", StructureManager.plane2, -8);
spawnWeight = 50; spawnWeight = StructureConfig.plane2SpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_1") {{ NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_1") {{
canSpawn = biome -> biome == BiomeGenBase.desert; canSpawn = biome -> biome == BiomeGenBase.desert;
structure = new JigsawPiece("desert_shack_1", StructureManager.desert_shack_1, -7); structure = new JigsawPiece("desert_shack_1", StructureManager.desert_shack_1, -7);
spawnWeight = 20; spawnWeight = StructureConfig.desertShack1SpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_2") {{ NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_2") {{
canSpawn = biome -> biome == BiomeGenBase.desert; canSpawn = biome -> biome == BiomeGenBase.desert;
structure = new JigsawPiece("desert_shack_2", StructureManager.desert_shack_2, -7); structure = new JigsawPiece("desert_shack_2", StructureManager.desert_shack_2, -7);
spawnWeight = 25; spawnWeight = StructureConfig.desertShack2SpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_3") {{ NBTStructure.registerStructure(0, new SpawnCondition("desert_shack_3") {{
canSpawn = biome -> biome == BiomeGenBase.desert; canSpawn = biome -> biome == BiomeGenBase.desert;
structure = new JigsawPiece("desert_shack_3", StructureManager.desert_shack_3, -5); structure = new JigsawPiece("desert_shack_3", StructureManager.desert_shack_3, -5);
spawnWeight = 30; spawnWeight = StructureConfig.desertShack3SpawnWeight;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("labolatory") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinA") {{
canSpawn = biome -> biome == BiomeGenBase.plains;
structure = new JigsawPiece("laboratory", StructureManager.laboratory, -10);
minHeight = 53;
maxHeight = 65;
spawnWeight = 8;
}});
NBTStructure.registerStructure(0, new SpawnCondition("forest_post") {{
canSpawn = biome -> biome == BiomeGenBase.forest;
structure = new JigsawPiece("forest_post", StructureManager.forest_post, -9);
spawnWeight = 40;
}});
NBTStructure.registerStructure(0, new SpawnCondition("ruin1") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsA", StructureManager.ntmruinsA, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsA", StructureManager.ntmruinsA, -1) {{conformToTerrain = true;}};
spawnWeight = 20; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsASpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin2") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinB") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsB", StructureManager.ntmruinsB, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsB", StructureManager.ntmruinsB, -1) {{conformToTerrain = true;}};
spawnWeight = 25; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsBSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin3") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinC") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsC", StructureManager.ntmruinsC, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsC", StructureManager.ntmruinsC, -1) {{conformToTerrain = true;}};
spawnWeight = 25; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsCSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin4") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinD") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsD", StructureManager.ntmruinsD, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsD", StructureManager.ntmruinsD, -1) {{conformToTerrain = true;}};
spawnWeight = 30; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsDSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin5") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinE") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsE", StructureManager.ntmruinsE, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsE", StructureManager.ntmruinsE, -1) {{conformToTerrain = true;}};
spawnWeight = 30; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsESpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin6") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinF") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsF", StructureManager.ntmruinsF, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsF", StructureManager.ntmruinsF, -1) {{conformToTerrain = true;}};
spawnWeight = 35; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsFSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin7") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinG") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsG", StructureManager.ntmruinsG, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsG", StructureManager.ntmruinsG, -1) {{conformToTerrain = true;}};
spawnWeight = 35; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsGSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin8") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinH") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsH", StructureManager.ntmruinsH, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsH", StructureManager.ntmruinsH, -1) {{conformToTerrain = true;}};
spawnWeight = 35; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsHSpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin9") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinI") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsI", StructureManager.ntmruinsI, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsI", StructureManager.ntmruinsI, -1) {{conformToTerrain = true;}};
spawnWeight = 35; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsISpawnWeight : 0;
}}); }});
NBTStructure.registerStructure(0, new SpawnCondition("ruin10") {{ NBTStructure.registerStructure(0, new SpawnCondition("ruinJ") {{
canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt(); canSpawn = biome -> !invalidBiomes.contains(biome) && biome.canSpawnLightningBolt();
structure = new JigsawPiece("NTMRuinsJ", StructureManager.ntmruinsJ, -1) {{conformToTerrain = true;}}; structure = new JigsawPiece("NTMRuinsJ", StructureManager.ntmruinsJ, -1) {{conformToTerrain = true;}};
spawnWeight = 35; spawnWeight = StructureConfig.enableRuins ? StructureConfig.ruinsJSpawnWeight : 0;
}});
NBTStructure.registerStructure(0, new SpawnCondition("radio") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("radio_house", StructureManager.radio_house, -6);
spawnWeight = 30;
}});
NBTStructure.registerStructure(0, new SpawnCondition("factory") {{
canSpawn = flatbiomes::contains;
structure = new JigsawPiece("factory", StructureManager.factory, -6);
spawnWeight = 30;
}}); }});
NBTStructure.registerNullWeight(0, 2, biome -> biome == BiomeGenBase.plains); NBTStructure.registerNullWeight(0, StructureConfig.plainsNullWeight, biome -> biome == BiomeGenBase.plains);
NBTStructure.registerNullWeight(0, 4, oceanBiomes::contains); NBTStructure.registerNullWeight(0, StructureConfig.oceanNullWeight, oceanBiomes::contains);
Map<Block, BlockSelector> bricks = new HashMap<Block, BlockSelector>() {{ Map<Block, BlockSelector> bricks = new HashMap<Block, BlockSelector>() {{
put(ModBlocks.meteor_brick, new MeteorBricks()); put(ModBlocks.meteor_brick, new MeteorBricks());

View File

@ -1098,9 +1098,7 @@ public class NBTStructure {
private SpawnCondition nextSpawn; private SpawnCondition nextSpawn;
public void generateStructures(World world, Random rand, IChunkProvider chunkProvider, int chunkX, int chunkZ) { 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, null);
func_151539_a(chunkProvider, world, chunkX, chunkZ, ablock);
generateStructuresInChunk(world, rand, chunkX, chunkZ); generateStructuresInChunk(world, rand, chunkX, chunkZ);
} }

View File

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

View File

@ -1197,34 +1197,34 @@ digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance: digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Cyber Crab entity.hbm.entity_cyber_crab.name=Cyber Crab
entity.entity_elder_one.name=Quackos The Elder One entity.hbm.entity_elder_one.name=Quackos The Elder One
entity.entity_fucc_a_ducc.name=Duck entity.hbm.entity_fucc_a_ducc.name=Duck
entity.entity_glyphid.name=Glyphid entity.hbm.entity_glyphid.name=Glyphid
entity.entity_glyphid_behemoth.name=Glyphid Behemoth entity.hbm.entity_glyphid_behemoth.name=Glyphid Behemoth
entity.entity_glyphid_blaster.name=Glyphid Blaster entity.hbm.entity_glyphid_blaster.name=Glyphid Blaster
entity.entity_glyphid_bombardier.name=Glyphid Bombardier entity.hbm.entity_glyphid_bombardier.name=Glyphid Bombardier
entity.entity_glyphid_brawler.name=Glyphid Brawler entity.hbm.entity_glyphid_brawler.name=Glyphid Brawler
entity.entity_glyphid_brenda.name=Brenda entity.hbm.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_digger.name=Glyphid Digger entity.hbm.entity_glyphid_digger.name=Glyphid Digger
entity.entity_glyphid_nuclear.name=Big Man Johnson entity.hbm.entity_glyphid_nuclear.name=Big Man Johnson
entity.entity_glyphid_scout.name=Glyphid Scout entity.hbm.entity_glyphid_scout.name=Glyphid Scout
entity.entity_ntm_fbi.name=FBI Agent entity.hbm.entity_ntm_fbi.name=FBI Agent
entity.entity_ntm_fbi_drone.name=FBI Drone entity.hbm.entity_ntm_fbi_drone.name=FBI Drone
entity.entity_ntm_radiation_blaze.name=Meltdown Elemental entity.hbm.entity_ntm_radiation_blaze.name=Meltdown Elemental
entity.hbm.entity_ntm_ufo.name=Martian Invasion Ship entity.hbm.entity_ntm_ufo.name=Martian Invasion Ship
entity.entity_mob_hunter_chopper.name=Hunter Chopper entity.hbm.entity_mob_hunter_chopper.name=Hunter Chopper
entity.entity_mob_mask_man.name=Mask Man entity.hbm.entity_mob_mask_man.name=Mask Man
entity.entity_mob_gold_creeper.name=Golden Creeper entity.hbm.entity_mob_gold_creeper.name=Golden Creeper
entity.entity_mob_nuclear_creeper.name=Nuclear Creeper entity.hbm.entity_mob_nuclear_creeper.name=Nuclear Creeper
entity.entity_mob_phosgene_creeper.name=Phosgene Creeper entity.hbm.entity_mob_phosgene_creeper.name=Phosgene Creeper
entity.entity_mob_tainted_creeper.name=Tainted Creeper entity.hbm.entity_mob_tainted_creeper.name=Tainted Creeper
entity.entity_mob_volatile_creeper.name=Volatile Creeper entity.hbm.entity_mob_volatile_creeper.name=Volatile Creeper
entity.entity_parasite_maggot.name=Parasitic Maggot entity.hbm.entity_parasite_maggot.name=Parasitic Maggot
entity.entity_pigeon.name=Pigeon entity.hbm.entity_pigeon.name=Pigeon
entity.entity_plastic_bag.name=Plastic Bag entity.hbm.entity_plastic_bag.name=Plastic Bag
entity.entity_taint_crab.name=Taint Crab entity.hbm.entity_taint_crab.name=Taint Crab
entity.entity_tesla_crab.name=Tesla 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.name=Balls-O-Tron Prime
entity.hbm.entity_balls_o_tron_seg.name=Balls-O-Tron Segment entity.hbm.entity_balls_o_tron_seg.name=Balls-O-Tron Segment
entity.hbm.entity_bullet.name=Bullet 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_bullet.name=Balle
entity.hbm.entity_rocket.name=Roquettes entity.hbm.entity_rocket.name=Roquettes
entity.hbm.entity_schrabnel.name=Shrapnel entity.hbm.entity_schrabnel.name=Shrapnel
entity.entity_mob_nuclear_creeper.name=Creeper nucléaire entity.hbm.entity_mob_nuclear_creeper.name=Creeper nucléaire
entity.entity_mob_hunter_chopper.name=Hélicoptère de chasse entity.hbm.entity_mob_hunter_chopper.name=Hélicoptère de chasse
entity.entity_cyber_crab.name=Cyber-crabe entity.hbm.entity_cyber_crab.name=Cyber-crabe
item.cap_aluminium.name=Capuchon en aluminium item.cap_aluminium.name=Capuchon en aluminium
item.hull_small_steel.name=Petite coque en acier item.hull_small_steel.name=Petite coque en acier

View File

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

View File

@ -1013,29 +1013,29 @@ digamma.playerHealth=Wpływ Digammy:
digamma.playerRes=Odporność na digamę: digamma.playerRes=Odporność na digamę:
digamma.title=DIAGNOSTYKA DIGAMMY digamma.title=DIAGNOSTYKA DIGAMMY
entity.entity_cyber_crab.name=Cyberkrab entity.hbm.entity_cyber_crab.name=Cyberkrab
entity.entity_elder_one.name=Quackos Starszy entity.hbm.entity_elder_one.name=Quackos Starszy
entity.entity_fucc_a_ducc.name=Kaczka entity.hbm.entity_fucc_a_ducc.name=Kaczka
entity.entity_glyphid.name=Glyfid entity.hbm.entity_glyphid.name=Glyfid
entity.entity_glyphid_behemoth.name=Glyfid Behemot entity.hbm.entity_glyphid_behemoth.name=Glyfid Behemot
entity.entity_glyphid_blaster.name=Glyfid Blaster entity.hbm.entity_glyphid_blaster.name=Glyfid Blaster
entity.entity_glyphid_bombardier.name=Glyfid Bombardier entity.hbm.entity_glyphid_bombardier.name=Glyfid Bombardier
entity.entity_glyphid_brawler.name=Glyfid Awanturnik entity.hbm.entity_glyphid_brawler.name=Glyfid Awanturnik
entity.entity_glyphid_brenda.name=Brenda entity.hbm.entity_glyphid_brenda.name=Brenda
entity.entity_glyphid_nuclear.name=Big Men Dżonson entity.hbm.entity_glyphid_nuclear.name=Big Men Dżonson
entity.entity_glyphid_scout.name=Glyfid Skaut entity.hbm.entity_glyphid_scout.name=Glyfid Skaut
entity.entity_ntm_fbi.name=Agent FBI entity.hbm.entity_ntm_fbi.name=Agent FBI
entity.entity_ntm_radiation_blaze.name=Żywiołak stopienia entity.hbm.entity_ntm_radiation_blaze.name=Żywiołak stopienia
entity.hbm.entity_ntm_ufo.name=Statek Inwazji Marsjan entity.hbm.entity_ntm_ufo.name=Statek Inwazji Marsjan
entity.entity_mob_hunter_chopper.name=Chopper Myśliwy entity.hbm.entity_mob_hunter_chopper.name=Chopper Myśliwy
entity.entity_mob_mask_man.name=Pan w Masce entity.hbm.entity_mob_mask_man.name=Pan w Masce
entity.entity_mob_gold_creeper.name=Złoty Creeper entity.hbm.entity_mob_gold_creeper.name=Złoty Creeper
entity.entity_mob_nuclear_creeper.name=Jądrowy creeper entity.hbm.entity_mob_nuclear_creeper.name=Jądrowy creeper
entity.entity_mob_phosgene_creeper.name=Fosgenowy Creeper entity.hbm.entity_mob_phosgene_creeper.name=Fosgenowy Creeper
entity.entity_mob_tainted_creeper.name=Skażony creeper entity.hbm.entity_mob_tainted_creeper.name=Skażony creeper
entity.entity_mob_volatile_creeper.name=Lotny Creeper entity.hbm.entity_mob_volatile_creeper.name=Lotny Creeper
entity.entity_taint_crab.name=Skażony krab entity.hbm.entity_taint_crab.name=Skażony krab
entity.entity_tesla_crab.name=Krab Tesli entity.hbm.entity_tesla_crab.name=Krab Tesli
entity.hbm.entity_balls_o_tron.name=Jądro-Tron 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_balls_o_tron_seg.name=Segment Jądro-Trona
entity.hbm.entity_bullet.name=Pocisk entity.hbm.entity_bullet.name=Pocisk

View File

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

View File

@ -1196,34 +1196,34 @@ digamma.playerHealth=Digamma influence:
digamma.playerRes=Digamma resistance: digamma.playerRes=Digamma resistance:
digamma.title=DIGAMMA DIAGNOSTIC digamma.title=DIGAMMA DIAGNOSTIC
entity.entity_cyber_crab.name=Кіберкраб entity.hbm.entity_cyber_crab.name=Кіберкраб
entity.entity_elder_one.name=Крякос Старший entity.hbm.entity_elder_one.name=Крякос Старший
entity.entity_fucc_a_ducc.name=Качка entity.hbm.entity_fucc_a_ducc.name=Качка
entity.entity_glyphid.name=Гліфід entity.hbm.entity_glyphid.name=Гліфід
entity.entity_glyphid_behemoth.name=Гліфід Бегемот entity.hbm.entity_glyphid_behemoth.name=Гліфід Бегемот
entity.entity_glyphid_blaster.name=Гліфід Бластер entity.hbm.entity_glyphid_blaster.name=Гліфід Бластер
entity.entity_glyphid_bombardier.name=Гліфід Бомбардир entity.hbm.entity_glyphid_bombardier.name=Гліфід Бомбардир
entity.entity_glyphid_brawler.name=Гліфід Боєць entity.hbm.entity_glyphid_brawler.name=Гліфід Боєць
entity.entity_glyphid_brenda.name=Бренда entity.hbm.entity_glyphid_brenda.name=Бренда
entity.entity_glyphid_digger.name=Гліфід Копач entity.hbm.entity_glyphid_digger.name=Гліфід Копач
entity.entity_glyphid_nuclear.name=Великий Джонсон entity.hbm.entity_glyphid_nuclear.name=Великий Джонсон
entity.entity_glyphid_scout.name=Гліфід Розвідник entity.hbm.entity_glyphid_scout.name=Гліфід Розвідник
entity.entity_ntm_fbi.name=Агент ФБР entity.hbm.entity_ntm_fbi.name=Агент ФБР
entity.entity_ntm_fbi_drone.name=Дрон ФБР entity.hbm.entity_ntm_fbi_drone.name=Дрон ФБР
entity.entity_ntm_radiation_blaze.name=Елементаль Розплавлення entity.hbm.entity_ntm_radiation_blaze.name=Елементаль Розплавлення
entity.hbm.entity_ntm_ufo.name=Марсіанький корабель НЛО entity.hbm.entity_ntm_ufo.name=Марсіанький корабель НЛО
entity.entity_mob_hunter_chopper.name=Гвинтокрил Мислиивець entity.hbm.entity_mob_hunter_chopper.name=Гвинтокрил Мислиивець
entity.entity_mob_mask_man.name=Маскмен entity.hbm.entity_mob_mask_man.name=Маскмен
entity.entity_mob_gold_creeper.name=Золотий Кріпер entity.hbm.entity_mob_gold_creeper.name=Золотий Кріпер
entity.entity_mob_nuclear_creeper.name=Ядерний Кріпер entity.hbm.entity_mob_nuclear_creeper.name=Ядерний Кріпер
entity.entity_mob_phosgene_creeper.name=Фосгений Кріпер entity.hbm.entity_mob_phosgene_creeper.name=Фосгений Кріпер
entity.entity_mob_tainted_creeper.name=Інфікований Кріпер entity.hbm.entity_mob_tainted_creeper.name=Інфікований Кріпер
entity.entity_mob_volatile_creeper.name=Шлаковий Кріпер entity.hbm.entity_mob_volatile_creeper.name=Шлаковий Кріпер
entity.entity_parasite_maggot.name=Паразитична личинка entity.hbm.entity_parasite_maggot.name=Паразитична личинка
entity.entity_pigeon.name=Голуб entity.hbm.entity_pigeon.name=Голуб
entity.entity_plastic_bag.name=Пластиковий пакет entity.hbm.entity_plastic_bag.name=Пластиковий пакет
entity.entity_taint_crab.name=Інфікований Краб entity.hbm.entity_taint_crab.name=Інфікований Краб
entity.entity_tesla_crab.name=Тесла Краб entity.hbm.entity_tesla_crab.name=Тесла Краб
entity.hbm.entity_balls_o_tron.name=Баллс-О-Трон Прайм entity.hbm.entity_balls_o_tron.name=Баллс-О-Трон Прайм
entity.hbm.entity_balls_o_tron_seg.name=Баллс-О-Трон Сегмент entity.hbm.entity_balls_o_tron_seg.name=Баллс-О-Трон Сегмент
entity.hbm.entity_bullet.name=Куля entity.hbm.entity_bullet.name=Куля

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB