removed performance config options. Yea, really.

This commit is contained in:
Ellpeck 2016-11-07 19:58:34 +01:00
parent ff1f38d1ac
commit 14255ea801
18 changed files with 26 additions and 79 deletions

View file

@ -49,10 +49,6 @@ public enum ConfigBoolValues{
WATER_BOWL("Water Bowl", ConfigCategories.OTHER, true, "Should right-clicking a bowl on water blocks create a water bowl?"), WATER_BOWL("Water Bowl", ConfigCategories.OTHER, true, "Should right-clicking a bowl on water blocks create a water bowl?"),
LESS_SOUND("Less Sound", ConfigCategories.PERFORMANCE, false, "If true, There will be less sounds from machines from Actually Additions."),
LESS_PARTICLES("Less Particles", ConfigCategories.PERFORMANCE, false, "If true, there will be less particles displayed from Actually Additions machines and blocks."),
LESS_BLOCK_BREAKING_EFFECTS("Less Block Breaking Effects", ConfigCategories.PERFORMANCE, false, "If true, there will be less sound effects from blocks breaking via Actually Additions machines."),
LASER_RELAY_LOSS("Laser Relay Energy Loss", ConfigCategories.MACHINE_VALUES, true, "If Energy Laser Relays should have energy loss"), LASER_RELAY_LOSS("Laser Relay Energy Loss", ConfigCategories.MACHINE_VALUES, true, "If Energy Laser Relays should have energy loss"),
SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)"); SUPER_DUPER_HARD_MODE("Super Duper Hard Recipes", ConfigCategories.OTHER, false, "Turn this on to make recipes for items from the mod really hard. (This is a joke feature poking fun at the whole FTB Infinity Expert Mode style of playing. You shouldn't really turn this on as it makes the mod completely unplayable.)");

View file

@ -10,7 +10,6 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -55,9 +54,7 @@ public class ItemChestToCrateUpgrade extends ItemBase{
} }
//Set New Block //Set New Block
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
world.playEvent(2001, pos, Block.getStateId(world.getBlockState(pos))); world.playEvent(2001, pos, Block.getStateId(world.getBlockState(pos)));
}
world.setBlockState(pos, this.end, 2); world.setBlockState(pos, this.end, 2);
//Copy Items into new Chest //Copy Items into new Chest

View file

@ -10,7 +10,6 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -131,10 +130,8 @@ public class ItemFillingWand extends ItemEnergy{
if(creative || removeFittingItem(replaceState, player)){ if(creative || removeFittingItem(replaceState, player)){
world.setBlockState(pos, replaceState, 2); world.setBlockState(pos, replaceState, 2);
if(!ConfigBoolValues.LESS_SOUND.isEnabled()){
SoundType sound = replaceState.getBlock().getSoundType(replaceState, world, pos, player); SoundType sound = replaceState.getBlock().getSoundType(replaceState, world, pos, player);
world.playSound(null, pos, sound.getPlaceSound(), SoundCategory.BLOCKS, (sound.getVolume()+1.0F)/2.0F, sound.getPitch()*0.8F); world.playSound(null, pos, sound.getPlaceSound(), SoundCategory.BLOCKS, (sound.getVolume()+1.0F)/2.0F, sound.getPitch()*0.8F);
}
if(!creative){ if(!creative){
this.extractEnergy(stack, energyUse, false); this.extractEnergy(stack, energyUse, false);

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem; import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockBush; import net.minecraft.block.BlockBush;
@ -80,9 +79,7 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem{
//Breaks the Blocks //Breaks the Blocks
boolean broke = this.breakStuff(world, x, y, z); boolean broke = this.breakStuff(world, x, y, z);
//Plays a Minecart sounds (It really sounds like a Leaf Blower!) //Plays a Minecart sounds (It really sounds like a Leaf Blower!)
if(!ConfigBoolValues.LESS_SOUND.isEnabled()){
world.playSound(null, x, y, z, SoundEvents.ENTITY_MINECART_RIDING, SoundCategory.PLAYERS, 0.3F, 0.001F); world.playSound(null, x, y, z, SoundEvents.ENTITY_MINECART_RIDING, SoundCategory.PLAYERS, 0.3F, 0.001F);
}
return broke; return broke;
} }
} }
@ -126,9 +123,7 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem{
drops.addAll(theBlock.getDrops(world, theCoord, world.getBlockState(theCoord), 0)); drops.addAll(theBlock.getDrops(world, theCoord, world.getBlockState(theCoord), 0));
//Plays the Breaking Sound //Plays the Breaking Sound
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
world.playEvent(2001, theCoord, Block.getStateId(world.getBlockState(theCoord))); world.playEvent(2001, theCoord, Block.getStateId(world.getBlockState(theCoord)));
}
//Deletes the Block //Deletes the Block
world.setBlockToAir(theCoord); world.setBlockToAir(theCoord);

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre; import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockNetherrack; import net.minecraft.block.BlockNetherrack;
import net.minecraft.block.BlockStone; import net.minecraft.block.BlockStone;
@ -138,9 +137,7 @@ public class LensMining extends Lens{
IBlockState state = block.getStateFromMeta(stack.getItemDamage()); IBlockState state = block.getStateFromMeta(stack.getItemDamage());
tile.getWorldObject().setBlockState(hitPos, state, 2); tile.getWorldObject().setBlockState(hitPos, state, 2);
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
tile.getWorldObject().playEvent(2001, hitPos, Block.getStateId(state)); tile.getWorldObject().playEvent(2001, hitPos, Block.getStateId(state));
}
tile.extractEnergy(adaptedUse); tile.extractEnergy(adaptedUse);
} }

