Skip to content

Commit 510fe4b

Browse files
committed
Port to 21.4
1 parent 852fd00 commit 510fe4b

File tree

13 files changed

+112
-110
lines changed

13 files changed

+112
-110
lines changed

.github/workflows/announce-latest-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
with:
9595
webhook-url: ${{ secrets.DISCORD_NIGHTLY_WEBHOOK }}
9696
avatar-url: "https://compactmods.dev/personal-shrinking-device.png"
97-
content: "**New Version Available: Simple Honey v${{ needs.get-package-info.outputs.version }}"
97+
content: "**New Version Available: Simple Honey v${{ needs.get-package-info.outputs.version }}**"
9898
filename: ${{ fromJson(steps.info.outputs.latestJson)[0].name }}
9999
embed-title: "**Mod File Information**"
100100
embed-description: "Filename: ${{ fromJson(steps.info.outputs.latestJson)[0].name}}"

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[versions]
2-
parchmentMC = "1.21"
3-
parchment = "2024.07.28"
2+
parchmentMC = "1.21.4"
3+
parchment = "2025.02.16"

gradle/mojang.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
2-
minecraft = "1.21.1"
2+
minecraft = "1.21.4"
33

44
[versions.minecraftRange]
5-
require = "[1.21.1, 1.21.2)"
6-
prefer = "1.21.1"
5+
require = "[1.21.4, 1.21.5)"
6+
prefer = "1.21.4"
77

gradle/neoforged.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
2-
neoforge = "21.1.122"
2+
neoforge = "21.4.95-beta"
33
mdg = "2.0.78"
4-
neoforgeRange = { require = "[21.1.122,)", prefer = "21.1.122" }
4+
neoforgeRange = { require = "[21.4.95-beta,)", prefer = "21.1.95-beta" }
55

66
[libraries.testframework]
77
module = "net.neoforged:testframework"

neoforge/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ neoForge {
111111
}
112112

113113
this.create("data") {
114-
this.data()
114+
this.clientData()
115115

116116
this.gameDirectory.set(file("runs/data"))
117117

neoforge/src/main/java/dev/compactmods/simplehoney/SimpleHoney.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import cpw.mods.modlauncher.Environment;
44
import net.minecraft.core.BlockPos;
55
import net.minecraft.core.Direction;
6+
import net.minecraft.core.registries.BuiltInRegistries;
7+
import net.minecraft.resources.ResourceKey;
8+
import net.minecraft.resources.ResourceLocation;
69
import net.minecraft.util.Tuple;
710
import net.minecraft.world.entity.player.Player;
811
import net.minecraft.world.food.FoodProperties;
@@ -43,10 +46,14 @@ public class SimpleHoney {
4346
.saturationModifier(0.1f)
4447
.build();
4548

49+
public static ResourceLocation HONEY_RL = ResourceLocation.fromNamespaceAndPath(MOD_ID, "honey_drop");
50+
4651
public static final Item.Properties HONEY_DROP_ITEM_PROPS = new Item.Properties()
47-
.food(HONEY_DROP_FOOD_PROPS);
52+
.food(HONEY_DROP_FOOD_PROPS)
53+
.setId(ResourceKey.create(BuiltInRegistries.ITEM.key(), HONEY_RL));
4854

49-
public static final DeferredItem<Item> HONEY_DROP = ITEMS.register("honey_drop", () -> new Item(HONEY_DROP_ITEM_PROPS));
55+
public static final DeferredItem<Item> HONEY_DROP = ITEMS
56+
.register("honey_drop", () -> new Item(HONEY_DROP_ITEM_PROPS));
5057

5158
public SimpleHoney(IEventBus modEventBus) {
5259
ITEMS.register(modEventBus);

neoforge/src/main/java/dev/compactmods/simplehoney/datagen/DataGeneration.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

neoforge/src/main/java/dev/compactmods/simplehoney/datagen/ItemModelGenerator.java

Lines changed: 0 additions & 33 deletions
This file was deleted.

neoforge/src/main/java/dev/compactmods/simplehoney/datagen/RecipeGenerator.java

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package dev.compactmods.simplehoney.datagen;
2+
3+
import dev.compactmods.simplehoney.SimpleHoney;
4+
import dev.compactmods.simplehoney.datagen.client.ItemAndBlockModels;
5+
import dev.compactmods.simplehoney.datagen.client.lang.EnglishLangGenerator;
6+
import dev.compactmods.simplehoney.datagen.server.SHRecipeProvider;
7+
import net.neoforged.bus.api.SubscribeEvent;
8+
import net.neoforged.fml.common.EventBusSubscriber;
9+
import net.neoforged.neoforge.data.event.GatherDataEvent;
10+
11+
@EventBusSubscriber(modid = SimpleHoney.MOD_ID, bus = EventBusSubscriber.Bus.MOD)
12+
public class SHDataGeneration {
13+
14+
@SubscribeEvent
15+
public static void gatherData(GatherDataEvent.Client event) {
16+
// Client
17+
event.createProvider(ItemAndBlockModels::new);
18+
event.createProvider(EnglishLangGenerator::new);
19+
20+
// Server
21+
event.createProvider(SHRecipeProvider.Runner::new);
22+
}
23+
}

0 commit comments

Comments
 (0)