Fix recipe book is not updated (#20)
This commit is contained in:
parent
dddb2e1474
commit
4ae308eb5f
@ -20,7 +20,7 @@ public class ServerRecipeBookMixin {
|
|||||||
|
|
||||||
@Redirect(method = "add", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/crafting/IRecipe;isDynamic()Z"))
|
@Redirect(method = "add", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/crafting/IRecipe;isDynamic()Z"))
|
||||||
public boolean arclight$recipeUpdate(IRecipe<?> recipe, Collection<IRecipe<?>> collection, ServerPlayerEntity playerEntity) {
|
public boolean arclight$recipeUpdate(IRecipe<?> recipe, Collection<IRecipe<?>> collection, ServerPlayerEntity playerEntity) {
|
||||||
return !recipe.isDynamic() && CraftEventFactory.handlePlayerRecipeListUpdateEvent(playerEntity, recipe.getId());
|
return recipe.isDynamic() || !CraftEventFactory.handlePlayerRecipeListUpdateEvent(playerEntity, recipe.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "sendPacket", cancellable = true, at = @At("HEAD"))
|
@Inject(method = "sendPacket", cancellable = true, at = @At("HEAD"))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user