View file

@ -23,7 +23,6 @@ import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace; import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace;
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture; import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly; import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler; import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
import net.minecraft.block.Block; import net.minecraft.block.Block;
@ -148,9 +147,7 @@ public class MethodHandler implements IMethodHandler{
if(recipe != null && recipe.type == tile.getLens() && tile.getEnergy() >= recipe.energyUse){ if(recipe != null && recipe.type == tile.getLens() && tile.getEnergy() >= recipe.energyUse){
ItemStack output = recipe.outputStack; ItemStack output = recipe.outputStack;
if(output != null){ if(output != null){
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
tile.getWorldObject().playEvent(2001, pos, Block.getStateId(tile.getWorldObject().getBlockState(pos))); tile.getWorldObject().playEvent(2001, pos, Block.getStateId(tile.getWorldObject().getBlockState(pos)));
}
if(output.getItem() instanceof ItemBlock){ if(output.getItem() instanceof ItemBlock){
tile.getWorldObject().setBlockState(pos, Block.getBlockFromItem(output.getItem()).getStateFromMeta(output.getItemDamage()), 2); tile.getWorldObject().setBlockState(pos, Block.getBlockFromItem(output.getItem()).getStateFromMeta(output.getItemDamage()), 2);
@ -191,7 +188,7 @@ public class MethodHandler implements IMethodHandler{
if(stack.stackSize-itemsPossible > 0){ if(stack.stackSize-itemsPossible > 0){
ItemStack stackCopy = stack.copy(); ItemStack stackCopy = stack.copy();
stackCopy.stackSize-=itemsPossible; stackCopy.stackSize -= itemsPossible;
EntityItem inputLeft = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, stackCopy); EntityItem inputLeft = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, stackCopy);
tile.getWorldObject().spawnEntityInWorld(inputLeft); tile.getWorldObject().spawnEntityInWorld(inputLeft);

View file

@ -40,10 +40,8 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
} }
public static void shootLaser(World world, double startX, double startY, double startZ, double endX, double endY, double endZ, Lens currentLens){ public static void shootLaser(World world, double startX, double startY, double startZ, double endX, double endY, double endZ, Lens currentLens){
if(!ConfigBoolValues.LESS_SOUND.isEnabled()){
world.playSound(null, startX, startY, startZ, SoundHandler.reconstructor, SoundCategory.BLOCKS, 0.35F, 1.0F); world.playSound(null, startX, startY, startZ, SoundHandler.reconstructor, SoundCategory.BLOCKS, 0.35F, 1.0F);
} AssetUtil.shootParticles(world, startX, startY, startZ, endX, endY, endZ, currentLens.getColor(), 8, 2F, 1F);
AssetUtil.shootParticles(world, startX, startY, startZ, endX, endY, endZ, currentLens.getColor(), ConfigBoolValues.LESS_PARTICLES.isEnabled() ? 2 : 8, 2F, 1F);
} }
@Override @Override

View file

@ -11,8 +11,6 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockLiquid; import net.minecraft.block.BlockLiquid;
@ -92,9 +90,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{
if(this.worldObj.rand.nextFloat() <= chance){ if(this.worldObj.rand.nextFloat() <= chance){
if(WorldUtil.addToInventory(this, drops, false, true)){ if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(stateToBreak)); this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(stateToBreak));
}
this.worldObj.setBlockToAir(coordsBlock); this.worldObj.setBlockToAir(coordsBlock);
WorldUtil.addToInventory(this, drops, true, true); WorldUtil.addToInventory(this, drops, true, true);
this.markDirty(); this.markDirty();

View file

@ -146,7 +146,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
if(!this.worldObj.isRemote){ if(!this.worldObj.isRemote){
if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= WATER_USE){ if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= WATER_USE){
if(this.storage.getEnergyStored() >= ENERGY_USED){ if(this.storage.getEnergyStored() >= ENERGY_USED){
if(this.brewTime%30 == 0 && !ConfigBoolValues.LESS_SOUND.isEnabled()){ if(this.brewTime%30 == 0){
this.worldObj.playSound(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), SoundHandler.coffeeMachine, SoundCategory.BLOCKS, 0.35F, 1.0F); this.worldObj.playSound(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), SoundHandler.coffeeMachine, SoundCategory.BLOCKS, 0.35F, 1.0F);
} }

View file

@ -11,8 +11,6 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import cofh.api.energy.EnergyStorage; import cofh.api.energy.EnergyStorage;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -92,9 +90,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
if(this.worldObj.rand.nextFloat() <= chance){ if(this.worldObj.rand.nextFloat() <= chance){
if(WorldUtil.addToInventory(this, drops, false, true)){ if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(this.worldObj.getBlockState(coordsBlock))); this.worldObj.playEvent(2001, coordsBlock, Block.getStateId(this.worldObj.getBlockState(coordsBlock)));
}
this.worldObj.setBlockToAir(coordsBlock); this.worldObj.setBlockToAir(coordsBlock);
WorldUtil.addToInventory(this, drops, true, true); WorldUtil.addToInventory(this, drops, true, true);
this.storage.extractEnergy(ENERGY_USE, false); this.storage.extractEnergy(ENERGY_USE, false);

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe; import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -57,7 +56,6 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase{
for(EmpowererRecipe recipe : recipes){ for(EmpowererRecipe recipe : recipes){
TileEntityDisplayStand[] modifierStands = this.getFittingModifiers(recipe, recipe.time); TileEntityDisplayStand[] modifierStands = this.getFittingModifiers(recipe, recipe.time);
if(modifierStands != null){ //Meaning the display stands around match all the criteria if(modifierStands != null){ //Meaning the display stands around match all the criteria
boolean lessParticles = ConfigBoolValues.LESS_PARTICLES.isEnabled();
this.processTime++; this.processTime++;
boolean done = this.processTime >= recipe.time; boolean done = this.processTime >= recipe.time;
@ -69,19 +67,15 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase{
stand.decrStackSize(0, 1); stand.decrStackSize(0, 1);
} }
if(!lessParticles){
AssetUtil.shootParticles(this.worldObj, stand.getPos().getX(), stand.getPos().getY()+0.45F, stand.getPos().getZ(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), recipe.particleColor, 8, 0.5F, 1F); AssetUtil.shootParticles(this.worldObj, stand.getPos().getX(), stand.getPos().getY()+0.45F, stand.getPos().getZ(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), recipe.particleColor, 8, 0.5F, 1F);
} }
}
if(!lessParticles && this.processTime%5 == 0 && this.worldObj instanceof WorldServer){ if(this.processTime%5 == 0 && this.worldObj instanceof WorldServer){
((WorldServer)this.worldObj).spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, false, this.pos.getX()+0.5, this.pos.getY()+1.1, this.pos.getZ()+0.5, 3, 0, 0, 0, 0.1D); ((WorldServer)this.worldObj).spawnParticle(EnumParticleTypes.FIREWORKS_SPARK, false, this.pos.getX()+0.5, this.pos.getY()+1.1, this.pos.getZ()+0.5, 3, 0, 0, 0, 0.1D);
} }
if(done){ if(done){
if(!lessParticles){
((WorldServer)this.worldObj).spawnParticle(EnumParticleTypes.END_ROD, false, this.pos.getX()+0.5, this.pos.getY()+1.1, this.pos.getZ()+0.5, 300, 0, 0, 0, 0.25D); ((WorldServer)this.worldObj).spawnParticle(EnumParticleTypes.END_ROD, false, this.pos.getX()+0.5, this.pos.getY()+1.1, this.pos.getZ()+0.5, 300, 0, 0, 0, 0.25D);
}
this.slots[0] = recipe.output.copy(); this.slots[0] = recipe.output.copy();
this.markDirty(); this.markDirty();

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import cofh.api.energy.EnergyStorage; import cofh.api.energy.EnergyStorage;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.*; import net.minecraft.block.*;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -95,9 +94,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements ICustom
if(WorldUtil.addToInventory(this, 6, 12, drops, EnumFacing.UP, false, true)){ if(WorldUtil.addToInventory(this, 6, 12, drops, EnumFacing.UP, false, true)){
WorldUtil.addToInventory(this, 6, 12, drops, EnumFacing.UP, true, true); WorldUtil.addToInventory(this, 6, 12, drops, EnumFacing.UP, true, true);
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, plant, Block.getStateId(plantState)); this.worldObj.playEvent(2001, plant, Block.getStateId(plantState));
}
this.worldObj.setBlockToAir(plant); this.worldObj.setBlockToAir(plant);
didSomething = true; didSomething = true;
} }

View file

@ -173,7 +173,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements ICusto
this.lastAutoSplit = this.isAutoSplit; this.lastAutoSplit = this.isAutoSplit;
} }
if(shouldPlaySound && !ConfigBoolValues.LESS_SOUND.isEnabled()){ if(shouldPlaySound){
this.worldObj.playSound(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), SoundHandler.crusher, SoundCategory.BLOCKS, 0.15F, 1.0F); this.worldObj.playSound(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), SoundHandler.crusher, SoundCategory.BLOCKS, 0.15F, 1.0F);
} }
} }

View file

@ -96,7 +96,7 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderParticles(){ public void renderParticles(){
if(this.worldObj.rand.nextInt(ConfigBoolValues.LESS_PARTICLES.isEnabled() ? 16 : 8) == 0){ if(this.worldObj.rand.nextInt(8) == 0){
EntityPlayer player = Minecraft.getMinecraft().thePlayer; EntityPlayer player = Minecraft.getMinecraft().thePlayer;
if(player != null){ if(player != null){
PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player);
@ -108,7 +108,7 @@ public abstract class TileEntityLaserRelay extends TileEntityBase{
if(network != null){ if(network != null){
for(IConnectionPair aPair : network.connections){ for(IConnectionPair aPair : network.connections){
if(!aPair.doesSuppressRender() && aPair.contains(this.pos) && this.pos.equals(aPair.getPositions()[0])){ if(!aPair.doesSuppressRender() && aPair.contains(this.pos) && this.pos.equals(aPair.getPositions()[0])){
AssetUtil.renderParticlesFromAToB(aPair.getPositions()[0].getX(), aPair.getPositions()[0].getY(), aPair.getPositions()[0].getZ(), aPair.getPositions()[1].getX(), aPair.getPositions()[1].getY(), aPair.getPositions()[1].getZ(), ConfigBoolValues.LESS_PARTICLES.isEnabled() ? 1 : this.worldObj.rand.nextInt(3)+1, 0.8F, this.type == LaserType.ITEM ? COLOR_ITEM : (this.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR), 1F); AssetUtil.renderParticlesFromAToB(aPair.getPositions()[0].getX(), aPair.getPositions()[0].getY(), aPair.getPositions()[0].getZ(), aPair.getPositions()[1].getX(), aPair.getPositions()[1].getY(), aPair.getPositions()[1].getZ(), this.worldObj.rand.nextInt(3)+1, 0.8F, this.type == LaserType.ITEM ? COLOR_ITEM : (this.type == LaserType.FLUID ? COLOR_FLUIDS : COLOR), 1F);
} }
} }
} }

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import cofh.api.energy.EnergyStorage; import cofh.api.energy.EnergyStorage;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -74,20 +73,16 @@ public class TileEntityLeafGenerator extends TileEntityBase implements ISharingE
Collections.shuffle(breakPositions); Collections.shuffle(breakPositions);
BlockPos theCoord = breakPositions.get(0); BlockPos theCoord = breakPositions.get(0);
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, theCoord, Block.getStateId(this.worldObj.getBlockState(theCoord))); this.worldObj.playEvent(2001, theCoord, Block.getStateId(this.worldObj.getBlockState(theCoord)));
}
this.worldObj.setBlockToAir(theCoord); this.worldObj.setBlockToAir(theCoord);
this.storage.receiveEnergy(ENERGY_PRODUCED, false); this.storage.receiveEnergy(ENERGY_PRODUCED, false);
if(!ConfigBoolValues.LESS_PARTICLES.isEnabled()){
AssetUtil.shootParticles(this.worldObj, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F, 1F); AssetUtil.shootParticles(this.worldObj, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F, 1F);
} }
} }
} }
}
else{ else{
this.nextUseCounter++; this.nextUseCounter++;
} }

View file

@ -11,12 +11,10 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import cofh.api.energy.EnergyStorage; import cofh.api.energy.EnergyStorage;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
import de.ellpeck.actuallyadditions.mod.items.ItemDrill; import de.ellpeck.actuallyadditions.mod.items.ItemDrill;
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockLiquid; import net.minecraft.block.BlockLiquid;
@ -109,9 +107,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements ICustomE
if(this.worldObj.rand.nextFloat() <= chance){ if(this.worldObj.rand.nextFloat() <= chance){
if(WorldUtil.addToInventory(this, drops, false, true)){ if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, pos, Block.getStateId(this.worldObj.getBlockState(pos))); this.worldObj.playEvent(2001, pos, Block.getStateId(this.worldObj.getBlockState(pos)));
}
this.worldObj.setBlockToAir(pos); this.worldObj.setBlockToAir(pos);
WorldUtil.addToInventory(this, drops, true, true); WorldUtil.addToInventory(this, drops, true, true);
@ -167,10 +163,8 @@ public class TileEntityMiner extends TileEntityInventoryBase implements ICustomE
} }
private void shootParticles(int endX, int endY, int endZ){ private void shootParticles(int endX, int endY, int endZ){
if(!ConfigBoolValues.LESS_PARTICLES.isEnabled()){
AssetUtil.shootParticles(this.worldObj, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F, 1F); AssetUtil.shootParticles(this.worldObj, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F, 1F);
} }
}
private boolean isBlacklisted(Block block){ private boolean isBlacklisted(Block block){
String reg = block.getRegistryName().toString(); String reg = block.getRegistryName().toString();

View file

@ -11,11 +11,9 @@
package de.ellpeck.actuallyadditions.mod.tile; package de.ellpeck.actuallyadditions.mod.tile;
import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -140,9 +138,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
drops.addAll(blockToBreak.getDrops(this.worldObj, this.boundPosition, this.worldObj.getBlockState(this.boundPosition), 0)); drops.addAll(blockToBreak.getDrops(this.worldObj, this.boundPosition, this.worldObj.getBlockState(this.boundPosition), 0));
if(WorldUtil.addToInventory(this, drops, false, true)){ if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigBoolValues.LESS_BLOCK_BREAKING_EFFECTS.isEnabled()){
this.worldObj.playEvent(2001, this.boundPosition, Block.getStateId(this.worldObj.getBlockState(this.boundPosition))); this.worldObj.playEvent(2001, this.boundPosition, Block.getStateId(this.worldObj.getBlockState(this.boundPosition)));
}
this.worldObj.setBlockToAir(this.boundPosition); this.worldObj.setBlockToAir(this.boundPosition);
WorldUtil.addToInventory(this, drops, true, true); WorldUtil.addToInventory(this, drops, true, true);
this.markDirty(); this.markDirty();

View file

@ -63,6 +63,8 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
if(WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, false, true)){ if(WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, false, true)){
WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, true, true); WorldUtil.addToInventory(this, 0, WHITELIST_START, checkList, EnumFacing.UP, true, true);
item.setDead(); item.setDead();
} }
} }
} }