Skip to content

Commit

Permalink
Fixed mixin error, fixed dependency, and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Minenash committed Dec 18, 2020
1 parent a31feb6 commit 87a9eaa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand Down
8 changes: 2 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions src/main/java/net/fabricmc/example/mixin/BedBlockMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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<HostileEntity> list = world.getEntitiesByClass(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],

"depends": {
"fabric": "*",
"fabricloader": ">=0.7.4",
"minecraft": "1.16.x"
}
}

0 comments on commit 87a9eaa

Please sign in to comment.