Skip to content

Commit

Permalink
updated to Forge 52.0.21
Browse files Browse the repository at this point in the history
- use common tags for carrots, wheat and ender pearls in advancements and recipes (all loaders)
- fixed recipes and advancements by using the new common tags in Forge
cech12 committed Oct 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1d66522 commit 6e27fd2
Showing 64 changed files with 52 additions and 849 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.21.1-6.5.1.0] - 2024-10-15
### Changed
- updated to Forge 52.0.21
- use common tags for carrots, wheat and ender pearls in advancements and recipes (all loaders)

### Fixed
- fixed recipes and advancements by using the new common tags in Forge

## [1.21.1-6.5.0.0] - 2024-09-28
### Changed
- updated to Minecraft 1.21.1 (Fabric 0.105.0+1.21.1, NeoForge 21.1.62, Forge 52.0.16)
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.cech12.usefulhats;

import de.cech12.usefulhats.platform.Services;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
@@ -9,7 +8,7 @@
public class UsefulHatsTags {

public static class Items {
public static final TagKey<Item> MUSHROOM_CAPS = tag(Services.PLATFORM.getModSharingNamespace(), "mushroom_caps");
public static final TagKey<Item> MUSHROOM_CAPS = tag("c", "mushroom_caps");
}

private static TagKey<Item> tag(final String namespace, final String name) {
Original file line number Diff line number Diff line change
@@ -12,13 +12,6 @@ public interface IPlatformHelper {
*/
String getPlatformName();

/**
* Gets the namespace that is shared by other mods
*
* @return namespace that is shared by other mods
*/
String getModSharingNamespace();

/**
* Checks if a mod with the given id is loaded.
*
11 changes: 11 additions & 0 deletions common/src/main/resources/data/c/tags/item/mushroom_caps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"minecraft:brown_mushroom_block",
"minecraft:red_mushroom_block",
{
"id": "#forge:mushroom_caps",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -21,9 +21,7 @@
"conditions": {
"items": [
{
"items": [
"minecraft:carrot"
]
"items": "#c:crops/carrot"
}
]
}
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"conditions": {
"items": [
{
"items": "#forge:ender_pearls"
"items": "#c:ender_pearls"
}
]
}
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"conditions": {
"items": [
{
"items": "minecraft:wheat"
"items": "#c:crops/wheat"
}
]
}
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"item": "minecraft:rabbit_hide"
},
"C": {
"item": "minecraft:carrot"
"tag": "c:crops/carrot"
}
},
"result": {
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
],
"key": {
"#": {
"tag": "forge:ender_pearls"
"tag": "c:ender_pearls"
}
},
"result": {
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
],
"key": {
"#": {
"item": "minecraft:wheat"
"tag": "c:crops/wheat"
}
},
"result": {
Original file line number Diff line number Diff line change
@@ -13,11 +13,6 @@ public String getPlatformName() {
return "Fabric";
}

@Override
public String getModSharingNamespace() {
return "c";
}

@Override
public boolean isModLoaded(String modId) {
return FabricLoader.getInstance().isModLoaded(modId);
7 changes: 0 additions & 7 deletions fabric/src/main/resources/data/c/tags/item/mushroom_caps.json

This file was deleted.

6 changes: 0 additions & 6 deletions fabric/src/main/resources/data/c/tags/item/nuggets/gold.json

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions fabric/src/main/resources/data/usefulhats/recipe/ender_helmet.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@
@Mod(Constants.MOD_ID)
public class UsefulHatsForgeMod {

public UsefulHatsForgeMod() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
public UsefulHatsForgeMod(FMLJavaModLoadingContext context) {
IEventBus modEventBus = context.getModEventBus();
ModItems.ITEMS.register(modEventBus);
ModItems.DATA_COMPONENTS.register(modEventBus);
ModItems.addEventListeners();
Original file line number Diff line number Diff line change
@@ -14,11 +14,6 @@ public String getPlatformName() {
return "Forge";
}

@Override
public String getModSharingNamespace() {
return "forge";
}

@Override
public boolean isModLoaded(String modId) {
return ModList.get().isLoaded(modId);
10 changes: 10 additions & 0 deletions forge/src/main/resources/data/c/tags/item/feathers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"replace": false,
"values": [
"minecraft:feather",
{
"id": "#forge:feathers",
"required": false
}
]
}
11 changes: 11 additions & 0 deletions forge/src/main/resources/data/c/tags/item/mushrooms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
{
"id": "#forge:mushrooms",
"required": false
}
]
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6e27fd2

Please sign in to comment.