类 ScreenEvent.RenderInventoryMobEffects
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.RenderInventoryMobEffects
- 封闭类:
ScreenEvent
Fired ahead of rendering any active mob effects in the
.
Can be used to select the size of the effects display (full or compact) or even hide or replace vanilla's rendering entirely.
This event can also be used to modify the horizontal position of the stack of effects being rendered.
引用无效
inventory screen
This event is cancellable and does not have a result. Cancelling this event will prevent vanilla rendering.
This event is fired on the main Forge event bus, only on the logical client.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.client.event.ScreenEvent
ScreenEvent.BackgroundRendered, ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段 -
构造器概要
构造器构造器说明RenderInventoryMobEffects
(Screen screen, int availableSpace, boolean compact, int horizontalOffset) -
方法概要
修饰符和类型方法说明void
addHorizontalOffset
(int offset) Adds to the horizontal offset of the effect stack.int
The available space to the right of the inventory.int
The distance from the left side of the screen that the effect stack is rendered.boolean
Whether the effects should be rendered in compact mode (only icons, no text), or the default full size.void
setCompact
(boolean compact) Sets whether the effects should be rendered in compact mode (only icons, no text), or the default full size.void
setHorizontalOffset
(int offset) Replaces the horizontal offset of the effect stack从类继承的方法 net.minecraftforge.client.event.ScreenEvent
getScreen
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
availableSpace
private final int availableSpace -
compact
private boolean compact -
horizontalOffset
private int horizontalOffset
-
-
构造器详细资料
-
RenderInventoryMobEffects
@Internal public RenderInventoryMobEffects(Screen screen, int availableSpace, boolean compact, int horizontalOffset)
-
-
方法详细资料
-
getAvailableSpace
public int getAvailableSpace()The available space to the right of the inventory. -
isCompact
public boolean isCompact()Whether the effects should be rendered in compact mode (only icons, no text), or the default full size. -
getHorizontalOffset
public int getHorizontalOffset()The distance from the left side of the screen that the effect stack is rendered. Positive values shift this more to the right. -
setHorizontalOffset
public void setHorizontalOffset(int offset) Replaces the horizontal offset of the effect stack -
addHorizontalOffset
public void addHorizontalOffset(int offset) Adds to the horizontal offset of the effect stack. Negative values are acceptable. -
setCompact
public void setCompact(boolean compact) Sets whether the effects should be rendered in compact mode (only icons, no text), or the default full size.
-