public class ChiselAndBitsAPI extends java.lang.Object implements IChiselAndBitsAPI
| Constructor and Description |
|---|
ChiselAndBitsAPI() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEquivilantMaterial(net.minecraft.block.material.Material newMaterial,
net.minecraft.block.material.Material target)
Register a custom material as equivalent to another material.
|
void |
beginUndoGroup(net.minecraft.entity.player.EntityPlayer player)
Begins an undo group, starting two operations without ending the previous
operation will throw a runtime exception.
|
boolean |
canBeChiseled(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Check if a block can support
IBitAccess |
IBitAccess |
createBitItem(net.minecraft.item.ItemStack stack)
Create a bit access from an ItemStack, passing an empty ItemStack creates
an empty bit access, passing an invalid item returns null.
|
IBitBrush |
createBrush(net.minecraft.item.ItemStack stack)
Create a brush from an ItemStack, once created you can use it many times.
|
IBitBrush |
createBrushFromState(net.minecraft.block.state.IBlockState state)
Create a brush from a state, once created you can use it many times.
|
void |
endUndoGroup(net.minecraft.entity.player.EntityPlayer player)
Ends a previously running undo group, must be called after starting an
undo group, closing a group without opening one will result in a runtime
exception.
|
IBitAccess |
getBitAccess(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
Get Access to the bits for a given block.
|
IBitBag |
getBitbag(net.minecraft.item.ItemStack stack)
Access the contents of a bitbag as if it was a normal
IItemHandler with a few extra features. |
net.minecraft.item.ItemStack |
getBitItem(net.minecraft.block.state.IBlockState state)
Get an ItemStack for the bit type of the state...
|
IBitLocation |
getBitPos(float hitX,
float hitY,
float hitZ,
net.minecraft.util.EnumFacing side,
net.minecraft.util.math.BlockPos pos,
boolean placement)
Convert ray trace information into bit location information, note that
the block position can change, be aware.
|
ItemType |
getItemType(net.minecraft.item.ItemStack stack)
Determine the Item Type of the item in an ItemStack and return it.
|
net.minecraft.client.settings.KeyBinding |
getKeyBinding(ModKeyBinding modKeyBinding)
Get a C&B key binding.
|
java.lang.Object |
getParameter(ParameterType which)
Example: int stackSize =
api.getParameter(IntegerParam.BIT_BAG_MAX_STACK_SIZE );
|
void |
giveBitToPlayer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack stack,
net.minecraft.util.math.Vec3d spawnPos)
Give a bit to a player, it will end up in their inventory, a bag, or if
there is no where to put it, on the ground.
|
boolean |
isBlockChiseled(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
is this block already chiseled?
|
public void addEquivilantMaterial(net.minecraft.block.material.Material newMaterial,
net.minecraft.block.material.Material target)
IChiselAndBitsAPIaddEquivilantMaterial in interface IChiselAndBitsAPInewMaterial - your custom materialtarget - default MC Material C&B knows about.public boolean canBeChiseled(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
IChiselAndBitsAPIIBitAccesscanBeChiseled in interface IChiselAndBitsAPIpublic boolean isBlockChiseled(net.minecraft.world.World world,
net.minecraft.util.math.BlockPos pos)
IChiselAndBitsAPIisBlockChiseled in interface IChiselAndBitsAPIpublic IBitAccess getBitAccess(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) throws APIExceptions.CannotBeChiseled
IChiselAndBitsAPIgetBitAccess in interface IChiselAndBitsAPIIBitAccess for the specified location.APIExceptions.CannotBeChiseled - when the location cannot support bits, or if the parameters
are invalid.public IBitBrush createBrush(net.minecraft.item.ItemStack stack) throws APIExceptions.InvalidBitItem
IChiselAndBitsAPIcreateBrush in interface IChiselAndBitsAPIAPIExceptions.InvalidBitItempublic IBitLocation getBitPos(float hitX, float hitY, float hitZ, net.minecraft.util.EnumFacing side, net.minecraft.util.math.BlockPos pos, boolean placement)
IChiselAndBitsAPIgetBitPos in interface IChiselAndBitsAPIpublic ItemType getItemType(net.minecraft.item.ItemStack stack)
IChiselAndBitsAPIgetItemType in interface IChiselAndBitsAPIpublic IBitAccess createBitItem(net.minecraft.item.ItemStack stack)
IChiselAndBitsAPIcreateBitItem in interface IChiselAndBitsAPIIBitAccess for an ItemStack.public IBitBrush createBrushFromState(net.minecraft.block.state.IBlockState state) throws APIExceptions.InvalidBitItem
IChiselAndBitsAPIcreateBrushFromState in interface IChiselAndBitsAPIAPIExceptions.InvalidBitItempublic net.minecraft.item.ItemStack getBitItem(net.minecraft.block.state.IBlockState state)
throws APIExceptions.InvalidBitItem
IChiselAndBitsAPIgetBitItem in interface IChiselAndBitsAPIAPIExceptions.InvalidBitItempublic void giveBitToPlayer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack stack,
net.minecraft.util.math.Vec3d spawnPos)
IChiselAndBitsAPIgiveBitToPlayer in interface IChiselAndBitsAPIplayer - player to give bits to.spawnPos - if null defaults to the players position, absolute position of
where to spawn bits, should be in the block near where they
are being extracted from.public IBitBag getBitbag(net.minecraft.item.ItemStack stack)
IChiselAndBitsAPIIItemHandler with a few extra features.getBitbag in interface IChiselAndBitsAPIpublic void beginUndoGroup(net.minecraft.entity.player.EntityPlayer player)
IChiselAndBitsAPIbeginUndoGroup in interface IChiselAndBitsAPIpublic void endUndoGroup(net.minecraft.entity.player.EntityPlayer player)
IChiselAndBitsAPIendUndoGroup in interface IChiselAndBitsAPIpublic net.minecraft.client.settings.KeyBinding getKeyBinding(ModKeyBinding modKeyBinding)
IChiselAndBitsAPIgetKeyBinding in interface IChiselAndBitsAPImodKeyBinding - the ModKeyBinding value that denotes the C&B key
binding to return.KeyBinding.public java.lang.Object getParameter(ParameterType which)
IChiselAndBitsAPIgetParameter in interface IChiselAndBitsAPIwhich - - refer to ParameterType for list of possible values.