public class HackableDispenser extends java.lang.Object implements IHackableBlock
| Constructor and Description |
|---|
HackableDispenser() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInfo(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
net.minecraft.entity.player.PlayerEntity player)
Add info that is displayed on the tracker tooltip here.
|
void |
addPostHackInfo(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
net.minecraft.entity.player.PlayerEntity player)
Add info to be displayed on the HUD after hacking is complete, as long as
IHackableBlock.afterHackTick(IBlockReader, BlockPos) continues to returning true, e.g. |
net.minecraft.util.ResourceLocation |
getHackableId()
Get a unique id to represent this hackable.
|
int |
getHackTime(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player)
Get the time it takes to hack this block in ticks.
|
void |
onHackComplete(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player)
When the player has been hacking the block for
IHackableBlock.getHackTime(IBlockReader, BlockPos, PlayerEntity) ticks,
this will be called on both server and client side. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterHackTick, canHack, fakeRayTracepublic net.minecraft.util.ResourceLocation getHackableId()
IHackableBlockThe returned ResourceLocation should be in the namespace of the mod which adds the hack (which is not necessarily the mod that adds the hackable block).
CURRENTLY THIS ISN'T IMPLEMENTED.
getHackableId in interface IHackableBlockpublic void addInfo(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
net.minecraft.entity.player.PlayerEntity player)
IHackableBlockIHackableBlock.canHack(IBlockReader, BlockPos, PlayerEntity) has returned true.
Keep this message short; one short sentence is enough.addInfo in interface IHackableBlockworld - the worldpos - the block pos of the to-be-hacked blockcurInfo - text component list to add info toplayer - the player observing the hackable blockpublic void addPostHackInfo(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
java.util.List<net.minecraft.util.text.ITextComponent> curInfo,
net.minecraft.entity.player.PlayerEntity player)
IHackableBlockIHackableBlock.afterHackTick(IBlockReader, BlockPos) continues to returning true, e.g. "Spawner Disabled".
Keep this message short; one short sentence or even a couple of words is enough.addPostHackInfo in interface IHackableBlockworld - the worldpos - the block pos of the hacked blockcurInfo - text component list to add info toplayer - the player observing the hacked blockpublic int getHackTime(net.minecraft.world.IBlockReader world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player)
IHackableBlockgetHackTime in interface IHackableBlockworld - the worldpos - the block posplayer - the player observing the hackable blockpublic void onHackComplete(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.PlayerEntity player)
IHackableBlockIHackableBlock.getHackTime(IBlockReader, BlockPos, PlayerEntity) ticks,
this will be called on both server and client side.onHackComplete in interface IHackableBlockworld - the worldpos - the block posplayer - the player observing the hacked block