Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions resources/assets/storagedrawers/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ storagedrawers.config.prop.enableSidedInput=Enable Sided Input
storagedrawers.config.prop.enableSidedInput.tooltip=Other blocks can insert items into drawers.
storagedrawers.config.prop.enableSidedOutput=Enable Sided Output
storagedrawers.config.prop.enableSidedOutput.tooltip=Other blocks can extract items from drawers.
storagedrawers.config.prop.enableVendorSidedOutput=Enable Vendor Sided Output
storagedrawers.config.prop.enableVendorSidedOutput.tooltip=Other blocks can extract items from drawers with vendor upgrade.
storagedrawers.config.prop.enableItemConversion=Enable Item Conversion
storagedrawers.config.prop.enableItemConversion.tooltip=Drawers auto-convert ore dictionary compatible items.
storagedrawers.config.prop.enableFallbackRecipes=Enable Fallback Recipes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.jaquadro.minecraft.storagedrawers.block.tile.tiledata;

import com.jaquadro.minecraft.chameleon.block.tiledata.TileDataShim;
import com.jaquadro.minecraft.storagedrawers.StorageDrawers;
import com.jaquadro.minecraft.storagedrawers.api.capabilities.IItemRepository;
import com.jaquadro.minecraft.storagedrawers.api.storage.*;
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.LockAttribute;
Expand Down Expand Up @@ -296,7 +297,7 @@ protected int adjustStoredItemCount (int amount, boolean notify) {
return Math.abs(amount);

if (amount > 0) {
if (attrs.isUnlimitedVending())
if (attrs.isUnlimitedVending())
return 0;

int originalCount = count;
Expand All @@ -311,6 +312,9 @@ protected int adjustStoredItemCount (int amount, boolean notify) {
return amount - (count - originalCount);
}
else {
if (attrs.isUnlimitedVending() && StorageDrawers.config.cache.enableVendorSidedOutput)
return 0;

int originalCount = count;
setStoredItemCount(originalCount + amount, notify);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class ConfigCache {
public boolean creativeTabVanillaWoods;
public boolean enableSidedInput;
public boolean enableSidedOutput;
public boolean enableVendorSidedOutput;
public boolean enableItemConversion;
public boolean enableWailaIntegration;
public boolean enableMineTweakerIntegration;
Expand Down Expand Up @@ -145,6 +146,7 @@ public void syncConfig () {
cache.enableDrawerUI = config.get(Configuration.CATEGORY_GENERAL, "enableDrawerUI", true).setLanguageKey(LANG_PREFIX + "prop.enableDrawerUI").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.enableVendorSidedOutput = config.get(Configuration.CATEGORY_GENERAL, "enableVendorSidedOutput", false).setLanguageKey(LANG_PREFIX + "prop.enableVendorSidedOutput").getBoolean();
cache.enableItemConversion = config.get(Configuration.CATEGORY_GENERAL, "enableItemConversion", true).setLanguageKey(LANG_PREFIX + "prop.enableItemConversion").getBoolean();
cache.enableFallbackRecipes = config.get(Configuration.CATEGORY_GENERAL, "enableFallbackRecipes", true).setLanguageKey(LANG_PREFIX + "prop.enableFallbackRecipes").setRequiresMcRestart(true).getBoolean();
cache.enableFramedDrawers = config.get(Configuration.CATEGORY_GENERAL, "enableFramedDrawers", true).setLanguageKey(LANG_PREFIX + "prop.enableFramedDrawers").setRequiresMcRestart(true).getBoolean();
Expand Down