Skip to content

Commit

Permalink
spotless apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Minecraftschurli committed Aug 24, 2024
1 parent 7e1ccf5 commit 88d194e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ 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()));
}
}

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()));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public ItemTransforms getTransforms() {

private static class DummyModelBaker implements ModelBaker {
static ModelBaker INSTANCE = new DummyModelBaker();

// soft implement IModelBakerExtension
public Function<Material, TextureAtlasSprite> getModelTextureGetter() {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<FriendlyByteBuf, MessageOpenBookGui> CODEC = StreamCodec.composite(
ResourceLocation.STREAM_CODEC,
Expand Down

0 comments on commit 88d194e

Please sign in to comment.