mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-13 00:47:31 +00:00
Add invertShift config to allow shift-clicking to give one item
This commit is contained in:
1 parent
2a0faddd67
commit
975cb9373e
2 files changed
+8
-2
No files matched your search
@@ -4,9 +4,11 @@ import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawer;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawers;
|
||||
import com.jaquadro.minecraft.storagedrawers.block.tile.TileEntityDrawersStandard;
|
||||
import com.jaquadro.minecraft.storagedrawers.config.ConfigManager;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModCreativeTabs;
|
||||
import com.jaquadro.minecraft.storagedrawers.core.ModItems;
|
||||
import com.jaquadro.minecraft.storagedrawers.network.BlockClickMessage;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -285,7 +287,8 @@ public class BlockDrawers extends BlockContainer implements IExtendedBlockClickH
|
||||
IDrawer drawer = tileDrawers.getDrawer(slot);
|
||||
|
||||
ItemStack item = null;
|
||||
if (player.isSneaking())
|
||||
// if invertSHift is true this will happen when the player is not shifting
|
||||
if (player.isSneaking() != StorageDrawers.config.cache.invertShift)
|
||||
item = tileDrawers.takeItemsFromSlot(slot, drawer.getStoredItemStackSize());
|
||||
else
|
||||
item = tileDrawers.takeItemsFromSlot(slot, 1);
|
||||
|
||||
@@ -61,6 +61,7 @@ public class ConfigManager
|
||||
public boolean enableSidedOutput;
|
||||
public boolean enableWailaIntegration;
|
||||
public boolean enableAE2Integration;
|
||||
public boolean invertShift;
|
||||
|
||||
public int level2Mult;
|
||||
public int level3Mult;
|
||||
@@ -117,7 +118,9 @@ public class ConfigManager
|
||||
cache.creativeTabVanillaWoods = config.get(Configuration.CATEGORY_GENERAL, "creativeTabVanillaWoods", true).setLanguageKey(LANG_PREFIX + "prop.creativeTabVanillaWoods").getBoolean();
|
||||
cache.enableSidedInput = config.get(Configuration.CATEGORY_GENERAL, "enableSidedInput", true).setLanguageKey(LANG_PREFIX + "prop.enableSidedInput").getBoolean();
|
||||
cache.enableSidedOutput = config.get(Configuration.CATEGORY_GENERAL, "enableSidedOutput", true).setLanguageKey(LANG_PREFIX + "prop.enableSidedOutput").getBoolean();
|
||||
|
||||
cache.invertShift = config.get(Configuration.CATEGORY_GENERAL, "invertShift", false,
|
||||
"Inverts how shift works with drawers. If this is true, shifting will only give one item, where regular clicks will give a full stack. Leave false for default behavior.").getBoolean();
|
||||
|
||||
cache.enableAE2Integration = config.get(sectionIntegration.getQualifiedName(), "enableAE2", true).setLanguageKey(LANG_PREFIX + "integration.enableAE2").setRequiresMcRestart(true).getBoolean();
|
||||
cache.enableWailaIntegration = config.get(sectionIntegration.getQualifiedName(), "enableWaila", true).setLanguageKey(LANG_PREFIX + "integration.enableWaila").setRequiresMcRestart(true).getBoolean();
|
||||
|
||||
|
||||
Reference in new issue
Block a user