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

Add config toggle for fortune on ores #1887

Open
wants to merge 2 commits into
base: 1.20.1
Choose a base branch
from
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
1 change: 1 addition & 0 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,7 @@
"config.gtceu.option.nerfWoodCrafting": "buıʇɟɐɹƆpooMɟɹǝu",
"config.gtceu.option.orderedAssemblyLineFluids": "spınןℲǝuıꞀʎןqɯǝssⱯpǝɹǝpɹo",
"config.gtceu.option.orderedAssemblyLineItems": "sɯǝʇIǝuıꞀʎןqɯǝssⱯpǝɹǝpɹo",
"config.gtceu.option.oreFortuneDrops": "sdoɹᗡǝunʇɹoℲǝɹo",
"config.gtceu.option.oreGenerationChunkCacheSize": "ǝzıSǝɥɔɐƆʞunɥƆuoıʇɐɹǝuǝ⅁ǝɹo",
"config.gtceu.option.oreIndicatorChunkCacheSize": "ǝzıSǝɥɔɐƆʞunɥƆɹoʇɐɔıpuIǝɹo",
"config.gtceu.option.oreVeinGridSize": "ǝzıSpıɹ⅁uıǝΛǝɹo",
Expand Down
1 change: 1 addition & 0 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,7 @@
"config.gtceu.option.nerfWoodCrafting": "nerfWoodCrafting",
"config.gtceu.option.orderedAssemblyLineFluids": "orderedAssemblyLineFluids",
"config.gtceu.option.orderedAssemblyLineItems": "orderedAssemblyLineItems",
"config.gtceu.option.oreFortuneDrops": "oreFortuneDrops",
"config.gtceu.option.oreGenerationChunkCacheSize": "oreGenerationChunkCacheSize",
"config.gtceu.option.oreIndicatorChunkCacheSize": "oreIndicatorChunkCacheSize",
"config.gtceu.option.oreVeinGridSize": "oreVeinGridSize",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ public static class NanoSaber {

public static class GameplayConfigs {

@Configurable
@Configurable.Comment({ "Enable fortune for ore drops", "Default: false" })
public boolean oreFortuneDrops = false;
@Configurable
@Configurable.Comment({ "Enable hazardous materials", "Default: true" })
public boolean hazardsEnabled = true;
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,11 @@ public static void generateGTDynamicLoot(Map<ResourceLocation, LootTable> lootTa
LootItem.lootTableItem(dropItem.getItem())
.apply(SetItemCountFunction
.setCount(ConstantValue.exactly(oreMultiplier)))));
// .apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE)))); //disable fortune for
// balance reasons. (for now, until we can think of a better solution.)
// disable fortune by default for balance reasons.
// (for now, until we can think of a better solution.)
if (ConfigHolder.INSTANCE.gameplay.oreFortuneDrops) {
builder.apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE));
}

Supplier<Material> outputDustMat = type.material();
LootPool.Builder pool = LootPool.lootPool();
Expand Down
Loading