Перейти к основному содержанию

LiquidRegistry

Index

Classes

Storage

Storage:

constructor

readonlyliquidAmounts
internal

liquidAmounts: {}

Type declaration

  • [key string]: number

readonlyliquidLimits
internal

liquidLimits: {}

Type declaration

  • [key string]: number

readonlytileEntity

tileEntity: TileEntity

_setContainerScale

  • _setContainerScale(container: Container, scale: string, liquid: string, val: number): void
  • internal

    Parameters

    • container: Container
    • scale: string
    • liquid: string
    • val: number

    Returns void

addLiquid

  • addLiquid(liquid: string, amount: number, onlyFullAmount?: boolean): number
  • Parameters

    • liquid: string
    • amount: number
    • optionalonlyFullAmount: boolean

    Returns number

getAmount

  • getAmount(liquid: string): number
  • Parameters

    • liquid: string

    Returns number

getLimit

  • getLimit(liquid: string): number
  • Parameters

    • liquid: string

    Returns number

getLiquid

  • getLiquid(liquid: string, amount: number, onlyFullAmount?: boolean): number
  • Parameters

    • liquid: string
    • amount: number
    • optionalonlyFullAmount: boolean

    Returns number

getLiquidStored

  • getLiquidStored(): string
  • Returns string

getParent

getRelativeAmount

  • getRelativeAmount(liquid: string): number
  • Parameters

    • liquid: string

    Returns number

hasDataFor

  • hasDataFor(liquid: string): boolean
  • Parameters

    • liquid: string

    Returns boolean

isEmpty

  • isEmpty(liquid?: string): boolean
  • Parameters

    • optionalliquid: string

    Returns boolean

isFull

  • isFull(liquid?: string): boolean
  • Parameters

    • optionalliquid: string

    Returns boolean

setAmount

  • setAmount(liquid: string, amount: number): void
  • Parameters

    • liquid: string
    • amount: number

    Returns void

setLimit

  • setLimit(liquid: string, limit: number): void
  • Parameters

    • liquid: string
    • limit: number

    Returns void

setParent

updateUiScale

  • updateUiScale(scale: string, liquid: string, container?: Container): void
  • Parameters

    • scale: string
    • liquid: string
    • optionalcontainer: Container

    Returns void

Interfaces

LiquidData

LiquidData:

blockId

blockId: number

key

key: string

modelTextures

modelTextures: string[]

name

name: string

staticBlockId

staticBlockId: number
@since

2.2.1b103

uiCache

uiCache: object

uiTextures

uiTextures: string[]

addModelTexture

  • addModelTexture(name: string): void
  • Parameters

    • name: string

    Returns void

addUITexture

  • addUITexture(name: string): void
  • Parameters

    • name: string

    Returns void

Variables

constLiquidByBlock
internal

LiquidByBlock: {}
@since

2.2.1b102


Type declaration

  • [blockId number]: string

constliquids
internal

liquids: {}

Type declaration

Functions

getBlockByLiquid

  • getBlockByLiquid(liquidId: string): number
  • getBlockByLiquid(liquidId: string, isStatic: boolean): number
  • @remarks

    This function will return 0 if no liquid with given string ID exists.

    @since

    2.2.1b102


    Parameters

    • liquidId: string

    Returns number

    Numeric ID of the liquid block by given LiquidRegistry string ID.

getEmptyItem

  • getEmptyItem(id: number, data: number): { data: number; id: number; liquid: string }
  • Parameters

    • id: number
    • data: number

    Returns { data: number; id: number; liquid: string }

    • data: number
    • id: number
    • liquid: string

getFullItem

  • getFullItem(id: number, data: number, liquid: string): { data: number; id: number }
  • Parameters

    • id: number
    • data: number
    • liquid: string

    Returns { data: number; id: number }

    • data: number
    • id: number

getItemLiquid

  • getItemLiquid(id: number, data: number): string
  • Parameters

    • id: number
    • data: number

    Returns string

getLiquidByBlock

  • getLiquidByBlock(id: number): Nullable<string>
  • @since

    2.2.1b102


    Parameters

    • id: number

    Returns Nullable<string>

    String ID of a liquid for given block, or null, if a block with given ID is not a liquid.

getLiquidData

getLiquidName

  • getLiquidName(key: string): string
  • Parameters

    • key: string

    Returns string

getLiquidUIBitmap

  • getLiquidUIBitmap(key: string, width: number, height: number): android.graphics.Bitmap
  • Parameters

    • key: string
    • width: number
    • height: number

    Returns android.graphics.Bitmap

getLiquidUITexture

  • getLiquidUITexture(key: string, width: number, height: number): string
  • Parameters

    • key: string
    • width: number
    • height: number

    Returns string

isExists

  • isExists(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

registerBlock

  • registerBlock(liquid: string, blockId: number, isDynamic: boolean): void
  • @since

    2.2.1b102


    Parameters

    • liquid: string
    • blockId: number
    • isDynamic: boolean

    Returns void

registerItem

  • registerItem(liquid: string, empty: { data: number; id: number }, full: { data: number; id: number }): void
  • Parameters

    • liquid: string
    • empty: { data: number; id: number }
      • data: number
      • id: number
    • full: { data: number; id: number }
      • data: number
      • id: number

    Returns void

registerLiquid

  • registerLiquid(key: string, name?: string, uiTextures?: string[], modelTextures?: string[]): void
  • Parameters

    • key: string
    • optionalname: string
    • optionaluiTextures: string[]
    • optionalmodelTextures: string[]

    Returns void