Work on things

This commit is contained in:
Nedelosk committed 2016-10-27 16:05:15 +02:00
1 parent 5bb4b5d9a5
commit 3bf37f8838
31 files changed
+519 -762

No files matched your search

@@ -1,5 +1,6 @@
package binnie.genetics.machine;
import binnie.core.BinnieCore;
import binnie.core.genetics.Gene;
import binnie.core.machines.IMachine;
import binnie.core.machines.Machine;
@@ -28,8 +29,10 @@ import forestry.api.genetics.IAllele;
import forestry.api.genetics.IChromosomeType;
import forestry.api.genetics.IIndividual;
import forestry.api.genetics.ISpeciesRoot;
import net.minecraft.client.particle.Particle;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.relauncher.Side;
@@ -194,76 +197,76 @@ public class Isolator {
@SideOnly(Side.CLIENT)
@Override
public void onRandomDisplayTick(final World world, final int x, final int y, final int z, final Random rand) {
// if (!this.getUtil().getProcess().isInProgress()) {
// return;
// }
// BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new EntityFX(world, x + 0.4 + 0.2 * rand.nextDouble(), y + 1.6, z + 0.4 + rand.nextDouble() * 0.2, 0.0, 0.0, 0.0) {
// double axisX = 0.0;
// double axisZ = 0.0;
// double angle = 0.0;
//
// {
// this.motionX = 0.0;
// this.motionZ = 0.0;
// this.motionY = -0.012;
// this.particleMaxAge = 100;
// this.particleGravity = 0.0f;
// this.noClip = true;
// this.setRBGColorF(0.8f, 0.4f, 0.0f);
// }
//
// @Override
// public void onUpdate() {
// super.onUpdate();
// this.angle += 0.06;
// this.setAlphaF((float) Math.sin(3.14 * this.particleAge / this.particleMaxAge));
// }
//
// @Override
// public int getFXLayer() {
// return 0;
// }
// });
public void onRandomDisplayTick(World world, BlockPos pos, Random rand) {
if (!this.getUtil().getProcess().isInProgress()) {
return;
}
BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new Particle(world, pos.getX() + 0.4 + 0.2 * rand.nextDouble(), pos.getY() + 1.6, pos.getZ() + 0.4 + rand.nextDouble() * 0.2, 0.0, 0.0, 0.0) {
double axisX = 0.0;
double axisZ = 0.0;
double angle = 0.0;
{
this.motionX = 0.0;
this.motionZ = 0.0;
this.motionY = -0.012;
this.particleMaxAge = 100;
this.particleGravity = 0.0f;
this.field_190017_n = true;
this.setRBGColorF(0.8f, 0.4f, 0.0f);
}
@Override
public void onUpdate() {
super.onUpdate();
this.angle += 0.06;
this.setAlphaF((float) Math.sin(3.14 * this.particleAge / this.particleMaxAge));
}
@Override
public int getFXLayer() {
return 0;
}
});
}
@SideOnly(Side.CLIENT)
@Override
public void onDisplayTick(final World world, final int x, final int y, final int z, final Random rand) {
// final int tick = (int) (world.getTotalWorldTime() % 6L);
// if ((tick == 0 || tick == 5) && this.getUtil().getProcess().isInProgress()) {
// BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new EntityFX(world, x + 0.5, y + 1, z + 0.5, 0.0, 0.0, 0.0) {
// double axisX = this.posX;
// double axisZ = this.posZ;
// double angle = 0.7 + (int) (this.worldObj.getTotalWorldTime() % 2L) * 3.1415;
//
// {
// this.axisX = 0.0;
// this.axisZ = 0.0;
// this.angle = 0.0;
// this.motionX = 0.0;
// this.motionZ = 0.0;
// this.motionY = 0.012;
// this.particleMaxAge = 100;
// this.particleGravity = 0.0f;
// this.noClip = true;
// this.setRBGColorF(0.8f, 0.0f, 1.0f);
// }
//
// @Override
// public void onUpdate() {
// super.onUpdate();
// this.angle += 0.06;
// this.setPosition(this.axisX + 0.26 * Math.sin(this.angle), this.posY, this.axisZ + 0.26 * Math.cos(this.angle));
// this.setAlphaF((float) Math.cos(1.57 * this.particleAge / this.particleMaxAge));
// }
//
// @Override
// public int getFXLayer() {
// return 0;
// }
// });
// }
public void onDisplayTick(World world, BlockPos pos, Random rand) {
final int tick = (int) (world.getTotalWorldTime() % 6L);
if ((tick == 0 || tick == 5) && this.getUtil().getProcess().isInProgress()) {
BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new Particle(world, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, 0.0, 0.0, 0.0) {
double axisX = this.posX;
double axisZ = this.posZ;
double angle = 0.7 + (int) (this.worldObj.getTotalWorldTime() % 2L) * 3.1415;
{
this.axisX = 0.0;
this.axisZ = 0.0;
this.angle = 0.0;
this.motionX = 0.0;
this.motionZ = 0.0;
this.motionY = 0.012;
this.particleMaxAge = 100;
this.particleGravity = 0.0f;
this.field_190017_n = true;
this.setRBGColorF(0.8f, 0.0f, 1.0f);
}
@Override
public void onUpdate() {
super.onUpdate();
this.angle += 0.06;
this.setPosition(this.axisX + 0.26 * Math.sin(this.angle), this.posY, this.axisZ + 0.26 * Math.cos(this.angle));
this.setAlphaF((float) Math.cos(1.57 * this.particleAge / this.particleMaxAge));
}
@Override
public int getFXLayer() {
return 0;
}
});
}
}
}
}