your current location:首页 > news>Plethora peripherals mincraft game in the order of Plethora

Plethora peripherals mincraft game in the order of Plethora

2024-12-10 17:46:05|Myriagame |source:minecraft skins

-solve the problem of the items in the inventory of the inventory

-LUA code, copy the file execution

-The origin of the coordinate axis in the lower left corner

AllContainers = {

["Names"] = {

["EQUIPMENT"] = "Equipment",-All entities have equipment columns, only players have the last shadow box inventory, backpack inventory, jewelry bar

["Enderchest"] = "Ender",

["INventory"] = "Inventory",

["Baules"] = "baubles"

},

["Positing"] = {

["INventory"] = {

-4 x x x x x x x x

-3 x x x x x x x x

-2 x x x x x x x x

-1 x x x x x x x x

-1 2 3 4 5 6 7 8 9 ["all"] = 36,

["List"] = {

[1] = {

[1] = 1,

[2] = 2,

[3] = 3,

[4] = 4,

[5] = 5,

[6] = 6,

[7] = 7,

[8] = 8, [9] = 9,

},

[2] = {

[1] = 28,

[2] = 29,

[3] = 30,

[4] = 31,

[5] = 32,

[6] = 33,

[7] = 34,

[8] = 35, [9] = 36,

},

[3] = {

[1] = 19,

[2] = 20,

[3] = 21,

[4] = 22,

[5] = 23,

[6] = 24,

[7] = 25,

[8] = 26, [9] = 27,

},

[4] = {

[1] = 10,

[2] = 11,

[3] = 12,

[4] = 13,

[5] = 14,

[6] = 15,

[7] = 16,

[8] = 17, [9] = 18,

}

}

},

["Equipment"] = {

-6 x: hand_main

-5 x: hand_sub

-4 X: Feet

-3 x: legs

-2 x: Chest

-1 x: head

-1

["All"] = 6, ["list"] = {

[1] = 1,

["Hand_main"] = 1,

[2] = 2,

["Hand_sub"] = 2,

[3] = 3,

["Feet"] = 3,

[4] = 4,

["Legs"] = 4,

[5] = 5,

["Chest"] = 5,

[6] = 6, ["head"] = 6

}

},

["EnderChes"] = {

-3 x x x x x x x x

-2 x x x x x x x x

-1 x x x x x x x x

-1 2 3 4 5 6 7 8 9 9

["All"] = 27,

["List"] = {

[1] = {

[1] = 19, [2] = 20,

[3] = 21,

[4] = 22,

[5] = 23,

[6] = 24,

[7] = 25,

[8] = 26,

[9] = 27,

},

[2] = {

[1] = 10, [2] = 11,

[3] = 12,

[4] = 13,

[5] = 14,

[6] = 15,

[7] = 16,

[8] = 17,

[9] = 18,

},

[3] = {

[1] = 1, [2] = 2,

[3] = 3,

[4] = 4,

[5] = 5,

[6] = 6,

[7] = 7,

[8] = 8,

[9] = 9,

}

}

}, ["Baubles"] = {

["All"] = 7,

["List"] = {

[1] = 1,

[2] = 2,

[3] = 3,

[4] = 4,

[5] = 5,

[6] = 6,

[7] = 7

}

}

}

}

Code example

For example, throw 9 backpack libraries (y, x) with the following code, that is, the vertical number Y grid, and then the horizontal number X grid.

Install the nerve interface and the provincial module, first execute the code above, and then execute the code below.

 local manip = peripheral.find ("neuralInterface")-Get all operations

local inventory = manip.getinventory ()-Get backpack inventory

local pos = allContainers.positation.inventory.list-Get the location conversion table

Inventory.drop (POS [3] [5], 9)-y = 3, x = 5