From 238dfbe39169d828729ff3428eb727a0de114554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pint=C3=A9r=20G=C3=A1bor?= Date: Tue, 19 Dec 2023 21:20:54 +0100 Subject: [PATCH] mc1.20.4 --- .editorconfig | 32 +++++++ .gitignore | 4 + build.gradle | 38 ++++---- gradle.properties | 18 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- .../net/kaupenjoe/mccourse/MCCourseMod.java | 8 +- .../kaupenjoe/mccourse/MCCourseModClient.java | 6 +- .../kaupenjoe/mccourse/block/ModBlocks.java | 71 +++++++++------ .../kaupenjoe/mccourse/item/ModItemGroup.java | 36 ++++---- .../net/kaupenjoe/mccourse/item/ModItems.java | 46 +++++----- .../item/custom/MetalDetectorItem.java | 89 ++++++++++--------- .../mccourse/mixin/ExampleMixin.java | 15 ---- src/main/resources/mccourse.mixins.json | 1 - 13 files changed, 209 insertions(+), 157 deletions(-) create mode 100644 .editorconfig delete mode 100644 src/main/java/net/kaupenjoe/mccourse/mixin/ExampleMixin.java diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..44d605c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +tab_width = 4 + +[*.gradle] +indent_style = tab + +[*.java] +indent_style = tab +ij_continuation_indent_size = 4 +ij_java_imports_layout = $*,|,java.**,|,javax.**,|,*,|,net.minecraft.**,|,net.fabricmc.** +ij_java_class_count_to_use_import_on_demand = 999 + +[*.json] +indent_style = tab +indent_size = 4 + +[*.properties] +indent_style = space +indent_size = 2 + +[.editorconfig] +indent_style = space +indent_size = 4 + +[*.{yaml,yml}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index c476faf..436b3d4 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,7 @@ hs_err_*.log replay_*.log *.hprof *.jfr + +# datagen generated + +.cache/ diff --git a/build.gradle b/build.gradle index f0b67c1..b2d64a1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,9 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' + id 'fabric-loom' version '1.4-SNAPSHOT' id 'maven-publish' } -version = project.mod_version +version = project.mod_version + "+mc" + project.minecraft_version group = project.maven_group base { @@ -11,11 +11,9 @@ base { } repositories { - // Add repositories to retrieve artifacts from in here. - // You should only use this when depending on other mods because - // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. - // See https://docs.gradle.org/current/userguide/declaring_repositories.html - // for more information about repositories. + maven { url = "https://maven.fabricmc.net/" } // Fabric + maven { url = "https://maven.shedaniel.me/" } // Cloth Config + maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu } loom { @@ -26,7 +24,7 @@ loom { name "Data Generation" vmArg "-Dfabric-api.datagen" vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}" - vmArg "-Dfabric-api.datagen.modid=mccourse" + vmArg "-Dfabric-api.datagen.modid=${project.archives_base_name}" runDir "build/datagen" } @@ -43,6 +41,7 @@ sourceSets { } } } + dependencies { // To change the versions see the gradle.properties file minecraft "com.mojang:minecraft:${project.minecraft_version}" @@ -51,11 +50,21 @@ dependencies { // Fabric API. This is technically optional, but you probably want it anyway. modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - - // Uncomment the following line to enable the deprecated Fabric API modules. - // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. - // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" + // ModMenu and ClothConfig + modApi "com.terraformersmc:modmenu:${project.modmenu_version}" + modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { + exclude(group: "net.fabricmc.fabric-api") + } + + // REI + modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}" + modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}" + + // Tech Reborn Energy + modApi("teamreborn:energy:${project.teamreborn_energy_version}") { + exclude(group: "net.fabricmc.fabric-api") + } } processResources { @@ -71,11 +80,6 @@ tasks.withType(JavaCompile).configureEach { } java { - // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task - // if it is present. - // If you remove this line, sources will not be generated. - withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } diff --git a/gradle.properties b/gradle.properties index ca8d9c3..ee85675 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,22 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.1 -yarn_mappings=1.20.1+build.1 -loader_version=0.14.21 +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.3 +loader_version=0.15.3 # Mod Properties -mod_version=0.1-1.20.1 +mod_version=0.1.1 maven_group=net.kaupenjoe.mccourse archives_base_name=mccourse # Dependencies -fabric_version=0.83.1+1.20.1 \ No newline at end of file +fabric_version=0.91.3+1.20.4 + +# Shedaniel API's: https://linkie.shedaniel.me/dependencies +modmenu_version = 9.0.0 +cloth_config_version = 13.0.114 +rei_version = 14.0.687 + +# Team Reborn API +teamreborn_energy_version = 3.0.0 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..3499ded 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/net/kaupenjoe/mccourse/MCCourseMod.java b/src/main/java/net/kaupenjoe/mccourse/MCCourseMod.java index 8e9c4b9..01a3f54 100644 --- a/src/main/java/net/kaupenjoe/mccourse/MCCourseMod.java +++ b/src/main/java/net/kaupenjoe/mccourse/MCCourseMod.java @@ -1,16 +1,16 @@ package net.kaupenjoe.mccourse; -import net.fabricmc.api.ModInitializer; - import net.kaupenjoe.mccourse.block.ModBlocks; import net.kaupenjoe.mccourse.item.ModItemGroup; import net.kaupenjoe.mccourse.item.ModItems; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import net.fabricmc.api.ModInitializer; + public class MCCourseMod implements ModInitializer { public static final String MOD_ID = "mccourse"; - public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); @Override public void onInitialize() { @@ -20,4 +20,4 @@ public void onInitialize() { ModBlocks.registerModBlocks(); } -} \ No newline at end of file +} diff --git a/src/main/java/net/kaupenjoe/mccourse/MCCourseModClient.java b/src/main/java/net/kaupenjoe/mccourse/MCCourseModClient.java index 2eae19a..8278b07 100644 --- a/src/main/java/net/kaupenjoe/mccourse/MCCourseModClient.java +++ b/src/main/java/net/kaupenjoe/mccourse/MCCourseModClient.java @@ -3,8 +3,8 @@ import net.fabricmc.api.ClientModInitializer; public class MCCourseModClient implements ClientModInitializer { - @Override - public void onInitializeClient() { + @Override + public void onInitializeClient() { - } + } } diff --git a/src/main/java/net/kaupenjoe/mccourse/block/ModBlocks.java b/src/main/java/net/kaupenjoe/mccourse/block/ModBlocks.java index 8beff73..82f2c6c 100644 --- a/src/main/java/net/kaupenjoe/mccourse/block/ModBlocks.java +++ b/src/main/java/net/kaupenjoe/mccourse/block/ModBlocks.java @@ -1,8 +1,7 @@ package net.kaupenjoe.mccourse.block; -import net.fabricmc.fabric.api.item.v1.FabricItemSettings; -import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.kaupenjoe.mccourse.MCCourseMod; + import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.block.ExperienceDroppingBlock; @@ -13,32 +12,46 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.intprovider.UniformIntProvider; +import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; + public class ModBlocks { - public static final Block PINK_GARNET_BLOCK = registerBlock("pink_garnet_block", - new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK))); - public static final Block RAW_PINK_GARNET_BLOCK = registerBlock("raw_pink_garnet_block", - new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK))); - - public static final Block PINK_GARNET_ORE = registerBlock("pink_garnet_ore", - new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.STONE), UniformIntProvider.create(3, 6))); - public static final Block DEEPSLATE_PINK_GARNET_ORE = registerBlock("deepslate_pink_garnet_ore", - new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.DEEPSLATE), UniformIntProvider.create(3, 6))); - public static final Block END_STONE_PINK_GARNET_ORE = registerBlock("end_stone_pink_garnet_ore", - new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.END_STONE), UniformIntProvider.create(3, 6))); - public static final Block NETHER_PINK_GARNET_ORE = registerBlock("nether_pink_garnet_ore", - new ExperienceDroppingBlock(FabricBlockSettings.copyOf(Blocks.NETHERRACK), UniformIntProvider.create(3, 6))); - - private static Block registerBlock(String name, Block block) { - registerBlockItem(name, block); - return Registry.register(Registries.BLOCK, new Identifier(MCCourseMod.MOD_ID, name), block); - } - - private static Item registerBlockItem(String name, Block block) { - return Registry.register(Registries.ITEM, new Identifier(MCCourseMod.MOD_ID, name), - new BlockItem(block, new FabricItemSettings())); - } - - public static void registerModBlocks() { - MCCourseMod.LOGGER.info("Registering ModBlocks for " + MCCourseMod.MOD_ID); - } + public static final Block PINK_GARNET_BLOCK = registerBlock("pink_garnet_block", + new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK))); + public static final Block RAW_PINK_GARNET_BLOCK = registerBlock("raw_pink_garnet_block", + new Block(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK))); + + public static final Block PINK_GARNET_ORE = registerBlock("pink_garnet_ore", + new ExperienceDroppingBlock( + UniformIntProvider.create(3, 6), + FabricBlockSettings.copyOf(Blocks.STONE))); + public static final Block DEEPSLATE_PINK_GARNET_ORE = registerBlock("deepslate_pink_garnet_ore", + new ExperienceDroppingBlock( + UniformIntProvider.create(3, 6), + FabricBlockSettings.copyOf(Blocks.DEEPSLATE))); + public static final Block END_STONE_PINK_GARNET_ORE = registerBlock("end_stone_pink_garnet_ore", + new ExperienceDroppingBlock( + UniformIntProvider.create(3, 6), + FabricBlockSettings.copyOf(Blocks.END_STONE))); + public static final Block NETHER_PINK_GARNET_ORE = registerBlock("nether_pink_garnet_ore", + new ExperienceDroppingBlock( + UniformIntProvider.create(3, 6), + FabricBlockSettings.copyOf(Blocks.NETHERRACK))); + + @SuppressWarnings("UnusedReturnValue") + private static Block registerBlock(String name, Block block) { + registerBlockItem(name, block); + return Registry.register(Registries.BLOCK, new Identifier(MCCourseMod.MOD_ID, name), block); + } + + @SuppressWarnings("UnusedReturnValue") + private static Item registerBlockItem(String name, Block block) { + return Registry.register(Registries.ITEM, new Identifier(MCCourseMod.MOD_ID, name), + new BlockItem(block, new FabricItemSettings())); + } + + @SuppressWarnings("UnusedReturnValue") + public static void registerModBlocks() { + MCCourseMod.LOGGER.info("Registering ModBlocks for " + MCCourseMod.MOD_ID); + } } diff --git a/src/main/java/net/kaupenjoe/mccourse/item/ModItemGroup.java b/src/main/java/net/kaupenjoe/mccourse/item/ModItemGroup.java index 1bbb87e..ccbe1cd 100644 --- a/src/main/java/net/kaupenjoe/mccourse/item/ModItemGroup.java +++ b/src/main/java/net/kaupenjoe/mccourse/item/ModItemGroup.java @@ -1,8 +1,8 @@ package net.kaupenjoe.mccourse.item; -import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.kaupenjoe.mccourse.MCCourseMod; import net.kaupenjoe.mccourse.block.ModBlocks; + import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.registry.Registries; @@ -10,26 +10,28 @@ import net.minecraft.text.Text; import net.minecraft.util.Identifier; +import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; + public class ModItemGroup { - public static final ItemGroup PINK_GARNET_GROUP = Registry.register(Registries.ITEM_GROUP, - new Identifier(MCCourseMod.MOD_ID, "pink_garnet_group"), - FabricItemGroup.builder().displayName(Text.translatable("itemgroup.pink_garnet_group")) - .icon(() -> new ItemStack(ModItems.PINK_GARNET)).entries((displayContext, entries) -> { - entries.add(ModItems.PINK_GARNET); - entries.add(ModItems.RAW_PINK_GARNET); - entries.add(ModItems.METAL_DETECTOR); + public static final ItemGroup PINK_GARNET_GROUP = Registry.register(Registries.ITEM_GROUP, + new Identifier(MCCourseMod.MOD_ID, "pink_garnet_group"), + FabricItemGroup.builder().displayName(Text.translatable("itemgroup.pink_garnet_group")) + .icon(() -> new ItemStack(ModItems.PINK_GARNET)).entries((displayContext, entries) -> { + entries.add(ModItems.PINK_GARNET); + entries.add(ModItems.RAW_PINK_GARNET); + entries.add(ModItems.METAL_DETECTOR); - entries.add(ModBlocks.PINK_GARNET_BLOCK); - entries.add(ModBlocks.RAW_PINK_GARNET_BLOCK); + entries.add(ModBlocks.PINK_GARNET_BLOCK); + entries.add(ModBlocks.RAW_PINK_GARNET_BLOCK); - entries.add(ModBlocks.PINK_GARNET_ORE); - entries.add(ModBlocks.DEEPSLATE_PINK_GARNET_ORE); - entries.add(ModBlocks.END_STONE_PINK_GARNET_ORE); - entries.add(ModBlocks.NETHER_PINK_GARNET_ORE); + entries.add(ModBlocks.PINK_GARNET_ORE); + entries.add(ModBlocks.DEEPSLATE_PINK_GARNET_ORE); + entries.add(ModBlocks.END_STONE_PINK_GARNET_ORE); + entries.add(ModBlocks.NETHER_PINK_GARNET_ORE); - }).build()); + }).build()); - public static void registerItemGroups() { + public static void registerItemGroups() { - } + } } diff --git a/src/main/java/net/kaupenjoe/mccourse/item/ModItems.java b/src/main/java/net/kaupenjoe/mccourse/item/ModItems.java index bf66ba6..5aac045 100644 --- a/src/main/java/net/kaupenjoe/mccourse/item/ModItems.java +++ b/src/main/java/net/kaupenjoe/mccourse/item/ModItems.java @@ -1,41 +1,43 @@ package net.kaupenjoe.mccourse.item; -import net.fabricmc.fabric.api.item.v1.FabricItemSettings; -import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries; -import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.kaupenjoe.mccourse.MCCourseMod; import net.kaupenjoe.mccourse.block.ModBlocks; import net.kaupenjoe.mccourse.item.custom.MetalDetectorItem; + import net.minecraft.item.Item; import net.minecraft.item.ItemGroups; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.util.Identifier; +import net.fabricmc.fabric.api.item.v1.FabricItemSettings; +import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroupEntries; +import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; + public class ModItems { - public static final Item PINK_GARNET = registerItem("pink_garnet", - new Item(new FabricItemSettings())); - public static final Item RAW_PINK_GARNET = registerItem("raw_pink_garnet", - new Item(new FabricItemSettings())); + public static final Item PINK_GARNET = registerItem("pink_garnet", + new Item(new FabricItemSettings())); + public static final Item RAW_PINK_GARNET = registerItem("raw_pink_garnet", + new Item(new FabricItemSettings())); - public static final Item METAL_DETECTOR = registerItem("metal_detector", - new MetalDetectorItem(new FabricItemSettings().maxDamage(256))); + public static final Item METAL_DETECTOR = registerItem("metal_detector", + new MetalDetectorItem(new FabricItemSettings().maxDamage(256))); - private static Item registerItem(String name, Item item) { - return Registry.register(Registries.ITEM, new Identifier(MCCourseMod.MOD_ID, name), item); - } + private static Item registerItem(String name, Item item) { + return Registry.register(Registries.ITEM, new Identifier(MCCourseMod.MOD_ID, name), item); + } - private static void itemGroupIngredients(FabricItemGroupEntries entries) { - entries.add(PINK_GARNET); - entries.add(RAW_PINK_GARNET); + private static void itemGroupIngredients(FabricItemGroupEntries entries) { + entries.add(PINK_GARNET); + entries.add(RAW_PINK_GARNET); - entries.add(ModBlocks.PINK_GARNET_BLOCK); - entries.add(ModBlocks.RAW_PINK_GARNET_BLOCK); - } + entries.add(ModBlocks.PINK_GARNET_BLOCK); + entries.add(ModBlocks.RAW_PINK_GARNET_BLOCK); + } - public static void registerModItems() { - MCCourseMod.LOGGER.info("Registering Mod Items for " + MCCourseMod.MOD_ID); + public static void registerModItems() { + MCCourseMod.LOGGER.info("Registering Mod Items for " + MCCourseMod.MOD_ID); - ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(ModItems::itemGroupIngredients); - } + ItemGroupEvents.modifyEntriesEvent(ItemGroups.INGREDIENTS).register(ModItems::itemGroupIngredients); + } } diff --git a/src/main/java/net/kaupenjoe/mccourse/item/custom/MetalDetectorItem.java b/src/main/java/net/kaupenjoe/mccourse/item/custom/MetalDetectorItem.java index de4a930..5faba30 100644 --- a/src/main/java/net/kaupenjoe/mccourse/item/custom/MetalDetectorItem.java +++ b/src/main/java/net/kaupenjoe/mccourse/item/custom/MetalDetectorItem.java @@ -11,47 +11,50 @@ import net.minecraft.util.math.BlockPos; public class MetalDetectorItem extends Item { - public MetalDetectorItem(Settings settings) { - super(settings); - } - - @Override - public ActionResult useOnBlock(ItemUsageContext context) { - if(!context.getWorld().isClient()) { - BlockPos positionClicked = context.getBlockPos(); - PlayerEntity player = context.getPlayer(); - boolean foundBlock = false; - - for(int i = 0; i <= positionClicked.getY() + 64; i++) { - BlockState blockState = context.getWorld().getBlockState(positionClicked.down(i)); - Block block = blockState.getBlock(); - - if(isValuableBlock(blockState)) { - outputValuableCoordinates(positionClicked.down(i), player, block); - foundBlock = true; - - break; - } - } - - if(!foundBlock) { - player.sendMessage(Text.translatable("item.mccourse.metal_detector.no_valuables")); - } - } - - context.getStack().damage(1, context.getPlayer(), - playerEntity -> playerEntity.sendToolBreakStatus(playerEntity.getActiveHand())); - - return ActionResult.SUCCESS; - } - - private void outputValuableCoordinates(BlockPos position, PlayerEntity player, Block block) { - player.sendMessage(Text.literal("Valuable Found: " + block.getName().getString() + " at " + - "(" + position.getX() + ", " + position.getY() + ", " + position.getZ() + ")")); - } - - private boolean isValuableBlock(BlockState blockState) { - return blockState.getBlock() == Blocks.IRON_ORE || blockState.getBlock() == Blocks.GOLD_ORE || - blockState.getBlock() == Blocks.DIAMOND_ORE || blockState.getBlock() == Blocks.REDSTONE_ORE; - } + public MetalDetectorItem(Settings settings) { + super(settings); + } + + @Override + public ActionResult useOnBlock(ItemUsageContext context) { + PlayerEntity player = context.getPlayer(); + if (player == null) { + return ActionResult.PASS; + } + if (!context.getWorld().isClient()) { + BlockPos positionClicked = context.getBlockPos(); + boolean foundBlock = false; + + for (int i = 0; i <= positionClicked.getY() + 64; i++) { + BlockState blockState = context.getWorld().getBlockState(positionClicked.down(i)); + Block block = blockState.getBlock(); + + if (isValuableBlock(blockState)) { + outputValuableCoordinates(positionClicked.down(i), player, block); + foundBlock = true; + + break; + } + } + + if (!foundBlock) { + player.sendMessage(Text.translatable("item.mccourse.metal_detector.no_valuables")); + } + } + + context.getStack().damage(1, player, + playerEntity -> playerEntity.sendToolBreakStatus(playerEntity.getActiveHand())); + + return ActionResult.SUCCESS; + } + + private void outputValuableCoordinates(BlockPos position, PlayerEntity player, Block block) { + player.sendMessage(Text.literal("Valuable Found: " + block.getName().getString() + " at " + + "(" + position.getX() + ", " + position.getY() + ", " + position.getZ() + ")")); + } + + private boolean isValuableBlock(BlockState blockState) { + return blockState.getBlock() == Blocks.IRON_ORE || blockState.getBlock() == Blocks.GOLD_ORE || + blockState.getBlock() == Blocks.DIAMOND_ORE || blockState.getBlock() == Blocks.REDSTONE_ORE; + } } diff --git a/src/main/java/net/kaupenjoe/mccourse/mixin/ExampleMixin.java b/src/main/java/net/kaupenjoe/mccourse/mixin/ExampleMixin.java deleted file mode 100644 index afbf8ac..0000000 --- a/src/main/java/net/kaupenjoe/mccourse/mixin/ExampleMixin.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.kaupenjoe.mccourse.mixin; - -import net.minecraft.server.MinecraftServer; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(MinecraftServer.class) -public class ExampleMixin { - @Inject(at = @At("HEAD"), method = "loadWorld") - private void init(CallbackInfo info) { - // This code is injected into the start of MinecraftServer.loadWorld()V - } -} \ No newline at end of file diff --git a/src/main/resources/mccourse.mixins.json b/src/main/resources/mccourse.mixins.json index e67276f..a214886 100644 --- a/src/main/resources/mccourse.mixins.json +++ b/src/main/resources/mccourse.mixins.json @@ -3,7 +3,6 @@ "package": "net.kaupenjoe.mccourse.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ - "ExampleMixin" ], "injectors": { "defaultRequire": 1