public class ButtonComponent extends java.lang.Object implements IScreenAddonProvider
| Constructor and Description |
|---|
ButtonComponent(int posX,
int posY,
int sizeX,
int sizeY) |
| Modifier and Type | Method and Description |
|---|---|
int |
getId() |
int |
getPosX() |
int |
getPosY() |
java.util.List<IFactory<? extends IScreenAddon>> |
getScreenAddons() |
int |
getSizeX() |
int |
getSizeY() |
void |
onButtonClicked(net.minecraft.entity.player.PlayerEntity entity,
net.minecraft.nbt.CompoundNBT information) |
ButtonComponent |
setId(int id) |
ButtonComponent |
setPredicate(java.util.function.BiConsumer<net.minecraft.entity.player.PlayerEntity,net.minecraft.nbt.CompoundNBT> serverPredicate)
Sets a predicate that will be runned in the server when the button is clicked in the client
|
public ButtonComponent setPredicate(java.util.function.BiConsumer<net.minecraft.entity.player.PlayerEntity,net.minecraft.nbt.CompoundNBT> serverPredicate)
serverPredicate - A predicate that has a NBTTagCompound with client informationpublic void onButtonClicked(net.minecraft.entity.player.PlayerEntity entity,
net.minecraft.nbt.CompoundNBT information)
public int getPosX()
public int getPosY()
public int getSizeX()
public int getSizeY()
public int getId()
public ButtonComponent setId(int id)
public java.util.List<IFactory<? extends IScreenAddon>> getScreenAddons()
getScreenAddons in interface IScreenAddonProvider