public class PneumaticHelmetRegistry extends java.lang.Object implements IPneumaticHelmetRegistry
| Modifier and Type | Field and Description |
|---|---|
java.util.List<java.util.function.Supplier<? extends IEntityTrackEntry>> |
entityTrackEntries |
java.util.Map<java.lang.Class<? extends net.minecraft.entity.Entity>,java.util.function.Supplier<? extends IHackableEntity>> |
hackableEntities |
java.util.Map<net.minecraft.util.ResourceLocation,java.util.function.Supplier<? extends IHackableEntity>> |
idToEntityHackables |
| Constructor and Description |
|---|
PneumaticHelmetRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
addHackable(net.minecraft.block.Block block,
java.util.function.Supplier<? extends IHackableBlock> iHackable)
Register a "foreign" block with your hackable.
|
void |
addHackable(java.lang.Class<? extends net.minecraft.entity.Entity> entityClazz,
java.util.function.Supplier<? extends IHackableEntity> iHackable)
Register a "foreign" entity with your hackable.
|
void |
addHackable(net.minecraft.tags.ITag.INamedTag<net.minecraft.block.Block> blockTag,
java.util.function.Supplier<? extends IHackableBlock> iHackable) |
java.util.List<IHackableEntity> |
getCurrentEntityHacks(net.minecraft.entity.Entity entity)
Get a list of all current successful hacks on a given entity.
|
IHackableEntity |
getEntityById(net.minecraft.util.ResourceLocation id) |
IHackableBlock |
getHackable(net.minecraft.block.Block block) |
IHackableEntity |
getHackable(net.minecraft.entity.Entity entity,
net.minecraft.entity.player.PlayerEntity player) |
static PneumaticHelmetRegistry |
getInstance() |
IKeybindingButton |
makeKeybindingButton(int yPos,
net.minecraft.client.settings.KeyBinding keyBinding)
Create a new keybinding button for an
IOptionPage armor GUI screen. |
ICheckboxWidget |
makeKeybindingCheckBox(net.minecraft.util.ResourceLocation upgradeId,
int xPos,
int yPos,
int color,
java.util.function.Consumer<ICheckboxWidget> onPressed)
Create or retrieve the toggle checkbox for the given upgrade.
|
void |
registerBlockTrackEntry(IBlockTrackEntry entry)
Register a block tracker for the Pneumatic Helmet
|
void |
registerEntityTrackEntry(java.util.function.Supplier<? extends IEntityTrackEntry> entry)
Register an entity tracker for the Pneumatic Helmet.
|
<T extends IArmorUpgradeHandler<?>> |
registerRenderHandler(T handler,
IArmorUpgradeClientHandler<T> clientHandler)
Registers the client handler for a Pneumatic Armor upgrade.
|
void |
resolveBlockTags(net.minecraft.tags.ITagCollection<net.minecraft.block.Block> tags)
Called when a TagsUpdatedEvent is received, on both server and client, to refresh the actual blocks referred to
by the tags we've registered.
|
public final java.util.List<java.util.function.Supplier<? extends IEntityTrackEntry>> entityTrackEntries
public final java.util.Map<java.lang.Class<? extends net.minecraft.entity.Entity>,java.util.function.Supplier<? extends IHackableEntity>> hackableEntities
public final java.util.Map<net.minecraft.util.ResourceLocation,java.util.function.Supplier<? extends IHackableEntity>> idToEntityHackables
public static PneumaticHelmetRegistry getInstance()
public void registerEntityTrackEntry(java.util.function.Supplier<? extends IEntityTrackEntry> entry)
IPneumaticHelmetRegistryregisterEntityTrackEntry in interface IPneumaticHelmetRegistryentry - the entity trackerpublic void addHackable(java.lang.Class<? extends net.minecraft.entity.Entity> entityClazz,
java.util.function.Supplier<? extends IHackableEntity> iHackable)
IPneumaticHelmetRegistryIHackableEntityaddHackable in interface IPneumaticHelmetRegistryentityClazz - entity class; subclasses of this entity will also be affectediHackable - the hack to registerpublic void addHackable(net.minecraft.block.Block block,
java.util.function.Supplier<? extends IHackableBlock> iHackable)
IPneumaticHelmetRegistryIHackableBlockaddHackable in interface IPneumaticHelmetRegistryblock - the block class; subclasses of this block will also be affectediHackable - the hack to registerpublic void addHackable(net.minecraft.tags.ITag.INamedTag<net.minecraft.block.Block> blockTag,
java.util.function.Supplier<? extends IHackableBlock> iHackable)
addHackable in interface IPneumaticHelmetRegistrypublic void resolveBlockTags(net.minecraft.tags.ITagCollection<net.minecraft.block.Block> tags)
tags - the newly updated block tagspublic java.util.List<IHackableEntity> getCurrentEntityHacks(net.minecraft.entity.Entity entity)
IPneumaticHelmetRegistrygetCurrentEntityHacks in interface IPneumaticHelmetRegistryentity - the entity to checkpublic void registerBlockTrackEntry(IBlockTrackEntry entry)
IPneumaticHelmetRegistryregisterBlockTrackEntry in interface IPneumaticHelmetRegistryentry - the block trackerpublic <T extends IArmorUpgradeHandler<?>> void registerRenderHandler(T handler, IArmorUpgradeClientHandler<T> clientHandler)
IPneumaticHelmetRegistryFMLClientSetupEvent
handler, using ParallelDispatchEvent.enqueueWork(Runnable). This
also registers any keybindings referenced by the render handler
(see IArmorUpgradeClientHandler.getInitialKeyBinding() and IArmorUpgradeClientHandler.getSubKeybinds().registerRenderHandler in interface IPneumaticHelmetRegistryclientHandler - the handler to registerpublic IKeybindingButton makeKeybindingButton(int yPos, net.minecraft.client.settings.KeyBinding keyBinding)
IPneumaticHelmetRegistryIOptionPage armor GUI screen. This is intended to be called from
IOptionPage.populateGui(IGuiScreen) to set up a button which can be used to change a particular key
binding.makeKeybindingButton in interface IPneumaticHelmetRegistryyPos - y position of the buttonkeyBinding - the keybinding modified by the buttonpublic ICheckboxWidget makeKeybindingCheckBox(net.minecraft.util.ResourceLocation upgradeId, int xPos, int yPos, int color, java.util.function.Consumer<ICheckboxWidget> onPressed)
IPneumaticHelmetRegistry
This is intended to be called from IOptionPage.populateGui(IGuiScreen) when creating the GUI for
an upgrade handler.
makeKeybindingCheckBox in interface IPneumaticHelmetRegistryupgradeId - the upgrade IDxPos - X position of the widgetyPos - Y position of the widgetcolor - widget's text color in ARGB formatonPressed - called when the checkbox is toggledpublic IHackableBlock getHackable(net.minecraft.block.Block block)
public IHackableEntity getHackable(net.minecraft.entity.Entity entity, net.minecraft.entity.player.PlayerEntity player)
public IHackableEntity getEntityById(net.minecraft.util.ResourceLocation id)