mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-18 19:29:28 +00:00
- Tested against Server-Client environment & fixxed issues there.
- AuraPylon effect for Vitium and the taintplosion now listen to TC config
This commit is contained in:
1 parent
ea15ad5c9f
commit
ff26bad7fb
6 files changed
+38
-24
No files matched your search
@@ -65,7 +65,7 @@ public class FXVortex {
|
||||
if(agescale >= 1.0F) agescale = 2 - agescale;
|
||||
float size = 0.2F + 0.1F * agescale;
|
||||
if(parent != null) {
|
||||
size += size * (((float) parent.getSizeStage()) * 0.1F);
|
||||
size += size * (((float) parent.getSizeStage()) * 0.04F);
|
||||
}
|
||||
|
||||
float anglePerc = (float) (ClientHandler.ticks % 300) / 300F;
|
||||
|
||||
@@ -2,7 +2,6 @@ package makeo.gadomancy.client.util;
|
||||
|
||||
import makeo.gadomancy.common.utils.MiscUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -179,6 +179,7 @@ public class AuraEffects {
|
||||
|
||||
@Override
|
||||
public void doBlockEffect(ChunkCoordinates originTile, ChunkCoordinates selectedBlock, World world) {
|
||||
if(!Config.genTaint) return;
|
||||
int x = selectedBlock.posX;
|
||||
int y = selectedBlock.posY;
|
||||
int z = selectedBlock.posZ;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
private static int multiblockIDCounter = 0;
|
||||
|
||||
//Standard multiblock stuff
|
||||
private boolean isMasterTile = true; //For debugging
|
||||
private boolean isMasterTile = false; //For debugging
|
||||
private int multiblockYIndex = -1, multiblockId = -1;
|
||||
|
||||
private boolean isMultiblockPresent = false;
|
||||
@@ -252,9 +252,9 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
this.cb -= this.tbi;
|
||||
}
|
||||
int count = 1;
|
||||
if(cr < 0) cr = 0;
|
||||
if(cg < 0) cg = 0;
|
||||
if(cb < 0) cb = 0;
|
||||
cr = Math.min(1.0F, Math.max(0.0F, cr));
|
||||
cg = Math.min(1.0F, Math.max(0.0F, cg));
|
||||
cb = Math.min(1.0F, Math.max(0.0F, cb));
|
||||
FXEssentiaTrail essentiaTrail = new FXEssentiaTrail(worldObj, xCoord + 0.5, yCoord + 0.4, zCoord + 0.5, xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, count, new Color(cr, cg, cb).getRGB(), 0.8F);
|
||||
essentiaTrail.noClip = true;
|
||||
essentiaTrail.motionY = (0.01F + MathHelper.sin(count / 3.0F) * 0.001F);
|
||||
@@ -339,22 +339,28 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void playLightningEffects() {
|
||||
if(incSize > 5 || worldObj.rand.nextBoolean()) {
|
||||
double originX = xCoord + 0.5;
|
||||
double originY = yCoord + 1.5;
|
||||
double originZ = zCoord + 0.5;
|
||||
double targetX = xCoord + 0.4 + worldObj.rand.nextFloat() * 0.2;
|
||||
double targetY = yCoord + 0.4 + (worldObj.rand.nextBoolean() ? 2.2 : 0);
|
||||
double targetZ = zCoord + 0.4 + worldObj.rand.nextFloat() * 0.2;
|
||||
FXLightningBolt bolt = new FXLightningBolt(Minecraft.getMinecraft().theWorld, originX, originY, originZ,
|
||||
targetX, targetY, targetZ, Minecraft.getMinecraft().theWorld.rand.nextLong(), 10, 4.0F, 5);
|
||||
bolt.defaultFractal();
|
||||
bolt.setType(5);
|
||||
bolt.finalizeBolt();
|
||||
if(incSize < 6) {
|
||||
if(incSize < 2) {
|
||||
if(worldObj.rand.nextInt(6) != 0) return;
|
||||
} else {
|
||||
if(worldObj.rand.nextBoolean()) return;
|
||||
}
|
||||
}
|
||||
double originX = xCoord + 0.5;
|
||||
double originY = yCoord + 1.5;
|
||||
double originZ = zCoord + 0.5;
|
||||
double targetX = xCoord + 0.4 + worldObj.rand.nextFloat() * 0.2;
|
||||
double targetY = yCoord + 0.4 + (worldObj.rand.nextBoolean() ? 2.2 : 0);
|
||||
double targetZ = zCoord + 0.4 + worldObj.rand.nextFloat() * 0.2;
|
||||
FXLightningBolt bolt = new FXLightningBolt(Minecraft.getMinecraft().theWorld, originX, originY, originZ,
|
||||
targetX, targetY, targetZ, Minecraft.getMinecraft().theWorld.rand.nextLong(), 10, 4.0F, 5);
|
||||
bolt.defaultFractal();
|
||||
bolt.setType(5);
|
||||
bolt.finalizeBolt();
|
||||
}
|
||||
|
||||
private void vortexEntities() {
|
||||
if(incSize <= 0) return;
|
||||
List entities = worldObj.getEntitiesWithinAABB(Entity.class,
|
||||
AxisAlignedBB.getBoundingBox(xCoord - 0.5, yCoord - 0.5, zCoord - 0.5,
|
||||
xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(4, 4, 4));
|
||||
@@ -367,6 +373,8 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
}
|
||||
|
||||
private void applyMovementVectors(Entity entity) {
|
||||
double mult = incSize * (1D / ((double) MAX_SIZE));
|
||||
|
||||
double var3 = (xCoord + 0.5D - entity.posX) / 8.0D;
|
||||
double var5 = (yCoord + 1.5D - entity.posY) / 8.0D;
|
||||
double var7 = (zCoord + 0.5D - entity.posZ) / 8.0D;
|
||||
@@ -374,9 +382,9 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
double var11 = 1.0D - var9;
|
||||
if (var11 > 0.0D) {
|
||||
var11 *= var11;
|
||||
entity.motionX += var3 / var9 * var11 * 0.05D;
|
||||
entity.motionY += var5 / var9 * var11 * 0.08D;
|
||||
entity.motionZ += var7 / var9 * var11 * 0.05D;
|
||||
entity.motionX += var3 / var9 * var11 * (0.08D * mult);
|
||||
entity.motionY += var5 / var9 * var11 * (0.11D * mult);
|
||||
entity.motionZ += var7 / var9 * var11 * (0.08D * mult);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,12 +534,12 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
|
||||
@Override
|
||||
public boolean doesContainerAccept(Aspect aspect) {
|
||||
return isMultiblockFormed() && multiblockYIndex == 1;
|
||||
return isMultiblockFormed() && multiblockYIndex == 1 && canAccept(aspect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int addToContainer(Aspect aspect, int i) {
|
||||
if(doesContainerAccept(aspect)) {
|
||||
if(doesContainerAccept(aspect) && canAccept(aspect)) {
|
||||
TileEssentiaCompressor master = tryFindMasterTile();
|
||||
if(master == null) return 0;
|
||||
master.al.add(aspect, i);
|
||||
@@ -655,7 +663,7 @@ public class TileEssentiaCompressor extends SynchronizedTileEntity implements IA
|
||||
|
||||
@Override
|
||||
public int addEssentia(Aspect aspect, int i, ForgeDirection direction) {
|
||||
if(canInputFrom(direction)) {
|
||||
if(canInputFrom(direction) && canAccept(aspect)) {
|
||||
TileEssentiaCompressor master = tryFindMasterTile();
|
||||
if(master == null) return 0;
|
||||
master.al.add(aspect, i);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package makeo.gadomancy.common.blocks.tiles;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import makeo.gadomancy.client.util.UtilsFX;
|
||||
import makeo.gadomancy.common.entities.EntityPermNoClipItem;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
@@ -212,6 +214,7 @@ public class TileKnowledgeBook extends SynchronizedTileEntity implements EntityP
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private void doResearchEffects() {
|
||||
if((ticksExisted & 15) == 0) {
|
||||
UtilsFX.doRuneEffects(Minecraft.getMinecraft().theWorld, xCoord, yCoord - 1, zCoord, 0);
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
import thaumcraft.common.lib.world.ThaumcraftWorldGenerator;
|
||||
@@ -53,6 +54,8 @@ public class ExplosionHelper {
|
||||
world.setBlock(xx, yy, zz, ConfigBlocks.blockFluxGas, 8, 3);
|
||||
}
|
||||
}
|
||||
if(!Config.genTaint) continue;
|
||||
|
||||
if(taintBiome && world.rand.nextInt(chanceToTaint) == 0) {
|
||||
Utils.setBiomeAt(world, xx, zz, ThaumcraftWorldGenerator.biomeTaint);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user