New particles, tweaks to particle packets

This commit is contained in:
chylex committed 2014-08-06 13:44:09 +02:00
1 parent ba335acb3a
commit e9a9b6dd9b
48 files changed
+255 -224

No files matched your search

@@ -16,7 +16,7 @@ import chylex.hee.entity.block.EntityBlockTempleDragonEgg;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C20ParticleDragonEggTeleportation;
import chylex.hee.packets.client.C13ParticleDragonEggTeleportation;
import chylex.hee.system.achievements.AchievementManager;
import chylex.hee.system.savedata.ServerSavefile;
import chylex.hee.world.biome.BiomeDecoratorHardcoreEnd;
@@ -112,7 +112,7 @@ public class BlockDragonEggCustom extends BlockDragonEgg{
world.setBlock(xx,yy,zz,this,world.getBlockMetadata(x,y,z),2);
world.setBlockToAir(x,y,z);
PacketPipeline.sendToAllAround(world.provider.dimensionId,x,y,z,76D,new C20ParticleDragonEggTeleportation(x,y,z,xx,yy,zz));
PacketPipeline.sendToAllAround(world.provider.dimensionId,x,y,z,76D,new C13ParticleDragonEggTeleportation(x,y,z,xx,yy,zz));
for(EntityPlayer observer:ObservationUtil.getAllObservers(world,x+0.5D,y+0.5D,z+0.5D,12D))KnowledgeRegistrations.ENDER_DRAGON.tryUnlockFragment(observer,0.25F,new byte[]{ 16,17 });
return;
@@ -15,7 +15,7 @@ import net.minecraft.world.World;
import chylex.hee.entity.boss.EntityMiniBossFireFiend;
import chylex.hee.item.block.ItemBlockWithSubtypes.IBlockSubtypes;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C21ParticleIgneousRockFlame;
import chylex.hee.packets.client.C14ParticleIgneousRockFlame;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -61,7 +61,7 @@ public class BlockDungeonPuzzle extends Block implements IBlockSubtypes{
world.setBlockMetadataWithNotify(tx+offx[a],y,tz+offz[a],cmeta == metaUnlit?metaSpreadingLitN+a:metaSpreadingUnlitN+a,2);
world.scheduleBlockUpdate(tx+offx[a],y,tz+offz[a],this,8);
PacketPipeline.sendToAllAround(world.provider.dimensionId,tx+offx[a]+0.5D,y+0.5D,tz+offz[a]+0.5D,64D,new C21ParticleIgneousRockFlame(tx+offx[a]+0.5D,y+0.5D,tz+offz[a]+0.5D));
PacketPipeline.sendToAllAround(world.provider.dimensionId,tx+offx[a]+0.5D,y+0.5D,tz+offz[a]+0.5D,64D,new C14ParticleIgneousRockFlame(tx+offx[a]+0.5D,y+0.5D,tz+offz[a]+0.5D));
}
}
else{
@@ -72,7 +72,7 @@ public class BlockDungeonPuzzle extends Block implements IBlockSubtypes{
}
}
PacketPipeline.sendToAllAround(world.provider.dimensionId,tx+0.5D,y+0.5D,tz+0.5D,64D,new C21ParticleIgneousRockFlame(tx+0.5D,y+0.5D,tz+0.5D));
PacketPipeline.sendToAllAround(world.provider.dimensionId,tx+0.5D,y+0.5D,tz+0.5D,64D,new C14ParticleIgneousRockFlame(tx+0.5D,y+0.5D,tz+0.5D));
}
// update me
@@ -15,7 +15,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import chylex.hee.entity.fx.FXType;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.proxy.ModCommonProxy;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -34,7 +34,7 @@ public class BlockSpookyLeaves extends BlockLeaves{
@Override
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int fortune){
if (!world.isRemote){
PacketPipeline.sendToAllAround(world.provider.dimensionId,x+0.5D,y+0.5D,z+0.5D,64D,new C30Effect(FXType.SPOOKY_LEAVES_DECAY,x,y,z));
PacketPipeline.sendToAllAround(world.provider.dimensionId,x+0.5D,y+0.5D,z+0.5D,64D,new C20Effect(FXType.Basic.SPOOKY_LEAVES_DECAY,x,y,z));
}
}
@@ -23,7 +23,7 @@ import chylex.hee.mechanics.knowledge.data.UnlockResult;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C08PlaySound;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.system.util.DragonUtil;
import chylex.hee.system.util.MathUtil;
import cpw.mods.fml.relauncher.Side;
@@ -122,7 +122,7 @@ public class BlockSpookyLog extends Block{
if (world.getBlock(x,y+1,z) == this){
dropBlockAsItemWithChance(world,x,y+1,z,world.getBlockMetadata(x,y+1,z),chance,fortune);
PacketPipeline.sendToAllAround(world.provider.dimensionId,x+0.5D,y+0.5D,z+0.5D,64D,new C30Effect(FXType.SPOOKY_LOG_DECAY,x,y,z));
PacketPipeline.sendToAllAround(world.provider.dimensionId,x+0.5D,y+0.5D,z+0.5D,64D,new C20Effect(FXType.Basic.SPOOKY_LOG_DECAY,x,y,z));
world.setBlockToAir(x,y+1,z);
}
}
@@ -55,7 +55,7 @@ import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C01ParticleEndPortalCreation;
import chylex.hee.packets.client.C26SetPlayerVelocity;
import chylex.hee.packets.client.C06SetPlayerVelocity;
import chylex.hee.proxy.ModCommonProxy;
import chylex.hee.system.achievements.AchievementManager;
import chylex.hee.system.commands.DebugBoard;
@@ -530,7 +530,7 @@ public class EntityBossDragon extends EntityLiving implements IBossDisplayData,I
event.collidedEntity.motionZ = event.velocityZ;
if (entity instanceof EntityPlayer){
PacketPipeline.sendToPlayer((EntityPlayer)entity,new C26SetPlayerVelocity(event.velocityX,event.velocityY,event.velocityZ));
PacketPipeline.sendToPlayer((EntityPlayer)entity,new C06SetPlayerVelocity(event.velocityX,event.velocityY,event.velocityZ));
if (rand.nextInt(13) == 0){
for(EntityPlayer observer:ObservationUtil.getAllObservers(entity,100D))KnowledgeRegistrations.ENDER_DRAGON.tryUnlockFragment(observer,0.33F,new byte[]{ 0,2,5,6 });
}
@@ -22,7 +22,7 @@ import chylex.hee.item.ItemList;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C18CustomWeather;
import chylex.hee.packets.client.C05CustomWeather;
import chylex.hee.proxy.ModCommonProxy;
import chylex.hee.system.util.DragonUtil;
@@ -86,7 +86,7 @@ public class EntityBossEnderDemon extends EntityFlying implements IBossDisplayDa
EntityWeatherEffect bolt = new EntityWeatherLightningBoltDemon(worldObj,xx,yy,zz,this,false);
worldObj.weatherEffects.add(bolt);
PacketPipeline.sendToAllAround(bolt,512D,new C18CustomWeather(bolt,(byte)0));
PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
if (++lightningCounter >= 6)lightningTarget = null;
}
@@ -118,7 +118,7 @@ public class EntityBossEnderDemon extends EntityFlying implements IBossDisplayDa
EntityWeatherEffect bolt = new EntityWeatherLightningBoltDemon(worldObj,ix+0.5D,iy,iz+0.5D,this,false);
worldObj.addWeatherEffect(bolt);
PacketPipeline.sendToAllAround(bolt,512D,new C18CustomWeather(bolt,(byte)0));
PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
for(EntityPlayer observer:ObservationUtil.getAllObservers(this,120D))KnowledgeRegistrations.ENDER_DEMON.tryUnlockFragment(observer,0.22F,new byte[]{ 0,1,2 });
@@ -236,7 +236,7 @@ public class EntityBossEnderDemon extends EntityFlying implements IBossDisplayDa
if (deathTime < 81 && deathTime%10 == 0){
EntityWeatherEffect bolt = new EntityWeatherLightningBoltDemon(worldObj,posX,posY,posZ,this,false);
worldObj.weatherEffects.add(bolt);
PacketPipeline.sendToAllAround(bolt,512D,new C18CustomWeather(bolt,(byte)0));
PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
for(EntityPlayer observer:ObservationUtil.getAllObservers(this,120D)){
@@ -27,7 +27,7 @@ import chylex.hee.mechanics.essence.EssenceType;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C19ParticleFireFiendFlames;
import chylex.hee.packets.client.C12ParticleFireFiendFlames;
import chylex.hee.proxy.ModCommonProxy;
import chylex.hee.system.util.DragonUtil;
@@ -238,7 +238,7 @@ public class EntityMiniBossFireFiend extends EntityFlying implements IBossDispla
if (attackStage == STAGE_CREATING || attackStage == STAGE_SHOOTING){
for(float[] offset:fireballOffsets){
PacketPipeline.sendToAllAround(this,96D,new C19ParticleFireFiendFlames(this,target,offset,Byte.valueOf((byte)((60-fireballAttackTimer)>>2))));
PacketPipeline.sendToAllAround(this,96D,new C12ParticleFireFiendFlames(this,target,offset,Byte.valueOf((byte)((60-fireballAttackTimer)>>2))));
}
}
@@ -13,7 +13,7 @@ import chylex.hee.entity.fx.FXType;
import chylex.hee.entity.mob.EntityMobVampiricBat;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.system.util.DragonUtil;
import chylex.hee.system.util.MathUtil;
@@ -100,7 +100,7 @@ public class DragonAttackBloodlust extends DragonSpecialAttackBase{
}
enderman.setDead();
PacketPipeline.sendToAllAround(enderman,64D,new C30Effect(FXType.ENDERMAN_BLOODLUST_TRANSFORMATION,enderman));
PacketPipeline.sendToAllAround(enderman,64D,new C20Effect(FXType.Basic.ENDERMAN_BLOODLUST_TRANSFORMATION,enderman));
break;
}
}
@@ -14,7 +14,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public final class FXHandler{
private static final Random rand = new Random();
public static void handle(World world, EntityClientPlayerMP player, FXType fx, double x, double y, double z){
public static void handleBasic(World world, EntityClientPlayerMP player, FXType.Basic fx, double x, double y, double z){
switch(fx){
case ESSENCE_ALTAR_SMOKE:
for(int a = 0; a < 15; a++)world.spawnParticle("largesmoke",x+randCenter(0.5D),y+0.6D+rand.nextDouble()*0.25D,z+randCenter(0.5D),0D,0.15D,0D);
@@ -72,10 +72,40 @@ public final class FXHandler{
for(int a = 0; a < 80; a++)HardcoreEnderExpansion.fx.portalBig(world,x+randCenter(0.6D),y+rand.nextDouble()*3.2D,z+randCenter(0.6D),+randCenter(0.125D),rand.nextDouble()*0.2D-0.1D,+randCenter(0.125D));
break;
case LOUSE_ARMOR_HIT:
for(int a = 0; a < 10; a++)world.spawnParticle("magicCrit",x+randCenter(0.4D),y+rand.nextDouble()*0.45D,z+randCenter(0.4D),randCenter(0.2D),randCenter(0.2D),randCenter(0.2D));
break;
default:
}
}
public static void handleEntity(World world, EntityClientPlayerMP player, FXType.Entity fx, double x, double y, double z, float width, float height){
switch(fx){
case CHARM_CRITICAL:
for(int a = 0; a < 12; a++)world.spawnParticle("crit",x+randCenter(width),y+rand.nextDouble()*height,z+randCenter(width),randCenter(0.2D),randCenter(0.2D),randCenter(0.2D));
break;
case CHARM_WITCH:
for(int a = 0; a < 18; a++)world.spawnParticle("witchMagic",x+randCenter(width),y+rand.nextDouble()*height,z+randCenter(width),randCenter(0.1D),randCenter(0.1D),randCenter(0.1D));
break;
case CHARM_BLOCK_EFFECT:
for(int a = 0; a < 10; a++)world.spawnParticle("magicCrit",x+randCenter(width),y+rand.nextDouble()*height*1.4D,z+randCenter(width),randCenter(0.2D),randCenter(0.2D),randCenter(0.2D));
break;
case GEM_TELEPORT_FROM:
for(int a = 0; a < 20; a++)world.spawnParticle("largesmoke",x+randCenter(width*1.2D),y+rand.nextDouble()*height*0.9D,z+randCenter(width*1.2D),0D,0.04D,0D);
world.playSound(x,y+1D,z,"mob.endermen.portal",1.2F,rand.nextFloat()*0.05F+0.85F,false);
break;
case ORB_TRANSFORMATION:
for(int a = 0; a < 18; a++)world.spawnParticle("largesmoke",x+randCenter(width),y+0.1D+rand.nextDouble()*height,z+randCenter(width),0D,0D,0D);
world.playSound(x,y,z,"hardcoreenderexpansion:block.random.transform",1.4F,1F+rand.nextFloat()*0.2F,false);
break;
}
}
private static double randCenter(double mp){
return (rand.nextDouble()-rand.nextDouble())*mp;
}
+25 -12
View File
@@ -1,16 +1,29 @@
package chylex.hee.entity.fx;
public enum FXType{
ESSENCE_ALTAR_SMOKE,
LASER_BEAM_DESTROY,
SPOOKY_LOG_DECAY,
SPOOKY_LEAVES_DECAY,
GEM_LINK,
GEM_TELEPORT_TO,
ENDER_PEARL_FREEZE,
IGNEOUS_ROCK_MELT,
ENDERMAN_BLOODLUST_TRANSFORMATION,
ENDER_GUARDIAN_TELEPORT;
public final class FXType{
public enum Basic{
ESSENCE_ALTAR_SMOKE,
LASER_BEAM_DESTROY,
SPOOKY_LOG_DECAY,
SPOOKY_LEAVES_DECAY,
GEM_LINK,
GEM_TELEPORT_TO,
ENDER_PEARL_FREEZE,
IGNEOUS_ROCK_MELT,
ENDERMAN_BLOODLUST_TRANSFORMATION,
ENDER_GUARDIAN_TELEPORT,
LOUSE_ARMOR_HIT;
public static FXType.Basic[] values = values();
}
public static FXType[] values = values();
public enum Entity{
CHARM_CRITICAL,
CHARM_WITCH,
CHARM_BLOCK_EFFECT,
GEM_TELEPORT_FROM,
ORB_TRANSFORMATION;
public static FXType.Entity[] values = values();
}
}
@@ -19,7 +19,7 @@ import chylex.hee.entity.fx.FXType;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
public class EntityItemIgneousRock extends EntityItem{
private static final IdentityHashMap<Block,Block> blockTransformations = new IdentityHashMap<>();
@@ -92,7 +92,7 @@ public class EntityItemIgneousRock extends EntityItem{
else continue;
if (block.getMaterial() != Material.air){
PacketPipeline.sendToAllAround(this,64D,new C30Effect(FXType.IGNEOUS_ROCK_MELT,pos[0]+0.5D,pos[1]+0.5D,pos[2]+0.5D));
PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.IGNEOUS_ROCK_MELT,pos[0]+0.5D,pos[1]+0.5D,pos[2]+0.5D));
}
if (rand.nextInt(3) == 0)break;
@@ -9,13 +9,14 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import chylex.hee.HardcoreEnderExpansion;
import chylex.hee.entity.fx.FXType;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.mechanics.orb.OrbAcquirableItems;
import chylex.hee.mechanics.orb.OrbSpawnableMobs;
import chylex.hee.mechanics.orb.WeightedItem;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C12InstabilityOrbTransformEffect;
import chylex.hee.packets.client.C21EffectEntity;
import chylex.hee.system.logging.Log;
import chylex.hee.system.util.DragonUtil;
@@ -98,7 +99,7 @@ public class EntityItemInstabilityOrb extends EntityItem{
e.setPositionAndRotation(posX,posY,posZ,rand.nextFloat()*360F-180F,0F);
worldObj.spawnEntityInWorld(e);
PacketPipeline.sendToAllAround(this,64D,new C12InstabilityOrbTransformEffect(posX,posY,posZ,e.width,e.height));
PacketPipeline.sendToAllAround(this,64D,new C21EffectEntity(FXType.Entity.ORB_TRANSFORMATION,e));
}catch(Exception ex){
Log.throwable(ex,"Error spawning entity $0 in EntityItemInstabilityOrb",cls.getSimpleName());
}
@@ -113,7 +114,7 @@ public class EntityItemInstabilityOrb extends EntityItem{
entityitem.delayBeforeCanPickup = 10;
worldObj.spawnEntityInWorld(entityitem);
PacketPipeline.sendToAllAround(this,64D,new C12InstabilityOrbTransformEffect(posX,posY,posZ,0.25F,0.4F));
PacketPipeline.sendToAllAround(this,64D,new C21EffectEntity(FXType.Entity.ORB_TRANSFORMATION,posX,posY,posZ,0.25F,0.4F));
}
for(EntityPlayer observer:ObservationUtil.getAllObservers(this,16D))KnowledgeRegistrations.INSTABILITY_ORB.tryUnlockFragment(observer,0.35F);
@@ -39,7 +39,7 @@ import chylex.hee.item.ItemList;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C06ClearInventorySlot;
import chylex.hee.packets.client.C00ClearInventorySlot;
import chylex.hee.proxy.ModCommonProxy;
import chylex.hee.system.util.IItemSelector;
@@ -167,7 +167,7 @@ public class EntityMobBabyEnderman extends EntityMob{
if (--target.inventory.mainInventory[slot].stackSize == 0){
target.inventory.mainInventory[slot] = null;
PacketPipeline.sendToPlayer(target,new C06ClearInventorySlot(slot));
PacketPipeline.sendToPlayer(target,new C00ClearInventorySlot(slot));
}
for(EntityPlayer observer:ObservationUtil.getAllObservers(this,6D))KnowledgeRegistrations.BABY_ENDERMAN.tryUnlockFragment(observer,0.5F);
@@ -21,7 +21,7 @@ import chylex.hee.item.ItemList;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C27ParticleMirageHurt;
import chylex.hee.packets.client.C16ParticleMirageHurt;
import chylex.hee.system.ReflectionPublicizer;
import chylex.hee.system.util.MathUtil;
import cpw.mods.fml.relauncher.Side;
@@ -132,7 +132,7 @@ public class EntityMobCorporealMirage extends EntityLiving implements IEntityOwn
source == DamageSource.inWall)return false;
if (super.attackEntityFrom(source,MathUtil.floatEquals(amount,-1F) ? 1F : 2F)){
PacketPipeline.sendToAllAround(this,64D,new C27ParticleMirageHurt(this));
PacketPipeline.sendToAllAround(this,64D,new C16ParticleMirageHurt(this));
for(EntityPlayer observer:ObservationUtil.getAllObservers(this,12D))KnowledgeRegistrations.CORPOREAL_MIRAGE_ORB.tryUnlockFragment(observer,0.15F);
return true;
@@ -18,7 +18,7 @@ import chylex.hee.item.ItemList;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.proxy.ModCommonProxy;
import chylex.hee.system.util.DragonUtil;
@@ -90,7 +90,7 @@ public class EntityMobEnderGuardian extends EntityMob{
for(int iy = (int)Math.floor(entityToAttack.posY)-1; iy < entityToAttack.posY+3; iy++){
if (worldObj.isAirBlock(ix,iy,iz) && worldObj.isAirBlock(ix,iy+1,iz)){
playSound("mob.endermen.portal",1.5F,1.2F);
PacketPipeline.sendToAllAround(this,64D,new C30Effect(FXType.ENDER_GUARDIAN_TELEPORT,this));
PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.ENDER_GUARDIAN_TELEPORT,this));
setPosition(xx,iy,zz);
faceEntity(entityToAttack,360F,360F);
@@ -13,8 +13,11 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import chylex.hee.entity.fx.FXType;
import chylex.hee.item.ItemList;
import chylex.hee.mechanics.charms.RuneType;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.system.util.MathUtil;
import chylex.hee.tileentity.spawner.LouseRavagedSpawnerLogic.LouseSpawnData;
import chylex.hee.tileentity.spawner.LouseRavagedSpawnerLogic.LouseSpawnData.EnumLouseAbility;
@@ -150,6 +153,7 @@ public class EntityMobLouse extends EntityMob{
if (armor > 0F && hurtResistantTime == 0){
entityToAttack = source.getEntity();
playSound("random.anvil_land",0.5F,1.2F);
PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.LOUSE_ARMOR_HIT,this));
if ((armor -= amount) <= 0F)armor = 0F;
hurtTime = maxHurtTime = 10;
@@ -22,7 +22,7 @@ import chylex.hee.mechanics.enhancements.EnhancementEnumHelper;
import chylex.hee.mechanics.enhancements.EnhancementHandler;
import chylex.hee.mechanics.enhancements.types.EnderPearlEnhancements;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.system.ReflectionPublicizer;
import chylex.hee.system.util.DragonUtil;
import cpw.mods.fml.client.FMLClientHandler;
@@ -145,7 +145,7 @@ public class EntityProjectileEnhancedEnderPearl extends EntityEnderPearl{
if (!pearlTypes.contains(EnderPearlEnhancements.NO_FALL_DAMAGE))player.attackEntityFrom(DamageSource.fall,event.attackDamage);
if (pearlTypes.contains(EnderPearlEnhancements.FREEZE))PacketPipeline.sendToAllAround(this,64D,new C30Effect(FXType.ENDER_PEARL_FREEZE,this));
if (pearlTypes.contains(EnderPearlEnhancements.FREEZE))PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.ENDER_PEARL_FREEZE,this));
}
}
}
@@ -15,8 +15,8 @@ import net.minecraft.world.World;
import chylex.hee.HardcoreEnderExpansion;
import chylex.hee.entity.fx.FXType;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C11ParticleTransferenceGemTeleportFrom;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.packets.client.C21EffectEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -107,7 +107,7 @@ public class EntityProjectileSpatialDash extends EntityThrowable{
if (getThrower() != null && getThrower() instanceof EntityPlayerMP){
EntityPlayerMP player = (EntityPlayerMP)getThrower();
PacketPipeline.sendToAllAround(player,64D,new C11ParticleTransferenceGemTeleportFrom(player));
PacketPipeline.sendToAllAround(player,64D,new C21EffectEntity(FXType.Entity.GEM_TELEPORT_FROM,player));
if (player.playerNetServerHandler.func_147362_b().isChannelOpen() && player.worldObj == worldObj){ // OBFUSCATED get network manager
if (player.isRiding())player.mountEntity((Entity)null);
@@ -161,7 +161,7 @@ public class EntityProjectileSpatialDash extends EntityThrowable{
if (!found)player.setPositionAndUpdate(x+0.5D,y+0.01D,z+0.5D);
player.fallDistance = 0F;
PacketPipeline.sendToAllAround(player,64D,new C30Effect(FXType.GEM_TELEPORT_TO,player));
PacketPipeline.sendToAllAround(player,64D,new C20Effect(FXType.Basic.GEM_TELEPORT_TO,player));
}
}
@@ -23,7 +23,7 @@ import chylex.hee.mechanics.enhancements.SlotList;
import chylex.hee.mechanics.knowledge.fragment.EnhancementKnowledgeFragment;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C08PlaySound;
import chylex.hee.packets.client.C25GuiEnhancementsUpdateItems;
import chylex.hee.packets.client.C09GuiEnhancementsUpdateItems;
import chylex.hee.system.logging.Log;
public class ContainerEndPowderEnhancements extends Container{
@@ -250,7 +250,7 @@ public class ContainerEndPowderEnhancements extends Container{
if (getSlot(0).getStack() == null)onSubjectChanged();
if (EnhancementFragmentUtil.unlockEnhancement(EnhancementHandler.getEnhancementKnowledgeRegistrationForItem(mainIS.getItem()),(Enum)selectedEnhancement,owner)){
PacketPipeline.sendToPlayer(owner,new C25GuiEnhancementsUpdateItems());
PacketPipeline.sendToPlayer(owner,new C09GuiEnhancementsUpdateItems());
}
}
@@ -292,7 +292,7 @@ public class ContainerEndPowderEnhancements extends Container{
if (rand.nextInt(ingredientsBroken > 0 ? 7 : 9) == 0){
EnhancementFragmentUtil.unlockEnhancement(EnhancementHandler.getEnhancementKnowledgeRegistrationForItem(mainIS.getItem()),(Enum)selectedEnhancement,owner);
PacketPipeline.sendToPlayer(owner,new C25GuiEnhancementsUpdateItems());
PacketPipeline.sendToPlayer(owner,new C09GuiEnhancementsUpdateItems());
}
PacketPipeline.sendToPlayer(owner,new C08PlaySound((byte)9,owner.posX,owner.posY,owner.posZ,0.8F,1.2F));
@@ -16,7 +16,7 @@ import chylex.hee.entity.weather.EntityWeatherLightningBoltDemon;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C18CustomWeather;
import chylex.hee.packets.client.C05CustomWeather;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -57,7 +57,7 @@ public class ItemEndermanRelic extends ItemAbstractEnergyAcceptor{
EntityWeatherEffect bolt = new EntityWeatherLightningBoltDemon(world,mob.posX,mob.posY,mob.posZ,null,false);
world.addWeatherEffect(bolt);
PacketPipeline.sendToAllAround(bolt,512D,new C18CustomWeather(bolt,(byte)0));
PacketPipeline.sendToAllAround(bolt,512D,new C05CustomWeather(bolt,(byte)0));
EntityMobParalyzedEnderman paralyzed = new EntityMobParalyzedEnderman(world);
paralyzed.copyLocationAndAnglesFrom(mob);
@@ -12,7 +12,7 @@ import chylex.hee.mechanics.knowledge.data.KnowledgeCategory;
import chylex.hee.mechanics.knowledge.data.KnowledgeRegistration;
import chylex.hee.mechanics.knowledge.util.FragmentWeightLists.FragmentWeightList;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C28KnowledgeRegistrationNotification;
import chylex.hee.packets.client.C19KnowledgeRegistrationNotification;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -61,13 +61,13 @@ public class ItemKnowledgeFragment extends Item{
--is.stackSize;
}
else if (registration != null){
PacketPipeline.sendToPlayer(player,new C28KnowledgeRegistrationNotification(-3));
PacketPipeline.sendToPlayer(player,new C19KnowledgeRegistrationNotification(-3));
}
return is;
}
PacketPipeline.sendToPlayer(player,new C28KnowledgeRegistrationNotification(-2));
PacketPipeline.sendToPlayer(player,new C19KnowledgeRegistrationNotification(-2));
return is;
}
@@ -20,8 +20,8 @@ import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.data.UnlockResult;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C11ParticleTransferenceGemTeleportFrom;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.packets.client.C21EffectEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -45,7 +45,7 @@ public class ItemTransferenceGem extends ItemAbstractEnergyAcceptor{
if (!world.isRemote && side == 1 && player.isSneaking()){
GemData.updateItemStack(is,player.dimension,x,y,z);
PacketPipeline.sendToAllAround(player.dimension,x,y,z,64D,new C30Effect(FXType.GEM_LINK,x,y,z));
PacketPipeline.sendToAllAround(player.dimension,x,y,z,64D,new C20Effect(FXType.Basic.GEM_LINK,x,y,z));
return true;
}
@@ -68,7 +68,7 @@ public class ItemTransferenceGem extends ItemAbstractEnergyAcceptor{
boolean isLiving = entity instanceof EntityLivingBase;
PacketPipeline.sendToAllAround(entity,64D,new C11ParticleTransferenceGemTeleportFrom(entity));
PacketPipeline.sendToAllAround(entity,64D,new C21EffectEntity(FXType.Entity.GEM_TELEPORT_FROM,entity));
is.setItemDamage(itemDamage+1);
entity.fallDistance = 0F;
@@ -88,7 +88,7 @@ public class ItemTransferenceGem extends ItemAbstractEnergyAcceptor{
e.extinguish();
}
PacketPipeline.sendToAllAround(entity,64D,new C30Effect(FXType.GEM_TELEPORT_TO,entity));
PacketPipeline.sendToAllAround(entity,64D,new C20Effect(FXType.Basic.GEM_TELEPORT_TO,entity));
if (!KnowledgeRegistrations.TRANSFERENCE_GEM.tryUnlockFragment(player,0.15F).stopTrying &&
KnowledgeRegistrations.TRANSFERENCE_GEM.tryUnlockFragment(player,0.1F,new byte[]{ 7 }) == UnlockResult.NOTHING_TO_UNLOCK){
@@ -88,7 +88,7 @@ public enum CharmType{
new CharmRecipe(43).rune(POWER).rune(MAGIC,4).prop("dmgtomagic",0.32F)
}, new String[]{ "perc,dmgtomagic" }),
WITCHERY_HARM(14, 4, new CharmRecipe[]{
WITCHERY_HARM(12, 4, new CharmRecipe[]{
new CharmRecipe(44).rune(POWER).rune(MAGIC).rune(VIGOR).rune(VOID).prop("badeffchance",0.08F).prop("badefflvl",1).prop("badefftime",5),
new CharmRecipe(45).rune(POWER).rune(MAGIC).rune(VIGOR,2).rune(VOID).prop("badeffchance",0.09F).prop("badefflvl",2).prop("badefftime",5),
new CharmRecipe(46).rune(POWER).rune(MAGIC,2).rune(VIGOR).rune(VOID).prop("badeffchance",0.14F).prop("badefflvl",1).prop("badefftime",5),
@@ -34,11 +34,13 @@ import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
import net.minecraftforge.event.world.BlockEvent.BreakEvent;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.tuple.Pair;
import chylex.hee.entity.fx.FXType;
import chylex.hee.mechanics.charms.CharmPouchInfo;
import chylex.hee.mechanics.charms.CharmRecipe;
import chylex.hee.mechanics.charms.CharmType;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C07AddPlayerVelocity;
import chylex.hee.packets.client.C21EffectEntity;
import chylex.hee.system.ReflectionPublicizer;
import chylex.hee.system.util.DragonUtil;
import chylex.hee.system.util.MathUtil;
@@ -197,7 +199,10 @@ public final class CharmEvents{
if (e.entity.worldObj.rand.nextFloat() < crit[a])val += (critDmg[a]*e.ammount)-e.ammount;
}
e.ammount += val;
if (val > 0F){
e.ammount += val;
PacketPipeline.sendToAllAround(e.entity,64,new C21EffectEntity(FXType.Entity.CHARM_CRITICAL,e.entity));System.out.println("crit");
}
}
// WITCHERY_HARM
@@ -206,6 +211,7 @@ public final class CharmEvents{
if (badEff.length > 0){
float[] badEffLvl = getProp(sourcePlayer,"badefflvl");
float[] badEffTime = getProp(sourcePlayer,"badefftime");
boolean causedEffect = false;
List<Potion> potionEffects = new ArrayList<>(Arrays.asList(
Potion.weakness, Potion.moveSlowdown, Potion.blindness, Potion.poison, null // null = fire
));
@@ -216,8 +222,12 @@ public final class CharmEvents{
if (type == null)e.entity.setFire((int)badEffTime[a]);
else e.entityLiving.addPotionEffect(new PotionEffect(type.id,20*(int)badEffTime[a],(int)badEffLvl[a]-1));
causedEffect = true;
}
}
if (causedEffect)PacketPipeline.sendToAllAround(e.entity,64,new C21EffectEntity(FXType.Entity.CHARM_WITCH,e.entity));
}
// MAGIC_PENETRATION
@@ -240,6 +250,8 @@ public final class CharmEvents{
// BLOCKING
e.ammount -= getPropPercentDecrease(targetPlayer,"reducedmgblock",e.ammount);
boolean showBlockingEffect = false;
// BLOCKING_REFLECTION
float[] reflectDmg = getProp(targetPlayer,"blockreflectdmg");
@@ -247,6 +259,7 @@ public final class CharmEvents{
float reflected = 0F;
for(int a = 0; a < reflectDmg.length; a++)reflected += e.ammount*reflectDmg[a];
e.source.getSourceOfDamage().attackEntityFrom(DamageSource.causePlayerDamage(targetPlayer),reflected);
showBlockingEffect = true;
}
// BLOCKING REPULSION
@@ -267,7 +280,12 @@ public final class CharmEvents{
source.motionZ += vec[1];
}
else source.addVelocity(vec[0],0.25D,vec[1]);
showBlockingEffect = true;
}
// BLOCKING REFLECTION & BLOCKING REPULSION EFFECT
if (showBlockingEffect)PacketPipeline.sendToAllAround(e.entity,64,new C21EffectEntity(FXType.Entity.CHARM_BLOCK_EFFECT,e.entity));
}
// DAMAGE_REDIRECTION
@@ -26,7 +26,7 @@ import chylex.hee.mechanics.essence.handler.dragon.AltarItemRecipe;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C17ParticleAltarOrb;
import chylex.hee.packets.client.C11ParticleAltarOrb;
import chylex.hee.system.util.DragonUtil;
import chylex.hee.system.util.MathUtil;
import chylex.hee.system.weight.ObjectWeightPair;
@@ -150,7 +150,7 @@ public class DragonEssenceHandler extends AltarActionHandler{
for(BlockLocation loc:pedestals){
if (rand.nextInt(5) <= 1){
PacketPipeline.sendToAllAround(altar,64D,new C17ParticleAltarOrb(altar,loc.x+0.5D,altar.yCoord+0.5D,loc.z+0.5D));
PacketPipeline.sendToAllAround(altar,64D,new C11ParticleAltarOrb(altar,loc.x+0.5D,altar.yCoord+0.5D,loc.z+0.5D));
}
}
}
@@ -181,7 +181,7 @@ public class DragonEssenceHandler extends AltarActionHandler{
updatePedestalItem(altarItem);
if (rand.nextInt(5) == 0){
PacketPipeline.sendToAllAround(altar.getWorldObj().provider.dimensionId,targX,loc.y+0.5D,targZ,64D,new C17ParticleAltarOrb(targX,loc.y+0.5D,targZ,item.posX,item.posY+0.3D,item.posZ,altar.getEssenceType().id,(byte)1));
PacketPipeline.sendToAllAround(altar.getWorldObj().provider.dimensionId,targX,loc.y+0.5D,targZ,64D,new C11ParticleAltarOrb(targX,loc.y+0.5D,targZ,item.posX,item.posY+0.3D,item.posZ,altar.getEssenceType().id,(byte)1));
}
}
}
@@ -13,7 +13,7 @@ import chylex.hee.api.interfaces.IAcceptFieryEssence;
import chylex.hee.mechanics.essence.EssenceType;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C17ParticleAltarOrb;
import chylex.hee.packets.client.C11ParticleAltarOrb;
import chylex.hee.tileentity.TileEntityEssenceAltar;
public class FieryEssenceHandler extends AltarActionHandler{
@@ -124,7 +124,7 @@ public class FieryEssenceHandler extends AltarActionHandler{
}
private void createOrbParticle(int targetX, int targetY, int targetZ){
PacketPipeline.sendToAllAround(altar,64D,new C17ParticleAltarOrb(altar,targetX+0.5D,targetY+0.5D,targetZ+0.5D));
PacketPipeline.sendToAllAround(altar,64D,new C11ParticleAltarOrb(altar,targetX+0.5D,targetY+0.5D,targetZ+0.5D));
if (rand.nextInt(17) == 0){
for(EntityPlayer observer:ObservationUtil.getAllObservers(altar.getWorldObj(),altar.xCoord+0.5D,altar.yCoord+0.5D,altar.zCoord+0.5D,16D)){
@@ -9,7 +9,7 @@ import chylex.hee.mechanics.knowledge.data.renderer.DummyRenderer;
import chylex.hee.mechanics.knowledge.data.renderer.IRegistrationRenderer;
import chylex.hee.mechanics.knowledge.fragment.KnowledgeFragment;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C28KnowledgeRegistrationNotification;
import chylex.hee.packets.client.C19KnowledgeRegistrationNotification;
import chylex.hee.system.logging.Log;
public class KnowledgeRegistration{
@@ -126,7 +126,7 @@ public class KnowledgeRegistration{
if (compendiumSlot == -1)return UnlockResult.NO_COMPENDIUM;
if (paperSlot == -1){
PacketPipeline.sendToPlayer(player,new C28KnowledgeRegistrationNotification(-1));
PacketPipeline.sendToPlayer(player,new C19KnowledgeRegistrationNotification(-1));
return UnlockResult.NO_PAPER;
}
@@ -10,7 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
import org.apache.commons.lang3.ArrayUtils;
import chylex.hee.mechanics.knowledge.fragment.KnowledgeFragment;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C28KnowledgeRegistrationNotification;
import chylex.hee.packets.client.C19KnowledgeRegistrationNotification;
public class ObjectFragmentSet{
private final KnowledgeRegistration registration;
@@ -99,7 +99,7 @@ public class ObjectFragmentSet{
is.stackTagCompound.setTag("knowledgeLast",lastUnlock);
if (player != null){
PacketPipeline.sendToPlayer(player,new C28KnowledgeRegistrationNotification(registration.identifier));
PacketPipeline.sendToPlayer(player,new C19KnowledgeRegistrationNotification(registration.identifier));
}
return true;
@@ -5,12 +5,12 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C06ClearInventorySlot extends AbstractClientPacket{
public class C00ClearInventorySlot extends AbstractClientPacket{
private byte slot;
public C06ClearInventorySlot(){}
public C00ClearInventorySlot(){}
public C06ClearInventorySlot(int slot){
public C00ClearInventorySlot(int slot){
this.slot = (byte)slot;
}
@@ -10,14 +10,14 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C18CustomWeather extends AbstractClientPacket{
public class C05CustomWeather extends AbstractClientPacket{
private int entityId;
private double x,y,z;
private byte weatherType;
public C18CustomWeather(){}
public C05CustomWeather(){}
public C18CustomWeather(EntityWeatherEffect eff, byte weatherType){
public C05CustomWeather(EntityWeatherEffect eff, byte weatherType){
this.entityId = eff.getEntityId();
this.x = eff.posX;
this.y = eff.posY;
@@ -5,12 +5,12 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C26SetPlayerVelocity extends AbstractClientPacket{
public class C06SetPlayerVelocity extends AbstractClientPacket{
private double velX,velY,velZ;
public C26SetPlayerVelocity(){}
public C06SetPlayerVelocity(){}
public C26SetPlayerVelocity(double velocityX, double velocityY, double velocityZ){
public C06SetPlayerVelocity(double velocityX, double velocityY, double velocityZ){
this.velX = velocityX;
this.velY = velocityY;
this.velZ = velocityZ;
@@ -6,8 +6,8 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C25GuiEnhancementsUpdateItems extends AbstractClientPacket{
public C25GuiEnhancementsUpdateItems(){}
public class C09GuiEnhancementsUpdateItems extends AbstractClientPacket{
public C09GuiEnhancementsUpdateItems(){}
@Override
public void write(ByteBuf buffer){}
@@ -9,18 +9,18 @@ import chylex.hee.tileentity.TileEntityEnergyExtractionTable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C29ParticleEnergyTransfer extends AbstractClientPacket{
public class C10ParticleEnergyTransfer extends AbstractClientPacket{
private double startX,startY,startZ;
private double targetX,targetY,targetZ;
private float red,green,blue;
public C29ParticleEnergyTransfer(){}
public C10ParticleEnergyTransfer(){}
public C29ParticleEnergyTransfer(TileEntityEnergyExtractionTable table, TileEntityEnergyCluster cluster){
public C10ParticleEnergyTransfer(TileEntityEnergyExtractionTable table, TileEntityEnergyCluster cluster){
this(table.xCoord+0.5D,table.yCoord+0.5D,table.zCoord+0.5D,cluster.xCoord+0.5D,cluster.yCoord+0.5D,cluster.zCoord+0.5D,cluster.getColor()[0],cluster.getColor()[1],cluster.getColor()[2]);
}
public C29ParticleEnergyTransfer(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, float red, float green, float blue){
public C10ParticleEnergyTransfer(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, float red, float green, float blue){
this.startX = startX;
this.startY = startY;
this.startZ = startZ;
@@ -8,19 +8,19 @@ import chylex.hee.tileentity.TileEntityEssenceAltar;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C17ParticleAltarOrb extends AbstractClientPacket{
public class C11ParticleAltarOrb extends AbstractClientPacket{
private double startX,startY,startZ;
private double targetX,targetY,targetZ;
private byte essenceId,amount;
private float width,height;
public C17ParticleAltarOrb(){}
public C11ParticleAltarOrb(){}
public C17ParticleAltarOrb(TileEntityEssenceAltar altar, double targetX, double targetY, double targetZ){
public C11ParticleAltarOrb(TileEntityEssenceAltar altar, double targetX, double targetY, double targetZ){
this(altar,targetX,targetY,targetZ,(byte)1);
}
public C17ParticleAltarOrb(TileEntityEssenceAltar altar, double targetX, double targetY, double targetZ, byte amount){
public C11ParticleAltarOrb(TileEntityEssenceAltar altar, double targetX, double targetY, double targetZ, byte amount){
this.startX = altar.xCoord+0.5D;
this.startY = altar.yCoord+0.5D;
this.startZ = altar.zCoord+0.5D;
@@ -31,7 +31,7 @@ public class C17ParticleAltarOrb extends AbstractClientPacket{
this.amount = amount;
}
public C17ParticleAltarOrb(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, byte essenceId, byte amount){
public C11ParticleAltarOrb(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, byte essenceId, byte amount){
this.startX = startX;
this.startY = startX;
this.startZ = startX;
@@ -42,7 +42,7 @@ public class C17ParticleAltarOrb extends AbstractClientPacket{
this.amount = amount;
}
public C17ParticleAltarOrb(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, byte essenceId, byte amount, float width, float height){
public C11ParticleAltarOrb(double startX, double startY, double startZ, double targetX, double targetY, double targetZ, byte essenceId, byte amount, float width, float height){
this(startX,startY,startZ,targetX,targetY,targetZ,essenceId,amount);
this.width = width;
this.height = height;
@@ -1,45 +0,0 @@
package chylex.hee.packets.client;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.Entity;
import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C11ParticleTransferenceGemTeleportFrom extends AbstractClientPacket{
private double x,y,z;
private float width,height;
public C11ParticleTransferenceGemTeleportFrom(){}
public C11ParticleTransferenceGemTeleportFrom(Entity entity){
this.x = entity.posX;
this.y = entity.posY;
this.z = entity.posZ;
this.width = entity.width;
this.height = entity.height;
}
@Override
public void write(ByteBuf buffer){
buffer.writeDouble(x).writeDouble(y).writeDouble(z).writeFloat(width).writeFloat(height);
}
@Override
public void read(ByteBuf buffer){
x = buffer.readDouble();
y = buffer.readDouble();
z = buffer.readDouble();
width = buffer.readFloat();
height = buffer.readFloat();
}
@Override
@SideOnly(Side.CLIENT)
protected void handle(EntityClientPlayerMP player){
float width = this.width*1.2F, hwidth = width*0.5F, height = this.height*0.9F;
for(int a = 0; a < 20; a++)player.worldObj.spawnParticle("largesmoke",x+rand.nextDouble()*width-hwidth,y+rand.nextDouble()*height,z+rand.nextDouble()*width-hwidth,0D,0.04D,0D);
player.worldObj.playSound(x+0.5D,y+1D,z+0.5D,"mob.endermen.portal",1.2F,player.worldObj.rand.nextFloat()*0.05F+0.85F,false);
}
}
@@ -1,45 +0,0 @@
package chylex.hee.packets.client;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.entity.EntityClientPlayerMP;
import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C12InstabilityOrbTransformEffect extends AbstractClientPacket{
private double x,y,z;
private float width,height;
public C12InstabilityOrbTransformEffect(){}
public C12InstabilityOrbTransformEffect(double x, double y, double z, float width, float height){
this.x = x;
this.y = y;
this.z = z;
this.width = width;
this.height = height;
}
@Override
public void write(ByteBuf buffer){
buffer.writeDouble(x).writeDouble(y).writeDouble(z).writeFloat(width).writeFloat(height);
}
@Override
public void read(ByteBuf buffer){
x = buffer.readDouble();
y = buffer.readDouble();
z = buffer.readDouble();
width = buffer.readFloat();
height = buffer.readFloat();
}
@Override
@SideOnly(Side.CLIENT)
protected void handle(EntityClientPlayerMP player){
for(int a = 0; a < 18; a++){
player.worldObj.spawnParticle("largesmoke",x+(rand.nextDouble()*width*2D)-width,y+0.1D+rand.nextDouble()*height,z+(rand.nextDouble()*width*2D)-width,0D,0D,0D);
}
player.worldObj.playSound(x,y,z,"hardcoreenderexpansion:block.random.transform",1.4F,1F+player.worldObj.rand.nextFloat()*0.2F,false);
}
}
@@ -11,14 +11,14 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C19ParticleFireFiendFlames extends AbstractClientPacket{
public class C12ParticleFireFiendFlames extends AbstractClientPacket{
private int fiendEntityId,targetEntityId;
private float offsetX,offsetY,offsetZ;
private byte amount;
public C19ParticleFireFiendFlames(){}
public C12ParticleFireFiendFlames(){}
public C19ParticleFireFiendFlames(EntityMiniBossFireFiend fiend, EntityLivingBase target, float[] offsets, byte amount){
public C12ParticleFireFiendFlames(EntityMiniBossFireFiend fiend, EntityLivingBase target, float[] offsets, byte amount){
this.fiendEntityId = fiend.getEntityId();
this.targetEntityId = target.getEntityId();
this.offsetX = offsets[0];
@@ -6,13 +6,13 @@ import chylex.hee.system.util.MathUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C20ParticleDragonEggTeleportation extends AbstractClientPacket{
public class C13ParticleDragonEggTeleportation extends AbstractClientPacket{
private int startX,startY,startZ;
private int endX,endY,endZ;
public C20ParticleDragonEggTeleportation(){}
public C13ParticleDragonEggTeleportation(){}
public C20ParticleDragonEggTeleportation(int startX, int startY, int startZ, int endX, int endY, int endZ){
public C13ParticleDragonEggTeleportation(int startX, int startY, int startZ, int endX, int endY, int endZ){
this.startX = startX;
this.startY = startY;
this.startZ = startZ;
@@ -5,12 +5,12 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C21ParticleIgneousRockFlame extends AbstractClientPacket{
public class C14ParticleIgneousRockFlame extends AbstractClientPacket{
private double x,y,z;
public C21ParticleIgneousRockFlame(){}
public C14ParticleIgneousRockFlame(){}
public C21ParticleIgneousRockFlame(double x, double y, double z){
public C14ParticleIgneousRockFlame(double x, double y, double z){
this.x = x;
this.y = y;
this.z = z;
@@ -8,12 +8,12 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C27ParticleMirageHurt extends AbstractClientPacket{
public class C16ParticleMirageHurt extends AbstractClientPacket{
private int entityId;
public C27ParticleMirageHurt(){}
public C16ParticleMirageHurt(){}
public C27ParticleMirageHurt(EntityMobCorporealMirage mirage){
public C16ParticleMirageHurt(EntityMobCorporealMirage mirage){
this.entityId = mirage.getEntityId();
}
@@ -12,13 +12,13 @@ import chylex.hee.tileentity.TileEntityEssenceAltar;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C16AltarRuneItemEffect extends AbstractClientPacket{
public class C17AltarRuneItemEffect extends AbstractClientPacket{
private int x,y,z;
private byte essenceId,runeArrayIndex;
public C16AltarRuneItemEffect(){}
public C17AltarRuneItemEffect(){}
public C16AltarRuneItemEffect(TileEntityEssenceAltar altar, byte runeArrayIndex){
public C17AltarRuneItemEffect(TileEntityEssenceAltar altar, byte runeArrayIndex){
this.x = altar.xCoord;
this.y = altar.yCoord;
this.z = altar.zCoord;
@@ -5,8 +5,8 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C23EnderDemonScreechEffect extends AbstractClientPacket{
public C23EnderDemonScreechEffect(){}
public class C18EnderDemonScreechEffect extends AbstractClientPacket{
public C18EnderDemonScreechEffect(){}
@Override
public void write(ByteBuf buffer){}
@@ -7,17 +7,17 @@ import chylex.hee.render.OverlayManager;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C28KnowledgeRegistrationNotification extends AbstractClientPacket{
public class C19KnowledgeRegistrationNotification extends AbstractClientPacket{
private byte lengthOrStatus;
private String registration;
public C28KnowledgeRegistrationNotification(){}
public C19KnowledgeRegistrationNotification(){}
public C28KnowledgeRegistrationNotification(int status){
public C19KnowledgeRegistrationNotification(int status){
this.lengthOrStatus = (byte)status;
}
public C28KnowledgeRegistrationNotification(String registration){
public C19KnowledgeRegistrationNotification(String registration){
this.lengthOrStatus = (byte)registration.length();
this.registration = registration;
}
@@ -9,24 +9,24 @@ import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C30Effect extends AbstractClientPacket{
private FXType type;
public class C20Effect extends AbstractClientPacket{
private FXType.Basic type;
private double x,y,z;
public C30Effect(){}
public C20Effect(){}
public C30Effect(FXType type, double x, double y, double z){
public C20Effect(FXType.Basic type, double x, double y, double z){
this.type = type;
this.x = x;
this.y = y;
this.z = z;
}
public C30Effect(FXType type, Entity entity){
public C20Effect(FXType.Basic type, Entity entity){
this(type,entity.posX,entity.posY,entity.posZ);
}
public C30Effect(FXType type, TileEntity tile){
public C20Effect(FXType.Basic type, TileEntity tile){
this(type,tile.xCoord+0.5D,tile.yCoord+0.5D,tile.zCoord+0.5D);
}
@@ -39,8 +39,8 @@ public class C30Effect extends AbstractClientPacket{
public void read(ByteBuf buffer){
byte fxType = buffer.readByte();
if (fxType >= 0 && fxType < FXType.values.length){
type = FXType.values[fxType];
if (fxType >= 0 && fxType < FXType.Basic.values.length){
type = FXType.Basic.values[fxType];
x = buffer.readDouble();
y = buffer.readDouble();
z = buffer.readDouble();
@@ -50,6 +50,6 @@ public class C30Effect extends AbstractClientPacket{
@Override
@SideOnly(Side.CLIENT)
protected void handle(EntityClientPlayerMP player){
if (type != null)FXHandler.handle(player.worldObj,player,type,x,y,z);
if (type != null)FXHandler.handleBasic(player.worldObj,player,type,x,y,z);
}
}
@@ -0,0 +1,55 @@
package chylex.hee.packets.client;
import io.netty.buffer.ByteBuf;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.Entity;
import chylex.hee.entity.fx.FXHandler;
import chylex.hee.entity.fx.FXType;
import chylex.hee.packets.AbstractClientPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class C21EffectEntity extends AbstractClientPacket{
private FXType.Entity type;
private double x,y,z;
private float entityWidth,entityHeight;
public C21EffectEntity(){}
public C21EffectEntity(FXType.Entity type, double x, double y, double z, float entityWidth, float entityHeight){
this.type = type;
this.x = x;
this.y = y;
this.z = z;
this.entityWidth = entityWidth;
this.entityHeight = entityHeight;
}
public C21EffectEntity(FXType.Entity type, Entity entity){
this(type,entity.posX,entity.posY,entity.posZ,entity.width,entity.height);
}
@Override
public void write(ByteBuf buffer){
buffer.writeByte(type.ordinal()).writeDouble(x).writeDouble(y).writeDouble(z).writeFloat(entityWidth).writeFloat(entityHeight);
}
@Override
public void read(ByteBuf buffer){
byte fxType = buffer.readByte();
if (fxType >= 0 && fxType < FXType.Entity.values.length){
type = FXType.Entity.values[fxType];
x = buffer.readDouble();
y = buffer.readDouble();
z = buffer.readDouble();
entityWidth = buffer.readFloat();
entityHeight = buffer.readFloat();
}
}
@Override
@SideOnly(Side.CLIENT)
protected void handle(EntityClientPlayerMP player){
if (type != null)FXHandler.handleEntity(player.worldObj,player,type,x,y,z,entityWidth,entityHeight);
}
}
@@ -13,7 +13,7 @@ import chylex.hee.item.ItemList;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.mechanics.knowledge.util.ObservationUtil;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C29ParticleEnergyTransfer;
import chylex.hee.packets.client.C10ParticleEnergyTransfer;
import chylex.hee.system.util.ItemDamagePair;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -98,7 +98,7 @@ public class TileEntityEnergyExtractionTable extends TileEntityAbstractInventory
cluster.data.addEnergy(diff);
cluster.synchronize();
if ((energy -= diff) <= 0)leakIntoWorld = false;
PacketPipeline.sendToAllAround(this,64D,new C29ParticleEnergyTransfer(this,cluster));
PacketPipeline.sendToAllAround(this,64D,new C10ParticleEnergyTransfer(this,cluster));
}
}
}
@@ -23,9 +23,9 @@ import chylex.hee.mechanics.essence.SocketManager;
import chylex.hee.mechanics.essence.handler.AltarActionHandler;
import chylex.hee.mechanics.knowledge.KnowledgeRegistrations;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C06ClearInventorySlot;
import chylex.hee.packets.client.C16AltarRuneItemEffect;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C00ClearInventorySlot;
import chylex.hee.packets.client.C17AltarRuneItemEffect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.system.achievements.AchievementManager;
import chylex.hee.system.logging.Log;
import cpw.mods.fml.relauncher.Side;
@@ -193,7 +193,7 @@ public class TileEntityEssenceAltar extends TileEntityAbstractSynchronized{
player.inventory.mainInventory[player.inventory.currentItem] = is = invIs;
player.inventory.setInventorySlotContents(a,null);
PacketPipeline.sendToPlayer(player,new C06ClearInventorySlot(a));
PacketPipeline.sendToPlayer(player,new C00ClearInventorySlot(a));
found = true;
break;
@@ -227,7 +227,7 @@ public class TileEntityEssenceAltar extends TileEntityAbstractSynchronized{
runeItems[a] = availableItems.remove(worldObj.rand.nextInt(availableItems.size()));
}
PacketPipeline.sendToAllAround(this,64D,new C30Effect(FXType.ESSENCE_ALTAR_SMOKE,this));
PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.ESSENCE_ALTAR_SMOKE,this));
essenceType.getEssenceRegistration().tryUnlockFragment(player,1F);
}
@@ -239,7 +239,7 @@ public class TileEntityEssenceAltar extends TileEntityAbstractSynchronized{
}
else if (currentStage == STAGE_HASTYPE){
if (runeItems[runeItemIndex] != null && runeItems[runeItemIndex].selector.isValid(is)){
PacketPipeline.sendToAllAround(this,32D,new C16AltarRuneItemEffect(this,runeItems[runeItemIndex].indexInArray));
PacketPipeline.sendToAllAround(this,32D,new C17AltarRuneItemEffect(this,runeItems[runeItemIndex].indexInArray));
essenceType.getAltarRegistration().tryUnlockFragment(player,0.14F);
@@ -6,7 +6,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import chylex.hee.entity.fx.FXType;
import chylex.hee.packets.PacketPipeline;
import chylex.hee.packets.client.C30Effect;
import chylex.hee.packets.client.C20Effect;
import chylex.hee.proxy.ModCommonProxy;
public class TileEntityLaserBeam extends TileEntity{
@@ -26,7 +26,7 @@ public class TileEntityLaserBeam extends TileEntity{
player.setFire(40);
}
PacketPipeline.sendToAllAround(this,64D,new C30Effect(FXType.LASER_BEAM_DESTROY,this));
PacketPipeline.sendToAllAround(this,64D,new C20Effect(FXType.Basic.LASER_BEAM_DESTROY,this));
}
}