// Path: src/main/java/team/creative/enhancedvisuals/common/handler/VisualHandlers.java
// public class VisualHandlers {
// 	
// 	public static ExplosionHandler EXPLOSION;
// 	public static PotionHandler POTION;
// 	
// 	public static SandSplatHandler SAND;
// 	public static SplashHandler SPLASH;
// 	public static DamageHandler DAMAGE;
// 	
// 	public static SlenderHandler SLENDER;
// 	public static SaturationHandler SATURATION;
// 	public static HeartbeatHandler HEARTBEAT;
// 	
// 	public static void init() {
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "explosion"), EXPLOSION = new ExplosionHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "potion"), POTION = new PotionHandler());
// 		
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "sand"), SAND = new SandSplatHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "splash"), SPLASH = new SplashHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "damage"), DAMAGE = new DamageHandler());
// 		
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "slender"), SLENDER = new SlenderHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "saturation"), SATURATION = new SaturationHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "heartbeat"), HEARTBEAT = new HeartbeatHandler());
// 	}
// 	
// }


import com.creativemd.creativecore.common.packet.CreativeCorePacket;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.Vec3d;
import team.creative.enhancedvisuals.common.handler.VisualHandlers;
package team.creative.enhancedvisuals.common.packet;



public class ExplosionPacket extends CreativeCorePacket {
	
	public Vec3d pos;
	public float size;
	public int sourceEntity;
	
	public ExplosionPacket(Vec3d pos, float size, int sourceEntity) {
		this.pos = pos;
		this.size = size;
		this.sourceEntity = sourceEntity;
	}
	
	public ExplosionPacket() {
		
	}
	
	@Override
	public void writeBytes(ByteBuf buf) {
		writeVec3d(pos, buf);
		buf.writeFloat(size);
		buf.writeInt(sourceEntity);
	}
	
	@Override
	public void readBytes(ByteBuf buf) {
		pos = readVec3d(buf);
		size = buf.readFloat();
		sourceEntity = buf.readInt();
	}
	
	@Override
	public void executeClient(EntityPlayer player) {
// Path: src/main/java/team/creative/enhancedvisuals/common/handler/VisualHandlers.java
// public class VisualHandlers {
// 	
// 	public static ExplosionHandler EXPLOSION;
// 	public static PotionHandler POTION;
// 	
// 	public static SandSplatHandler SAND;
// 	public static SplashHandler SPLASH;
// 	public static DamageHandler DAMAGE;
// 	
// 	public static SlenderHandler SLENDER;
// 	public static SaturationHandler SATURATION;
// 	public static HeartbeatHandler HEARTBEAT;
// 	
// 	public static void init() {
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "explosion"), EXPLOSION = new ExplosionHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "potion"), POTION = new PotionHandler());
// 		
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "sand"), SAND = new SandSplatHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "splash"), SPLASH = new SplashHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "damage"), DAMAGE = new DamageHandler());
// 		
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "slender"), SLENDER = new SlenderHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "saturation"), SATURATION = new SaturationHandler());
// 		VisualRegistry.registerHandler(new ResourceLocation(EnhancedVisuals.MODID, "heartbeat"), HEARTBEAT = new HeartbeatHandler());
// 	}
// 	
// }


// Path: src/main/java/team/creative/enhancedvisuals/common/packet/ExplosionPacket.java
import com.creativemd.creativecore.common.packet.CreativeCorePacket;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.Vec3d;
import team.creative.enhancedvisuals.common.handler.VisualHandlers;

package team.creative.enhancedvisuals.common.packet;



public class ExplosionPacket extends CreativeCorePacket {
	
	public Vec3d pos;
	public float size;
	public int sourceEntity;
	
	public ExplosionPacket(Vec3d pos, float size, int sourceEntity) {
		this.pos = pos;
		this.size = size;
		this.sourceEntity = sourceEntity;
	}
	
	public ExplosionPacket() {
		
	}
	
	@Override
	public void writeBytes(ByteBuf buf) {
		writeVec3d(pos, buf);
		buf.writeFloat(size);
		buf.writeInt(sourceEntity);
	}
	
	@Override
	public void readBytes(ByteBuf buf) {
		pos = readVec3d(buf);
		size = buf.readFloat();
		sourceEntity = buf.readInt();
	}
	
	@Override
	public void executeClient(EntityPlayer player) {
		if (VisualHandlers.EXPLOSION.isEnabled(player))