Skip to content

Commit

Permalink
Fix JEI appearing on dialogue screens
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Jun 15, 2024
1 parent 487f685 commit 440a50b
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ dependencies {
modIncludeImplementation(libs.permissionsApi)
modLocalImplementation(libs.rei.api)
compileOnly(sourceSets.reiDummy.output)
modLocalImplementation(libs.emi)
modCompileOnly(libs.emi)
modLocalImplementation(libs.jei)

compileOnly(libs.mcAnnotations)

Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Version 1.6.0
- Blabber will now log a warning with some additional details when it detects that a player gets stuck without available choices
- API change: `DialogueIllustration#parseText` can now throw `CommandSyntaxException`

**Mod Interactions**
- JEI no longer appears on the dialogue screen

------------------------------------------------------
Version 1.5.1
------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xmx2G
archives_base_name = blabber

# Dependencies
fabric_version=0.92.0+1.20.4
fabric_version=0.93.1+1.20.4

# Publishing
license_header = LGPL
Expand Down
3 changes: 3 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fpa = "0.2-SNAPSHOT"
mcAnnotations = "1.0"
modmenu = "9.0.0"
rei = "14.0.688"
jei = "xGApC30U" # 17.3.0.52

[libraries]
cca-base = { module = "dev.onyxstudios.cardinal-components-api:cardinal-components-base", version.ref = "cca" }
Expand All @@ -16,3 +17,5 @@ mcAnnotations = { module = "com.demonwav.mcdev:annotations", version.ref = "mcAn
modmenu = { module = "com.terraformersmc:modmenu", version.ref = "modmenu"}
permissionsApi = { module = "me.lucko:fabric-permissions-api", version.ref = "fpa" }
rei-api = { module = "me.shedaniel:RoughlyEnoughItems-api-fabric", version.ref = "rei" }
# We cannot use the nice API jar because it is not getting remapped correctly
jei = { module = "maven.modrinth:jei", version.ref = "jei" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Blabber
* Copyright (C) 2022-2024 Ladysnake
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; If not, see <https://www.gnu.org/licenses>.
*/
package org.ladysnake.blabber.impl.client.compat;

import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin;
import mezz.jei.api.registration.IGuiHandlerRegistration;
import net.minecraft.util.Identifier;
import org.ladysnake.blabber.Blabber;
import org.ladysnake.blabber.api.client.BlabberDialogueScreen;

@JeiPlugin
public class BlabberJeiClientPlugin implements IModPlugin {
@Override
public Identifier getPluginUid() {
return Blabber.id("jei_remover");
}

@Override
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
registration.addGuiScreenHandler(BlabberDialogueScreen.class, s -> null);
}
}
3 changes: 3 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
],
"rei_client": [
"org.ladysnake.blabber.impl.client.compat.BlabberReiClientPlugin"
],
"jei_mod_plugin": [
"org.ladysnake.blabber.impl.client.compat.BlabberJeiClientPlugin"
]
},
"mixins": [
Expand Down

0 comments on commit 440a50b

Please sign in to comment.