Skip to content

Commit c0a7bb2

Browse files
Update MDK with new output from mod generator (#1)
* Update MDK with new output from mod generator * Update MDK with new output from mod generator * Update MDK with new output from mod generator --------- Co-authored-by: NeoForge MDK Automation <173375039+neoforge-mdk-automation[bot]@users.noreply.github.com>
1 parent 63cd6da commit c0a7bb2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java-library'
33
id 'maven-publish'
4-
id 'net.neoforged.moddev' version '2.0.122'
4+
id 'net.neoforged.moddev' version '2.0.123'
55
id 'idea'
66
}
77

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ minecraft_version=1.21.11
1818
# as they do not follow standard versioning conventions.
1919
minecraft_version_range=[1.21.11]
2020
# The Neo version must agree with the Minecraft version to get a valid artifact
21-
neo_version=
21+
neo_version=21.11.3-beta
2222

2323
## Mod Properties
2424

src/main/java/com/example/examplemod/Config.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import java.util.stream.Collectors;
66

77
import net.minecraft.core.registries.BuiltInRegistries;
8-
import net.minecraft.resources.ResourceLocation;
8+
import net.minecraft.resources.Identifier;
99
import net.minecraft.world.item.Item;
1010
import net.neoforged.bus.api.SubscribeEvent;
1111
import net.neoforged.fml.common.EventBusSubscriber;
@@ -37,6 +37,6 @@ public class Config {
3737
static final ModConfigSpec SPEC = BUILDER.build();
3838

3939
private static boolean validateItemName(final Object obj) {
40-
return obj instanceof String itemName && BuiltInRegistries.ITEM.containsKey(ResourceLocation.parse(itemName));
40+
return obj instanceof String itemName && BuiltInRegistries.ITEM.containsKey(Identifier.parse(itemName));
4141
}
4242
}

src/main/java/com/example/examplemod/ExampleMod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public class ExampleMod {
4646
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
4747

4848
// Creates a new Block with the id "examplemod:example_block", combining the namespace and path
49-
public static final DeferredBlock<Block> EXAMPLE_BLOCK = BLOCKS.registerSimpleBlock("example_block", BlockBehaviour.Properties.of().mapColor(MapColor.STONE));
49+
public static final DeferredBlock<Block> EXAMPLE_BLOCK = BLOCKS.registerSimpleBlock("example_block", p -> p.mapColor(MapColor.STONE));
5050
// Creates a new BlockItem with the id "examplemod:example_block", combining the namespace and path
5151
public static final DeferredItem<BlockItem> EXAMPLE_BLOCK_ITEM = ITEMS.registerSimpleBlockItem("example_block", EXAMPLE_BLOCK);
5252

5353
// Creates a new food item with the id "examplemod:example_id", nutrition 1 and saturation 2
54-
public static final DeferredItem<Item> EXAMPLE_ITEM = ITEMS.registerSimpleItem("example_item", new Item.Properties().food(new FoodProperties.Builder()
54+
public static final DeferredItem<Item> EXAMPLE_ITEM = ITEMS.registerSimpleItem("example_item", p -> p.food(new FoodProperties.Builder()
5555
.alwaysEdible().nutrition(1).saturationModifier(2f).build()));
5656

5757
// Creates a creative tab with the id "examplemod:example_tab" for the example item, that is placed after the combat tab

0 commit comments

Comments
 (0)