mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
Basis of casing system
All untested and should be considered still in-development. Just commiting for backup.
This commit is contained in:
parent
e75e328653
commit
51e392011e
@ -72,7 +72,6 @@ public class WeaponRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_quadro, 1), new Object[] { "SSS", "SSS", "CM ", 'S', ModItems.hull_small_steel, 'C', ModItems.circuit_targeting_tier3, 'M', ModItems.mechanism_launcher_2 });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', FE.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_hk69, 1), new Object[] { "SSI", " MB", 'S', ModItems.hull_small_steel, 'I', FE.ingot(), 'M', ModItems.mechanism_launcher_1, 'B', ModItems.bolt_tungsten });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_stinger, 1), new Object[] { "SSW", "CMW", 'S', STEEL.plate(), 'W', TI.plate(), 'C', ModItems.circuit_red_copper, 'M', ModItems.mechanism_launcher_2 });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_stinger_rocket, 4), new Object[] { "SS ", "STI", " IR", 'S', STEEL.plate(), 'T', Item.getItemFromBlock(Blocks.tnt), 'I', AL.plate(), 'R', REDSTONE.dust() });
|
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver, 1), new Object[] { "SSM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_saturnite, 1), new Object[] { "SSM", " RW", 'S', BIGMT.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_tungsten, 'M', ModItems.mechanism_revolver_2 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_saturnite, 1), new Object[] { "SSM", " RW", 'S', BIGMT.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_tungsten, 'M', ModItems.mechanism_revolver_2 });
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_iron, 1), new Object[] { "SSM", " RW", 'S', FE.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_iron, 1), new Object[] { "SSM", " RW", 'S', FE.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'M', ModItems.mechanism_revolver_1 });
|
||||||
@ -215,8 +214,8 @@ public class WeaponRecipes {
|
|||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_folly_du, 1), new Object[] { " B ", "EEE", " S ", 'B', ModItems.folly_bullet_du, 'E', ModBlocks.det_charge, 'S', ModItems.folly_shell });
|
||||||
|
|
||||||
//Rockets
|
//Rockets
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', Blocks.tnt, 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });// I got tired of changing *all* of them, the stock one is always the first one anyway
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 1), new Object[] { " T ", "GCG", " P ", 'T', ModItems.ball_dynamite, 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });// I got tired of changing *all* of them, the stock one is always the first one anyway
|
||||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.casing_50, 'P', ModItems.primer_50 });
|
CraftingManager.addRecipeAuto(new ItemStack(ModItems.ammo_rocket, 2), new Object[] { " T ", "GCG", " P ", 'T', ANY_PLASTICEXPLOSIVE.ingot(), 'G', ModItems.rocket_fuel, 'C', ModItems.hull_small_aluminium, 'P', ModItems.primer_50 });
|
||||||
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE), new Object[] { "G", "R", 'G', ANY_PLASTICEXPLOSIVE.ingot(), 'R', ModItems.ammo_rocket });
|
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.HE), new Object[] { "G", "R", 'G', ANY_PLASTICEXPLOSIVE.ingot(), 'R', ModItems.ammo_rocket });
|
||||||
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY), new Object[] { "G", "R", 'G', P_RED.dust(), 'R', ModItems.ammo_rocket });
|
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.INCENDIARY), new Object[] { "G", "R", 'G', P_RED.dust(), 'R', ModItems.ammo_rocket });
|
||||||
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS), new Object[] { "G", "R", 'G', P_WHITE.ingot(), 'R', ModItems.ammo_rocket });
|
CraftingManager.addRecipeAuto(ModItems.ammo_rocket.stackFromEnum(AmmoRocket.PHOSPHORUS), new Object[] { "G", "R", 'G', P_WHITE.ingot(), 'R', ModItems.ammo_rocket });
|
||||||
|
|||||||
@ -1,11 +1,14 @@
|
|||||||
package com.hbm.handler;
|
package com.hbm.handler;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.EnumMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
import com.hbm.lib.HbmCollection.EnumGunManufacturer;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.particle.SpentCasingConfig;
|
||||||
import com.hbm.render.anim.BusAnimation;
|
import com.hbm.render.anim.BusAnimation;
|
||||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||||
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
import com.hbm.render.util.RenderScreenOverlay.Crosshair;
|
||||||
@ -32,7 +35,7 @@ public class GunConfiguration implements Cloneable {
|
|||||||
public int durability;
|
public int durability;
|
||||||
|
|
||||||
//animations!
|
//animations!
|
||||||
public HashMap<AnimType, BusAnimation> animations = new HashMap<AnimType, BusAnimation>();
|
public final Map<AnimType, BusAnimation> animations = new EnumMap<>(AnimType.class);
|
||||||
//whether ot not to disable crosshais when sneaking
|
//whether ot not to disable crosshais when sneaking
|
||||||
public boolean hasSights;
|
public boolean hasSights;
|
||||||
|
|
||||||
@ -90,6 +93,9 @@ public class GunConfiguration implements Cloneable {
|
|||||||
//crosshair
|
//crosshair
|
||||||
public Crosshair crosshair;
|
public Crosshair crosshair;
|
||||||
|
|
||||||
|
/**Controller for spent casings. If {@code Optional.empty()} it will not eject casings.**/
|
||||||
|
public Optional<SpentCasingConfig> casingConfig = Optional.empty();
|
||||||
|
|
||||||
public static final int MODE_NORMAL = 0;
|
public static final int MODE_NORMAL = 0;
|
||||||
public static final int MODE_RELEASE = 1;
|
public static final int MODE_RELEASE = 1;
|
||||||
public static final int MODE_BOTH = 1;
|
public static final int MODE_BOTH = 1;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.hbm.handler.guncfg;
|
package com.hbm.handler.guncfg;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import com.hbm.entity.projectile.EntityBulletBase;
|
import com.hbm.entity.projectile.EntityBulletBase;
|
||||||
import com.hbm.handler.BulletConfigSyncingUtil;
|
import com.hbm.handler.BulletConfigSyncingUtil;
|
||||||
@ -133,7 +132,7 @@ public class Gun556mmFactory {
|
|||||||
|
|
||||||
public static GunConfiguration getMLRConfig()
|
public static GunConfiguration getMLRConfig()
|
||||||
{
|
{
|
||||||
GunConfiguration config = new GunConfiguration();
|
final GunConfiguration config = new GunConfiguration();
|
||||||
|
|
||||||
config.rateOfFire = 2;
|
config.rateOfFire = 2;
|
||||||
config.roundsPerCycle = 1;
|
config.roundsPerCycle = 1;
|
||||||
@ -156,7 +155,6 @@ public class Gun556mmFactory {
|
|||||||
config.config.addAll(HbmCollection.NATO);
|
config.config.addAll(HbmCollection.NATO);
|
||||||
config.config.addAll(HbmCollection.NATOFlechette);
|
config.config.addAll(HbmCollection.NATOFlechette);
|
||||||
|
|
||||||
config.animations = new HashMap<>();
|
|
||||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||||
.addBus("RECOIL", new BusAnimationSequence()
|
.addBus("RECOIL", new BusAnimationSequence()
|
||||||
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
|
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
|
||||||
@ -167,7 +165,7 @@ public class Gun556mmFactory {
|
|||||||
|
|
||||||
public static GunConfiguration getG36Config()
|
public static GunConfiguration getG36Config()
|
||||||
{
|
{
|
||||||
GunConfiguration config = new GunConfiguration();
|
final GunConfiguration config = new GunConfiguration();
|
||||||
|
|
||||||
config.rateOfFire = 3;
|
config.rateOfFire = 3;
|
||||||
config.roundsPerCycle = 1;
|
config.roundsPerCycle = 1;
|
||||||
@ -188,7 +186,6 @@ public class Gun556mmFactory {
|
|||||||
|
|
||||||
config.config.addAll(HbmCollection.NATO);
|
config.config.addAll(HbmCollection.NATO);
|
||||||
|
|
||||||
config.animations = new HashMap<>();
|
|
||||||
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
config.animations.put(AnimType.CYCLE, new BusAnimation()
|
||||||
.addBus("RECOIL", new BusAnimationSequence()
|
.addBus("RECOIL", new BusAnimationSequence()
|
||||||
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
|
.addKeyframe(new BusAnimationKeyframe(-0.35, 0, 0, 30))
|
||||||
|
|||||||
@ -130,7 +130,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
//SoundUtil.addSoundCategory("ntmMachines");
|
//SoundUtil.addSoundCategory("ntmMachines");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerClientEventHandler(Object handler) {
|
private static void registerClientEventHandler(Object handler) {
|
||||||
MinecraftForge.EVENT_BUS.register(handler);
|
MinecraftForge.EVENT_BUS.register(handler);
|
||||||
FMLCommonHandler.instance().bus().register(handler);
|
FMLCommonHandler.instance().bus().register(handler);
|
||||||
}
|
}
|
||||||
@ -343,7 +343,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
MinecraftForgeClient.registerItemRenderer(entry.getKey(), entry.getValue());
|
MinecraftForgeClient.registerItemRenderer(entry.getKey(), entry.getValue());
|
||||||
|
|
||||||
//this bit registers an item renderer for every existing tile entity renderer that implements IItemRendererProvider
|
//this bit registers an item renderer for every existing tile entity renderer that implements IItemRendererProvider
|
||||||
Iterator iterator = TileEntityRendererDispatcher.instance.mapSpecialRenderers.values().iterator();
|
Iterator<?> iterator = TileEntityRendererDispatcher.instance.mapSpecialRenderers.values().iterator();
|
||||||
while(iterator.hasNext()) {
|
while(iterator.hasNext()) {
|
||||||
Object renderer = iterator.next();
|
Object renderer = iterator.next();
|
||||||
if(renderer instanceof IItemRendererProvider) {
|
if(renderer instanceof IItemRendererProvider) {
|
||||||
@ -783,10 +783,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
MissilePart.registerAllParts();
|
MissilePart.registerAllParts();
|
||||||
|
|
||||||
Iterator it = MissilePart.parts.entrySet().iterator();
|
Iterator<?> it = MissilePart.parts.entrySet().iterator();
|
||||||
|
|
||||||
while(it.hasNext()) {
|
while(it.hasNext()) {
|
||||||
Map.Entry pair = (Map.Entry) it.next();
|
Map.Entry<?, ?> pair = (Map.Entry<?, ?>) it.next();
|
||||||
MissilePart part = (MissilePart) pair.getValue();
|
MissilePart part = (MissilePart) pair.getValue();
|
||||||
MinecraftForgeClient.registerItemRenderer(part.part, new ItemRenderMissilePart(part));
|
MinecraftForgeClient.registerItemRenderer(part.part, new ItemRenderMissilePart(part));
|
||||||
}
|
}
|
||||||
@ -828,6 +828,8 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ParticleRadiationFog fog = new ParticleRadiationFog(man, world, x, y, z);
|
ParticleRadiationFog fog = new ParticleRadiationFog(man, world, x, y, z);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fog);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fog);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -869,6 +871,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//mk3, only use this one
|
//mk3, only use this one
|
||||||
|
@Override
|
||||||
public void effectNT(NBTTagCompound data) {
|
public void effectNT(NBTTagCompound data) {
|
||||||
|
|
||||||
World world = Minecraft.getMinecraft().theWorld;
|
World world = Minecraft.getMinecraft().theWorld;
|
||||||
@ -885,12 +888,15 @@ public class ClientProxy extends ServerProxy {
|
|||||||
double y = data.getDouble("posY");
|
double y = data.getDouble("posY");
|
||||||
double z = data.getDouble("posZ");
|
double z = data.getDouble("posZ");
|
||||||
|
|
||||||
if("smoke".equals(type)) {
|
switch (type)
|
||||||
|
{
|
||||||
|
case "smoke": {
|
||||||
|
|
||||||
String mode = data.getString("mode");
|
|
||||||
int count = Math.max(1, data.getInteger("count"));
|
int count = Math.max(1, data.getInteger("count"));
|
||||||
|
|
||||||
if("cloud".equals(mode)) {
|
switch (data.getString("mode"))
|
||||||
|
{
|
||||||
|
case "cloud": {
|
||||||
|
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
ParticleExSmoke fx = new ParticleExSmoke(man, world, x, y, z);
|
ParticleExSmoke fx = new ParticleExSmoke(man, world, x, y, z);
|
||||||
@ -900,9 +906,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
if(rand.nextBoolean()) fx.motionY = Math.abs(fx.motionY);
|
if(rand.nextBoolean()) fx.motionY = Math.abs(fx.motionY);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("radial".equals(mode)) {
|
case "radial": {
|
||||||
|
|
||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
ParticleExSmoke fx = new ParticleExSmoke(man, world, x, y, z);
|
ParticleExSmoke fx = new ParticleExSmoke(man, world, x, y, z);
|
||||||
@ -911,9 +918,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionZ = rand.nextGaussian() * (1 + (count / 50));
|
fx.motionZ = rand.nextGaussian() * (1 + (count / 50));
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("radialDigamma".equals(mode)) {
|
case "radialDigamma": {
|
||||||
|
|
||||||
Vec3 vec = Vec3.createVectorHelper(2, 0, 0);
|
Vec3 vec = Vec3.createVectorHelper(2, 0, 0);
|
||||||
vec.rotateAroundY(rand.nextFloat() * (float)Math.PI * 2F);
|
vec.rotateAroundY(rand.nextFloat() * (float)Math.PI * 2F);
|
||||||
@ -925,11 +933,12 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionZ = vec.zCoord;
|
fx.motionZ = vec.zCoord;
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
|
|
||||||
vec.rotateAroundY((float)Math.PI * 2F / (float)count);
|
vec.rotateAroundY((float)Math.PI * 2F / count);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("shock".equals(mode)) {
|
case "shock": {
|
||||||
|
|
||||||
double strength = data.getDouble("strength");
|
double strength = data.getDouble("strength");
|
||||||
|
|
||||||
@ -943,11 +952,12 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionZ = vec.zCoord;
|
fx.motionZ = vec.zCoord;
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
|
|
||||||
vec.rotateAroundY((float)Math.PI * 2F / (float)count);
|
vec.rotateAroundY((float)Math.PI * 2F / count);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("shockRand".equals(mode)) {
|
case "shockRand": {
|
||||||
|
|
||||||
double strength = data.getDouble("strength");
|
double strength = data.getDouble("strength");
|
||||||
|
|
||||||
@ -965,9 +975,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
vec.rotateAroundY(360 / count);
|
vec.rotateAroundY(360 / count);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("wave".equals(mode)) {
|
case "wave": {
|
||||||
|
|
||||||
double strength = data.getDouble("range");
|
double strength = data.getDouble("range");
|
||||||
|
|
||||||
@ -986,14 +997,18 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
vec.rotateAroundY(360 / count);
|
vec.rotateAroundY(360 / count);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("exhaust".equals(type)) {
|
case "exhaust": {
|
||||||
|
|
||||||
String mode = data.getString("mode");
|
switch (data.getString("mode"))
|
||||||
|
{
|
||||||
if("soyuz".equals(mode)) {
|
case "soyuz": {
|
||||||
|
|
||||||
if(Vec3.createVectorHelper(player.posX - x, player.posY - y, player.posZ - z).lengthVector() > 350)
|
if(Vec3.createVectorHelper(player.posX - x, player.posY - y, player.posZ - z).lengthVector() > 350)
|
||||||
return;
|
return;
|
||||||
@ -1007,9 +1022,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionY = -0.75 + rand.nextDouble() * 0.5;
|
fx.motionY = -0.75 + rand.nextDouble() * 0.5;
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("meteor".equals(mode)) {
|
case "meteor": {
|
||||||
|
|
||||||
if(Vec3.createVectorHelper(player.posX - x, player.posY - y, player.posZ - z).lengthVector() > 350)
|
if(Vec3.createVectorHelper(player.posX - x, player.posY - y, player.posZ - z).lengthVector() > 350)
|
||||||
return;
|
return;
|
||||||
@ -1022,10 +1038,13 @@ public class ClientProxy extends ServerProxy {
|
|||||||
ParticleRocketFlame fx = new ParticleRocketFlame(man, world, x + rand.nextGaussian() * width, y + rand.nextGaussian() * width, z + rand.nextGaussian() * width);
|
ParticleRocketFlame fx = new ParticleRocketFlame(man, world, x + rand.nextGaussian() * width, y + rand.nextGaussian() * width, z + rand.nextGaussian() * width);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if("fireworks".equals(type)) {
|
case "fireworks": {
|
||||||
int color = data.getInteger("color");
|
int color = data.getInteger("color");
|
||||||
char c = (char)data.getInteger("char");
|
char c = (char)data.getInteger("char");
|
||||||
|
|
||||||
@ -1040,9 +1059,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
blast.setColour(color);
|
blast.setColour(color);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(blast);
|
Minecraft.getMinecraft().effectRenderer.addEffect(blast);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("vanillaburst".equals(type)) {
|
case "vanillaburst": {
|
||||||
|
|
||||||
double motion = data.getDouble("motion");
|
double motion = data.getDouble("motion");
|
||||||
|
|
||||||
@ -1054,42 +1074,36 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
EntityFX fx = null;
|
EntityFX fx = null;
|
||||||
|
|
||||||
if("flame".equals(data.getString("mode"))) {
|
switch (data.getString("mode"))
|
||||||
fx = new EntityFlameFX(world, x, y, z, mX, mY, mZ);
|
{
|
||||||
}
|
case "flame": fx = new EntityFlameFX(world, x, y, z, mX, mY, mZ); break;
|
||||||
|
case "cloud": fx = new net.minecraft.client.particle.EntityCloudFX(world, x, y, z, mX, mY, mZ); break;
|
||||||
|
|
||||||
if("cloud".equals(data.getString("mode"))) {
|
case "reddust":
|
||||||
fx = new net.minecraft.client.particle.EntityCloudFX(world, x, y, z, mX, mY, mZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("reddust".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.0F, 0.0F, 0.0F);
|
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.0F, 0.0F, 0.0F);
|
||||||
fx.motionX = mX;
|
fx.motionX = mX;
|
||||||
fx.motionY = mY;
|
fx.motionY = mY;
|
||||||
fx.motionZ = mZ;
|
fx.motionZ = mZ;
|
||||||
}
|
break;
|
||||||
|
case "bluedust": fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F); break;
|
||||||
if("bluedust".equals(data.getString("mode"))) {
|
case "greendust": fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.5F, 0.1F); break;
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("greendust".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.5F, 0.1F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("blockdust".equals(data.getString("mode"))) {
|
|
||||||
|
|
||||||
|
case "blockdust":
|
||||||
Block b = Block.getBlockById(data.getInteger("block"));
|
Block b = Block.getBlockById(data.getInteger("block"));
|
||||||
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
||||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 50 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
|
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 50 + rand.nextInt(50), "particleMaxAge", "field_70547_e");
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fx != null)
|
if(fx != null)
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("vanillaExt".equals(type)) {
|
case "vanillaExt": {
|
||||||
|
|
||||||
double mX = data.getDouble("mX");
|
double mX = data.getDouble("mX");
|
||||||
double mY = data.getDouble("mY");
|
double mY = data.getDouble("mY");
|
||||||
@ -1097,15 +1111,11 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
EntityFX fx = null;
|
EntityFX fx = null;
|
||||||
|
|
||||||
if("flame".equals(data.getString("mode"))) {
|
switch (data.getString("mode"))
|
||||||
fx = new EntityFlameFX(world, x, y, z, mX, mY, mZ);
|
{
|
||||||
}
|
case "flame": fx = new EntityFlameFX(world, x, y, z, mX, mY, mZ); break;
|
||||||
|
case "smoke": fx = new net.minecraft.client.particle.EntitySmokeFX(world, x, y, z, mX, mY, mZ); break;
|
||||||
if("smoke".equals(data.getString("mode"))) {
|
case "volcano":
|
||||||
fx = new net.minecraft.client.particle.EntitySmokeFX(world, x, y, z, mX, mY, mZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("volcano".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntitySmokeFX(world, x, y, z, mX, mY, mZ);
|
fx = new net.minecraft.client.particle.EntitySmokeFX(world, x, y, z, mX, mY, mZ);
|
||||||
float scale = 100;
|
float scale = 100;
|
||||||
ReflectionHelper.setPrivateValue(net.minecraft.client.particle.EntitySmokeFX.class, (net.minecraft.client.particle.EntitySmokeFX)fx, scale, "smokeParticleScale", "field_70587_a");
|
ReflectionHelper.setPrivateValue(net.minecraft.client.particle.EntitySmokeFX.class, (net.minecraft.client.particle.EntitySmokeFX)fx, scale, "smokeParticleScale", "field_70587_a");
|
||||||
@ -1114,9 +1124,8 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionY = 2.5 + rand.nextDouble();
|
fx.motionY = 2.5 + rand.nextDouble();
|
||||||
fx.motionX = rand.nextGaussian() * 0.2;
|
fx.motionX = rand.nextGaussian() * 0.2;
|
||||||
fx.motionZ = rand.nextGaussian() * 0.2;
|
fx.motionZ = rand.nextGaussian() * 0.2;
|
||||||
}
|
break;
|
||||||
|
case "cloud":
|
||||||
if("cloud".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntityCloudFX(world, x, y, z, mX, mY, mZ);
|
fx = new net.minecraft.client.particle.EntityCloudFX(world, x, y, z, mX, mY, mZ);
|
||||||
|
|
||||||
if(data.hasKey("r")) {
|
if(data.hasKey("r")) {
|
||||||
@ -1127,23 +1136,11 @@ public class ClientProxy extends ServerProxy {
|
|||||||
fx.motionY = 0;
|
fx.motionY = 0;
|
||||||
fx.motionZ = 0;
|
fx.motionZ = 0;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
case "reddust": fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, (float)mX, (float)mY, (float)mZ); break;
|
||||||
if("reddust".equals(data.getString("mode"))) {
|
case "bluedust": fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F); break;
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, (float)mX, (float)mY, (float)mZ);
|
case "greendust": fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.5F, 0.1F); break;
|
||||||
}
|
case "largeexplode":
|
||||||
|
|
||||||
if("bluedust".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.01F, 1F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("greendust".equals(data.getString("mode"))) {
|
|
||||||
fx = new net.minecraft.client.particle.EntityReddustFX(world, x, y, z, 0.01F, 0.5F, 0.1F);
|
|
||||||
}
|
|
||||||
|
|
||||||
if("largeexplode".equals(data.getString("mode"))) {
|
|
||||||
|
|
||||||
|
|
||||||
fx = new net.minecraft.client.particle.EntityLargeExplodeFX(man, world, x, y, z, data.getFloat("size"), 0.0F, 0.0F);
|
fx = new net.minecraft.client.particle.EntityLargeExplodeFX(man, world, x, y, z, data.getFloat("size"), 0.0F, 0.0F);
|
||||||
float r = 1.0F - rand.nextFloat() * 0.2F;
|
float r = 1.0F - rand.nextFloat() * 0.2F;
|
||||||
fx.setRBGColorF(1F * r, 0.9F * r, 0.5F * r);
|
fx.setRBGColorF(1F * r, 0.9F * r, 0.5F * r);
|
||||||
@ -1155,35 +1152,33 @@ public class ClientProxy extends ServerProxy {
|
|||||||
sec.multipleParticleScaleBy(i + 1);
|
sec.multipleParticleScaleBy(i + 1);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(sec);
|
Minecraft.getMinecraft().effectRenderer.addEffect(sec);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
|
case "townaura":
|
||||||
if("townaura".equals(data.getString("mode"))) {
|
|
||||||
fx = new EntityAuraFX(world, x, y, z, 0, 0, 0);
|
fx = new EntityAuraFX(world, x, y, z, 0, 0, 0);
|
||||||
float color = 0.5F + rand.nextFloat() * 0.5F;
|
float color = 0.5F + rand.nextFloat() * 0.5F;
|
||||||
fx.setRBGColorF(0.8F * color, 0.9F * color, 1.0F * color);
|
fx.setRBGColorF(0.8F * color, 0.9F * color, 1.0F * color);
|
||||||
fx.setVelocity(mX, mY, mZ);
|
fx.setVelocity(mX, mY, mZ);
|
||||||
}
|
break;
|
||||||
|
case "blockdust":
|
||||||
if("blockdust".equals(data.getString("mode"))) {
|
{
|
||||||
|
|
||||||
Block b = Block.getBlockById(data.getInteger("block"));
|
Block b = Block.getBlockById(data.getInteger("block"));
|
||||||
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
||||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
case "colordust":
|
||||||
if("colordust".equals(data.getString("mode"))) {
|
{
|
||||||
|
|
||||||
Block b = Blocks.wool;
|
Block b = Blocks.wool;
|
||||||
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
fx = new net.minecraft.client.particle.EntityBlockDustFX(world, x, y, z, mX, mY + 0.2, mZ, b, 0);
|
||||||
fx.setRBGColorF(data.getFloat("r"), data.getFloat("g"), data.getFloat("b"));
|
fx.setRBGColorF(data.getFloat("r"), data.getFloat("g"), data.getFloat("b"));
|
||||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
ReflectionHelper.setPrivateValue(EntityFX.class, fx, 10 + rand.nextInt(20), "particleMaxAge", "field_70547_e");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fx != null) {
|
if(fx != null) {
|
||||||
|
|
||||||
if(data.getBoolean("noclip")) {
|
fx.noClip = data.getBoolean("noclip");
|
||||||
fx.noClip = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(data.getInteger("overrideAge") > 0) {
|
if(data.getInteger("overrideAge") > 0) {
|
||||||
ReflectionHelper.setPrivateValue(EntityFX.class, fx, data.getInteger("overrideAge"), "particleMaxAge", "field_70547_e");
|
ReflectionHelper.setPrivateValue(EntityFX.class, fx, data.getInteger("overrideAge"), "particleMaxAge", "field_70547_e");
|
||||||
@ -1191,17 +1186,19 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("vanilla".equals(type)) {
|
case "vanilla": {
|
||||||
|
|
||||||
double mX = data.getDouble("mX");
|
double mX = data.getDouble("mX");
|
||||||
double mY = data.getDouble("mY");
|
double mY = data.getDouble("mY");
|
||||||
double mZ = data.getDouble("mZ");
|
double mZ = data.getDouble("mZ");
|
||||||
world.spawnParticle(data.getString("mode"), x, y, z, mX, mY, mZ);
|
world.spawnParticle(data.getString("mode"), x, y, z, mX, mY, mZ);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("jetpack".equals(type)) {
|
case "jetpack": {
|
||||||
|
|
||||||
if(particleSetting == 2)
|
if(particleSetting == 2)
|
||||||
return;
|
return;
|
||||||
@ -1280,9 +1277,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new net.minecraft.client.particle.EntitySmokeFX(world, ix - ox, iy, iz - oz, mX3, mY3, mZ3));
|
Minecraft.getMinecraft().effectRenderer.addEffect(new net.minecraft.client.particle.EntitySmokeFX(world, ix - ox, iy, iz - oz, mX3, mY3, mZ3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("bnuuy".equals(type)) {
|
case "bnuuy": {
|
||||||
|
|
||||||
if(particleSetting == 2)
|
if(particleSetting == 2)
|
||||||
return;
|
return;
|
||||||
@ -1317,13 +1315,14 @@ public class ClientProxy extends ServerProxy {
|
|||||||
for(int i = 0; i < 2; i++) {
|
for(int i = 0; i < 2; i++) {
|
||||||
net.minecraft.client.particle.EntitySmokeFX fx = new net.minecraft.client.particle.EntitySmokeFX(world, ix + ox * (i == 0 ? -1 : 1), iy, iz + oz * (i == 0 ? -1 : 1), mX, 0, mZ);
|
net.minecraft.client.particle.EntitySmokeFX fx = new net.minecraft.client.particle.EntitySmokeFX(world, ix + ox * (i == 0 ? -1 : 1), iy, iz + oz * (i == 0 ? -1 : 1), mX, 0, mZ);
|
||||||
float scale = 0.5F;
|
float scale = 0.5F;
|
||||||
ReflectionHelper.setPrivateValue(net.minecraft.client.particle.EntitySmokeFX.class, (net.minecraft.client.particle.EntitySmokeFX)fx, scale, "smokeParticleScale", "field_70587_a");
|
ReflectionHelper.setPrivateValue(net.minecraft.client.particle.EntitySmokeFX.class, fx, scale, "smokeParticleScale", "field_70587_a");
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("jetpack_bj".equals(type)) {
|
case "jetpack_bj": {
|
||||||
|
|
||||||
if(particleSetting == 2)
|
if(particleSetting == 2)
|
||||||
return;
|
return;
|
||||||
@ -1375,9 +1374,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
Minecraft.getMinecraft().effectRenderer.addEffect(dust1);
|
Minecraft.getMinecraft().effectRenderer.addEffect(dust1);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(dust2);
|
Minecraft.getMinecraft().effectRenderer.addEffect(dust2);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("jetpack_dns".equals(type)) {
|
case "jetpack_dns": {
|
||||||
|
|
||||||
if(particleSetting == 2)
|
if(particleSetting == 2)
|
||||||
return;
|
return;
|
||||||
@ -1427,9 +1427,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
Minecraft.getMinecraft().effectRenderer.addEffect(dust1);
|
Minecraft.getMinecraft().effectRenderer.addEffect(dust1);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(dust2);
|
Minecraft.getMinecraft().effectRenderer.addEffect(dust2);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("muke".equals(type)) {
|
case "muke": {
|
||||||
|
|
||||||
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y, z);
|
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y, z);
|
||||||
ParticleMukeFlash flash = new ParticleMukeFlash(man, world, x, y, z, data.getBoolean("balefire"));
|
ParticleMukeFlash flash = new ParticleMukeFlash(man, world, x, y, z, data.getBoolean("balefire"));
|
||||||
@ -1449,9 +1450,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
player.maxHurtTime = 15;
|
player.maxHurtTime = 15;
|
||||||
}
|
}
|
||||||
player.attackedAtYaw = 0F;
|
player.attackedAtYaw = 0F;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("tinytot".equals(type)) {
|
case "tinytot": {
|
||||||
|
|
||||||
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y, z);
|
ParticleMukeWave wave = new ParticleMukeWave(man, world, x, y, z);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(wave);
|
Minecraft.getMinecraft().effectRenderer.addEffect(wave);
|
||||||
@ -1488,39 +1490,43 @@ public class ClientProxy extends ServerProxy {
|
|||||||
player.attackedAtYaw = 0F;
|
player.attackedAtYaw = 0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("ufo".equals(type)) {
|
case "ufo": {
|
||||||
double motion = data.getDouble("motion");
|
double motion = data.getDouble("motion");
|
||||||
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y, z, rand.nextGaussian() * motion, 0, rand.nextGaussian() * motion);
|
ParticleMukeCloud cloud = new ParticleMukeCloud(man, world, x, y, z, rand.nextGaussian() * motion, 0, rand.nextGaussian() * motion);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("haze".equals(type)) {
|
case "haze": {
|
||||||
|
|
||||||
ParticleHaze fog = new ParticleHaze(man, world, x, y, z);
|
ParticleHaze fog = new ParticleHaze(man, world, x, y, z);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fog);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fog);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("plasmablast".equals(type)) {
|
case "plasmablast": {
|
||||||
|
|
||||||
ParticlePlasmaBlast cloud = new ParticlePlasmaBlast(man, world, x, y, z, data.getFloat("r"), data.getFloat("g"), data.getFloat("b"), data.getFloat("pitch"), data.getFloat("yaw"));
|
ParticlePlasmaBlast cloud = new ParticlePlasmaBlast(man, world, x, y, z, data.getFloat("r"), data.getFloat("g"), data.getFloat("b"), data.getFloat("pitch"), data.getFloat("yaw"));
|
||||||
cloud.setScale(data.getFloat("scale"));
|
cloud.setScale(data.getFloat("scale"));
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
Minecraft.getMinecraft().effectRenderer.addEffect(cloud);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("justTilt".equals(type)) {
|
case "justTilt": {
|
||||||
|
|
||||||
player.hurtTime = player.maxHurtTime = data.getInteger("time");
|
player.hurtTime = player.maxHurtTime = data.getInteger("time");
|
||||||
player.attackedAtYaw = 0F;
|
player.attackedAtYaw = 0F;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("properJolt".equals(type)) {
|
case "properJolt": {
|
||||||
|
|
||||||
player.hurtTime = data.getInteger("time");
|
player.hurtTime = data.getInteger("time");
|
||||||
player.maxHurtTime = data.getInteger("maxTime");
|
player.maxHurtTime = data.getInteger("maxTime");
|
||||||
player.attackedAtYaw = 0F;
|
player.attackedAtYaw = 0F;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("sweat".equals(type)) {
|
case "sweat": {
|
||||||
|
|
||||||
Entity e = world.getEntityByID(data.getInteger("entity"));
|
Entity e = world.getEntityByID(data.getInteger("entity"));
|
||||||
Block b = Block.getBlockById(data.getInteger("block"));
|
Block b = Block.getBlockById(data.getInteger("block"));
|
||||||
@ -1541,9 +1547,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("vomit".equals(type)) {
|
case "vomit": {
|
||||||
|
|
||||||
Entity e = world.getEntityByID(data.getInteger("entity"));
|
Entity e = world.getEntityByID(data.getInteger("entity"));
|
||||||
int count = data.getInteger("count") / (particleSetting + 1);
|
int count = data.getInteger("count") / (particleSetting + 1);
|
||||||
@ -1577,9 +1584,10 @@ public class ClientProxy extends ServerProxy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("radiation".equals(type)) {
|
case "radiation": {
|
||||||
|
|
||||||
for(int i = 0; i < data.getInteger("count"); i++) {
|
for(int i = 0; i < data.getInteger("count"); i++) {
|
||||||
|
|
||||||
@ -1593,36 +1601,23 @@ public class ClientProxy extends ServerProxy {
|
|||||||
flash.setVelocity(rand.nextGaussian(), rand.nextGaussian(), rand.nextGaussian());
|
flash.setVelocity(rand.nextGaussian(), rand.nextGaussian(), rand.nextGaussian());
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(flash);
|
Minecraft.getMinecraft().effectRenderer.addEffect(flash);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("schrabfog".equals(type)) {
|
case "schrabfog": {
|
||||||
|
|
||||||
EntityAuraFX flash = new EntityAuraFX(world, x, y, z, 0, 0, 0);
|
EntityAuraFX flash = new EntityAuraFX(world, x, y, z, 0, 0, 0);
|
||||||
flash.setRBGColorF(0F, 1F, 1F);
|
flash.setRBGColorF(0F, 1F, 1F);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(flash);
|
Minecraft.getMinecraft().effectRenderer.addEffect(flash);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("hadron".equals(type)) {
|
case "hadron": Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z)); break;
|
||||||
|
case "rift": Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRift(man, world, x, y, z)); break;
|
||||||
|
case "rbmkflame": Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKFlame(man, world, x, y, z, data.getInteger("maxAge"))); break;
|
||||||
|
case "rbmkmush": Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKMush(man, world, x, y, z, data.getFloat("scale"))); break;
|
||||||
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z));
|
case "tower": {
|
||||||
}
|
|
||||||
|
|
||||||
if("rift".equals(type)) {
|
|
||||||
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRift(man, world, x, y, z));
|
|
||||||
}
|
|
||||||
|
|
||||||
if("rbmkflame".equals(type)) {
|
|
||||||
int maxAge = data.getInteger("maxAge");
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKFlame(man, world, x, y, z, maxAge));
|
|
||||||
}
|
|
||||||
|
|
||||||
if("rbmkmush".equals(type)) {
|
|
||||||
float scale = data.getFloat("scale");
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleRBMKMush(man, world, x, y, z, scale));
|
|
||||||
}
|
|
||||||
|
|
||||||
if("tower".equals(type)) {
|
|
||||||
if(particleSetting == 0 || (particleSetting == 1 && rand.nextBoolean())) {
|
if(particleSetting == 0 || (particleSetting == 1 && rand.nextBoolean())) {
|
||||||
ParticleCoolingTower fx = new ParticleCoolingTower(man, world, x, y, z);
|
ParticleCoolingTower fx = new ParticleCoolingTower(man, world, x, y, z);
|
||||||
fx.setLift(data.getFloat("lift"));
|
fx.setLift(data.getFloat("lift"));
|
||||||
@ -1637,17 +1632,22 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
Minecraft.getMinecraft().effectRenderer.addEffect(fx);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("deadleaf".equals(type)) {
|
case "deadleaf": {
|
||||||
if(particleSetting == 0 || (particleSetting == 1 && rand.nextBoolean()))
|
if(particleSetting == 0 || (particleSetting == 1 && rand.nextBoolean()))
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleDeadLeaf(man, world, x, y, z));
|
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleDeadLeaf(man, world, x, y, z));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("anim".equals(type)) {
|
case "anim": {
|
||||||
|
|
||||||
/* crucible deploy */
|
/* crucible deploy */
|
||||||
if("crucible".equals(data.getString("mode")) && player.getHeldItem() != null) {
|
switch (data.getString("mode"))
|
||||||
|
{
|
||||||
|
case "crucible":
|
||||||
|
if(player.getHeldItem() != null) {
|
||||||
|
|
||||||
BusAnimation animation = new BusAnimation()
|
BusAnimation animation = new BusAnimation()
|
||||||
.addBus("GUARD_ROT", new BusAnimationSequence()
|
.addBus("GUARD_ROT", new BusAnimationSequence()
|
||||||
@ -1657,9 +1657,9 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
/* crucible swing */
|
/* crucible swing */
|
||||||
if("cSwing".equals(data.getString("mode"))) {
|
case "cSwing": {
|
||||||
|
|
||||||
if(HbmAnimations.getRelevantTransformation("SWING_ROT")[0] == 0) {
|
if(HbmAnimations.getRelevantTransformation("SWING_ROT")[0] == 0) {
|
||||||
|
|
||||||
@ -1679,10 +1679,13 @@ public class ClientProxy extends ServerProxy {
|
|||||||
|
|
||||||
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* chainsaw swing */
|
/* chainsaw swing */
|
||||||
if("sSwing".equals(data.getString("mode")) || "lSwing".equals(data.getString("mode"))) { //temp for lance
|
case "sSwing":
|
||||||
|
case "lSwing":
|
||||||
|
{ //temp for lance
|
||||||
|
|
||||||
int forward = 150;
|
int forward = 150;
|
||||||
int sideways = 100;
|
int sideways = 100;
|
||||||
@ -1725,21 +1728,27 @@ public class ClientProxy extends ServerProxy {
|
|||||||
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
HbmAnimations.hotbar[player.inventory.currentItem] = new Animation(player.getHeldItem().getItem().getUnlocalizedName(), System.currentTimeMillis(), animation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("tau".equals(type)) {
|
case "tau": {
|
||||||
|
|
||||||
for(int i = 0; i < data.getByte("count"); i++)
|
for(int i = 0; i < data.getByte("count"); i++)
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleSpark(world, x, y, z, rand.nextGaussian() * 0.05, 0.05, rand.nextGaussian() * 0.05));
|
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleSpark(world, x, y, z, rand.nextGaussian() * 0.05, 0.05, rand.nextGaussian() * 0.05));
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z));
|
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleHadron(man, world, x, y, z));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("vanish".equals(type)) {
|
case "vanish": {
|
||||||
int ent = data.getInteger("ent");
|
int ent = data.getInteger("ent");
|
||||||
this.vanish(ent);
|
this.vanish(ent);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("giblets".equals(type)) {
|
case "giblets": {
|
||||||
int ent = data.getInteger("ent");
|
int ent = data.getInteger("ent");
|
||||||
this.vanish(ent);
|
this.vanish(ent);
|
||||||
Entity e = world.getEntityByID(ent);
|
Entity e = world.getEntityByID(ent);
|
||||||
@ -1766,48 +1775,48 @@ public class ClientProxy extends ServerProxy {
|
|||||||
for(int i = 0; i < count; i++) {
|
for(int i = 0; i < count; i++) {
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult));
|
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleGiblet(man, world, x, y, z, rand.nextGaussian() * 0.25 * mult, rand.nextDouble() * mult, rand.nextGaussian() * 0.25 * mult));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
case "amat": Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleAmatFlash(world, x, y, z, data.getFloat("scale"))); break;
|
||||||
|
|
||||||
if("amat".equals(type)) {
|
case "debug": {
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(new ParticleAmatFlash(world, x, y, z, data.getFloat("scale")));
|
|
||||||
}
|
|
||||||
|
|
||||||
if("debug".equals(type)) {
|
|
||||||
String t = data.getString("text");
|
String t = data.getString("text");
|
||||||
int color = data.getInteger("color");
|
int color = data.getInteger("color");
|
||||||
float scale = data.getFloat("scale");
|
float scale = data.getFloat("scale");
|
||||||
ParticleText text = new ParticleText(world, x, y, z, color, t);
|
ParticleText text = new ParticleText(world, x, y, z, color, t);
|
||||||
text.multipleParticleScaleBy(scale);
|
text.multipleParticleScaleBy(scale);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(text);
|
Minecraft.getMinecraft().effectRenderer.addEffect(text);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("network".equals(type)) {
|
case "network": {
|
||||||
ParticleDebug debug = null;
|
ParticleDebug debug = null;
|
||||||
double mX = data.getDouble("mX");
|
double mX = data.getDouble("mX");
|
||||||
double mY = data.getDouble("mY");
|
double mY = data.getDouble("mY");
|
||||||
double mZ = data.getDouble("mZ");
|
double mZ = data.getDouble("mZ");
|
||||||
|
switch (data.getString("mode"))
|
||||||
if("power".equals(data.getString("mode"))) {
|
{
|
||||||
debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ);
|
case "power": debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ); break;
|
||||||
}
|
case "fluid": debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ, data.getInteger("color")); break;
|
||||||
if("fluid".equals(data.getString("mode"))) {
|
default: break;
|
||||||
int color = data.getInteger("color");
|
|
||||||
debug = new ParticleDebug(man, world, x, y, z, mX, mY, mZ, color);
|
|
||||||
}
|
}
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(debug);
|
Minecraft.getMinecraft().effectRenderer.addEffect(debug);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if("gasfire".equals(type)) {
|
case "gasfire": {
|
||||||
double mX = data.getDouble("mX");
|
double mX = data.getDouble("mX");
|
||||||
double mY = data.getDouble("mY");
|
double mY = data.getDouble("mY");
|
||||||
double mZ = data.getDouble("mZ");
|
double mZ = data.getDouble("mZ");
|
||||||
float scale = data.getFloat("scale");
|
float scale = data.getFloat("scale");
|
||||||
ParticleGasFlame text = new ParticleGasFlame(world, x, y, z, mX, mY, mZ, scale > 0 ? scale : 6.5F);
|
ParticleGasFlame text = new ParticleGasFlame(world, x, y, z, mX, mY, mZ, scale > 0 ? scale : 6.5F);
|
||||||
Minecraft.getMinecraft().effectRenderer.addEffect(text);
|
Minecraft.getMinecraft().effectRenderer.addEffect(text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashMap<Integer, Long> vanished = new HashMap();
|
private final HashMap<Integer, Long> vanished = new HashMap<Integer, Long>();
|
||||||
|
|
||||||
public void vanish(int ent) {
|
public void vanish(int ent) {
|
||||||
vanished.put(ent, System.currentTimeMillis() + 2000);
|
vanished.put(ent, System.currentTimeMillis() + 2000);
|
||||||
@ -1853,9 +1862,9 @@ public class ClientProxy extends ServerProxy {
|
|||||||
public void displayTooltip(String msg, int time, int id) {
|
public void displayTooltip(String msg, int time, int id) {
|
||||||
|
|
||||||
if(id != 0)
|
if(id != 0)
|
||||||
this.theInfoSystem.push(new InfoEntry(msg, time), id);
|
RenderInfoSystem.push(new InfoEntry(msg, time), id);
|
||||||
else
|
else
|
||||||
this.theInfoSystem.push(new InfoEntry(msg, time));
|
RenderInfoSystem.push(new InfoEntry(msg, time));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1872,9 +1881,9 @@ public class ClientProxy extends ServerProxy {
|
|||||||
case CRANE_LEFT: return HbmKeybinds.craneLeftKey.getIsKeyPressed();
|
case CRANE_LEFT: return HbmKeybinds.craneLeftKey.getIsKeyPressed();
|
||||||
case CRANE_RIGHT: return HbmKeybinds.craneRightKey.getIsKeyPressed();
|
case CRANE_RIGHT: return HbmKeybinds.craneRightKey.getIsKeyPressed();
|
||||||
case CRANE_LOAD: return HbmKeybinds.craneLoadKey.getIsKeyPressed();
|
case CRANE_LOAD: return HbmKeybinds.craneLoadKey.getIsKeyPressed();
|
||||||
|
default: return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -1886,13 +1895,15 @@ public class ClientProxy extends ServerProxy {
|
|||||||
public void openLink(String url) {
|
public void openLink(String url) {
|
||||||
try {
|
try {
|
||||||
Desktop.getDesktop().browse(new URI(url));
|
Desktop.getDesktop().browse(new URI(url));
|
||||||
} catch (Exception e) { }
|
} catch (Exception e) {
|
||||||
|
MainRegistry.logger.catching(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getSubItems(ItemStack stack) {
|
public List<ItemStack> getSubItems(ItemStack stack) {
|
||||||
|
|
||||||
List<ItemStack> list = new ArrayList();
|
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||||
stack.getItem().getSubItems(stack.getItem(), stack.getItem().getCreativeTab(), list);
|
stack.getItem().getSubItems(stack.getItem(), stack.getItem().getCreativeTab(), list);
|
||||||
for(ItemStack sta : list) {
|
for(ItemStack sta : list) {
|
||||||
sta.stackSize = stack.stackSize;
|
sta.stackSize = stack.stackSize;
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class ServerProxy {
|
public abstract class ServerProxy {
|
||||||
|
|
||||||
//sort by estimated time of display. longer lasting ones should be sorted at the top.
|
//sort by estimated time of display. longer lasting ones should be sorted at the top.
|
||||||
public static final int ID_DUCK = 0;
|
public static final int ID_DUCK = 0;
|
||||||
@ -28,50 +28,46 @@ public class ServerProxy {
|
|||||||
public static final int ID_GUN_MODE = 8;
|
public static final int ID_GUN_MODE = 8;
|
||||||
public static final int ID_GAS_HAZARD = 9;
|
public static final int ID_GAS_HAZARD = 9;
|
||||||
|
|
||||||
public void registerRenderInfo() { }
|
public abstract void registerRenderInfo();
|
||||||
public void registerTileEntitySpecialRenderer() { }
|
public abstract void registerTileEntitySpecialRenderer();
|
||||||
public void registerItemRenderer() { }
|
public abstract void registerItemRenderer();
|
||||||
public void registerEntityRenderer() { }
|
public abstract void registerEntityRenderer();
|
||||||
public void registerBlockRenderer() { }
|
public abstract void registerBlockRenderer();
|
||||||
|
|
||||||
public void particleControl(double x, double y, double z, int type) { }
|
public abstract void particleControl(double x, double y, double z, int type);
|
||||||
|
|
||||||
public void spawnParticle(double x, double y, double z, String type, float[] args) { }
|
public abstract void spawnParticle(double x, double y, double z, String type, float... args);
|
||||||
|
|
||||||
public void effectNT(NBTTagCompound data) { }
|
public abstract void effectNT(NBTTagCompound data);
|
||||||
|
|
||||||
public void registerMissileItems() { }
|
public abstract void registerMissileItems();
|
||||||
|
|
||||||
public AudioWrapper getLoopedSound(String sound, float x, float y, float z, float volume, float pitch) { return null; }
|
public abstract AudioWrapper getLoopedSound(String sound, float x, float y, float z, float volume, float pitch);
|
||||||
public AudioWrapper getLoopedSoundStartStop(World world, String sound, String start, String stop, float x, float y, float z, float volume, float pitch) { return null; }
|
public abstract AudioWrapper getLoopedSoundStartStop(World world, String sound, String start, String stop, float x, float y, float z, float volume, float pitch);
|
||||||
|
|
||||||
public void playSound(String sound, Object data) { }
|
public abstract void playSound(String sound, Object data);
|
||||||
|
|
||||||
public void displayTooltip(String msg, int id) {
|
public void displayTooltip(String msg, int id) {
|
||||||
displayTooltip(msg, 1000, id);
|
displayTooltip(msg, 1000, id);
|
||||||
}
|
}
|
||||||
public void displayTooltip(String msg, int time, int id) { }
|
public abstract void displayTooltip(String msg, int time, int id);
|
||||||
|
|
||||||
public boolean getIsKeyPressed(EnumKeybind key) {
|
public abstract boolean getIsKeyPressed(EnumKeybind key);
|
||||||
return false;
|
public abstract EntityPlayer me();
|
||||||
}
|
|
||||||
public EntityPlayer me() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isVanished(Entity e) {
|
public abstract boolean isVanished(Entity e);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void openLink(String url) { }
|
public abstract void openLink(String url);
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unused", "static-method" })
|
||||||
public SoundWrapper getTileSound(String sound, ISoundSourceTE source) {
|
public SoundWrapper getTileSound(String sound, ISoundSourceTE source) {
|
||||||
return new SoundWrapper();
|
return new SoundWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("static-method")
|
||||||
public List<ItemStack> getSubItems(ItemStack stack) {
|
public List<ItemStack> getSubItems(ItemStack stack) {
|
||||||
|
|
||||||
List<ItemStack> list = new ArrayList();
|
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||||
list.add(stack);
|
list.add(stack);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
97
src/main/java/com/hbm/particle/ParticleSpentCasing.java
Normal file
97
src/main/java/com/hbm/particle/ParticleSpentCasing.java
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
package com.hbm.particle;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.particle.SpentCasingConfig.CasingType;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.client.particle.EntityFX;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureManager;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public class ParticleSpentCasing extends EntityFX
|
||||||
|
{
|
||||||
|
private static final ResourceLocation TEXTURE_BRASS = new ResourceLocation(RefStrings.MODID, "textures/particle/casing_brass.png"),
|
||||||
|
TEXTURE_SHOTGUN = new ResourceLocation(RefStrings.MODID, "textures/particle/casing_shotgun.png"),
|
||||||
|
TEXTURE_AR2 = new ResourceLocation(RefStrings.MODID, "textures/particle/casing_ar2.png");
|
||||||
|
|
||||||
|
private final TextureManager textureManager;
|
||||||
|
|
||||||
|
private final float momentumPitch, momentumYaw;
|
||||||
|
private final CasingType casingType;
|
||||||
|
public ParticleSpentCasing(TextureManager textureManager, World world, double x, double y, double z, double mx, double my, double mz, CasingType casingType, float momentumPitch, float momentumYaw)
|
||||||
|
{
|
||||||
|
super(world, x, y, z, mx, my, mz);
|
||||||
|
particleMaxAge = 120;
|
||||||
|
this.textureManager = textureManager;
|
||||||
|
this.casingType = casingType;
|
||||||
|
this.momentumPitch = momentumPitch;
|
||||||
|
this.momentumYaw = momentumYaw;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFXLayer()
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate()
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
super.onUpdate();
|
||||||
|
|
||||||
|
prevRotationPitch = rotationPitch;
|
||||||
|
prevRotationYaw = rotationYaw;
|
||||||
|
|
||||||
|
if (!onGround)
|
||||||
|
{
|
||||||
|
rotationPitch += momentumPitch;
|
||||||
|
rotationYaw += momentumYaw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderParticle(
|
||||||
|
Tessellator tessellator, float interp, float x, float y, float z,
|
||||||
|
float tx, float tz
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
super.renderParticle(tessellator, interp, x, y, z, tx, tz);
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
final ResourceLocation texture;
|
||||||
|
switch (casingType)
|
||||||
|
{
|
||||||
|
case AR2: texture = TEXTURE_AR2; break;
|
||||||
|
case BRASS: texture = TEXTURE_BRASS; break;
|
||||||
|
case SHOTGUN: texture = TEXTURE_SHOTGUN; break;
|
||||||
|
default: throw new IllegalStateException("CasingType [" + casingType + "] is not recognized, cannot render spent casing!");
|
||||||
|
}
|
||||||
|
textureManager.bindTexture(texture);
|
||||||
|
|
||||||
|
final float scale = particleScale * 0.1f,
|
||||||
|
xInterp = (float) (prevPosX + (posX - prevPosX) * interp - interpPosX),
|
||||||
|
yInterp = (float) (prevPosY + (posY - prevPosY) * interp - interpPosY),
|
||||||
|
zInterp = (float) (prevPosZ + (posZ - prevPosZ) * interp - interpPosZ);
|
||||||
|
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setNormal(0, 1, 0);
|
||||||
|
tessellator.setBrightness(240);
|
||||||
|
tessellator.setColorRGBA_F(particleRed, particleGreen, particleBlue, particleAlpha);
|
||||||
|
tessellator.addVertexWithUV(xInterp - x * scale - tx * scale, yInterp - y, zInterp - z * scale - tz * scale, 0, 0);
|
||||||
|
tessellator.addVertexWithUV(xInterp - x * scale + tx * scale, yInterp + y, zInterp - z * scale + tz * scale, 0, 1);
|
||||||
|
tessellator.addVertexWithUV(xInterp + x * scale + tx * scale, yInterp + y, zInterp + z * scale + tz * scale, 1, 1);
|
||||||
|
tessellator.addVertexWithUV(xInterp + x * scale - tx * scale, yInterp - y, zInterp + z * scale - tz * scale, 1, 0);
|
||||||
|
tessellator.draw();
|
||||||
|
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
200
src/main/java/com/hbm/particle/SpentCasingConfig.java
Normal file
200
src/main/java/com/hbm/particle/SpentCasingConfig.java
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
package com.hbm.particle;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class SpentCasingConfig implements Cloneable
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum CasingType
|
||||||
|
{
|
||||||
|
/**The typical ejected type. Most pistols, rifles, and even cannons will likely use it.**/
|
||||||
|
BRASS,
|
||||||
|
/**Shotgun shells.**/
|
||||||
|
SHOTGUN,
|
||||||
|
/**AR2 pulse rifle plugs.**/
|
||||||
|
AR2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**Change position of the ejecting shell.**/
|
||||||
|
private final double offsetX, offsetY, offsetZ;
|
||||||
|
/**Set initial motion after ejecting.**/
|
||||||
|
private final double motionX, motionY, motionZ;
|
||||||
|
/**Rescale the sprite to match the approximate scale of the rounds.**/
|
||||||
|
private final float stretchX, stretchY;
|
||||||
|
/**Multipliers for random pitch and yaw.**/
|
||||||
|
private final float pitchFactor, yawFactor;
|
||||||
|
/**Overrides for the sprite colors.**/
|
||||||
|
private final int redOverride, greenOverride, blueOverride;
|
||||||
|
/**Whether or not to override the default sprite color scheme.**/
|
||||||
|
private final boolean overrideColor;
|
||||||
|
/**The type of casing.**/
|
||||||
|
private final CasingType casingType;
|
||||||
|
/**Amount of casings to spawn per event. Default 1.**/
|
||||||
|
private final int casingAmount;
|
||||||
|
/**If the casing(s) should be spawned after reloading, instead of after firing.**/
|
||||||
|
private final boolean afterReload;
|
||||||
|
public SpentCasingConfig(
|
||||||
|
double offsetX, double offsetY, double offsetZ, double motionX, double motionY, double motionZ,
|
||||||
|
float stretchX, float stretchY, float pitchFactor, float yawFactor, int redOverride, int greenOverride,
|
||||||
|
int blueOverride, boolean overrideColor, CasingType casingType, int casingAmount, boolean afterReload
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.offsetX = offsetX;
|
||||||
|
this.offsetY = offsetY;
|
||||||
|
this.offsetZ = offsetZ;
|
||||||
|
this.motionX = motionX;
|
||||||
|
this.motionY = motionY;
|
||||||
|
this.motionZ = motionZ;
|
||||||
|
this.stretchX = stretchX;
|
||||||
|
this.stretchY = stretchY;
|
||||||
|
this.pitchFactor = pitchFactor;
|
||||||
|
this.yawFactor = yawFactor;
|
||||||
|
this.redOverride = redOverride;
|
||||||
|
this.greenOverride = greenOverride;
|
||||||
|
this.blueOverride = blueOverride;
|
||||||
|
this.overrideColor = overrideColor;
|
||||||
|
this.casingType = casingType;
|
||||||
|
this.casingAmount = casingAmount;
|
||||||
|
this.afterReload = afterReload;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply these settings to an initialized casing entity
|
||||||
|
* @param entity The entity to apply the settings defined by this object
|
||||||
|
*/
|
||||||
|
public void applyToEntity(ParticleSpentCasing entity)
|
||||||
|
{
|
||||||
|
entity.setPosition((entity.posX - Math.cos(entity.rotationYaw / 180 * Math.PI)) + offsetX,
|
||||||
|
(entity.posY - 0.1) + offsetY,
|
||||||
|
(entity.posZ - Math.sin(entity.rotationYaw / 180 * Math.PI) + offsetZ));
|
||||||
|
|
||||||
|
entity.setRBGColorF((float) redOverride / 255, (float) greenOverride / 255, (float) blueOverride / 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getOffsetX()
|
||||||
|
{
|
||||||
|
return offsetX;
|
||||||
|
}
|
||||||
|
public double getOffsetY()
|
||||||
|
{
|
||||||
|
return offsetY;
|
||||||
|
}
|
||||||
|
public double getOffsetZ()
|
||||||
|
{
|
||||||
|
return offsetZ;
|
||||||
|
}
|
||||||
|
public double getMotionX()
|
||||||
|
{
|
||||||
|
return motionX;
|
||||||
|
}
|
||||||
|
public double getMotionY()
|
||||||
|
{
|
||||||
|
return motionY;
|
||||||
|
}
|
||||||
|
public double getMotionZ()
|
||||||
|
{
|
||||||
|
return motionZ;
|
||||||
|
}
|
||||||
|
public float getStretchX()
|
||||||
|
{
|
||||||
|
return stretchX;
|
||||||
|
}
|
||||||
|
public float getStretchY()
|
||||||
|
{
|
||||||
|
return stretchY;
|
||||||
|
}
|
||||||
|
public float getPitchFactor()
|
||||||
|
{
|
||||||
|
return pitchFactor;
|
||||||
|
}
|
||||||
|
public float getYawFactor()
|
||||||
|
{
|
||||||
|
return yawFactor;
|
||||||
|
}
|
||||||
|
public int getRedOverride()
|
||||||
|
{
|
||||||
|
return redOverride;
|
||||||
|
}
|
||||||
|
public int getGreenOverride()
|
||||||
|
{
|
||||||
|
return greenOverride;
|
||||||
|
}
|
||||||
|
public int getBlueOverride()
|
||||||
|
{
|
||||||
|
return blueOverride;
|
||||||
|
}
|
||||||
|
public boolean isOverrideColor()
|
||||||
|
{
|
||||||
|
return overrideColor;
|
||||||
|
}
|
||||||
|
public CasingType getCasingType()
|
||||||
|
{
|
||||||
|
return casingType;
|
||||||
|
}
|
||||||
|
public int getCasingAmount()
|
||||||
|
{
|
||||||
|
return casingAmount;
|
||||||
|
}
|
||||||
|
public boolean isAfterReload()
|
||||||
|
{
|
||||||
|
return afterReload;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Objects.hash(afterReload, blueOverride, casingAmount, casingType, greenOverride, motionX, motionY, motionZ,
|
||||||
|
offsetX, offsetY, offsetZ, overrideColor, pitchFactor, redOverride, stretchX, stretchY, yawFactor);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj)
|
||||||
|
{
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (!(obj instanceof SpentCasingConfig))
|
||||||
|
return false;
|
||||||
|
final SpentCasingConfig other = (SpentCasingConfig) obj;
|
||||||
|
return afterReload == other.afterReload && blueOverride == other.blueOverride
|
||||||
|
&& casingAmount == other.casingAmount && casingType == other.casingType
|
||||||
|
&& greenOverride == other.greenOverride
|
||||||
|
&& Double.doubleToLongBits(motionX) == Double.doubleToLongBits(other.motionX)
|
||||||
|
&& Double.doubleToLongBits(motionY) == Double.doubleToLongBits(other.motionY)
|
||||||
|
&& Double.doubleToLongBits(motionZ) == Double.doubleToLongBits(other.motionZ)
|
||||||
|
&& Double.doubleToLongBits(offsetX) == Double.doubleToLongBits(other.offsetX)
|
||||||
|
&& Double.doubleToLongBits(offsetY) == Double.doubleToLongBits(other.offsetY)
|
||||||
|
&& Double.doubleToLongBits(offsetZ) == Double.doubleToLongBits(other.offsetZ)
|
||||||
|
&& overrideColor == other.overrideColor
|
||||||
|
&& Float.floatToIntBits(pitchFactor) == Float.floatToIntBits(other.pitchFactor)
|
||||||
|
&& redOverride == other.redOverride
|
||||||
|
&& Float.floatToIntBits(stretchX) == Float.floatToIntBits(other.stretchX)
|
||||||
|
&& Float.floatToIntBits(stretchY) == Float.floatToIntBits(other.stretchY)
|
||||||
|
&& Float.floatToIntBits(yawFactor) == Float.floatToIntBits(other.yawFactor);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
final StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("SpentCasingConfig [offsetX=").append(offsetX).append(", offsetY=").append(offsetY)
|
||||||
|
.append(", offsetZ=").append(offsetZ).append(", motionX=").append(motionX).append(", motionY=")
|
||||||
|
.append(motionY).append(", motionZ=").append(motionZ).append(", stretchX=").append(stretchX)
|
||||||
|
.append(", stretchY=").append(stretchY).append(", pitchFactor=").append(pitchFactor)
|
||||||
|
.append(", yawFactor=").append(yawFactor).append(", redOverride=").append(redOverride)
|
||||||
|
.append(", greenOverride=").append(greenOverride).append(", blueOverride=").append(blueOverride)
|
||||||
|
.append(", overrideColor=").append(overrideColor).append(", casingType=").append(casingType)
|
||||||
|
.append(", casingAmount=").append(casingAmount).append(", afterReload=").append(afterReload)
|
||||||
|
.append(']');
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public SpentCasingConfig clone()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return (SpentCasingConfig) super.clone();
|
||||||
|
} catch (CloneNotSupportedException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
return new SpentCasingConfig(offsetX, offsetY, offsetZ, motionX, motionY, motionZ, stretchX, stretchY, pitchFactor, yawFactor, redOverride, greenOverride, blueOverride, overrideColor, casingType, casingAmount, afterReload);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
293
src/main/java/com/hbm/particle/SpentCasingConfigBuilder.java
Normal file
293
src/main/java/com/hbm/particle/SpentCasingConfigBuilder.java
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
package com.hbm.particle;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import com.hbm.particle.SpentCasingConfig.CasingType;
|
||||||
|
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
|
||||||
|
public class SpentCasingConfigBuilder implements Cloneable
|
||||||
|
{
|
||||||
|
/**Change position of the ejecting shell.**/
|
||||||
|
private double offsetX, offsetY, offsetZ;
|
||||||
|
/**Set initial motion after ejecting.**/
|
||||||
|
private double motionX, motionY, motionZ;
|
||||||
|
/**Rescale the sprite to match the approximate scale of the rounds.**/
|
||||||
|
private float stretchX, stretchY;
|
||||||
|
/**Multipliers for random pitch and yaw.**/
|
||||||
|
private float pitchFactor = 1, yawFactor = 1;
|
||||||
|
/**Overrides for the sprite colors.**/
|
||||||
|
private int redOverride, greenOverride, blueOverride;
|
||||||
|
/**Whether or not to override the default sprite color scheme.**/
|
||||||
|
private boolean overrideColor;
|
||||||
|
/**The type of casing.**/
|
||||||
|
private CasingType casingType;
|
||||||
|
/**Amount of casings to spawn per event. Default 1.**/
|
||||||
|
private int casingAmount = 1;
|
||||||
|
/**If the casing(s) should be spawned after reloading, instead of after firing.**/
|
||||||
|
private boolean afterReload;
|
||||||
|
public SpentCasingConfigBuilder(CasingType casingType, boolean overrideColor)
|
||||||
|
{
|
||||||
|
this.casingType = casingType;
|
||||||
|
this.overrideColor = overrideColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getOffsetX()
|
||||||
|
{
|
||||||
|
return offsetX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setOffsetX(double offsetX)
|
||||||
|
{
|
||||||
|
this.offsetX = offsetX;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getOffsetY()
|
||||||
|
{
|
||||||
|
return offsetY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setOffsetY(double offsetY)
|
||||||
|
{
|
||||||
|
this.offsetY = offsetY;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getOffsetZ()
|
||||||
|
{
|
||||||
|
return offsetZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setOffsetZ(double offsetZ)
|
||||||
|
{
|
||||||
|
this.offsetZ = offsetZ;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMotionX()
|
||||||
|
{
|
||||||
|
return motionX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setMotionX(double motionX)
|
||||||
|
{
|
||||||
|
this.motionX = motionX;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMotionY()
|
||||||
|
{
|
||||||
|
return motionY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setMotionY(double motionY)
|
||||||
|
{
|
||||||
|
this.motionY = motionY;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMotionZ()
|
||||||
|
{
|
||||||
|
return motionZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setMotionZ(double motionZ)
|
||||||
|
{
|
||||||
|
this.motionZ = motionZ;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getStretchX()
|
||||||
|
{
|
||||||
|
return stretchX;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setStretchX(float stretchX)
|
||||||
|
{
|
||||||
|
this.stretchX = stretchX;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getStretchY()
|
||||||
|
{
|
||||||
|
return stretchY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setStretchY(float stretchY)
|
||||||
|
{
|
||||||
|
this.stretchY = stretchY;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getPitchFactor()
|
||||||
|
{
|
||||||
|
return pitchFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setPitchFactor(float pitchFactor)
|
||||||
|
{
|
||||||
|
this.pitchFactor = pitchFactor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getYawFactor()
|
||||||
|
{
|
||||||
|
return yawFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setYawFactor(float yawFactor)
|
||||||
|
{
|
||||||
|
this.yawFactor = yawFactor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRedOverride()
|
||||||
|
{
|
||||||
|
return redOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setRedOverride(int redOverride)
|
||||||
|
{
|
||||||
|
this.redOverride = MathHelper.clamp_int(redOverride, 0, 255);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGreenOverride()
|
||||||
|
{
|
||||||
|
return greenOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setGreenOverride(int greenOverride)
|
||||||
|
{
|
||||||
|
this.greenOverride = MathHelper.clamp_int(greenOverride, 0, 255);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBlueOverride()
|
||||||
|
{
|
||||||
|
return blueOverride;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setBlueOverride(int blueOverride)
|
||||||
|
{
|
||||||
|
this.blueOverride = MathHelper.clamp_int(blueOverride, 0, 255);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOverrideColor()
|
||||||
|
{
|
||||||
|
return overrideColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setOverrideColor(boolean overrideColor)
|
||||||
|
{
|
||||||
|
this.overrideColor = overrideColor;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CasingType getCasingType()
|
||||||
|
{
|
||||||
|
return casingType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setCasingType(CasingType casingType)
|
||||||
|
{
|
||||||
|
this.casingType = casingType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCasingAmount()
|
||||||
|
{
|
||||||
|
return casingAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setCasingAmount(int casingAmount)
|
||||||
|
{
|
||||||
|
this.casingAmount = casingAmount;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAfterReload()
|
||||||
|
{
|
||||||
|
return afterReload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfigBuilder setAfterReload(boolean afterReload)
|
||||||
|
{
|
||||||
|
this.afterReload = afterReload;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SpentCasingConfig build()
|
||||||
|
{
|
||||||
|
return new SpentCasingConfig(offsetX, offsetY, offsetZ, motionX, motionY, motionZ, stretchX, stretchY, pitchFactor, yawFactor, redOverride, greenOverride, blueOverride, overrideColor, casingType, casingAmount, afterReload);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
return Objects.hash(afterReload, blueOverride, casingAmount, casingType, greenOverride, motionX, motionY,
|
||||||
|
motionZ, offsetX, offsetY, offsetZ, overrideColor, pitchFactor, redOverride, stretchX, stretchY,
|
||||||
|
yawFactor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj)
|
||||||
|
{
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (!(obj instanceof SpentCasingConfigBuilder))
|
||||||
|
return false;
|
||||||
|
final SpentCasingConfigBuilder other = (SpentCasingConfigBuilder) obj;
|
||||||
|
return afterReload == other.afterReload && blueOverride == other.blueOverride
|
||||||
|
&& casingAmount == other.casingAmount && casingType == other.casingType
|
||||||
|
&& greenOverride == other.greenOverride
|
||||||
|
&& Double.doubleToLongBits(motionX) == Double.doubleToLongBits(other.motionX)
|
||||||
|
&& Double.doubleToLongBits(motionY) == Double.doubleToLongBits(other.motionY)
|
||||||
|
&& Double.doubleToLongBits(motionZ) == Double.doubleToLongBits(other.motionZ)
|
||||||
|
&& Double.doubleToLongBits(offsetX) == Double.doubleToLongBits(other.offsetX)
|
||||||
|
&& Double.doubleToLongBits(offsetY) == Double.doubleToLongBits(other.offsetY)
|
||||||
|
&& Double.doubleToLongBits(offsetZ) == Double.doubleToLongBits(other.offsetZ)
|
||||||
|
&& overrideColor == other.overrideColor
|
||||||
|
&& Float.floatToIntBits(pitchFactor) == Float.floatToIntBits(other.pitchFactor)
|
||||||
|
&& redOverride == other.redOverride
|
||||||
|
&& Float.floatToIntBits(stretchX) == Float.floatToIntBits(other.stretchX)
|
||||||
|
&& Float.floatToIntBits(stretchY) == Float.floatToIntBits(other.stretchY)
|
||||||
|
&& Float.floatToIntBits(yawFactor) == Float.floatToIntBits(other.yawFactor);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
final StringBuilder builder = new StringBuilder();
|
||||||
|
builder.append("SpentCasingConfigBuilder [offsetX=").append(offsetX).append(", offsetY=").append(offsetY)
|
||||||
|
.append(", offsetZ=").append(offsetZ).append(", motionX=").append(motionX).append(", motionY=")
|
||||||
|
.append(motionY).append(", motionZ=").append(motionZ).append(", stretchX=").append(stretchX)
|
||||||
|
.append(", stretchY=").append(stretchY).append(", pitchFactor=").append(pitchFactor)
|
||||||
|
.append(", yawFactor=").append(yawFactor).append(", redOverride=").append(redOverride)
|
||||||
|
.append(", greenOverride=").append(greenOverride).append(", blueOverride=").append(blueOverride)
|
||||||
|
.append(", overrideColor=").append(overrideColor).append(", casingType=").append(casingType)
|
||||||
|
.append(", casingAmount=").append(casingAmount).append(", afterReload=").append(afterReload)
|
||||||
|
.append(']');
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SpentCasingConfigBuilder clone()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return (SpentCasingConfigBuilder) super.clone();
|
||||||
|
} catch (CloneNotSupportedException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
return new SpentCasingConfigBuilder(casingType, overrideColor).setBlueOverride(blueOverride)
|
||||||
|
.setCasingAmount(casingAmount).setGreenOverride(greenOverride).setMotionX(motionX)
|
||||||
|
.setMotionY(motionY).setMotionZ(motionZ).setOffsetX(offsetX).setOffsetY(offsetY)
|
||||||
|
.setOffsetZ(offsetZ).setPitchFactor(pitchFactor).setRedOverride(redOverride)
|
||||||
|
.setStretchX(stretchX).setStretchY(stretchY).setYawFactor(yawFactor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
BIN
src/main/resources/assets/hbm/textures/particle/casing_brass.png
Normal file
BIN
src/main/resources/assets/hbm/textures/particle/casing_brass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 633 B |
Binary file not shown.
|
After Width: | Height: | Size: 628 B |
BIN
src/main/resources/assets/hbm/textures/particle/casings.png
Normal file
BIN
src/main/resources/assets/hbm/textures/particle/casings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 773 B |
Loading…
x
Reference in New Issue
Block a user