From f6efb4dde935269ec3a92e05f3f2686e5a6f1db4 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:27:24 +0300 Subject: [PATCH 01/18] Update LightroomBlockEntity.java Positive film stuff --- .../block/entity/LightroomBlockEntity.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/io/github/mortuusars/exposure/block/entity/LightroomBlockEntity.java b/common/src/main/java/io/github/mortuusars/exposure/block/entity/LightroomBlockEntity.java index 3c01d3c46..54b746583 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/block/entity/LightroomBlockEntity.java +++ b/common/src/main/java/io/github/mortuusars/exposure/block/entity/LightroomBlockEntity.java @@ -265,10 +265,12 @@ public void startPrintingProcess(boolean advanceFrameOnFinish) { if (getActualProcess(filmStack) == Lightroom.Process.CHROMATIC) printTime = Config.Common.LIGHTROOM_CHROMATIC_PRINT_TIME.get(); - else if (film.getType() == FilmType.BLACK_AND_WHITE) - printTime = Config.Common.LIGHTROOM_BW_PRINT_TIME.get(); - else - printTime = Config.Common.LIGHTROOM_COLOR_PRINT_TIME.get(); + else { + printTime = switch (film.getType()) { + case BLACK_AND_WHITE,COLOR_POSITIVE -> Config.Common.LIGHTROOM_BW_PRINT_TIME.get(); + case COLOR -> Config.Common.LIGHTROOM_COLOR_PRINT_TIME.get(); + }; + } advanceFrame = advanceFrameOnFinish; @@ -353,7 +355,10 @@ protected int[] getRequiredDyeSlotsForPrint(ItemStack film, ItemStack paper, Lig return ArrayUtils.EMPTY_INT_ARRAY; if (process == Lightroom.Process.REGULAR) { - return filmItem.getType() == FilmType.COLOR ? Lightroom.DYES_FOR_COLOR : Lightroom.DYES_FOR_BW; + return switch (filmItem.getType()) { + case BLACK_AND_WHITE -> Lightroom.DYES_FOR_BW; + case COLOR, COLOR_POSITIVE -> Lightroom.DYES_FOR_COLOR; + }; } if (process == Lightroom.Process.CHROMATIC) { @@ -433,9 +438,10 @@ protected void storeExperienceForPrint(ItemStack film, CompoundTag frame, Lightr xp = result.getItem() instanceof ChromaticSheetItem ? 0 : Config.Common.LIGHTROOM_EXPERIENCE_PER_PRINT_CHROMATIC.get(); } else if (film.getItem() instanceof IFilmItem filmItem) - xp = filmItem.getType() == FilmType.COLOR - ? Config.Common.LIGHTROOM_EXPERIENCE_PER_PRINT_COLOR.get() - : Config.Common.LIGHTROOM_EXPERIENCE_PER_PRINT_BW.get(); + xp = switch (filmItem.getType()) { + case BLACK_AND_WHITE -> Config.Common.LIGHTROOM_EXPERIENCE_PER_PRINT_BW.get(); + case COLOR, COLOR_POSITIVE -> Config.Common.LIGHTROOM_EXPERIENCE_PER_PRINT_COLOR.get(); + }; if (xp > 0) { float variability = level.getRandom().nextFloat() * 0.3f + 1f; From 9310f59574302fe4e7ad0d983c98faccf4d6bb5e Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:28:43 +0300 Subject: [PATCH 02/18] Update DitheringColorConverter.java Increased saturation --- .../converter/DitheringColorConverter.java | 119 ++++++++++++++---- 1 file changed, 98 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/DitheringColorConverter.java b/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/DitheringColorConverter.java index a6fd6e14b..dda9f4b2a 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/DitheringColorConverter.java +++ b/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/DitheringColorConverter.java @@ -2,7 +2,9 @@ import com.mojang.blaze3d.platform.NativeImage; import io.github.mortuusars.exposure.camera.capture.Capture; +import io.github.mortuusars.exposure.camera.infrastructure.FilmType; import io.github.mortuusars.exposure.util.Color; +import net.minecraft.util.FastColor; import net.minecraft.util.Mth; import net.minecraft.world.level.material.MapColor; @@ -12,6 +14,13 @@ public class DitheringColorConverter implements IImageToMapColorsConverter { private record NegatableColor(int r, int g, int b) {} + protected FilmType filmType; + + public DitheringColorConverter setFilmType(FilmType type) { + this.filmType = type; + return this; + } + public static MapColor[] getMapColors() { MapColor[] colors = new MapColor[64]; for (int i = 0; i <= 63; i++){ @@ -22,37 +31,105 @@ public static MapColor[] getMapColors() { @Override public byte[] convert(Capture capture, NativeImage image) { + + if (capture.getFilmType() == FilmType.COLOR_POSITIVE || filmType == FilmType.COLOR_POSITIVE) { + applySaturation(image, 2.0f); + } + return convert(image); } + //AI slop for increasing saturation + private void applySaturation(NativeImage image, float saturationMultiplier) { + for (int y = 0; y < image.getHeight(); y++) { + for (int x = 0; x < image.getWidth(); x++) { + int abgr = image.getPixelRGBA(x, y); + + int alpha = FastColor.ABGR32.alpha(abgr); + if (alpha == 0) continue; + + int blue = FastColor.ABGR32.blue(abgr); + int green = FastColor.ABGR32.green(abgr); + int red = FastColor.ABGR32.red(abgr); + + float[] hsb = rgbToHsb(red, green, blue); + + hsb[1] *= saturationMultiplier; + hsb[1] = Mth.clamp(hsb[1], 0.0f, 1.0f); + + int newAbgr = hsbToAbgr(hsb[0], hsb[1], hsb[2], alpha); + image.setPixelRGBA(x, y, newAbgr); + } + } + } + + // --- Lightweight, AWT-Free HSB/RGB Conversion Methods --- + + private static float[] rgbToHsb(int r, int g, int b) { + float hue, saturation, brightness; + int cmax = Math.max(r, g); + if (b > cmax) cmax = b; + int cmin = Math.min(r, g); + if (b < cmin) cmin = b; + + brightness = ((float) cmax) / 255.0f; + if (cmax != 0) + saturation = ((float) (cmax - cmin)) / ((float) cmax); + else + saturation = 0; + + if (saturation == 0) { + hue = 0; + } else { + float redc = ((float) (cmax - r)) / ((float) (cmax - cmin)); + float greenc = ((float) (cmax - g)) / ((float) (cmax - cmin)); + float bluec = ((float) (cmax - b)) / ((float) (cmax - cmin)); + if (r == cmax) + hue = bluec - greenc; + else if (g == cmax) + hue = 2.0f + redc - bluec; + else + hue = 4.0f + greenc - redc; + hue = hue / 6.0f; + if (hue < 0) + hue = hue + 1.0f; + } + return new float[]{hue, saturation, brightness}; + } + + private static int hsbToAbgr(float hue, float saturation, float brightness, int alpha) { + int r = 0, g = 0, b = 0; + if (saturation == 0) { + r = g = b = (int) (brightness * 255.0f + 0.5f); + } else { + float h = (hue - (float)Math.floor(hue)) * 6.0f; + float f = h - (float)java.lang.Math.floor(h); + float p = brightness * (1.0f - saturation); + float q = brightness * (1.0f - saturation * f); + float t = brightness * (1.0f - (saturation * (1.0f - f))); + switch ((int) h) { + case 0 -> { r = (int) (brightness * 255.0f + 0.5f); g = (int) (t * 255.0f + 0.5f); b = (int) (p * 255.0f + 0.5f); } + case 1 -> { r = (int) (q * 255.0f + 0.5f); g = (int) (brightness * 255.0f + 0.5f); b = (int) (p * 255.0f + 0.5f); } + case 2 -> { r = (int) (p * 255.0f + 0.5f); g = (int) (brightness * 255.0f + 0.5f); b = (int) (t * 255.0f + 0.5f); } + case 3 -> { r = (int) (p * 255.0f + 0.5f); g = (int) (q * 255.0f + 0.5f); b = (int) (brightness * 255.0f + 0.5f); } + case 4 -> { r = (int) (t * 255.0f + 0.5f); g = (int) (p * 255.0f + 0.5f); b = (int) (brightness * 255.0f + 0.5f); } + case 5 -> { r = (int) (brightness * 255.0f + 0.5f); g = (int) (p * 255.0f + 0.5f); b = (int) (q * 255.0f + 0.5f); } + } + } + return FastColor.ABGR32.color(alpha, b, g, r); + } + @Override public byte[] convert(NativeImage image) { + if (filmType == FilmType.COLOR_POSITIVE) { + applySaturation(image, 2.0f); + } int[][] pixels = convertToPixelArray(image); return convert(pixels); - -// int width = image.getWidth(); -// int height = image.getHeight(); -// MapColor[] mapColors = Arrays.stream(getMapColors()).filter(Objects::nonNull).toArray(MapColor[]::new); -// -// byte[] bytes = new byte[width * height]; -// -// for (int x = 0; x < width; x++) { -// for (int y = 0; y < height; y++) { -// Color imageColor = new Color(pixels[y][x], true); -// -// byte b = (byte) floydDither(mapColors, pixels, x, y, imageColor); -// -// if (imageColor.getAlpha() == 0) -// b = (byte)MapColor.NONE.id; -// -// bytes[x + y * width] = b; -// } -// } -// -// return bytes; } public byte[] convert(int[][] pixels) { + MapColor[] mapColors = Arrays.stream(getMapColors()).filter(Objects::nonNull).toArray(MapColor[]::new); int width = pixels[0].length; From dd546661814f8d93691ff707141e9b7fb1e6fbfb Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:29:36 +0300 Subject: [PATCH 03/18] Update SimpleColorConverter.java The same thing as the dithering color converter but... different. Idk if this is even needed tbh --- .../converter/SimpleColorConverter.java | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/SimpleColorConverter.java b/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/SimpleColorConverter.java index 7ecd9f8d2..28d88efaa 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/SimpleColorConverter.java +++ b/common/src/main/java/io/github/mortuusars/exposure/camera/capture/converter/SimpleColorConverter.java @@ -2,7 +2,9 @@ import com.mojang.blaze3d.platform.NativeImage; import io.github.mortuusars.exposure.camera.capture.Capture; +import io.github.mortuusars.exposure.camera.infrastructure.FilmType; import net.minecraft.util.FastColor; +import net.minecraft.util.Mth; import net.minecraft.world.level.material.MapColor; import java.util.Arrays; @@ -20,6 +22,9 @@ public static MapColor[] getMapColors() { @Override public byte[] convert(Capture capture, NativeImage image) { + if (capture.getFilmType() == FilmType.COLOR_POSITIVE) { + applySaturation(image, 2.0f); + } return convert(image); } @@ -54,6 +59,86 @@ public byte[] convert(NativeImage image) { private final double[] shadeCoeffs = { 0.71, 0.86, 1.0, 0.53 }; + + //AI slop for saturating an image + + private void applySaturation(NativeImage image, float saturationMultiplier) { + for (int y = 0; y < image.getHeight(); y++) { + for (int x = 0; x < image.getWidth(); x++) { + int abgr = image.getPixelRGBA(x, y); + + int alpha = FastColor.ABGR32.alpha(abgr); + if (alpha == 0) continue; + + int blue = FastColor.ABGR32.blue(abgr); + int green = FastColor.ABGR32.green(abgr); + int red = FastColor.ABGR32.red(abgr); + + float[] hsb = rgbToHsb(red, green, blue); + + hsb[1] *= saturationMultiplier; + hsb[1] = Mth.clamp(hsb[1], 0.0f, 1.0f); + + int newAbgr = hsbToAbgr(hsb[0], hsb[1], hsb[2], alpha); + image.setPixelRGBA(x, y, newAbgr); + } + } + } + + private static float[] rgbToHsb(int r, int g, int b) { + float hue, saturation, brightness; + int cmax = Math.max(r, g); + if (b > cmax) cmax = b; + int cmin = Math.min(r, g); + if (b < cmin) cmin = b; + + brightness = ((float) cmax) / 255.0f; + if (cmax != 0) + saturation = ((float) (cmax - cmin)) / ((float) cmax); + else + saturation = 0; + + if (saturation == 0) { + hue = 0; + } else { + float redc = ((float) (cmax - r)) / ((float) (cmax - cmin)); + float greenc = ((float) (cmax - g)) / ((float) (cmax - cmin)); + float bluec = ((float) (cmax - b)) / ((float) (cmax - cmin)); + if (r == cmax) + hue = bluec - greenc; + else if (g == cmax) + hue = 2.0f + redc - bluec; + else + hue = 4.0f + greenc - redc; + hue = hue / 6.0f; + if (hue < 0) + hue = hue + 1.0f; + } + return new float[]{hue, saturation, brightness}; + } + + private static int hsbToAbgr(float hue, float saturation, float brightness, int alpha) { + int r = 0, g = 0, b = 0; + if (saturation == 0) { + r = g = b = (int) (brightness * 255.0f + 0.5f); + } else { + float h = (hue - (float)Math.floor(hue)) * 6.0f; + float f = h - (float)java.lang.Math.floor(h); + float p = brightness * (1.0f - saturation); + float q = brightness * (1.0f - saturation * f); + float t = brightness * (1.0f - (saturation * (1.0f - f))); + switch ((int) h) { + case 0 -> { r = (int) (brightness * 255.0f + 0.5f); g = (int) (t * 255.0f + 0.5f); b = (int) (p * 255.0f + 0.5f); } + case 1 -> { r = (int) (q * 255.0f + 0.5f); g = (int) (brightness * 255.0f + 0.5f); b = (int) (p * 255.0f + 0.5f); } + case 2 -> { r = (int) (p * 255.0f + 0.5f); g = (int) (brightness * 255.0f + 0.5f); b = (int) (t * 255.0f + 0.5f); } + case 3 -> { r = (int) (p * 255.0f + 0.5f); g = (int) (q * 255.0f + 0.5f); b = (int) (brightness * 255.0f + 0.5f); } + case 4 -> { r = (int) (t * 255.0f + 0.5f); g = (int) (p * 255.0f + 0.5f); b = (int) (brightness * 255.0f + 0.5f); } + case 5 -> { r = (int) (brightness * 255.0f + 0.5f); g = (int) (p * 255.0f + 0.5f); b = (int) (q * 255.0f + 0.5f); } + } + } + return FastColor.ABGR32.color(alpha, b, g, r); + } + private double[] applyShade(double[] color, int shadeIndex) { double coeff = shadeCoeffs[shadeIndex]; return new double[] { color[0] * coeff, color[1] * coeff, color[2] * coeff }; From 4d6d8fd5dcb7fc34f9a0a6c4c1631ece1d536a45 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:31:57 +0300 Subject: [PATCH 04/18] Update FilmType.java Add color positive --- .../exposure/camera/infrastructure/FilmType.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/io/github/mortuusars/exposure/camera/infrastructure/FilmType.java b/common/src/main/java/io/github/mortuusars/exposure/camera/infrastructure/FilmType.java index 48f7d5024..b46625981 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/camera/infrastructure/FilmType.java +++ b/common/src/main/java/io/github/mortuusars/exposure/camera/infrastructure/FilmType.java @@ -8,7 +8,8 @@ public enum FilmType implements StringRepresentable { BLACK_AND_WHITE("black_and_white", 255, 255, 255, 1.0F, 1.0F, 1.0F, 1.0F), - COLOR("color", 180, 130, 110, 1.2F, 0.96F, 0.75F, 1.0F); + COLOR("color", 180, 130, 110, 1.2F, 0.96F, 0.75F, 1.0F), + COLOR_POSITIVE("color_positive", 255, 255, 255, 0.0F, 0.0F, 0.0F, 1.0F); @SuppressWarnings("deprecation") public static final StringRepresentable.EnumCodec CODEC = StringRepresentable.fromEnum(FilmType::values); @@ -47,6 +48,11 @@ public ItemStack createItemStack() { } public ItemStack createDevelopedItemStack() { - return new ItemStack(this == COLOR ? Exposure.Items.DEVELOPED_COLOR_FILM.get() : Exposure.Items.DEVELOPED_BLACK_AND_WHITE_FILM.get()); + // Updated to a switch statement to handle all types + return switch (this) { + case BLACK_AND_WHITE -> new ItemStack(Exposure.Items.DEVELOPED_BLACK_AND_WHITE_FILM.get()); + case COLOR -> new ItemStack(Exposure.Items.DEVELOPED_COLOR_FILM.get()); + case COLOR_POSITIVE -> new ItemStack(Exposure.Items.DEVELOPED_COLOR_POSITIVE_FILM.get()); + }; } } From 008a1b3ee322b02040a11c2e9d1fb240967de86f Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:34:19 +0300 Subject: [PATCH 05/18] Update LightroomScreen.java Positive film --- .../exposure/gui/screen/LightroomScreen.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/io/github/mortuusars/exposure/gui/screen/LightroomScreen.java b/common/src/main/java/io/github/mortuusars/exposure/gui/screen/LightroomScreen.java index d65dddc13..d7d960955 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/gui/screen/LightroomScreen.java +++ b/common/src/main/java/io/github/mortuusars/exposure/gui/screen/LightroomScreen.java @@ -17,6 +17,7 @@ import io.github.mortuusars.exposure.menu.LightroomMenu; import io.github.mortuusars.exposure.render.image.RenderedImageProvider; import io.github.mortuusars.exposure.render.modifiers.ExposurePixelModifiers; +import io.github.mortuusars.exposure.render.modifiers.IPixelModifier; import io.github.mortuusars.exposure.util.ColorChannel; import io.github.mortuusars.exposure.util.PagingDirection; import net.minecraft.ChatFormatting; @@ -294,8 +295,15 @@ public void renderFrame(@Nullable CompoundTag frame, PoseStack poseStack, float poseStack.translate(x, y, 0); MultiBufferSource.BufferSource bufferSource = MultiBufferSource.immediate(Tesselator.getInstance().getBuilder()); + + IPixelModifier modifier = switch (negative) { + case COLOR_POSITIVE -> ExposurePixelModifiers.EMPTY; //literally does nothing lmao + default -> ExposurePixelModifiers.NEGATIVE_FILM; + }; + ExposureClient.getExposureRenderer().render(RenderedImageProvider.fromFrame(frame), - ExposurePixelModifiers.NEGATIVE_FILM, poseStack, bufferSource, 0, 0, size, size, LightTexture.FULL_BRIGHT, + modifier, + poseStack, bufferSource, 0, 0, size, size, LightTexture.FULL_BRIGHT, negative.frameR, negative.frameG, negative.frameB, Mth.clamp((int) Math.ceil(alpha * 255), 0, 255)); bufferSource.endBatch(); From 4055b879bb17f806e45d36095bec9bb50c826771 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:37:21 +0300 Subject: [PATCH 06/18] Update Exposure.java Add IDs for positive film --- .../main/java/io/github/mortuusars/exposure/Exposure.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/src/main/java/io/github/mortuusars/exposure/Exposure.java b/common/src/main/java/io/github/mortuusars/exposure/Exposure.java index d48c368cc..941e29d53 100644 --- a/common/src/main/java/io/github/mortuusars/exposure/Exposure.java +++ b/common/src/main/java/io/github/mortuusars/exposure/Exposure.java @@ -132,6 +132,10 @@ public static class Items { () -> new FilmRollItem(FilmType.COLOR, Mth.color(0.4F, 0.4F, 1.0F), new Item.Properties() .stacksTo(16))); + public static final Supplier COLOR_POSITIVE_FILM = Register.item("color_positive_film", + () -> new FilmRollItem(FilmType.COLOR_POSITIVE, Mth.color(0.8F, 0.4F, 1.0F), new Item.Properties() + .stacksTo(16))); + public static final Supplier DEVELOPED_BLACK_AND_WHITE_FILM = Register.item("developed_black_and_white_film", () -> new DevelopedFilmItem(FilmType.BLACK_AND_WHITE, new Item.Properties() .stacksTo(1))); @@ -140,6 +144,10 @@ public static class Items { () -> new DevelopedFilmItem(FilmType.COLOR, new Item.Properties() .stacksTo(1))); + public static final Supplier DEVELOPED_COLOR_POSITIVE_FILM = Register.item("developed_color_positive_film", + () -> new DevelopedFilmItem(FilmType.COLOR_POSITIVE, new Item.Properties() + .stacksTo(1))); + public static final Supplier PHOTOGRAPH = Register.item("photograph", () -> new PhotographItem(new Item.Properties() .stacksTo(1))); From 900b2fd4294be3676319b9c197e309d1772ce976 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:38:50 +0300 Subject: [PATCH 07/18] Update film_rolls.json Positive film --- .../main/resources/data/exposure/tags/items/film_rolls.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/resources/data/exposure/tags/items/film_rolls.json b/common/src/main/resources/data/exposure/tags/items/film_rolls.json index 02221ee0d..652d6db16 100644 --- a/common/src/main/resources/data/exposure/tags/items/film_rolls.json +++ b/common/src/main/resources/data/exposure/tags/items/film_rolls.json @@ -1,6 +1,7 @@ { "values": [ "exposure:black_and_white_film", - "exposure:color_film" + "exposure:color_film", + "exposure:color_positive_film" ] -} \ No newline at end of file +} From 800e3ebe30d45cb594a4cb9f5e7ad40747f83886 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:39:11 +0300 Subject: [PATCH 08/18] Update developed_film_rolls.json Positive film --- .../data/exposure/tags/items/developed_film_rolls.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/main/resources/data/exposure/tags/items/developed_film_rolls.json b/common/src/main/resources/data/exposure/tags/items/developed_film_rolls.json index 9931da3b8..1f702dead 100644 --- a/common/src/main/resources/data/exposure/tags/items/developed_film_rolls.json +++ b/common/src/main/resources/data/exposure/tags/items/developed_film_rolls.json @@ -1,6 +1,7 @@ { "values": [ "exposure:developed_black_and_white_film", - "exposure:developed_color_film" + "exposure:developed_color_film", + "exposure:developed_color_positive_film" ] -} \ No newline at end of file +} From ea427cea58002df3e853f385a46ec7f83643f880 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:41:02 +0300 Subject: [PATCH 09/18] Add files via upload --- .../textures/item/color_positive_film.png | Bin 0 -> 462 bytes .../item/developed_color_positive_film.png | Bin 0 -> 436 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 common/src/main/resources/assets/exposure/textures/item/color_positive_film.png create mode 100644 common/src/main/resources/assets/exposure/textures/item/developed_color_positive_film.png diff --git a/common/src/main/resources/assets/exposure/textures/item/color_positive_film.png b/common/src/main/resources/assets/exposure/textures/item/color_positive_film.png new file mode 100644 index 0000000000000000000000000000000000000000..bbb44177f5c00dd03806d3d38ac9600c3fe2792e GIT binary patch literal 462 zcmV;<0WtoGP)Px$h)G02R5*>rlFusyVHn3hv#pt(CF?iiuxu$&a*#hj&RmsHLdwBmYfEuZF4)>y zDF@2YNeTaeJ#mmoMA}8NmX+VeS~KIInT%bozNe?R=lQ&!_vwZIj$jtSV35h_DMOZA zyr$lGeOH+n8y9{X3T? zC8Z+CA{C04i=%x2jxUq={eA&pbaCF`M=}fmuHxsGfjJD&**jp>=0C7@@VKxGz}{Vy z3dQ@Sx{@Fq4rjX~tAQ}n&~8(7i?ZM;DnwC~KOz5{PyQ*86UL8YmjD0&07*qoM6N<$ Eg4J5jS^xk5 literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/exposure/textures/item/developed_color_positive_film.png b/common/src/main/resources/assets/exposure/textures/item/developed_color_positive_film.png new file mode 100644 index 0000000000000000000000000000000000000000..fe063a3e5fd9785d2cf4cc928abc44a6a86b534e GIT binary patch literal 436 zcmV;l0ZaagP)Px$Zb?KzR5*>rl1*>ZKoEwX{jj}uq9h6^qC)%vBznmI{|P=&H54k4I7fh*l-j$t zcejU4+=f==*g4M5yz{&}1FszdV7*@R zzJ1xmOsm6)$cJ|eT<7^~J+12ik_CWSm5-B3Qvi@_jWGpp=M`mX*#5Z#z_#sJI|>jZ z(T5Y{E@AR}*Fc2Tasq%U%Vz|HKq$$+9mZ6iWdOXHR{#X>3E_0eD6nsmr&+0Ktvf05 zAp-DgXA_yVPX(U)gQJC;+vIt*oDc%!#yo%nOiU4#l=u*kQlO-y8$2e Date: Thu, 14 Aug 2025 15:43:41 +0300 Subject: [PATCH 10/18] Add files via upload --- .../assets/exposure/models/item/color_positive_film.json | 6 ++++++ .../exposure/models/item/developed_color_positive_film.json | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 common/src/main/resources/assets/exposure/models/item/color_positive_film.json create mode 100644 common/src/main/resources/assets/exposure/models/item/developed_color_positive_film.json diff --git a/common/src/main/resources/assets/exposure/models/item/color_positive_film.json b/common/src/main/resources/assets/exposure/models/item/color_positive_film.json new file mode 100644 index 000000000..a60c24283 --- /dev/null +++ b/common/src/main/resources/assets/exposure/models/item/color_positive_film.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "exposure:item/color_positive_film" + } +} \ No newline at end of file diff --git a/common/src/main/resources/assets/exposure/models/item/developed_color_positive_film.json b/common/src/main/resources/assets/exposure/models/item/developed_color_positive_film.json new file mode 100644 index 000000000..5e1a78fc3 --- /dev/null +++ b/common/src/main/resources/assets/exposure/models/item/developed_color_positive_film.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "exposure:item/developed_color_positive_film" + } +} \ No newline at end of file From c8bddbf4c9429010199b2aad024438d363f43476 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:45:14 +0300 Subject: [PATCH 11/18] Update en_us.json --- common/src/main/resources/assets/exposure/lang/en_us.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/resources/assets/exposure/lang/en_us.json b/common/src/main/resources/assets/exposure/lang/en_us.json index c3a3bdc56..5b046a2bc 100644 --- a/common/src/main/resources/assets/exposure/lang/en_us.json +++ b/common/src/main/resources/assets/exposure/lang/en_us.json @@ -132,8 +132,10 @@ "item.exposure.chromatic_sheet.info": "Use as a paper to print remaining layers", "item.exposure.chromatic_sheet.use_tooltip": "Use to combine three layers into a Photograph", "item.exposure.color_film": "Color Film", + "item.exposure.color_positive_film": "Color Positive Film", "item.exposure.developed_black_and_white_film": "Developed Black and White Film", "item.exposure.developed_color_film": "Developed Color Film", + "item.exposure.developed_color_positive_film": "Developed Color Positive Film", "item.exposure.developed_film.tooltip.frame_count": "Frames: %s", "item.exposure.film_roll.tooltip.details.develop": "Developed by crafting with:", "item.exposure.film_roll.tooltip.developing_step": "Developing: %s", @@ -186,4 +188,4 @@ "subtitle.exposure.photograph_frame.remove_item": "Photograph Frame empties", "subtitle.exposure.photograph_frame.rotate_item": "Photograph Frame clicks", "tooltip.exposure.hold_for_details": "§8Hold [§7Shift§8] for Details" -} \ No newline at end of file +} From 20b9840c012b263766b8720cebf7fe795db262bd Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:45:34 +0300 Subject: [PATCH 12/18] Update ru_ru.json --- common/src/main/resources/assets/exposure/lang/ru_ru.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/resources/assets/exposure/lang/ru_ru.json b/common/src/main/resources/assets/exposure/lang/ru_ru.json index 56dae0b98..baf678b3e 100644 --- a/common/src/main/resources/assets/exposure/lang/ru_ru.json +++ b/common/src/main/resources/assets/exposure/lang/ru_ru.json @@ -120,6 +120,7 @@ "item.exposure.album": "Фотоальбом", "item.exposure.album.tooltip.photos_count": "§7Фотографий: %s", "item.exposure.black_and_white_film": "Чёрно-белая плёнка", + "item.exposure.color_positive_film": "Цветная обратимая плёнка", "item.exposure.camera": "Фотоаппарат", "item.exposure.camera.camera_attachments.fail.shutter_open": "Невозможно разобрать фотоаппарат, пока опущен затвор.", "item.exposure.camera.sneak_to_open_tooltip": "Используйте крадясь, чтобы настроить", @@ -132,6 +133,7 @@ "item.exposure.color_film": "Цветная плёнка", "item.exposure.developed_black_and_white_film": "Проявленная чёрно-белая плёнка", "item.exposure.developed_color_film": "Проявленная цветная плёнка", + "item.exposure.developed_color_positive_film": "Проявлённая цветная обратимая плёнка", "item.exposure.developed_film.tooltip.frame_count": "Кадры: %s", "item.exposure.film_roll.tooltip.details.develop": "Проявляется при совмещении с:", "item.exposure.film_roll.tooltip.developing_step": "Проявка: %s", @@ -184,4 +186,4 @@ "subtitle.exposure.photograph_frame.remove_item": "Рамка для фотографии опустошена", "subtitle.exposure.photograph_frame.rotate_item": "Щелчок рамки для фотографии", "tooltip.exposure.hold_for_details": "§8Удерживайте [§7Shift§8] для подробностей" -} \ No newline at end of file +} From b844a6f86f600ef07d7237583c4b3b9729426732 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:48:03 +0300 Subject: [PATCH 13/18] Add files via upload --- .../exposure/recipes/color_positive_film.json | 33 +++++++++++ .../developing_color_positive_film.json | 59 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 forge/src/main/resources/data/exposure/recipes/color_positive_film.json create mode 100644 forge/src/main/resources/data/exposure/recipes/developing_color_positive_film.json diff --git a/forge/src/main/resources/data/exposure/recipes/color_positive_film.json b/forge/src/main/resources/data/exposure/recipes/color_positive_film.json new file mode 100644 index 000000000..b2a3ce1f8 --- /dev/null +++ b/forge/src/main/resources/data/exposure/recipes/color_positive_film.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "C": { + "item": "minecraft:cyan_dye" + }, + "M": { + "item": "minecraft:magenta_dye" + }, + "Y": { + "item": "minecraft:yellow_dye" + }, + "E": { + "item": "minecraft:emerald" + }, + "G": { + "item": "minecraft:gunpowder" + }, + "K": { + "item": "minecraft:dried_kelp" + } + }, + "pattern": [ + "CYM", + "GEG", + "KGK" + ], + "result": { + "item": "exposure:color_positive_film" + }, + "show_notification": true +} \ No newline at end of file diff --git a/forge/src/main/resources/data/exposure/recipes/developing_color_positive_film.json b/forge/src/main/resources/data/exposure/recipes/developing_color_positive_film.json new file mode 100644 index 000000000..44947a943 --- /dev/null +++ b/forge/src/main/resources/data/exposure/recipes/developing_color_positive_film.json @@ -0,0 +1,59 @@ +{ + "type": "exposure:film_developing", + "film": { + "item": "exposure:color_positive_film" + }, + "ingredients": [ + [ + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"minecraft:awkward\"}" + }, + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"awkward\"}" + } + ], + [ + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"minecraft:thick\"}" + }, + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"thick\"}" + } + ], + [ + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"minecraft:mundane\"}" + }, + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"mundane\"}" + } + ], + [ + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"minecraft:night_vision\"}" + }, + { + "type": "forge:partial_nbt", + "item": "minecraft:potion", + "nbt": "{Potion:\"night_vision\"}" + } + ] + ], + "result": { + "item": "exposure:developed_color_positive_film" + } +} \ No newline at end of file From 70b7dc54a879d349bb83e065da189870bb0fe826 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 15:50:29 +0300 Subject: [PATCH 14/18] Update CommonEvents.java Creative mode entries for color positive film --- .../io/github/mortuusars/exposure/forge/event/CommonEvents.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/forge/src/main/java/io/github/mortuusars/exposure/forge/event/CommonEvents.java b/forge/src/main/java/io/github/mortuusars/exposure/forge/event/CommonEvents.java index 294d64993..2308ce669 100644 --- a/forge/src/main/java/io/github/mortuusars/exposure/forge/event/CommonEvents.java +++ b/forge/src/main/java/io/github/mortuusars/exposure/forge/event/CommonEvents.java @@ -33,8 +33,10 @@ public static void onCreativeTabsBuild(BuildCreativeModeTabContentsEvent event) event.accept(Exposure.Items.CAMERA.get()); event.accept(Exposure.Items.BLACK_AND_WHITE_FILM.get()); event.accept(Exposure.Items.COLOR_FILM.get()); + event.accept(Exposure.Items.COLOR_POSITIVE_FILM.get()); event.accept(Exposure.Items.DEVELOPED_BLACK_AND_WHITE_FILM.get()); event.accept(Exposure.Items.DEVELOPED_COLOR_FILM.get()); + event.accept(Exposure.Items.DEVELOPED_COLOR_POSITIVE_FILM.get()); event.accept(Exposure.Items.PHOTOGRAPH.get()); event.accept(Exposure.Items.AGED_PHOTOGRAPH.get()); event.accept(Exposure.Items.INTERPLANAR_PROJECTOR.get()); From a58987eb1a207e82fa07a8117a8da034c74709f1 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:30:44 +0300 Subject: [PATCH 15/18] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8fa897168..9216e73ae 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,5 @@

Camera mod for Minecraft with focus on process and aesthetics

Content + This branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work
From e9762cab0af896cd69857b978483ceb19e88ac5c Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:31:07 +0300 Subject: [PATCH 16/18] Newline? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9216e73ae..40e453af7 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,5 @@

Camera mod for Minecraft with focus on process and aesthetics

Content - This branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work + \nThis branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work
From a43cb76f38240a37017b7572db1ef6384d8180bb Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 16:32:14 +0300 Subject: [PATCH 17/18] oh thats how you do newlines in html --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40e453af7..3335946ab 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@

Camera mod for Minecraft with focus on process and aesthetics

+

This branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work

Content - \nThis branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work +
From c3c91fc209dc4cde03a3ff788a0d47d8641e9ce7 Mon Sep 17 00:00:00 2001 From: dog god <58438390+dog-god-rus@users.noreply.github.com> Date: Thu, 14 Aug 2025 17:17:37 +0300 Subject: [PATCH 18/18] Update README.md I just realized how pull requests work. Guess we ain' doin this fancy description thing --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 3335946ab..8fa897168 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,5 @@

Camera mod for Minecraft with focus on process and aesthetics

-

This branch implements color positive film (slide film) for 1.20.1 Forge. Not the best code, but should work

Content -