File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
src/main/java/com/example/examplemod Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11plugins {
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
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ minecraft_version=1.21.11
1818# as they do not follow standard versioning conventions.
1919minecraft_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
Original file line number Diff line number Diff line change 55import java .util .stream .Collectors ;
66
77import net .minecraft .core .registries .BuiltInRegistries ;
8- import net .minecraft .resources .ResourceLocation ;
8+ import net .minecraft .resources .Identifier ;
99import net .minecraft .world .item .Item ;
1010import net .neoforged .bus .api .SubscribeEvent ;
1111import 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments