mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Add cancelable event for Potions shifting the gui position (#2667)
Add cancelable event for Potions shifting the gui position
This commit is contained in:
1 parent
03584ec411
commit
a018e14939
2 files changed
+19
-3
No files matched your search
@@ -189,6 +189,20 @@ public class GuiScreenEvent extends Event
|
||||
return mouseY;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This event fires in {@code InventoryEffectRenderer.updateActivePotionEffects()}
|
||||
* when potion effects are active and the gui wants to move over.
|
||||
* Cancel this event to prevent the Gui from being moved.
|
||||
*/
|
||||
@Cancelable
|
||||
public static class PotionShiftEvent extends GuiScreenEvent
|
||||
{
|
||||
public PotionShiftEvent(GuiScreen gui)
|
||||
{
|
||||
super(gui);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ActionPerformedEvent extends GuiScreenEvent
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user