Files
architectury-api/testmod-common
canitzp 2ff5dd500d Add an easy way to register Villager and Wandering Trader trades (#84)
* Add TradeRegistry to add Trades a bit more easily. Uses the VillagerTradesEvent on forge

* Added TradeRegistry#registerTradeForWanderer which uses the WandererTraderEvent on forge

* Added javadoc

* Use Fabric own Trade implementation and fixed Test Mod

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Update common/src/main/java/me/shedaniel/architectury/registry/TradeRegistry.java

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

* Added javadoc for SimpleTrade

* Use two lists instead of Int2ObjectMap

* Use "registerTradeForWanderingTrader" instead of "registerTradeForWanderer" for better clarification

* Use IllegalArgumentException instead of RuntimeException

* Remove level limit (Mods may be able to remove this restriction in VillagerData#canLevelUp), Clean up forge's implementation

Signed-off-by: shedaniel <daniel@shedaniel.me>

* Clean up TestTrades and add licenses

Signed-off-by: shedaniel <daniel@shedaniel.me>

* [ciskip] Reintroduce lower bound validation for level

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: shedaniel <daniel@shedaniel.me>
Co-authored-by: Max <maxh2709@gmail.com>
2021-05-14 23:59:58 +02:00
..