-
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.
- Loading branch information
1 parent
b4954cf
commit 228be19
Showing
78 changed files
with
13,098 additions
and
0 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 |
---|---|---|
@@ -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.