Package tschipp.linear.api
Class LinearApi
java.lang.Object
tschipp.linear.api.LinearApi
Linear's API for other mods. Works the same on every loader; register during common setup, after
checking that Linear is loaded.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable HeldItemHandlerhandlerFor(net.minecraft.world.item.ItemStack held) static booleanisBuildingEnabled(net.minecraft.world.entity.player.Player player) Whether the player has building enabled.static booleanisDragging(net.minecraft.world.entity.player.Player player) Whether the player is dragging a line.static voidregisterHeldItem(HeldItemHandler handler) Lets a non-block item draw lines.static voidregisterSupply(BlockSupply supply) Adds a source of blocks besides the player's inventory.static List<BlockSupply> supplies()
-
Method Details
-
registerSupply
Adds a source of blocks besides the player's inventory. Supplies are asked in order. -
registerHeldItem
Lets a non-block item draw lines. The first matching handler is used. -
supplies
-
handlerFor
@Nullable public static @Nullable HeldItemHandler handlerFor(net.minecraft.world.item.ItemStack held) -
isBuildingEnabled
public static boolean isBuildingEnabled(net.minecraft.world.entity.player.Player player) Whether the player has building enabled. Works on the server and for the local player. -
isDragging
public static boolean isDragging(net.minecraft.world.entity.player.Player player) Whether the player is dragging a line. Client side, local player only.
-