-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modular GUI Implementation. * First round of tweaks based on covers feedback. * Made requested changes * Update JEI maven
- Loading branch information
1 parent
b4954cf
commit 9fbd40b
Showing
103 changed files
with
12,599 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ org.gradle.daemon=false | |
mc_version=1.20.1 | ||
forge_version=47.1.65 | ||
mod_version=4.4.0 | ||
jei_version=15.2.0.27 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package codechicken.lib.compat; | ||
|
||
import codechicken.lib.CodeChickenLib; | ||
import codechicken.lib.gui.modular.ModularGuiContainer; | ||
import mezz.jei.api.IModPlugin; | ||
import mezz.jei.api.JeiPlugin; | ||
import mezz.jei.api.gui.handlers.IGuiContainerHandler; | ||
import mezz.jei.api.registration.IGuiHandlerRegistration; | ||
import net.minecraft.client.renderer.Rect2i; | ||
import net.minecraft.resources.ResourceLocation; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by brandon3055 on 31/12/2023 | ||
*/ | ||
@JeiPlugin | ||
public class JEIPlugin implements IModPlugin { | ||
private static final ResourceLocation ID = new ResourceLocation(CodeChickenLib.MOD_ID, "jei_plugin"); | ||
|
||
public JEIPlugin() {} | ||
|
||
@Override | ||
public ResourceLocation getPluginUid() { | ||
return ID; | ||
} | ||
|
||
@Override | ||
public void registerGuiHandlers(IGuiHandlerRegistration registration) { | ||
registration.addGuiContainerHandler(ModularGuiContainer.class, new IGuiContainerHandler<>() { | ||
@Override | ||
public List<Rect2i> getGuiExtraAreas(ModularGuiContainer screen) { | ||
return screen.getModularGui().getJeiExclusions().map(e -> e.getRectangle().toRect2i()).toList(); | ||
} | ||
}); | ||
} | ||
} |
Oops, something went wrong.