mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-23 15:48:34 +01:00
Added configuration for Atomic Reconstructor
This commit is contained in:
parent
160067c273
commit
878f64c1dc
15 changed files with 94 additions and 72 deletions
|
@ -222,6 +222,6 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
|
|||
if (t instanceof TileEntityAtomicReconstructor) {
|
||||
i = ((TileEntityAtomicReconstructor) t).getEnergy();
|
||||
}
|
||||
return MathHelper.clamp(i / 20000, 0, 15);
|
||||
return MathHelper.clamp(i / (ConfigIntValues.ATOMIC_RECONSTRUCTOR_ENERGY_CAPACITY.getValue() / 15), 0, 15);
|
||||
}
|
||||
}
|
|
@ -25,14 +25,14 @@ import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntry;
|
|||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryAllItems;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.entry.BookletEntryTrials;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.*;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.*;
|
||||
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.OreGen;
|
||||
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensMining;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
|
||||
|
@ -49,6 +49,7 @@ import net.minecraft.item.crafting.IRecipe;
|
|||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public final class InitBooklet{
|
||||
|
@ -136,7 +137,7 @@ public final class InitBooklet{
|
|||
chaptersIntroduction[1] = new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM"), new PageLinkButton(2, "https://www.youtube.com/playlist?list=PLJeFZ64pT89MrTRZYzD_rtHFajPVlt6cF")).setImportant();
|
||||
new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
|
||||
ArrayList<BookletPage> crystalPages = new ArrayList<BookletPage>();
|
||||
crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard()));
|
||||
crystalPages.addAll(Arrays.asList(new PageTextOnly(1).addTextReplacement("<rf>", ConfigIntValues.ATOMIC_RECONSTRUCTOR_ENERGY_USE.getValue()), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "page_atomic_reconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setWildcard()));
|
||||
for(int i = 0; i < LensRecipeHandler.MAIN_PAGE_RECIPES.size(); i++){
|
||||
crystalPages.add(new PageReconstructor(7+i, LensRecipeHandler.MAIN_PAGE_RECIPES.get(i)).setNoText());
|
||||
}
|
||||
|
@ -188,8 +189,8 @@ public final class InitBooklet{
|
|||
new BookletChapter("lensDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDamageLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeDamageLens).setNoText());
|
||||
new BookletChapter("lensMoreDeath", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMoreDamageLens), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLensMoreDeath).setNoText());
|
||||
new BookletChapter("lensDetonation", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemExplosionLens), new PageTextOnly(1), new PageReconstructor(2, LensRecipeHandler.recipeExplosionLens).setNoText());
|
||||
new BookletChapter("lensDisenchanting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDisenchantingLens), new PageTextOnly(1).addTextReplacement("<energy>", LensDisenchanting.ENERGY_USE), new PageCrafting(2, ItemCrafting.recipeDisenchantingLens).setNoText()).setSpecial();
|
||||
new BookletChapter("lensMining", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMiningLens), new PageTextOnly(1).addTextReplacement("<energy>", LensMining.ENERGY_USE), new PageCrafting(2, ItemCrafting.recipeMiningLens).setNoText()).setImportant();
|
||||
new BookletChapter("lensDisenchanting", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemDisenchantingLens), new PageTextOnly(1).addTextReplacement("<energy>", ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[3]), new PageCrafting(2, ItemCrafting.recipeDisenchantingLens).setNoText()).setSpecial();
|
||||
new BookletChapter("lensMining", ActuallyAdditionsAPI.entryReconstruction, new ItemStack(InitItems.itemMiningLens), new PageTextOnly(1).addTextReplacement("<energy>", ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[5]), new PageCrafting(2, ItemCrafting.recipeMiningLens).setNoText()).setImportant();
|
||||
|
||||
//Laser Relays
|
||||
chaptersIntroduction[8] = new BookletChapter("laserIntro", ActuallyAdditionsAPI.entryLaserRelays, new ItemStack(InitItems.itemLaserWrench), new PageTextOnly(1), new PageTextOnly(2).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE), new PageCrafting(3, ItemCrafting.recipeLaserWrench)).setImportant();
|
||||
|
|
|
@ -19,6 +19,8 @@ public enum ConfigCategories{
|
|||
MOB_DROPS("Mob Drops", "Everything regarding Item drops from mobs"),
|
||||
WORLD_GEN("World Gen", "Everything regarding World Generation"),
|
||||
TOOL_ENERGY_VALUES("Tool Energy Values", "Energy values for Tools"),
|
||||
MACHINE_ENERGY_VALUES("Machine Energy Values", "Energy values for Machines"),
|
||||
MACHINE_RECIPE_COSTS("Machine Energy Values.Recipe Costs", "Energy Costs of Recipes"),
|
||||
OTHER("Other", "Everything else");
|
||||
|
||||
public final String name;
|
||||
|
|
|
@ -19,9 +19,13 @@ public enum ConfigIntListValues{
|
|||
OIL_POWER("Oil Gen: Power Values", ConfigCategories.MACHINE_VALUES, new int[]{40, 80, 100, 120}, "The amount of power that the 4 tiers of oils generate (in order)"),
|
||||
OIL_TIME("Oil Gen: Time Values", ConfigCategories.MACHINE_VALUES, new int[]{100, 120, 280, 400}, "The amount of time that the 4 tiers of oils work for (in order)"),
|
||||
|
||||
DRILL_AUGMENTS_ENERGY_USE("Drill: Energy Use Per Augment", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{50, 75, 175, 100, 40, 80, 10, 30, 0}, "Additional amount of energy Drill Augments use per mined block. Order of augments: Speed I, Speed II, Speed III, Silk Touch, Fortune I, Fortune II, Mining I, Mining II, Block Placing"),
|
||||
DRILL_AUGMENTS_ENERGY_USE("Drill: Energy Use Per Augment", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{50, 75, 175, 100, 40, 80, 10, 30, 0}, "Additional amount of energy Drill Augments use per mined block.\nOrder of augments: Speed I, Speed II, Speed III, Silk Touch, Fortune I, Fortune II, Mining I, Mining II, Block Placing"),
|
||||
BATTERIES_ENERGY_CAPACITY("Batteries: Energy Capacity Per Tier", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{200000, 350000, 600000, 1000000, 2000000}, "Amount of energy each tier of Batteries can store."),
|
||||
BATTERIES_ENERGY_TRANSFER("Batteries: Energy Transfer Rate Per Tier", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{1000, 5000, 10000, 30000, 100000}, "Amount of energy each tier of Batteries can send or receive.");
|
||||
BATTERIES_ENERGY_TRANSFER("Batteries: Energy Transfer Rate Per Tier", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{1000, 5000, 10000, 30000, 100000}, "Amount of energy each tier of Batteries can send or receive."),
|
||||
|
||||
ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE("Atomic Reconstructor: Lenses Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, new int[]{200, 350, 250000, 250000, 2500, 60000, 70000, 150000}, "Amount of energy used by each Lens type.\nOrder of lenses: Color, Certain Death, Detonation, Disenchanting, Killer, Miner, Miner (for nether ores), Disruption."),
|
||||
ATOMIC_RECONSTRUCTOR_CRYSTALLIZATION_RECIPE_COSTS("Atomic Reconstructor: Crystallization Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{40, 40, 60, 100, 60, 80, 400, 400, 600, 1000, 600, 800, 2000}, "Amount of energy used to crystallize item.\nOrder of items: Restonia Crystal, Palis Crystal, Diamatine Crystal, Emeradic Crystal, Void Crystal, Enori Crystal, Restonia Block, Palis Block, Diamatine Block, Emeradic Block, Void Block, Enori Block, Crystallized Canola Seed"),
|
||||
ATOMIC_RECONSTRUCTOR_CONVERSION_RECIPE_COSTS("Atomic Reconstructor: Conversion Energy Cost", ConfigCategories.MACHINE_RECIPE_COSTS, new int[]{5000, 2000, 20000, 8000, 150000, 30000, 10, 10}, "Amount of energy used to convert item to another one.\nOrder of items: Lenses, Relays, Soul Sand, Leather, Nether Wart, Prismarine, Ethetic Quartz, Ethetic Green Block");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -52,7 +52,11 @@ public enum ConfigIntValues{
|
|||
LEAF_BLOWER_ENERGY_USE("Leaf Blower: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 60, 1, 1000000, "Amount of energy Leaf Blower uses per tick while placed on Display Stand."),
|
||||
ADVANCED_LEAF_BLOWER_ENERGY_USE("Advanced Leaf Blower: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 60, 1, 1000000, "Amount of energy Advanced Leaf Blower uses per tick while placed on Display Stand."),
|
||||
POTION_RINGS_ENERGY_USE("Potion Rings: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 325, 1, 1000000, "Amount of energy Potion Rings use per tick while placed on Display Stand."),
|
||||
ADVANCED_POTION_RINGS_ENERGY_USE("Advanced Potion Rings: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 325, 1, 1000000, "Amount of energy Advanced Potion Rings use per tick while placed on Display Stand.");
|
||||
ADVANCED_POTION_RINGS_ENERGY_USE("Advanced Potion Rings: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 325, 1, 1000000, "Amount of energy Advanced Potion Rings use per tick while placed on Display Stand."),
|
||||
|
||||
ATOMIC_RECONSTRUCTOR_ENERGY_CAPACITY("Atomic Reconstructor: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 300000, 1000, 1000000000, "Amount of energy Atomic Reconstructor can store."),
|
||||
ATOMIC_RECONSTRUCTOR_ENERGY_RECEIVE("Atomic Reconstructor: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 5000, 1, 1000000000, "Amount of energy Atomic Reconstructor can receive per tick."),
|
||||
ATOMIC_RECONSTRUCTOR_ENERGY_USE("Atomic Reconstructor: Energy Use", ConfigCategories.MACHINE_ENERGY_VALUES, 1000, 1, 1000000000, "Basic amount of energy Atomic Reconstructor uses per craft.");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -35,7 +36,6 @@ import java.util.Random;
|
|||
|
||||
public class LensColor extends Lens{
|
||||
|
||||
public static final int ENERGY_USE = 200;
|
||||
//Thanks to xdjackiexd for this, as I couldn't be bothered
|
||||
public static final float[][] POSSIBLE_COLORS = {
|
||||
{158F, 43F, 39F}, //Red
|
||||
|
@ -55,8 +55,9 @@ public class LensColor extends Lens{
|
|||
|
||||
@Override
|
||||
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
int energyUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[0];
|
||||
if(hitBlock != null){
|
||||
if(tile.getEnergy() >= ENERGY_USE){
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
IBlockState state = tile.getWorldObject().getBlockState(hitBlock);
|
||||
Block block = state.getBlock();
|
||||
int meta = block.getMetaFromState(state);
|
||||
|
@ -65,13 +66,13 @@ public class LensColor extends Lens{
|
|||
Block toPlace = Block.getBlockFromItem(returnStack.getItem());
|
||||
IBlockState state2Place = toPlace.getStateForPlacement(tile.getWorldObject(), hitBlock, EnumFacing.UP, 0, 0, 0, returnStack.getMetadata(), FakePlayerFactory.getMinecraft((WorldServer) tile.getWorldObject()), EnumHand.MAIN_HAND);
|
||||
tile.getWorldObject().setBlockState(hitBlock, state2Place, 2);
|
||||
tile.extractEnergy(ENERGY_USE);
|
||||
tile.extractEnergy(energyUse);
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<EntityItem> items = (ArrayList<EntityItem>)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1));
|
||||
for(EntityItem item : items){
|
||||
if(!item.isDead && StackUtil.isValid(item.getItem()) && tile.getEnergy() >= ENERGY_USE){
|
||||
if(!item.isDead && StackUtil.isValid(item.getItem()) && tile.getEnergy() >= energyUse){
|
||||
ItemStack newStack = this.tryConvert(item.getItem(), hitState, hitBlock, tile);
|
||||
if(StackUtil.isValid(newStack)){
|
||||
item.setDead();
|
||||
|
@ -79,7 +80,7 @@ public class LensColor extends Lens{
|
|||
EntityItem newItem = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, newStack);
|
||||
tile.getWorldObject().spawnEntity(newItem);
|
||||
|
||||
tile.extractEnergy(ENERGY_USE);
|
||||
tile.extractEnergy(energyUse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -90,11 +91,9 @@ public class LensColor extends Lens{
|
|||
private ItemStack tryConvert(ItemStack stack, IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
if(StackUtil.isValid(stack)){
|
||||
Item item = stack.getItem();
|
||||
if(item != null){
|
||||
for(Map.Entry<Item, IColorLensChanger> changer : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_COLOR_CHANGERS.entrySet()){
|
||||
if(item == changer.getKey()){
|
||||
return changer.getValue().modifyItem(stack, hitState, hitBlock, tile);
|
||||
}
|
||||
for(Map.Entry<Item, IColorLensChanger> changer : ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_COLOR_CHANGERS.entrySet()){
|
||||
if(item == changer.getKey()){
|
||||
return changer.getValue().modifyItem(stack, hitState, hitBlock, tile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -115,6 +114,6 @@ public class LensColor extends Lens{
|
|||
|
||||
@Override
|
||||
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot){
|
||||
return tile.getEnergy()-energyUsePerShot >= ENERGY_USE;
|
||||
return tile.getEnergy()-energyUsePerShot >= ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[0];
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.lens;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.DamageSources;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -26,9 +27,9 @@ public class LensDeath extends Lens{
|
|||
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
ArrayList<EntityLivingBase> entities = (ArrayList<EntityLivingBase>)tile.getWorldObject().getEntitiesWithinAABB(EntityLivingBase.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1));
|
||||
for(EntityLivingBase entity : entities){
|
||||
int use = this.getUsePerEntity();
|
||||
if(tile.getEnergy() >= use){
|
||||
tile.extractEnergy(use);
|
||||
int energyUse = this.getUsePerEntity();
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
tile.extractEnergy(energyUse);
|
||||
|
||||
this.onAttacked(entity, tile);
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ public class LensDeath extends Lens{
|
|||
}
|
||||
|
||||
protected int getUsePerEntity(){
|
||||
return 350;
|
||||
return ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,20 +12,21 @@ package de.ellpeck.actuallyadditions.mod.items.lens;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class LensDetonation extends Lens{
|
||||
|
||||
private static final int ENERGY_USE = 250000;
|
||||
|
||||
@Override
|
||||
public boolean invoke(IBlockState state, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
if(hitBlock != null && !state.getBlock().isAir(state, tile.getWorldObject(), hitBlock)){
|
||||
if(tile.getEnergy() >= ENERGY_USE){
|
||||
int energyUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[2];
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
tile.getWorldObject().newExplosion(null, hitBlock.getX()+0.5, hitBlock.getY()+0.5, hitBlock.getZ()+0.5, 10F, true, true);
|
||||
tile.extractEnergy(ENERGY_USE);
|
||||
tile.extractEnergy(energyUse);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -44,6 +45,6 @@ public class LensDetonation extends Lens{
|
|||
|
||||
@Override
|
||||
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot){
|
||||
return tile.getEnergy()-energyUsePerShot >= ENERGY_USE;
|
||||
return tile.getEnergy()-energyUsePerShot >= ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[2];
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.lens;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -32,11 +33,11 @@ import java.util.Map;
|
|||
|
||||
public class LensDisenchanting extends Lens{
|
||||
|
||||
public static final int ENERGY_USE = 250000;
|
||||
|
||||
@Override
|
||||
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
if(tile.getEnergy() >= ENERGY_USE){
|
||||
int energyUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[3];
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
List<EntityItem> items = tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX()+1, hitBlock.getY()+1, hitBlock.getZ()+1));
|
||||
if(items != null && !items.isEmpty()){
|
||||
EntityItem book = null;
|
||||
|
@ -97,7 +98,7 @@ public class LensDisenchanting extends Lens{
|
|||
tile.getWorldObject().spawnEntity(newBook);
|
||||
tile.getWorldObject().spawnEntity(disenchanted);
|
||||
|
||||
tile.extractEnergy(ENERGY_USE);
|
||||
tile.extractEnergy(energyUse);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -119,6 +120,6 @@ public class LensDisenchanting extends Lens{
|
|||
|
||||
@Override
|
||||
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot){
|
||||
return tile.getEnergy()-energyUsePerShot >= ENERGY_USE;
|
||||
return tile.getEnergy()-energyUsePerShot >= ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[3];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items.lens;
|
|||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
|
@ -29,11 +30,11 @@ import java.util.ArrayList;
|
|||
|
||||
public class LensDisruption extends Lens{
|
||||
|
||||
private static final int ENERGY_USE = 150000;
|
||||
|
||||
@Override
|
||||
public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){
|
||||
if(ConfigIntValues.ELEVEN.getValue() == 11 && tile.getEnergy() >= ENERGY_USE && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)){
|
||||
int energyUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[7];
|
||||
if(ConfigIntValues.ELEVEN.getValue() == 11 && tile.getEnergy() >= energyUse && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)){
|
||||
int range = 2;
|
||||
ArrayList<EntityItem> items = (ArrayList<EntityItem>)tile.getWorldObject().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(hitBlock.getX()-range, hitBlock.getY()-range, hitBlock.getZ()-range, hitBlock.getX()+range, hitBlock.getY()+range, hitBlock.getZ()+range));
|
||||
for(EntityItem item : items){
|
||||
|
@ -64,7 +65,7 @@ public class LensDisruption extends Lens{
|
|||
EntityItem newItem = new EntityItem(tile.getWorldObject(), item.posX, item.posY, item.posZ, newStack);
|
||||
tile.getWorldObject().spawnEntity(newItem);
|
||||
|
||||
tile.extractEnergy(ENERGY_USE);
|
||||
tile.extractEnergy(energyUse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +86,6 @@ public class LensDisruption extends Lens{
|
|||
|
||||
@Override
|
||||
public boolean canInvoke(IAtomicReconstructor tile, EnumFacing sideToShootTo, int energyUsePerShot){
|
||||
return tile.getEnergy()-energyUsePerShot >= ENERGY_USE;
|
||||
return tile.getEnergy()-energyUsePerShot >= ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[7];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.items.lens;
|
||||
|
||||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
@ -39,6 +40,6 @@ public class LensEvenMoarDeath extends LensDeath{
|
|||
|
||||
@Override
|
||||
protected int getUsePerEntity(){
|
||||
return 2500;
|
||||
return ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[4];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.WeightedOre;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
|
@ -37,7 +38,6 @@ import java.util.List;
|
|||
|
||||
public class LensMining extends Lens{
|
||||
|
||||
public static final int ENERGY_USE = 60000;
|
||||
|
||||
public static void init(){
|
||||
ActuallyAdditionsAPI.addMiningLensStoneOre("oreCoal", 5000);
|
||||
|
@ -126,8 +126,9 @@ public class LensMining extends Lens{
|
|||
@Override
|
||||
public boolean invoke(IBlockState hitState, BlockPos hitPos, IAtomicReconstructor tile){
|
||||
if(!tile.getWorldObject().isAirBlock(hitPos)){
|
||||
if(tile.getEnergy() >= ENERGY_USE){
|
||||
int adaptedUse = ENERGY_USE;
|
||||
int energyUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[5];
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
int adaptedUse = energyUse;
|
||||
|
||||
List<WeightedOre> ores = null;
|
||||
Block hitBlock = hitState.getBlock();
|
||||
|
@ -136,7 +137,7 @@ public class LensMining extends Lens{
|
|||
}
|
||||
else if(hitBlock instanceof BlockNetherrack){
|
||||
ores = ActuallyAdditionsAPI.NETHERRACK_ORES;
|
||||
adaptedUse += 10000;
|
||||
adaptedUse = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_LENSES_ENERGY_USE.getValue()[6];
|
||||
}
|
||||
|
||||
if(ores != null){
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.recipe.ColorLensChangerByDyeMeta;
|
|||
import de.ellpeck.actuallyadditions.api.recipe.IColorLensChanger;
|
||||
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
|
||||
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
||||
|
@ -44,66 +45,68 @@ public final class LensRecipeHandler{
|
|||
public static LensConversionRecipe recipeFluidLaser;
|
||||
|
||||
public static void init(){
|
||||
int[] crystallizationRecipeCosts = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_CRYSTALLIZATION_RECIPE_COSTS.getValue();
|
||||
int[] conversionRecipeCosts = ConfigIntListValues.ATOMIC_RECONSTRUCTOR_CONVERSION_RECIPE_COSTS.getValue();
|
||||
//Crystal Blocks
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), 400);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.REDSTONE_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.REDSTONE.ordinal()), crystallizationRecipeCosts[6]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), 400);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.LAPIS_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.LAPIS.ordinal()), crystallizationRecipeCosts[7]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), 600);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.DIAMOND_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), crystallizationRecipeCosts[8]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), 1000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.EMERALD_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.EMERALD.ordinal()), crystallizationRecipeCosts[9]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 600);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.COAL_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), crystallizationRecipeCosts[10]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 800);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.IRON_BLOCK), new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), crystallizationRecipeCosts[11]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
|
||||
//Crystal Items
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 40);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.REDSTONE), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), crystallizationRecipeCosts[0]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.DYE, 1, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 40);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.DYE, 1, 4), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), crystallizationRecipeCosts[1]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 60);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.DIAMOND), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), crystallizationRecipeCosts[2]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), 100);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.EMERALD), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.EMERALD.ordinal()), crystallizationRecipeCosts[3]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 60);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.COAL), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), crystallizationRecipeCosts[4]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 80);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), crystallizationRecipeCosts[5]);
|
||||
MAIN_PAGE_RECIPES.add(RecipeUtil.lastReconstructorRecipe());
|
||||
|
||||
//Lenses
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new ItemStack(InitItems.itemColorLens), 5000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), new ItemStack(InitItems.itemColorLens), conversionRecipeCosts[0]);
|
||||
recipeColorLens = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), 5000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemColorLens), new ItemStack(InitItems.itemExplosionLens), conversionRecipeCosts[0]);
|
||||
recipeExplosionLens = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), 5000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemExplosionLens), new ItemStack(InitItems.itemDamageLens), conversionRecipeCosts[0]);
|
||||
recipeDamageLens = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), 5000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), conversionRecipeCosts[0]);
|
||||
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelay), new ItemStack(InitBlocks.blockLaserRelayFluids), 2000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelay), new ItemStack(InitBlocks.blockLaserRelayFluids), conversionRecipeCosts[1]);
|
||||
recipeFluidLaser = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), 2000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayFluids), new ItemStack(InitBlocks.blockLaserRelayItem), conversionRecipeCosts[1]);
|
||||
recipeItemLaser = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), 2000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelay), conversionRecipeCosts[1]);
|
||||
|
||||
//Misc
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), 20000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), conversionRecipeCosts[2]);
|
||||
recipeSoulSand = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), 8000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), conversionRecipeCosts[3]);
|
||||
recipeLeather = RecipeUtil.lastReconstructorRecipe();
|
||||
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), 150000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), conversionRecipeCosts[4]);
|
||||
recipeNetherWart = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), 30000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), conversionRecipeCosts[5]);
|
||||
recipePrismarine = RecipeUtil.lastReconstructorRecipe();
|
||||
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), 2000);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CRYSTALLIZED_CANOLA_SEED.ordinal()), crystallizationRecipeCosts[12]);
|
||||
recipeCrystallizedCanolaSeed = RecipeUtil.lastReconstructorRecipe();
|
||||
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), 10);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.QUARTZ_BLOCK), new ItemStack(InitBlocks.blockTestifiBucksWhiteWall), conversionRecipeCosts[6]);
|
||||
recipeWhiteWall = RecipeUtil.lastReconstructorRecipe();
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 10);
|
||||
ActuallyAdditionsAPI.addReconstructorLensConversionRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1, 1), new ItemStack(InitBlocks.blockTestifiBucksGreenWall), conversionRecipeCosts[7]);
|
||||
recipeGreenWall = RecipeUtil.lastReconstructorRecipe();
|
||||
|
||||
IColorLensChanger changer = new ColorLensChangerByDyeMeta();
|
||||
|
|
|
@ -25,6 +25,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.page.PageCrafting;
|
|||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageFurnace;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PagePicture;
|
||||
import de.ellpeck.actuallyadditions.mod.booklet.page.PageTextOnly;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
|
||||
import de.ellpeck.actuallyadditions.mod.items.lens.LensRecipeHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry;
|
||||
|
@ -237,11 +238,12 @@ public class MethodHandler implements IMethodHandler{
|
|||
|
||||
@Override
|
||||
public boolean invokeReconstructor(IAtomicReconstructor tile){
|
||||
if(tile.getEnergy() >= TileEntityAtomicReconstructor.ENERGY_USE){
|
||||
int energyUse = ConfigIntValues.ATOMIC_RECONSTRUCTOR_ENERGY_USE.getValue();
|
||||
if(tile.getEnergy() >= energyUse){
|
||||
EnumFacing sideToManipulate = tile.getOrientation();
|
||||
Lens currentLens = tile.getLens();
|
||||
if(currentLens.canInvoke(tile, sideToManipulate, TileEntityAtomicReconstructor.ENERGY_USE)){
|
||||
tile.extractEnergy(TileEntityAtomicReconstructor.ENERGY_USE);
|
||||
if(currentLens.canInvoke(tile, sideToManipulate, energyUse)){
|
||||
tile.extractEnergy(energyUse);
|
||||
|
||||
int distance = currentLens.getDistance();
|
||||
for(int i = 0; i < distance; i++){
|
||||
|
|
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
|
|||
import de.ellpeck.actuallyadditions.api.lens.ILensItem;
|
||||
import de.ellpeck.actuallyadditions.api.lens.Lens;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.SoundHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
|
||||
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
|
||||
|
@ -30,14 +31,14 @@ import net.minecraftforge.energy.IEnergyStorage;
|
|||
|
||||
public class TileEntityAtomicReconstructor extends TileEntityInventoryBase implements IEnergyDisplay, IAtomicReconstructor{
|
||||
|
||||
public static final int ENERGY_USE = 1000;
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(300000, 5000, 0);
|
||||
public final CustomEnergyStorage storage;
|
||||
public int counter;
|
||||
private int currentTime;
|
||||
private int oldEnergy;
|
||||
|
||||
public TileEntityAtomicReconstructor(){
|
||||
super(1, "reconstructor");
|
||||
this.storage = new CustomEnergyStorage(ConfigIntValues.ATOMIC_RECONSTRUCTOR_ENERGY_CAPACITY.getValue(), ConfigIntValues.ATOMIC_RECONSTRUCTOR_ENERGY_RECEIVE.getValue(), 0);
|
||||
}
|
||||
|
||||
public static void shootLaser(World world, double startX, double startY, double startZ, double endX, double endY, double endZ, Lens currentLens){
|
||||
|
|
Loading…
Reference in a new issue