Shopkeepers

Shopkeepers

2M Downloads

[Request] Option to disable result item check

Rubenicos opened this issue ยท 1 comments

commented

Description

Add the option to disable the safe-check in TradingHandler:

// As a safe-guard, check that the result item of the selected recipe actually matches the result item expected
// by the player:
UnmodifiableItemStack recipeResultItem = tradingRecipe.getResultItem();
if (!recipeResultItem.equals(resultItem)) {

Why

I get the error "Not handling trade: The trade result item does not match the expected item of the active trading recipe!" when i try to edit the trading recipes for client-side.

commented

This error indicates that you are not actually only modifying the item on the client side, but also on the server side. If you are modifying the outgoing merchant trade list packet, you need to copy the whole merchant recipe list, and all the merchant recipes you are trying to modify the items of. Otherwise your modifications also affect the actual merchant list on the server side.