Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option to disable dolly stacking #32

Merged
merged 4 commits into from
May 27, 2024
Merged
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
8 changes: 7 additions & 1 deletion src/main/java/mcp/mobius/betterbarrels/BetterBarrels.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static void debug(String msg) {

/* CONFIG PARAMS */
private static Configuration config = null;

public static boolean disableDollyStacking;
public static boolean fullBarrelTexture = true;
public static boolean highRezTexture = true;
public static boolean showUpgradeSymbols = true;
Expand Down Expand Up @@ -216,6 +216,12 @@ public void preInit(FMLPreInitializationEvent event) {
BlacklistedTileEntiyClassNames,
"The Canonical Class-Names of TileEntities that should be ignored when using a Dolly.");

disableDollyStacking = config.getBoolean(
"disableDollyStacking",
Configuration.CATEGORY_GENERAL,
false,
"Disables the ability to collapse and stack the dollies");

// fullBarrelTexture = config.get(Configuration.CATEGORY_GENERAL, "fullBarrelTexture",
// true).getBoolean(true);
// highRezTexture = config.get(Configuration.CATEGORY_GENERAL, "highRezTexture", false).getBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer
return itemStack;
}

// Config to enable or disable Dollie
if (BetterBarrels.disableDollyStacking) {
return itemStack;
}

// This prevents the dolly from folding after sneak right-clicking to place an item.
if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey(PREVENT_FOLD_TAG_KEY)) {
itemStack.getTagCompound().removeTag(PREVENT_FOLD_TAG_KEY);
Expand Down