diff --git a/common/src/main/java/com/unlikepaladin/pfm/blocks/BasicChairBlock.java b/common/src/main/java/com/unlikepaladin/pfm/blocks/BasicChairBlock.java index 374a64379..734eca7ae 100644 --- a/common/src/main/java/com/unlikepaladin/pfm/blocks/BasicChairBlock.java +++ b/common/src/main/java/com/unlikepaladin/pfm/blocks/BasicChairBlock.java @@ -1,7 +1,7 @@ package com.unlikepaladin.pfm.blocks; import com.unlikepaladin.pfm.data.FurnitureBlock; -import com.unlikepaladin.pfm.data.Tags; +import com.unlikepaladin.pfm.data.PFMTags; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Material; @@ -128,7 +128,7 @@ public BlockState getStateForNeighborUpdate(BlockState state, Direction directio } public boolean canTuck(BlockState state) { - return state.isIn(Tags.getTuckableBlocks()); + return state.isIn(PFMTags.TUCKABLE_BLOCKS); } @Override diff --git a/common/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/PFMFarmersDelight.java b/common/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/PFMFarmersDelight.java index 5c6a4f856..cf9da68db 100644 --- a/common/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/PFMFarmersDelight.java +++ b/common/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/PFMFarmersDelight.java @@ -1,11 +1,17 @@ package com.unlikepaladin.pfm.compat.farmersdelight; import com.unlikepaladin.pfm.compat.PFMModCompatibility; +import com.unlikepaladin.pfm.data.PFMTags; import dev.architectury.injectables.annotations.ExpectPlatform; +import net.minecraft.block.Block; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; public abstract class PFMFarmersDelight implements PFMModCompatibility { @ExpectPlatform public static PFMFarmersDelight getInstance() { throw new AssertionError(); }; + + protected static final TagKey HEAT_SOURCES = PFMTags.createTag(new Identifier("farmersdelight", "heat_sources")); } diff --git a/common/src/main/java/com/unlikepaladin/pfm/data/PFMTags.java b/common/src/main/java/com/unlikepaladin/pfm/data/PFMTags.java new file mode 100644 index 000000000..ac60ec115 --- /dev/null +++ b/common/src/main/java/com/unlikepaladin/pfm/data/PFMTags.java @@ -0,0 +1,15 @@ +package com.unlikepaladin.pfm.data; + +import dev.architectury.injectables.annotations.ExpectPlatform; +import net.minecraft.block.Block; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; + +public class PFMTags { + public static TagKey TUCKABLE_BLOCKS = createTag(new Identifier("pfm", "tuckable_blocks")); + + @ExpectPlatform + public static TagKey createTag(Identifier identifier) { + throw new AssertionError(); + } +} diff --git a/common/src/main/java/com/unlikepaladin/pfm/data/Tags.java b/common/src/main/java/com/unlikepaladin/pfm/data/Tags.java deleted file mode 100644 index cfca9a4e1..000000000 --- a/common/src/main/java/com/unlikepaladin/pfm/data/Tags.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.unlikepaladin.pfm.data; - -import dev.architectury.injectables.annotations.ExpectPlatform; -import net.minecraft.block.Block; -import net.minecraft.registry.tag.TagKey; - -public class Tags { - - @ExpectPlatform - public static TagKey getTuckableBlocks() { - throw new AssertionError("Failed to get Tag"); - } -} diff --git a/common/src/main/java/com/unlikepaladin/pfm/runtime/data/PFMTagProvider.java b/common/src/main/java/com/unlikepaladin/pfm/runtime/data/PFMTagProvider.java index b592d75e9..4fea0d0e1 100644 --- a/common/src/main/java/com/unlikepaladin/pfm/runtime/data/PFMTagProvider.java +++ b/common/src/main/java/com/unlikepaladin/pfm/runtime/data/PFMTagProvider.java @@ -9,7 +9,7 @@ import com.unlikepaladin.pfm.blocks.*; import com.unlikepaladin.pfm.compat.PFMModCompatibility; import com.unlikepaladin.pfm.data.FurnitureBlock; -import com.unlikepaladin.pfm.data.Tags; +import com.unlikepaladin.pfm.data.PFMTags; import com.unlikepaladin.pfm.registry.PaladinFurnitureModBlocksItems; import com.unlikepaladin.pfm.runtime.PFMDataGen; import com.unlikepaladin.pfm.runtime.PFMRuntimeResources; @@ -212,7 +212,7 @@ protected void generateTags() { getOrCreateTagBuilder(BlockTags.CLIMBABLE) .add(simpleBunkLadders); - getOrCreateTagBuilder(Tags.getTuckableBlocks()) + getOrCreateTagBuilder(PFMTags.TUCKABLE_BLOCKS) .add(woodBasicTables) .add(stoneBasicTables) .add(woodClassicTables) diff --git a/common/src/main/resources/pfm_background.png b/common/src/main/resources/pfm_background.png new file mode 100644 index 000000000..a7cecd27c Binary files /dev/null and b/common/src/main/resources/pfm_background.png differ diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java b/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java index 122650c44..95a28bfcf 100644 --- a/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java +++ b/fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java @@ -28,7 +28,7 @@ public void generateTags() { List stoves = new ArrayList<>(StoveBlock.streamStoves().map(FurnitureBlock::getBlock).toList()); stoves.addAll(IronStoveBlock.streamIronStoves().map(FurnitureBlock::getBlock).toList()); stoves.add(PaladinFurnitureModBlocksItems.KITCHEN_STOVETOP); - PFMTagProvider.getOrCreateTagBuilder(TagsRegistry.HEAT_SOURCES) + PFMTagProvider.getOrCreateTagBuilder(HEAT_SOURCES) .add(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new)); } diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PFMTagsImpl.java b/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PFMTagsImpl.java new file mode 100644 index 000000000..9c877cc24 --- /dev/null +++ b/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PFMTagsImpl.java @@ -0,0 +1,12 @@ +package com.unlikepaladin.pfm.data.fabric; + +import net.minecraft.block.Block; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; + +public class PFMTagsImpl { + public static TagKey createTag(Identifier identifier) { + return TagKey.of(RegistryKeys.BLOCK, identifier); + } +} diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PaladinFurnitureModDataEntrypoint.java b/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PaladinFurnitureModDataEntrypoint.java index ce83e73ab..bf83feb7e 100644 --- a/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PaladinFurnitureModDataEntrypoint.java +++ b/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/PaladinFurnitureModDataEntrypoint.java @@ -3,7 +3,6 @@ import com.unlikepaladin.pfm.blocks.DinnerChairBlock; import com.unlikepaladin.pfm.blocks.*; import com.unlikepaladin.pfm.data.FurnitureBlock; -import com.unlikepaladin.pfm.data.Tags; import com.unlikepaladin.pfm.registry.PaladinFurnitureModBlocksItems; import com.unlikepaladin.pfm.runtime.data.FurnitureRecipeJsonFactory; import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; diff --git a/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/TagsImpl.java b/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/TagsImpl.java deleted file mode 100644 index bd962dd1c..000000000 --- a/fabric/src/main/java/com/unlikepaladin/pfm/data/fabric/TagsImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.unlikepaladin.pfm.data.fabric; - -import net.minecraft.block.Block; -import net.minecraft.registry.Registries; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.util.Identifier; -import net.minecraft.registry.Registry; - -public class TagsImpl { - - public static TagKey TUCKABLE_BLOCKS = TagKey.of(Registries.BLOCK.getKey(), new Identifier("pfm", "tuckable_blocks")); - - public static TagKey getTuckableBlocks() { - return TUCKABLE_BLOCKS; - } -} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 18226566e..526de6a17 100755 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -9,7 +9,8 @@ ], "contact": { "homepage": "https://www.curseforge.com/minecraft/mc-mods/paladins-furniture", - "sources": "https://github.com/UnlikePaladin/paladins-furniture" + "sources": "https://github.com/UnlikePaladin/paladins-furniture", + "issues": "https://github.com/UnlikePaladin/paladins-furniture/issues" }, "contributors": [ "lzyzl6", @@ -52,5 +53,12 @@ }, "suggests": { "patchouli": "*" + }, + "modmenu": { + "links": { + "modmenu.discord": "https://discord.gg/zbMDUPB", + "modmenu.kofi": "https://ko-fi.com/unlikepaladin", + "modmenu.modrinth": "https://modrinth.com/mod/paladins-furniture/" + } } } \ No newline at end of file diff --git a/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java b/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java index 1edfed622..ddbe15669 100644 --- a/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java +++ b/forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java @@ -28,7 +28,7 @@ public void generateTags() { List stoves = new ArrayList<>(StoveBlock.streamStoves().map(FurnitureBlock::getBlock).toList()); stoves.addAll(IronStoveBlock.streamIronStoves().map(FurnitureBlock::getBlock).toList()); stoves.add(PaladinFurnitureModBlocksItems.KITCHEN_STOVETOP); - PFMTagProvider.getOrCreateTagBuilder(ModTags.HEAT_SOURCES) + PFMTagProvider.getOrCreateTagBuilder(HEAT_SOURCES) .add(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new)); } diff --git a/forge/src/main/java/com/unlikepaladin/pfm/data/forge/PFMTagsImpl.java b/forge/src/main/java/com/unlikepaladin/pfm/data/forge/PFMTagsImpl.java new file mode 100644 index 000000000..521a67cd9 --- /dev/null +++ b/forge/src/main/java/com/unlikepaladin/pfm/data/forge/PFMTagsImpl.java @@ -0,0 +1,12 @@ +package com.unlikepaladin.pfm.data.forge; + +import net.minecraft.block.Block; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.util.Identifier; + +public class PFMTagsImpl { + public static TagKey createTag(Identifier identifier) { + return BlockTags.create(new Identifier("pfm", "tuckable_blocks")); + } +} diff --git a/forge/src/main/java/com/unlikepaladin/pfm/data/forge/TagsImpl.java b/forge/src/main/java/com/unlikepaladin/pfm/data/forge/TagsImpl.java deleted file mode 100644 index 77a58d66f..000000000 --- a/forge/src/main/java/com/unlikepaladin/pfm/data/forge/TagsImpl.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.unlikepaladin.pfm.data.forge; - -import net.minecraft.block.Block; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.util.Identifier; - -public class TagsImpl { - public static TagKey TUCKABLE_BLOCKS; - - public static TagKey getTuckableBlocks() { - return TUCKABLE_BLOCKS; - } -} diff --git a/forge/src/main/java/com/unlikepaladin/pfm/forge/PaladinFurnitureModForge.java b/forge/src/main/java/com/unlikepaladin/pfm/forge/PaladinFurnitureModForge.java index 3126dca95..e035232b7 100644 --- a/forge/src/main/java/com/unlikepaladin/pfm/forge/PaladinFurnitureModForge.java +++ b/forge/src/main/java/com/unlikepaladin/pfm/forge/PaladinFurnitureModForge.java @@ -2,7 +2,7 @@ import com.unlikepaladin.pfm.PaladinFurnitureMod; import com.unlikepaladin.pfm.config.PaladinFurnitureModConfig; -import com.unlikepaladin.pfm.data.forge.TagsImpl; +import com.unlikepaladin.pfm.data.forge.PFMTagsImpl; import com.unlikepaladin.pfm.registry.BlockItemRegistry; import com.unlikepaladin.pfm.registry.dynamic.forge.LateBlockRegistryForge; import com.unlikepaladin.pfm.registry.forge.*; @@ -29,7 +29,6 @@ public PaladinFurnitureModForge() { GENERAL_LOGGER.error("Failed to initialize Paladin's Furniture configuration, default values will be used instead"); GENERAL_LOGGER.error("", e); } - TagsImpl.TUCKABLE_BLOCKS = BlockTags.create(new Identifier("pfm", "tuckable_blocks")); MinecraftForge.EVENT_BUS.register(EntityRegistryForge.class); MinecraftForge.EVENT_BUS.register(BlockItemRegistryForge.class); MinecraftForge.EVENT_BUS.register(StatisticsRegistryForge.class); diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index d186adc4c..10447bdff 100755 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -11,6 +11,7 @@ authors = "UnlikePaladin" description = ''' A Brand-New Furniture mod for Modern Minecraft where things are functional! ''' +itemIcon = "pfm:oak_chair" logoFile = "icon.png" credits = "Translators: lzyzl6, MIHONO, WrenXing" @@ -26,4 +27,8 @@ modId = "minecraft" mandatory = true versionRange = "[1.19.3,1.19.4)" ordering = "NONE" -side = "BOTH" \ No newline at end of file +side = "BOTH" + +[modproperties.pfm] +catalogueBackground="pfm_background.png" +catalogueImageIcon="" \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index af5c1d1d4..5afac8582 100755 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.19.3 enabled_platforms=fabric,forge archives_base_name=paladin-furniture-mod -mod_version=1.2.0 +mod_version=1.2.0-rc2 maven_group=com.unlikepaladin architectury_version=5.12.42