public interface IBlockTrackEntry
IPneumaticHelmetRegistry.registerBlockTrackEntry(IBlockTrackEntry).
Your implementation must provide a no-parameter constructor. For every entity that's applicable for this definition,
an instance is created.| Modifier and Type | Method and Description |
|---|---|
void |
addInformation(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.tileentity.TileEntity te,
net.minecraft.util.Direction face,
java.util.List<net.minecraft.util.text.ITextComponent> infoList)
This method is called each client tick to retrieve the block's additional
information.
|
net.minecraft.util.ResourceLocation |
getEntryID()
Return a unique identifier for this block track entry.
|
java.util.List<net.minecraft.util.math.BlockPos> |
getServerUpdatePositions(net.minecraft.tileentity.TileEntity te)
This method controls whether the block should be updated by the server (at 5
second intervals).
|
static boolean |
hasCapabilityOnAnyFace(net.minecraftforge.common.capabilities.ICapabilityProvider provider,
net.minecraftforge.common.capabilities.Capability<?> cap)
Convenience method: check if the given capability provider provides the given capability on any block face.
|
boolean |
shouldTrackWithThisEntry(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
net.minecraft.tileentity.TileEntity te)
This method should return true if the coordinate checked is one that
should be tracked.
|
int |
spamThreshold()
The return of this method defines at how many tracked blocks of this type
the HUD should stop displaying text at the tracked blocks of this type.
|
boolean shouldTrackWithThisEntry(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.block.BlockState state,
net.minecraft.tileentity.TileEntity te)
world - The world that is examined.pos - The position of the block examined.state - The block of the current coordinate. This will save you a
call to World.getBlockState().te - The TileEntity at this x,y,z (may be null)java.util.List<net.minecraft.util.math.BlockPos> getServerUpdatePositions(@Nullable
net.minecraft.tileentity.TileEntity te)
te - the tile entity at the currently checked location, may be nullint spamThreshold()
void addInformation(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.tileentity.TileEntity te,
net.minecraft.util.Direction face,
java.util.List<net.minecraft.util.text.ITextComponent> infoList)
Item.appendHoverText(ItemStack, World, List, ITooltipFlag).
This method is only called if shouldTrackWithThisEntry(IBlockReader, BlockPos, BlockState, TileEntity)
returned true, and the player is curently focused on the block.world - The world the block is in.pos - The position the block is at.te - The TileEntity at the x,y,z (may be null)face - The blockface the player is looking at (null if player is not looking directly at the block)infoList - The list of lines to display.net.minecraft.util.ResourceLocation getEntryID()
IArmorUpgradeHandler.getStringKey(ResourceLocation)static boolean hasCapabilityOnAnyFace(net.minecraftforge.common.capabilities.ICapabilityProvider provider,
net.minecraftforge.common.capabilities.Capability<?> cap)
provider - the capability providercap - the capability