Skip to content

Commit

Permalink
fix needing fabricAPI closes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeF53 committed May 24, 2022
1 parent 936587e commit 09e58b4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
14 changes: 9 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,20 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
/*
//modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modIncludeImplementation(fabricApi.module("fabric-api-base", project.fabric_version))
modIncludeImplementation(fabricApi.module("fabric-rendering-data-attachment-v1", project.fabric_version))
modIncludeImplementation(fabricApi.module("fabric-lifecycle-events-v1", project.fabric_version))
*/

modIncludeImplementation(fabricApi.module("fabric-registry-sync-v0", project.fabric_version))

// Cloth Config
modIncludeImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}")
modIncludeImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}"){
exclude(group: "net.fabricmc.fabric-api")
}
// Cloth devs wont update fabric api, so you cant use it certain versions without excluding it's fabric api
// but because you excluded its instance of fabric api, you need to re-add the bits it uses
modIncludeImplementation(fabricApi.module("fabric-screen-api-v1", project.fabric_version))
modIncludeImplementation(fabricApi.module("fabric-resource-loader-v0", project.fabric_version))

// Mod Menu
modImplementation("com.terraformersmc:modmenu:${project.mod_menu_version}")
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/develop/
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
loader_version=0.14.5
loader_version=0.14.6

# Mod Properties
mod_version = 2.0.0
maven_group = com.HorseBuff
archives_base_name = HorseBuff

# Dependencies
fabric_version=0.51.1+1.18.2
cloth_config_version=6.0.42
fabric_version=0.53.4+1.18.2
cloth_config_version=6.2.62
mod_menu_version=3.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public abstract class InventoryAccessor {

@Shadow @Nullable public ClientPlayerEntity player;

@Redirect(method="net/minecraft/client/MinecraftClient.handleInputEvents()V", at = @At(value = "INVOKE", target = "net/minecraft/client/network/ClientPlayerEntity.openRidingInventory ()V"))
void teergtoind(ClientPlayerEntity instance){
@Redirect(method= "handleInputEvents()V", at = @At(value = "INVOKE", target = "net/minecraft/client/network/ClientPlayerEntity.openRidingInventory ()V"))
void playerInventoryAccess(ClientPlayerEntity instance){
assert this.player != null;
if (MinecraftClient.getInstance().options.sprintKey.isPressed()) {
tutorialManager.onInventoryOpened();
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 @@ -32,7 +32,7 @@
],

"depends": {
"fabricloader": ">=0.13.3",
"fabricloader": ">=0.14.6",
"minecraft": "1.18.x",
"java": ">=17"
}
Expand Down

0 comments on commit 09e58b4

Please sign in to comment.