mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-27 07:23:24 +00:00
Added a config option to disable elf portal particles.
This commit is contained in:
1 parent
1364d489f9
commit
9bf7b25d6e
4 files changed
+23
-13
No files matched your search
@@ -28,6 +28,7 @@ import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.mana.TilePool;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.ItemLexicon;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
@@ -98,7 +99,8 @@ public class TileAlfPortal extends TileMod {
|
||||
|
||||
if(ticksOpen > 60) {
|
||||
ticksSinceLastItem++;
|
||||
blockParticle(meta);
|
||||
if(ConfigHandler.elfPortalParticlesEnabled)
|
||||
blockParticle(meta);
|
||||
|
||||
AxisAlignedBB aabb = getPortalAABB();
|
||||
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, aabb);
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
|
||||
public class TilePylon extends TileEntity {
|
||||
@@ -38,21 +39,23 @@ public class TilePylon extends TileEntity {
|
||||
Vector3 centerBlock = new Vector3(centerX + 0.5, centerY + 0.75 + (Math.random() - 0.5 * 0.25), centerZ + 0.5);
|
||||
|
||||
if(meta == 1) {
|
||||
double worldTime = (int) worldObj.getTotalWorldTime();
|
||||
worldTime += new Random(xCoord ^ yCoord ^ zCoord).nextInt(1000);
|
||||
worldTime /= 5;
|
||||
if(ConfigHandler.elfPortalParticlesEnabled) {
|
||||
double worldTime = (int) worldObj.getTotalWorldTime();
|
||||
worldTime += new Random(xCoord ^ yCoord ^ zCoord).nextInt(1000);
|
||||
worldTime /= 5;
|
||||
|
||||
float r = 0.75F + (float) Math.random() * 0.05F;
|
||||
double x = xCoord + 0.5 + Math.cos(worldTime) * r;
|
||||
double z = zCoord + 0.5 + Math.sin(worldTime) * r;
|
||||
float r = 0.75F + (float) Math.random() * 0.05F;
|
||||
double x = xCoord + 0.5 + Math.cos(worldTime) * r;
|
||||
double z = zCoord + 0.5 + Math.sin(worldTime) * r;
|
||||
|
||||
Vector3 ourCoords = new Vector3(x, yCoord + 0.25, z);
|
||||
centerBlock.sub(new Vector3(0, 0.5, 0));
|
||||
Vector3 movementVector = centerBlock.sub(ourCoords).normalize().multiply(0.2);
|
||||
Vector3 ourCoords = new Vector3(x, yCoord + 0.25, z);
|
||||
centerBlock.sub(new Vector3(0, 0.5, 0));
|
||||
Vector3 movementVector = centerBlock.sub(ourCoords).normalize().multiply(0.2);
|
||||
|
||||
Botania.proxy.wispFX(worldObj, x, yCoord + 0.25, z, (float) Math.random() * 0.25F, 0.75F + (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, 0.25F + (float) Math.random() * 0.1F, -0.075F - (float) Math.random() * 0.015F);
|
||||
if(worldObj.rand.nextInt(3) == 0)
|
||||
Botania.proxy.wispFX(worldObj, x, yCoord + 0.25, z, (float) Math.random() * 0.25F, 0.75F + (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, 0.25F + (float) Math.random() * 0.1F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
Botania.proxy.wispFX(worldObj, x, yCoord + 0.25, z, (float) Math.random() * 0.25F, 0.75F + (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, 0.25F + (float) Math.random() * 0.1F, -0.075F - (float) Math.random() * 0.015F);
|
||||
if(worldObj.rand.nextInt(3) == 0)
|
||||
Botania.proxy.wispFX(worldObj, x, yCoord + 0.25, z, (float) Math.random() * 0.25F, 0.75F + (float) Math.random() * 0.25F, (float) Math.random() * 0.25F, 0.25F + (float) Math.random() * 0.1F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
}
|
||||
} else {
|
||||
Vector3 ourCoords = Vector3.fromTileEntityCenter(this).add(0, 1 + (Math.random() - 0.5 * 0.25), 0);
|
||||
Vector3 movementVector = centerBlock.sub(ourCoords).normalize().multiply(0.2);
|
||||
|
||||
@@ -34,6 +34,7 @@ public final class ConfigHandler {
|
||||
public static double flowerParticleFrequency = 0.75F;
|
||||
public static boolean blockBreakParticles = true;
|
||||
public static boolean blockBreakParticlesTool = true;
|
||||
public static boolean elfPortalParticlesEnabled = true;
|
||||
public static boolean referencesEnabled = true;
|
||||
|
||||
public static boolean versionCheckEnabled = true;
|
||||
@@ -88,6 +89,9 @@ public final class ConfigHandler {
|
||||
desc = "Set to false to remove the block breaking particles from the Mana Shatterer, as there can be a good amount in higher levels.";
|
||||
blockBreakParticlesTool = loadPropBool("blockBreakingParticlesTool.enabled", desc, blockBreakParticlesTool);
|
||||
|
||||
desc = "Set to false to disable the particles in the elven portal.";
|
||||
elfPortalParticlesEnabled = loadPropBool("elfPortal.particles.enabled", desc, elfPortalParticlesEnabled);
|
||||
|
||||
desc = "Set to false to disable the references in flower tooltips. (You monster D:)";
|
||||
referencesEnabled = loadPropBool("references.enabled", desc, referencesEnabled);
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ lexicon.enable.rotatingItems=Lexicon Rotating Items
|
||||
lexicon.render.3D=3D Lexicon Render
|
||||
powerSystem.subtle=Use Subtle Power System
|
||||
pylonModel.old=Use Old Pylon Model
|
||||
elfPortal.particles.enabled=Enable Portal Particles
|
||||
references.enabled=Enable Tooltip References
|
||||
shaders.enabled=Enable Shader Usage
|
||||
spreader.posShift=Spreader Pos Shift
|
||||
|
||||
Reference in new issue
Block a user