Reorganized github - Renamed packages lowercase
This commit is contained in:
parent
5a3a6d4a8e
commit
579ddee7f0
362 changed files with 5163 additions and 8935 deletions
|
|
@ -1,121 +1,106 @@
|
|||
package MysticWorld.Client;
|
||||
package mysticworld.client;
|
||||
|
||||
import mysticworld.blocks.BlockHandler;
|
||||
import mysticworld.client.fx.LightCubeFX;
|
||||
import mysticworld.client.fx.PowerAirFX;
|
||||
import mysticworld.client.fx.PowerEarthFX;
|
||||
import mysticworld.client.fx.PowerEnergyFX;
|
||||
import mysticworld.client.fx.PowerFireFX;
|
||||
import mysticworld.client.fx.PowerWaterFX;
|
||||
import mysticworld.entity.EntityChargeAir;
|
||||
import mysticworld.entity.EntityChargeEarth;
|
||||
import mysticworld.entity.EntityChargeEnergy;
|
||||
import mysticworld.entity.EntityChargeFire;
|
||||
import mysticworld.entity.EntityChargeWater;
|
||||
import mysticworld.items.ItemHandler$1;
|
||||
import mysticworld.lib.RenderIds;
|
||||
import mysticworld.renderer.BlockPillarInsertRenderer;
|
||||
import mysticworld.renderer.ItemOrbAirRenderer;
|
||||
import mysticworld.renderer.ItemOrbEarthRenderer;
|
||||
import mysticworld.renderer.ItemOrbEnergyRenderer;
|
||||
import mysticworld.renderer.ItemOrbFireRenderer;
|
||||
import mysticworld.renderer.ItemOrbWaterRenderer;
|
||||
import mysticworld.renderer.ItemStaffAirRenderer;
|
||||
import mysticworld.renderer.ItemStaffEarthRenderer;
|
||||
import mysticworld.renderer.ItemStaffEnergyRenderer;
|
||||
import mysticworld.renderer.ItemStaffFireRenderer;
|
||||
import mysticworld.renderer.ItemStaffWaterRenderer;
|
||||
import mysticworld.renderer.RenderStaffPower;
|
||||
import mysticworld.renderer.TileEntityPillarInsertRenderer;
|
||||
import mysticworld.tiles.TileEntityPillarInsert;
|
||||
import mysticworld.util.CommonProxy;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import MysticWorld.Blocks.BlockHandler;
|
||||
import MysticWorld.Client.FX.LightCubeFX;
|
||||
import MysticWorld.Client.FX.PowerAirFX;
|
||||
import MysticWorld.Client.FX.PowerEarthFX;
|
||||
import MysticWorld.Client.FX.PowerEnergyFX;
|
||||
import MysticWorld.Client.FX.PowerFireFX;
|
||||
import MysticWorld.Client.FX.PowerWaterFX;
|
||||
import MysticWorld.Entity.EntityChargeAir;
|
||||
import MysticWorld.Entity.EntityChargeEarth;
|
||||
import MysticWorld.Entity.EntityChargeEnergy;
|
||||
import MysticWorld.Entity.EntityChargeFire;
|
||||
import MysticWorld.Entity.EntityChargeWater;
|
||||
import MysticWorld.Items.ItemHandler$1;
|
||||
import MysticWorld.Lib.RenderIds;
|
||||
import MysticWorld.Renderer.BlockPillarInsertRenderer;
|
||||
import MysticWorld.Renderer.ItemOrbAirRenderer;
|
||||
import MysticWorld.Renderer.ItemOrbEarthRenderer;
|
||||
import MysticWorld.Renderer.ItemOrbEnergyRenderer;
|
||||
import MysticWorld.Renderer.ItemOrbFireRenderer;
|
||||
import MysticWorld.Renderer.ItemOrbWaterRenderer;
|
||||
import MysticWorld.Renderer.ItemStaffAirRenderer;
|
||||
import MysticWorld.Renderer.ItemStaffEarthRenderer;
|
||||
import MysticWorld.Renderer.ItemStaffEnergyRenderer;
|
||||
import MysticWorld.Renderer.ItemStaffFireRenderer;
|
||||
import MysticWorld.Renderer.ItemStaffWaterRenderer;
|
||||
import MysticWorld.Renderer.RenderStaffPower;
|
||||
import MysticWorld.Renderer.TileEntityPillarInsertRenderer;
|
||||
import MysticWorld.TileEntity.TileEntityPillarInsert;
|
||||
import MysticWorld.Util.CommonProxy;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerRenderIDs()
|
||||
{
|
||||
public int addArmor(String armor) {
|
||||
return RenderingRegistry.addNewArmourRendererPrefix(armor);
|
||||
}
|
||||
|
||||
//particles
|
||||
@Override
|
||||
public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age) {
|
||||
PowerAirFX airFX = new PowerAirFX(worldObj, x, y, z, scale, age);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(airFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earthFX(World worldObj, double x, double y, double z, float scale) {
|
||||
PowerEarthFX earthFX = new PowerEarthFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(earthFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void energyFX(World worldObj, double x, double y, double z, float scale) {
|
||||
PowerEnergyFX energyFX = new PowerEnergyFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(energyFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireFX(World worldObj, double x, double y, double z, float scale) {
|
||||
PowerFireFX fireFX = new PowerFireFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(fireFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) {
|
||||
LightCubeFX lightCubeFX = new LightCubeFX(worldObj, x, y, z, motionX, motionY, motionZ, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(lightCubeFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRenderIDs() {
|
||||
RenderIds.RENDER_PILLAR_INSERT = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerRenders()
|
||||
{
|
||||
public void registerRenders() {
|
||||
MinecraftForgeClient.registerItemRenderer(BlockHandler.pillarInsert.blockID, new BlockPillarInsertRenderer());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.fireStaff.itemID, new ItemStaffFireRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.earthStaff.itemID, new ItemStaffEarthRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.airStaff.itemID, new ItemStaffAirRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.energyStaff.itemID, new ItemStaffEnergyRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.waterStaff.itemID, new ItemStaffWaterRenderer());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.fireOrb.itemID, new ItemOrbFireRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.earthOrb.itemID, new ItemOrbEarthRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.airOrb.itemID, new ItemOrbAirRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.energyOrb.itemID, new ItemOrbEnergyRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(ItemHandler$1.waterOrb.itemID, new ItemOrbWaterRenderer());
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeFire.class, new RenderStaffPower(0));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeWater.class, new RenderStaffPower(1));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeEarth.class, new RenderStaffPower(2));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeAir.class, new RenderStaffPower(3));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityChargeEnergy.class, new RenderStaffPower(4));
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPillarInsert.class, new TileEntityPillarInsertRenderer());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int addArmor(String armor)
|
||||
{
|
||||
return RenderingRegistry.addNewArmourRendererPrefix(armor);
|
||||
}
|
||||
|
||||
//particles
|
||||
@Override
|
||||
public void airFeetFX(World worldObj, double x, double y, double z, float scale, int age)
|
||||
{
|
||||
PowerAirFX airFX = new PowerAirFX(worldObj, x, y, z, scale, age);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(airFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earthFX(World worldObj, double x, double y, double z, float scale)
|
||||
{
|
||||
PowerEarthFX earthFX = new PowerEarthFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(earthFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void energyFX(World worldObj, double x, double y, double z, float scale)
|
||||
{
|
||||
PowerEnergyFX energyFX = new PowerEnergyFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(energyFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fireFX(World worldObj, double x, double y, double z, float scale)
|
||||
{
|
||||
PowerFireFX fireFX = new PowerFireFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(fireFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void waterFX(World worldObj, double x, double y, double z, float scale)
|
||||
{
|
||||
public void waterFX(World worldObj, double x, double y, double z, float scale) {
|
||||
PowerWaterFX waterFX = new PowerWaterFX(worldObj, x, y, z, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(waterFX);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lightCubeFX(World worldObj, double x, double y, double z, double motionX, double motionY, double motionZ, float scale)
|
||||
{
|
||||
LightCubeFX lightCubeFX = new LightCubeFX(worldObj, x, y, z, motionX, motionY, motionZ, scale);
|
||||
ModLoader.getMinecraftInstance().effectRenderer.addEffect(lightCubeFX);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,102 +1,83 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class LightCubeFX extends EntityFX {
|
||||
|
||||
public LightCubeFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public LightCubeFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public LightCubeFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float scale){
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = rand.nextInt(25);
|
||||
}
|
||||
public LightCubeFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float scale) {
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = rand.nextInt(25);
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/lightCubeFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/lightCubeFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,126 +1,103 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
public class PowerAirFX extends EntityFX {
|
||||
public PowerAirFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public class PowerAirFX extends EntityFX
|
||||
{
|
||||
public PowerAirFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public PowerAirFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float rotPitch, float rotYaw) {
|
||||
super(world, x, y, z);
|
||||
this.motionX = -MathHelper.sin(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.motionY = (-MathHelper.sin((this.rotationPitch) / 180.0F * (float) Math.PI));
|
||||
this.motionZ = MathHelper.cos(this.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float) Math.PI);
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = 1.0F;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 120;
|
||||
this.rotationPitch = rotPitch;
|
||||
this.rotationYaw = rotYaw;
|
||||
}
|
||||
|
||||
public PowerAirFX(World world, double x, double y, double z, float scale, int age){
|
||||
super(world, x, y, z);
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = age;
|
||||
}
|
||||
|
||||
public PowerAirFX(World world, double x, double y, double z, double motionX, double motionY, double motionZ, float rotPitch, float rotYaw){
|
||||
super(world, x, y, z);
|
||||
this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
|
||||
this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI));
|
||||
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = 1.0F;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 120;
|
||||
this.rotationPitch = rotPitch;
|
||||
this.rotationYaw = rotYaw;
|
||||
}
|
||||
public PowerAirFX(World world, double x, double y, double z, float scale, int age) {
|
||||
super(world, x, y, z);
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = age;
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/airFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/airFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,104 +1,83 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
public class PowerEarthFX extends EntityFX {
|
||||
public PowerEarthFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public class PowerEarthFX extends EntityFX
|
||||
{
|
||||
public PowerEarthFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public PowerEarthFX(World world, double x, double y, double z, float scale) {
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
|
||||
public PowerEarthFX(World world, double x, double y, double z, float scale){
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/earthFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/earthFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,104 +1,83 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
public class PowerEnergyFX extends EntityFX {
|
||||
public PowerEnergyFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public class PowerEnergyFX extends EntityFX
|
||||
{
|
||||
public PowerEnergyFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public PowerEnergyFX(World world, double x, double y, double z, float scale) {
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
|
||||
public PowerEnergyFX(World world, double x, double y, double z, float scale){
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/energyFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/energyFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,83 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
public class PowerFireFX extends EntityFX {
|
||||
public PowerFireFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public class PowerFireFX extends EntityFX
|
||||
{
|
||||
public PowerFireFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public PowerFireFX(World world, double x, double y, double z, float scale) {
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
|
||||
public PowerFireFX(World world, double x, double y, double z, float scale){
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/fireFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/fireFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,104 +1,83 @@
|
|||
package MysticWorld.Client.FX;
|
||||
package mysticworld.client.fx;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
public class PowerWaterFX extends EntityFX {
|
||||
public PowerWaterFX(World world, double x, double y, double z) {
|
||||
super(world, x, y, z);
|
||||
}
|
||||
|
||||
public class PowerWaterFX extends EntityFX
|
||||
{
|
||||
public PowerWaterFX(World world, double x, double y, double z)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
}
|
||||
public PowerWaterFX(World world, double x, double y, double z, float scale) {
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
|
||||
public PowerWaterFX(World world, double x, double y, double z, float scale){
|
||||
super(world, x, y, z);
|
||||
this.motionX *= 0.019999999552965164D;
|
||||
this.motionY *= 0.019999999552965164D;
|
||||
this.motionZ *= 0.019999999552965164D;
|
||||
this.motionX += motionX;
|
||||
this.motionY += motionY;
|
||||
this.motionZ += motionZ;
|
||||
this.particleRed = 1.0F;
|
||||
this.particleGreen = 1.0F;
|
||||
this.particleBlue = 1.0F;
|
||||
this.particleScale = scale;
|
||||
this.noClip = true;
|
||||
this.particleMaxAge = 15;
|
||||
}
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
if (this.particleAge++ >= this.particleMaxAge) {
|
||||
this.setDead();
|
||||
}
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
if (this.posY == this.prevPosY) {
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
if (this.onGround) {
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
this.prevPosX = this.posX;
|
||||
this.prevPosY = this.posY;
|
||||
this.prevPosZ = this.posZ;
|
||||
|
||||
if (this.particleAge++ >= this.particleMaxAge)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
|
||||
this.motionY += 0.004D;
|
||||
this.moveEntity(this.motionX, this.motionY, this.motionZ);
|
||||
|
||||
if (this.posY == this.prevPosY)
|
||||
{
|
||||
this.motionX *= 1.1D;
|
||||
this.motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
this.motionX *= 0.9599999785423279D;
|
||||
this.motionY *= 0.9599999785423279D;
|
||||
this.motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (this.onGround)
|
||||
{
|
||||
this.motionX *= 0.699999988079071D;
|
||||
this.motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("MysticMods:textures" + "/misc/waterFX.png"));
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * (double) par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * (double) par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * (double) par2 - interpPosZ);
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos - par5 * scale - par7 * scale), 0D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos - par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos - par5 * scale + par7 * scale), 1D, 1D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale + par6 * scale), (double) (yPos + par4 * scale), (double) (zPos + par5 * scale + par7 * scale), 1D, 0D);
|
||||
tessellator.addVertexWithUV((double) (xPos + par3 * scale - par6 * scale), (double) (yPos - par4 * scale), (double) (zPos + par5 * scale - par7 * scale), 0D, 0D);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
@Override
|
||||
public void renderParticle(Tessellator tessellator, float par2, float par3, float par4, float par5, float par6, float par7) {
|
||||
tessellator.draw();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/waterFX.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
float scale = 0.1F * this.particleScale;
|
||||
float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX);
|
||||
float yPos = (float) (this.prevPosY + (this.posY - this.prevPosY) * par2 - interpPosY);
|
||||
float zPos = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(240);
|
||||
tessellator.setColorOpaque_F(this.particleRed, this.particleGreen, this.particleBlue);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale - par6 * scale, yPos - par4 * scale, zPos - par5 * scale - par7 * scale, 0D, 1D);
|
||||
tessellator.addVertexWithUV(xPos - par3 * scale + par6 * scale, yPos + par4 * scale, zPos - par5 * scale + par7 * scale, 1D, 1D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale + par6 * scale, yPos + par4 * scale, zPos + par5 * scale + par7 * scale, 1D, 0D);
|
||||
tessellator.addVertexWithUV(xPos + par3 * scale - par6 * scale, yPos - par4 * scale, zPos + par5 * scale - par7 * scale, 0D, 0D);
|
||||
tessellator.draw();
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png"));
|
||||
tessellator.startDrawingQuads();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue