mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
parent
363bdcef41
commit
d93fdaf995
3 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<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){
|
||||
|
|
Loading…
Reference in a new issue