diff --git a/buildSrc/src/main/java/de/griefed/generation/generator/CommonSubProjectGenerator.java b/buildSrc/src/main/java/de/griefed/generation/generator/CommonSubProjectGenerator.java index 8ea35e4..9516b14 100644 --- a/buildSrc/src/main/java/de/griefed/generation/generator/CommonSubProjectGenerator.java +++ b/buildSrc/src/main/java/de/griefed/generation/generator/CommonSubProjectGenerator.java @@ -26,6 +26,7 @@ public CommonSubProjectGenerator(Project project, String modName, BlockDefinitio import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; + @SuppressWarnings("unused") public class GeneratedModBlocks { public static final RegistrationProvider BLOCKS = RegistrationProvider.get(Registry.BLOCK_REGISTRY, Constants.MOD_ID); public static final RegistrationProvider ITEMS = RegistrationProvider.get(Registry.ITEM_REGISTRY, Constants.MOD_ID); @@ -38,8 +39,7 @@ private static Item.Properties itemBuilder() { } // Called in the mod initializer / constructor in order to make sure that items are registered - public static void loadClass() { - } + public static void loadClass() {} } """ .replace("GROUP", getGroup()); @@ -53,7 +53,8 @@ public static void loadClass() { import GROUP.registry.RegistryObject; import net.minecraft.core.Registry; import net.minecraft.world.item.Item; - + + @SuppressWarnings("unused") public class GeneratedModItems { public static final RegistrationProvider ITEMS = RegistrationProvider.get(Registry.ITEM_REGISTRY, Constants.MOD_ID); @@ -65,8 +66,7 @@ private static Item.Properties itemBuilder() { } // Called in the mod initializer / constructor in order to make sure that items are registered - public static void loadClass() { - } + public static void loadClass() {} } """ @@ -99,7 +99,6 @@ public class CommonClass { public static void init() { Constants.LOG.info("Hello from Common init on {}! we are currently in a {} environment!", Services.PLATFORM.getPlatformName(), Services.PLATFORM.getEnvironmentName()); - Constants.LOG.info("The ID for diamonds is {}", Registry.ITEM.getKey(Items.DIAMOND)); // It is common for all supported loaders to provide a similar feature that can not be used directly in the // common code. A popular way to get around this is using Java's built-in service loader feature to create diff --git a/common/src/main/java/de/griefed/addemall/CommonClass.java b/common/src/main/java/de/griefed/addemall/CommonClass.java index b11ae86..63fa725 100644 --- a/common/src/main/java/de/griefed/addemall/CommonClass.java +++ b/common/src/main/java/de/griefed/addemall/CommonClass.java @@ -5,14 +5,10 @@ import de.griefed.addemall.platform.Services; import net.minecraft.core.Registry; import net.minecraft.network.chat.Component; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; import net.minecraft.world.food.FoodProperties; -import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.TooltipFlag; -import net.minecraft.world.level.block.Block; import java.util.List; @@ -35,7 +31,7 @@ public static void init() { // we have an interface in the common code and use a loader specific implementation to delegate our call to // the platform specific approach. if (Services.PLATFORM.isModLoaded("addemall")) { - Constants.LOG.info("Hello to AddEmAll"); + Constants.LOG.info("Hello to addemall"); } /*###GENERATED CODE - DO NOT EDIT - MANUALLY EDITED CODE WILL BE LOST###*/ diff --git a/common/src/main/java/de/griefed/addemall/block/GeneratedModBlocks.java b/common/src/main/java/de/griefed/addemall/block/GeneratedModBlocks.java index baa97f3..eacbd23 100644 --- a/common/src/main/java/de/griefed/addemall/block/GeneratedModBlocks.java +++ b/common/src/main/java/de/griefed/addemall/block/GeneratedModBlocks.java @@ -11,6 +11,7 @@ import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; +@SuppressWarnings("unused") public class GeneratedModBlocks { public static final RegistrationProvider BLOCKS = RegistrationProvider.get(Registry.BLOCK_REGISTRY, Constants.MOD_ID); public static final RegistrationProvider ITEMS = RegistrationProvider.get(Registry.ITEM_REGISTRY, Constants.MOD_ID); @@ -371,12 +372,11 @@ public class GeneratedModBlocks { () -> new BlockItem(WALLPAPER_1.get(), itemBuilder())); /*###GENERATED CODE - DO NOT EDIT - MANUALLY EDITED CODE WILL BE LOST###*/ - + private static Item.Properties itemBuilder() { return new Item.Properties().tab(Services.PLATFORM.getCreativeTab()); } // Called in the mod initializer / constructor in order to make sure that items are registered - public static void loadClass() { - } + public static void loadClass() {} } diff --git a/common/src/main/java/de/griefed/addemall/item/GeneratedModItems.java b/common/src/main/java/de/griefed/addemall/item/GeneratedModItems.java index c69048f..cf5af1d 100644 --- a/common/src/main/java/de/griefed/addemall/item/GeneratedModItems.java +++ b/common/src/main/java/de/griefed/addemall/item/GeneratedModItems.java @@ -7,6 +7,7 @@ import net.minecraft.core.Registry; import net.minecraft.world.item.Item; +@SuppressWarnings("unused") public class GeneratedModItems { public static final RegistrationProvider ITEMS = RegistrationProvider.get(Registry.ITEM_REGISTRY, Constants.MOD_ID); @@ -19,7 +20,6 @@ private static Item.Properties itemBuilder() { } // Called in the mod initializer / constructor in order to make sure that items are registered - public static void loadClass() { - } + public static void loadClass() {} }