A little refactoring

This commit is contained in:
Aleksey 2021-01-08 12:57:42 +03:00
parent 5ce9087ac5
commit 24f63e4d5b
2 changed files with 2 additions and 2 deletions

View file

@ -59,10 +59,9 @@ public class AnvilScreenMixin extends ForgingScreen<AnvilScreenHandler> {
@Inject(method = "onSlotUpdate", at = @At("HEAD"), cancellable = true)
public void onSlotUpdate(ScreenHandler handler, int slotId, ItemStack stack, CallbackInfo info) {
AnvilScreenHandlerExtended anvilHandler = AnvilScreenHandlerExtended.class.cast(handler);
if (anvilHandler.be_getCurrentRecipe() != null) {
this.nameField.setText("");
this.nameField.setEditable(false);
this.setFocused(null);
info.cancel();
}
}