diff --git a/common/src/main/java/pl/panszelescik/colorize/common/Colorize.java b/common/src/main/java/pl/panszelescik/colorize/common/Colorize.java new file mode 100644 index 0000000..9c9df96 --- /dev/null +++ b/common/src/main/java/pl/panszelescik/colorize/common/Colorize.java @@ -0,0 +1,6 @@ +package pl.panszelescik.colorize.common; + +public class Colorize { + + public static final String MODID = "colorize"; +} diff --git a/common/src/main/java/pl/panszelescik/colorize/common/api/config/BasicConfig.java b/common/src/main/java/pl/panszelescik/colorize/common/api/config/BasicConfig.java index 22fa4d3..8049b4e 100644 --- a/common/src/main/java/pl/panszelescik/colorize/common/api/config/BasicConfig.java +++ b/common/src/main/java/pl/panszelescik/colorize/common/api/config/BasicConfig.java @@ -10,6 +10,7 @@ import org.apache.commons.io.FileUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Unmodifiable; +import pl.panszelescik.colorize.common.Colorize; import pl.panszelescik.colorize.common.api.ColorizeConfig; import java.io.File; @@ -18,12 +19,11 @@ public class BasicConfig implements ColorizeConfig { - public static final String MODID = "colorize"; private static final Gson GSON = new GsonBuilder().setPrettyPrinting().create(); private final Object2BooleanMap booleans; public BasicConfig(@NotNull File configDir) throws IOException { - var file = new File(configDir, MODID + ".json"); + var file = new File(configDir, Colorize.MODID + ".json"); if (file.exists()) { this.booleans = loadConfigFile(file); diff --git a/common/src/main/resources/assets/colorize/lang/en_us.json b/common/src/main/resources/assets/colorize/lang/en_us.json index 58f8aa9..8aa148b 100644 --- a/common/src/main/resources/assets/colorize/lang/en_us.json +++ b/common/src/main/resources/assets/colorize/lang/en_us.json @@ -1,5 +1,30 @@ { "gui.colorize.jei.name": "Colorize", "gui.colorize.jei.sneaking": "Requires sneaking", - "gui.colorize.jei.consume": "Consumes this item" -} \ No newline at end of file + "gui.colorize.jei.consume": "Consumes this item", + + "colorize.configuration.handlers": "Handlers settings", + "colorize.configuration.sneaking": "Sneaking settings", + "colorize.configuration.consume": "Consume item settings", + + "colorize.configuration.banner": "Banner", + "colorize.configuration.bed": "Bed", + "colorize.configuration.candle": "Candle", + "colorize.configuration.carpet": "Carpet", + "colorize.configuration.concrete": "Concrete", + "colorize.configuration.concretePowder": "Concrete Powder", + "colorize.configuration.glazedTerracotta": "Glazed Terracotta", + "colorize.configuration.shulkerBox": "Shulker Box", + "colorize.configuration.stainedGlass": "Stained Glass", + "colorize.configuration.stainedGlassPane": "Stained Glass Pane", + "colorize.configuration.terracotta": "Terracotta", + "colorize.configuration.wool": "Wool", + "colorize.configuration.mossyCobblestone": "Mossy Cobblestone", + "colorize.configuration.mossyCobblestoneSlab": "Mossy Cobblestone Slab", + "colorize.configuration.mossyCobblestoneStairs": "Mossy Cobblestone Stairs", + "colorize.configuration.mossyCobblestoneWall": "Mossy Cobblestone Wall", + "colorize.configuration.mossyStoneBricks": "Mossy Stone Bricks", + "colorize.configuration.mossyStoneBrickSlab": "Mossy Stone Brick Slab", + "colorize.configuration.mossyStoneBrickStairs": "Mossy Stone Brick Stairs", + "colorize.configuration.mossyStoneBrickWall": "Mossy Stone Brick Wall" +} diff --git a/common/src/main/resources/assets/colorize/lang/pl_pl.json b/common/src/main/resources/assets/colorize/lang/pl_pl.json index c711032..d46bef1 100644 --- a/common/src/main/resources/assets/colorize/lang/pl_pl.json +++ b/common/src/main/resources/assets/colorize/lang/pl_pl.json @@ -1,5 +1,30 @@ { "gui.colorize.jei.name": "Colorize", "gui.colorize.jei.sneaking": "Wymaga skradania się", - "gui.colorize.jei.consume": "Zużywa ten przedmiot" -} \ No newline at end of file + "gui.colorize.jei.consume": "Zużywa ten przedmiot", + + "colorize.configuration.handlers": "Ustawienia bloków", + "colorize.configuration.sneaking": "Ustawienia skradania się", + "colorize.configuration.consume": "Ustawienia zużywania przedmiotu", + + "colorize.configuration.banner": "Banner", + "colorize.configuration.bed": "Łóżko", + "colorize.configuration.candle": "Świeca", + "colorize.configuration.carpet": "Dywan", + "colorize.configuration.concrete": "Beton", + "colorize.configuration.concretePowder": "Cement", + "colorize.configuration.glazedTerracotta": "Glazurowana terakota", + "colorize.configuration.shulkerBox": "Shulkerowa skrzynia", + "colorize.configuration.stainedGlass": "Szkło", + "colorize.configuration.stainedGlassPane": "Szyba", + "colorize.configuration.terracotta": "Terakota", + "colorize.configuration.wool": "Wełna", + "colorize.configuration.mossyCobblestone": "Zamszony bruk", + "colorize.configuration.mossyCobblestoneSlab": "Zamszona brukowa płyta", + "colorize.configuration.mossyCobblestoneStairs": "Zamszone brukowe schody", + "colorize.configuration.mossyCobblestoneWall": "Zamszony brukowy murek", + "colorize.configuration.mossyStoneBricks": "Zamszone kamienne cegły", + "colorize.configuration.mossyStoneBrickSlab": "Zamszona kamienna ceglana płyta", + "colorize.configuration.mossyStoneBrickStairs": "Zamszone kamienne ceglane schody", + "colorize.configuration.mossyStoneBrickWall": "Zamszony kamienny ceglany murek" +} diff --git a/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForge.java b/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForge.java index 8726436..2a062e8 100644 --- a/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForge.java +++ b/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForge.java @@ -6,17 +6,17 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; import org.jetbrains.annotations.NotNull; +import pl.panszelescik.colorize.common.Colorize; -@Mod(ColorizeForge.MODID) +@Mod(Colorize.MODID) public class ColorizeForge { - public static final String MODID = "colorize"; private final ColorizeForgeHandler handler = new ColorizeForgeHandler(ColorizeForgeConfig.CONFIG); - public ColorizeForge() { + public ColorizeForge(ModLoadingContext modLoadingContext) { MinecraftForge.EVENT_BUS.addListener(this::onRightClickBlock); - ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, ColorizeForgeConfig.SPEC); + modLoadingContext.registerConfig(ModConfig.Type.COMMON, ColorizeForgeConfig.SPEC); } private void onRightClickBlock(@NotNull PlayerInteractEvent.RightClickBlock event) { diff --git a/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForge.java b/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForge.java index c7b884a..90c0a77 100644 --- a/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForge.java +++ b/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForge.java @@ -6,11 +6,11 @@ import net.neoforged.neoforge.common.NeoForge; import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent; import org.jetbrains.annotations.NotNull; +import pl.panszelescik.colorize.common.Colorize; -@Mod(ColorizeNeoForge.MODID) +@Mod(Colorize.MODID) public class ColorizeNeoForge { - public static final String MODID = "colorize"; private final ColorizeNeoForgeHandler handler = new ColorizeNeoForgeHandler(ColorizeNeoForgeConfig.CONFIG); public ColorizeNeoForge(ModContainer modContainer) { diff --git a/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForgeClient.java b/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForgeClient.java new file mode 100644 index 0000000..364aa63 --- /dev/null +++ b/neoforged/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeNeoForgeClient.java @@ -0,0 +1,16 @@ +package pl.panszelescik.colorize.neoforge; + +import net.neoforged.api.distmarker.Dist; +import net.neoforged.fml.ModContainer; +import net.neoforged.fml.common.Mod; +import net.neoforged.neoforge.client.gui.ConfigurationScreen; +import net.neoforged.neoforge.client.gui.IConfigScreenFactory; +import pl.panszelescik.colorize.common.Colorize; + +@Mod(value = Colorize.MODID, dist = Dist.CLIENT) +public class ColorizeNeoForgeClient { + + public ColorizeNeoForgeClient(ModContainer modContainer) { + modContainer.registerExtensionPoint(IConfigScreenFactory.class, (mc, parent) -> new ConfigurationScreen(modContainer, parent)); + } +}