From d93fdaf99591725fbdc5efcc4f6b97013ab4d29b Mon Sep 17 00:00:00 2001 From: Brennan Ward Date: Sun, 16 Jul 2017 13:34:21 -0400 Subject: [PATCH] 11 (#851) (shh) --- .../mod/blocks/BlockAtomicReconstructor.java | 3 ++- .../actuallyadditions/mod/config/values/ConfigIntValues.java | 4 +++- .../actuallyadditions/mod/items/lens/LensDisruption.java | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 70a32f212..c4e7660a4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil; @@ -83,7 +84,7 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud player.inventory.decrStackSize(player.inventory.currentItem, 1); } //Shush, don't tell anyone! - else if(item == Items.RECORD_11){ + else if(ConfigIntValues.ELEVEN.getValue() == 11 && item == Items.RECORD_11){ reconstructor.counter++; reconstructor.markDirty(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java index fd27ca416..7f8bacf1e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java @@ -29,7 +29,9 @@ public enum ConfigIntValues{ FONT_SIZE_SMALL("Booklet Small Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's small font in percent. Set to 0 to use defaults from the lang file."), FONT_SIZE_MEDIUM("Booklet Medium Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's medium font in percent. Set to 0 to use defaults from the lang file."), - FONT_SIZE_LARGE("Booklet Large Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's large font in percent. Set to 0 to use defaults from the lang file."); + FONT_SIZE_LARGE("Booklet Large Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's large font in percent. Set to 0 to use defaults from the lang file."), + + ELEVEN("What is 11", ConfigCategories.OTHER, 11, 0, 12, "11?"); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java index 562942e83..4b88415ff 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisruption.java @@ -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.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.block.Block; @@ -32,7 +33,7 @@ public class LensDisruption extends Lens{ @Override public boolean invoke(IBlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile){ - if(tile.getEnergy() >= ENERGY_USE && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)){ + if(ConfigIntValues.ELEVEN.getValue() == 11 && tile.getEnergy() >= ENERGY_USE && hitBlock != null && !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock)){ int range = 2; ArrayList items = (ArrayList)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){