From 88d194ebb1d8f6bb2e25efd3db42c9474f1c6889 Mon Sep 17 00:00:00 2001 From: Minecraftschurli Date: Sat, 24 Aug 2024 21:06:16 +0200 Subject: [PATCH] spotless apply --- .../network/handler/NeoForgeClientPayloadHandler.java | 4 ++-- .../src/main/java/vazkii/patchouli/client/base/BookModel.java | 1 + .../java/vazkii/patchouli/network/MessageOpenBookGui.java | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NeoForge/src/main/java/vazkii/patchouli/neoforge/network/handler/NeoForgeClientPayloadHandler.java b/NeoForge/src/main/java/vazkii/patchouli/neoforge/network/handler/NeoForgeClientPayloadHandler.java index 36015e49..5b083c63 100644 --- a/NeoForge/src/main/java/vazkii/patchouli/neoforge/network/handler/NeoForgeClientPayloadHandler.java +++ b/NeoForge/src/main/java/vazkii/patchouli/neoforge/network/handler/NeoForgeClientPayloadHandler.java @@ -17,7 +17,7 @@ public static NeoForgeClientPayloadHandler getInstance() { public void handleData(final MessageOpenBookGui data, final IPayloadContext context) { try { ClientBookRegistry.INSTANCE.displayBookGui(data.book(), data.entry(), data.page()); - } catch(Exception e) { + } catch (Exception e) { context.disconnect(Component.translatable("patchouli.networking.open_book.failed", e.getMessage())); } } @@ -25,7 +25,7 @@ public void handleData(final MessageOpenBookGui data, final IPayloadContext cont public void handleData(final MessageReloadBookContents data, final IPayloadContext context) { try { ClientBookRegistry.INSTANCE.reload(); - } catch(Exception e) { + } catch (Exception e) { context.disconnect(Component.translatable("patchouli.networking.reload_contents.failed", e.getMessage())); } } diff --git a/Xplat/src/main/java/vazkii/patchouli/client/base/BookModel.java b/Xplat/src/main/java/vazkii/patchouli/client/base/BookModel.java index 9b7361eb..dce9c3f1 100644 --- a/Xplat/src/main/java/vazkii/patchouli/client/base/BookModel.java +++ b/Xplat/src/main/java/vazkii/patchouli/client/base/BookModel.java @@ -88,6 +88,7 @@ public ItemTransforms getTransforms() { private static class DummyModelBaker implements ModelBaker { static ModelBaker INSTANCE = new DummyModelBaker(); + // soft implement IModelBakerExtension public Function getModelTextureGetter() { return null; diff --git a/Xplat/src/main/java/vazkii/patchouli/network/MessageOpenBookGui.java b/Xplat/src/main/java/vazkii/patchouli/network/MessageOpenBookGui.java index f0988d1b..f6d8540f 100644 --- a/Xplat/src/main/java/vazkii/patchouli/network/MessageOpenBookGui.java +++ b/Xplat/src/main/java/vazkii/patchouli/network/MessageOpenBookGui.java @@ -11,6 +11,7 @@ import org.jetbrains.annotations.Nullable; public record MessageOpenBookGui(ResourceLocation book, @Nullable ResourceLocation entry, int page) implements CustomPacketPayload { + public static final ResourceLocation ID = ResourceLocation.fromNamespaceAndPath(PatchouliAPI.MOD_ID, "open_book"); public static final StreamCodec CODEC = StreamCodec.composite( ResourceLocation.STREAM_CODEC,