Skip to content

Commit

Permalink
Merge branch 'architectury-1.19.3' into architectury-1.19.4
Browse files Browse the repository at this point in the history
# Conflicts:
#	common/src/main/java/com/unlikepaladin/pfm/runtime/data/PFMTagProvider.java
#	fabric/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/fabric/PFMFarmersDelightImpl.java
#	forge/src/main/java/com/unlikepaladin/pfm/compat/farmersdelight/forge/PFMFarmersDelightImpl.java
  • Loading branch information
UnlikePaladin committed Aug 15, 2023
2 parents 3213279 + 1825da4 commit 17375fb
Show file tree
Hide file tree
Showing 18 changed files with 70 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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<Block> HEAT_SOURCES = PFMTags.createTag(new Identifier("farmersdelight", "heat_sources"));
}
15 changes: 15 additions & 0 deletions common/src/main/java/com/unlikepaladin/pfm/data/PFMTags.java
Original file line number Diff line number Diff line change
@@ -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<Block> TUCKABLE_BLOCKS = createTag(new Identifier("pfm", "tuckable_blocks"));

@ExpectPlatform
public static TagKey<Block> createTag(Identifier identifier) {
throw new AssertionError();
}
}
13 changes: 0 additions & 13 deletions common/src/main/java/com/unlikepaladin/pfm/data/Tags.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.unlikepaladin.pfm.compat.PFMModCompatibility;
import com.unlikepaladin.pfm.data.FurnitureBlock;
import com.unlikepaladin.pfm.data.PFMTag;
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;
Expand Down Expand Up @@ -213,7 +213,7 @@ protected void generateTags() {
getOrCreateTagBuilder(BlockTags.CLIMBABLE)
.add(simpleBunkLadders);

getOrCreateTagBuilder(Tags.getTuckableBlocks())
getOrCreateTagBuilder(PFMTags.TUCKABLE_BLOCKS)
.add(woodBasicTables)
.add(stoneBasicTables)
.add(woodClassicTables)
Expand Down
2 changes: 2 additions & 0 deletions common/src/main/resources/assets/pfm/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,8 @@
"block.pfm.warped_herringbone_planks": "Warped Herringbone Planks",
"block.pfm.crimson_herringbone_planks": "Crimson Herringbone Planks",
"block.pfm.mangrove_herringbone_planks": "Mangrove Herringbone Planks",
"block.pfm.cherry_herringbone_planks": "Cherry Herringbone Planks",
"block.pfm.bamboo_herringbone_planks": "Bamboo Herringbone Planks",

"block.pfm.raw_concrete": "Raw Concrete",
"block.pfm.raw_concrete_powder": "Raw Concrete Powder",
Expand Down
Binary file added common/src/main/resources/pfm_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void generateTags() {
List<Block> 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)
.addKey(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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<Block> createTag(Identifier identifier) {
return TagKey.of(RegistryKeys.BLOCK, identifier);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

This file was deleted.

10 changes: 9 additions & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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/"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void generateTags() {
List<Block> 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)
.addKey(stoves.stream().map(block -> Registries.BLOCK.getKey(block).or(null).get()).toArray(RegistryKey[]::new));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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<Block> createTag(Identifier identifier) {
return BlockTags.create(new Identifier("pfm", "tuckable_blocks"));
}
}
13 changes: 0 additions & 13 deletions forge/src/main/java/com/unlikepaladin/pfm/data/forge/TagsImpl.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand All @@ -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);
Expand Down
7 changes: 6 additions & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -26,4 +27,8 @@ modId = "minecraft"
mandatory = true
versionRange = "[1.19.4,1.20)"
ordering = "NONE"
side = "BOTH"
side = "BOTH"

[modproperties.pfm]
catalogueBackground="pfm_background.png"
catalogueImageIcon=""
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.19.4
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
Expand Down

0 comments on commit 17375fb

Please sign in to comment.