Skip to content

Commit

Permalink
Fixed a crash when Depleted Reroll is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Estecka committed Apr 26, 2024
1 parent 2d358b7 commit d6407fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ Initial release

## 1.1
- Added a gamerules that allows cartographers to regenerate maps that have been sold at least once.
- _Regression: Restocks cause a crash if Deplete Reroll is disabled._

# v2
## 2.0.0
- Made some methods and types available through an API.
- Added an entrypoint to define villager trades from outside mods
## 2.1.0
- Reimplemented Trade-Rebalance support in a backward-compatible way
## 2.1.1
- Fixed a crash that would occur upon restock if Depleted Reroll is disabled.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ loader_version=0.15.3
fabric_version=0.91.2+1.20.2

# Mod Properties
mod_version=2.1.0
mod_version=2.1.1
maven_group=tk.estecka.shiftingwares
archives_base_name=shifting-wares
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private TradeOfferList DailyRefill(VillagerEntity me, Operation<TradeOfferList>
if (IsDailyRerollEnabled() || IsDepleteRerollEnabled())
return EMPTY;
else
return original.call();
return original.call(me);
}

/**
Expand All @@ -71,7 +71,7 @@ private TradeOfferList RestockReroll(VillagerEntity me, Operation<TradeOfferList
return EMPTY;
}
else
return original.call();
return original.call(me);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"shifting-wares.mixins.json"
],
"depends": {
"minecraft": "<1.20.5",
"fabricloader": ">=0.15.3",
"java": ">=17",
"fabric-api": "*"
"fabric-api": "*",
"java": ">=17"
},
"recommends": {
"minecraft": "^1.19.4"
Expand Down

0 comments on commit d6407fb

Please sign in to comment.