Skip to content

Commit

Permalink
Fixed Soft Coating and Fortuna Extract
Browse files Browse the repository at this point in the history
Required changes to the Global Loot Modifier. Best to keep an eye on https://docs.minecraftforge.net/en/1.20.x/resources/server/glm/ if it occurs again.

Fixes #1974
  • Loading branch information
WayofTime committed Sep 19, 2023
1 parent 8f35459 commit 8dcd2da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 3.3.2
------------------------------------------------------
- Fixed Soft Coating and Fortuna Extract; voiding of drops is not part of the "ultimate price"!

------------------------------------------------------
Version 3.3.1
------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public SilkTouchTestModifier(LootItemCondition[] conditionsIn)
fakeTool.enchant(Enchantments.SILK_TOUCH, 1);
LootParams.Builder builder = new LootParams.Builder(context.getLevel());
builder.withParameter(LootContextParams.TOOL, fakeTool);
LootParams ctx = builder.create(LootContextParamSets.BLOCK);
LootParams ctx = builder.create(LootContextParamSets.EMPTY);
LootTable loottable = context.getLevel().getServer().getLootData().getLootTable(context.getParamOrNull(LootContextParams.BLOCK_STATE).getBlock().getLootTable());
return loottable.getRandomItems(ctx);
}
Expand Down Expand Up @@ -129,7 +129,7 @@ public FortuneModifier(LootItemCondition[] conditionsIn)

LootParams.Builder builder = new LootParams.Builder(context.getLevel());
builder.withParameter(LootContextParams.TOOL, fakeTool);
LootParams ctx = builder.create(LootContextParamSets.BLOCK);
LootParams ctx = builder.create(LootContextParamSets.EMPTY);
LootTable loottable = context.getLevel().getServer().getLootData().getLootTable(context.getParamOrNull(LootContextParams.BLOCK_STATE).getBlock().getLootTable());
return loottable.getRandomItems(ctx);
}
Expand Down

0 comments on commit 8dcd2da

Please sign in to comment.