Skip to content

Commit

Permalink
OK fffine
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed May 29, 2024
1 parent ae4d32b commit 3a27139
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Updated to 1.20.5.
- Added a config option to disable the automatic removal of furnace extraction exceptions.
- This can be turned off to preserve vanilla hopper behaviour when pulling empty buckets from furnaces.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings=1.20.5+build.1
loader_version=0.15.10

# Mod Properties
mod_version = 2.2.4
mod_version = 2.3.0
maven_group = nl.enjarai
archives_base_name = omnihopper
modid = omnihopper
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/nl/enjarai/omnihopper/ModConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package nl.enjarai.omnihopper;

import net.fabricmc.loader.api.FabricLoader;
import nl.enjarai.cicada.api.util.AbstractModConfig;

public class ModConfig extends AbstractModConfig {
public static ModConfig INSTANCE = loadConfigFile(
FabricLoader.getInstance().getConfigDir().resolve("omnihopper-server.json"), new ModConfig());

public boolean removeFurnaceExtractionExceptions = true;
}
2 changes: 2 additions & 0 deletions src/main/java/nl/enjarai/omnihopper/OmniHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public void onInitialize() {
ModBlocks.register();
ModItems.register();
ModScreenHandlers.register();

var touch = ModConfig.INSTANCE;
}

public static Identifier id(String path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import nl.enjarai.omnihopper.ModConfig;
import nl.enjarai.omnihopper.util.FurnaceFuelBucketStorage;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
Expand Down Expand Up @@ -55,6 +56,9 @@ protected void setFuelStack(ItemStack fuelItem) {
)
)
private boolean removeExtractionExceptions(boolean original) {
return false;
if (ModConfig.INSTANCE.removeFurnaceExtractionExceptions) {
return false;
}
return original;
}
}

0 comments on commit 3a27139

Please sign in to comment.