Documentation
¶
Index ¶
- Variables
- type Anvil
- type Beacon
- type BlastFurnace
- type BrewingStand
- type CartographyTable
- type Container
- type CraftingTable
- type EnchantmentTable
- type Furnace
- type Generic
- type Generic3x3
- type Generic9x1
- type Generic9x2
- type Generic9x3
- type Generic9x4
- type Generic9x5
- type Generic9x6
- type GenericInventory
- func (g *GenericInventory) FindItem(predicate func(item.Item) bool) item.Item
- func (g *GenericInventory) FindItemNth(nth int, predicate func(item.Item) bool) item.Item
- func (g *GenericInventory) FindItemNthPoint(nth int, predicate func(item.Item) bool, start, end int) item.Item
- func (g *GenericInventory) GetArmor() []item.Item
- func (g *GenericInventory) GetCraftingInput() []item.Item
- func (g *GenericInventory) GetCraftingOutput() item.Item
- func (g *GenericInventory) GetHotbar() []item.Item
- func (g *GenericInventory) GetInventory() []item.Item
- func (g *GenericInventory) GetItem(i int) item.Item
- func (g *GenericInventory) GetOffhand() item.Item
- func (g *GenericInventory) GetSize() int
- func (g *GenericInventory) GetSlot(i int) *slots.Slot
- func (g *GenericInventory) GetType() int
- func (g *GenericInventory) OnClose() error
- func (g *GenericInventory) SetSlot(i int, s *slots.Slot) error
- type Grindstone
- type Hopper
- type Loom
- type Merchant
- type ShulkerBox
- type SmithingTable
- type Smoker
- type Stonecutter
Constants ¶
This section is empty.
Variables ¶
View Source
var Containers = map[int]Container{ 0: new(GenericInventory), 1: NewGeneric9x1(), 2: NewGeneric9x2(), 3: NewGeneric9x3(), 4: NewGeneric9x4(), 5: NewGeneric9x5(), 6: NewGeneric9x6(), 7: NewGeneric3x3(), 8: NewAnvil(), 9: NewBeacon(), 10: NewBlastFurnace(), 11: NewBrewingStand(), 12: NewCraftingTable(), 13: NewEnchantmentTable(), 14: NewFurnace(), 15: NewGrindstone(), 16: NewHopper(), 17: InitGenericContainer("nil", 0, 0), 18: NewLoom(), 19: NewMerchant(), 20: NewShulkerBox(), 21: NewSmithingTable(), 22: NewSmoker(), 23: NewCartographyTable(), 24: NewStonecutter(), }
Functions ¶
This section is empty.
Types ¶
type BlastFurnace ¶
type BlastFurnace struct {
*Generic
}
func NewBlastFurnace ¶
func NewBlastFurnace() *BlastFurnace
type BrewingStand ¶
type BrewingStand struct {
*Generic
}
func NewBrewingStand ¶
func NewBrewingStand() *BrewingStand
type CartographyTable ¶
type CartographyTable struct {
*Generic
}
func NewCartographyTable ¶
func NewCartographyTable() *CartographyTable
type CraftingTable ¶
type CraftingTable struct {
*Generic
}
func NewCraftingTable ¶
func NewCraftingTable() *CraftingTable
type EnchantmentTable ¶
type EnchantmentTable struct {
*Generic
}
func NewEnchantmentTable ¶
func NewEnchantmentTable() *EnchantmentTable
type Generic ¶
type Generic struct { Name string // Name of the grid. Type int // Type is the int corresponding to the window type. Size int Data []*slots.Slot }
A Generic is a grid that can be used for any type of window. Generic is different from GenericInventory When you open a chest, the chest is a Generic, but the Generic has access to the player inventory, and places the items in the slots, either in the chest or in the player inventory. If index >= size, then the slot is in the player inventory. If index < size, then the slot is in the chest.
func InitGenericContainer ¶
type Generic3x3 ¶
type Generic3x3 struct {
*Generic
}
func NewGeneric3x3 ¶
func NewGeneric3x3() *Generic3x3
type Generic9x1 ¶
type Generic9x1 struct {
*Generic
}
func NewGeneric9x1 ¶
func NewGeneric9x1() *Generic9x1
type Generic9x2 ¶
type Generic9x2 struct {
*Generic
}
func NewGeneric9x2 ¶
func NewGeneric9x2() *Generic9x2
type Generic9x3 ¶
type Generic9x3 struct {
*Generic
}
func NewGeneric9x3 ¶
func NewGeneric9x3() *Generic9x3
type Generic9x4 ¶
type Generic9x4 struct {
*Generic
}
func NewGeneric9x4 ¶
func NewGeneric9x4() *Generic9x4
func NewGeneric9x5 ¶
func NewGeneric9x5() *Generic9x4
type Generic9x5 ¶
type Generic9x5 struct {
*Generic
}
type Generic9x6 ¶
type Generic9x6 struct {
*Generic
}
func NewGeneric9x6 ¶
func NewGeneric9x6() *Generic9x6
type GenericInventory ¶
func (*GenericInventory) FindItemNth ¶
func (*GenericInventory) FindItemNthPoint ¶
func (*GenericInventory) GetArmor ¶
func (g *GenericInventory) GetArmor() []item.Item
func (*GenericInventory) GetCraftingInput ¶
func (g *GenericInventory) GetCraftingInput() []item.Item
func (*GenericInventory) GetCraftingOutput ¶
func (g *GenericInventory) GetCraftingOutput() item.Item
func (*GenericInventory) GetHotbar ¶
func (g *GenericInventory) GetHotbar() []item.Item
func (*GenericInventory) GetInventory ¶
func (g *GenericInventory) GetInventory() []item.Item
func (*GenericInventory) GetOffhand ¶
func (g *GenericInventory) GetOffhand() item.Item
func (*GenericInventory) GetSize ¶
func (g *GenericInventory) GetSize() int
func (*GenericInventory) GetType ¶
func (g *GenericInventory) GetType() int
func (*GenericInventory) OnClose ¶
func (g *GenericInventory) OnClose() error
type Grindstone ¶
type Grindstone struct {
*Generic
}
func NewGrindstone ¶
func NewGrindstone() *Grindstone
type ShulkerBox ¶
type ShulkerBox struct {
*Generic
}
func NewShulkerBox ¶
func NewShulkerBox() *ShulkerBox
type SmithingTable ¶
type SmithingTable struct {
*Generic
}
func NewSmithingTable ¶
func NewSmithingTable() *SmithingTable
type Stonecutter ¶
type Stonecutter struct {
*Generic
}
func NewStonecutter ¶
func NewStonecutter() *Stonecutter
Click to show internal directories.
Click to hide internal directories.