From 87a9eaa3da6722d3367e4e357845b32cea5c4b8a Mon Sep 17 00:00:00 2001 From: minenash Date: Fri, 18 Dec 2020 01:16:01 -0500 Subject: [PATCH] Fixed mixin error, fixed dependency, and updated readme --- README.md | 10 ++-------- build.gradle | 3 --- gradle.properties | 8 ++------ .../java/net/fabricmc/example/mixin/BedBlockMixin.java | 7 +++++-- src/main/resources/fabric.mod.json | 2 +- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index fd96346..a9ee55c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -# Fabric Example Mod +# Monsters in the Closet -## Setup - -For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using. - -## License - -This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects. +Highlights the mobs that are preventing you from sleeping diff --git a/build.gradle b/build.gradle index 62083f9..b638fca 100644 --- a/build.gradle +++ b/build.gradle @@ -16,9 +16,6 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // You may need to force-disable transitiveness on them. } diff --git a/gradle.properties b/gradle.properties index 5c6da7b..3991161 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,9 +9,5 @@ org.gradle.jvmargs=-Xmx1G # Mod Properties mod_version = 1.0.0 - maven_group = net.fabricmc - archives_base_name = fabric-example-mod - -# Dependencies - # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.25.1+build.416-1.16 + maven_group = com.minenash + archives_base_name = monsters-in-the-closet diff --git a/src/main/java/net/fabricmc/example/mixin/BedBlockMixin.java b/src/main/java/net/fabricmc/example/mixin/BedBlockMixin.java index a0fbf42..ba5f2e8 100644 --- a/src/main/java/net/fabricmc/example/mixin/BedBlockMixin.java +++ b/src/main/java/net/fabricmc/example/mixin/BedBlockMixin.java @@ -22,7 +22,7 @@ import java.util.List; -@Mixin(targets = "net/minecraft/block/BedBlock") +@Mixin(BedBlock.class) public class BedBlockMixin { @Inject(method = "onUse", at = @At("HEAD")) @@ -32,8 +32,11 @@ public void onUse(BlockState state, World world, BlockPos pos, PlayerEntity play return; } - if (!notSafe(state,world,pos,player)) + if (!notSafe(state,world,pos,player)) { + System.out.println("A"); return; + } + System.out.println("B"); Vec3d vec3d = Vec3d.ofBottomCenter(pos); List list = world.getEntitiesByClass( diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 111d140..c25e2ae 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -21,7 +21,7 @@ ], "depends": { - "fabric": "*", + "fabricloader": ">=0.7.4", "minecraft": "1.16.x" } }