mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Expand InventoryOrder for 10 bit blocks
This commit is contained in:
parent
8010538a05
commit
e5d6b53832
@ -425,7 +425,7 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
|
|
||||||
case "order":
|
case "order":
|
||||||
int order = 0;
|
int order = 0;
|
||||||
if (!CommandParser.GetInt(p, value, "Inventory order", ref order, 1, 255)) {
|
if (!CommandParser.GetInt(p, value, "Inventory order", ref order, 1, Block.MaxRaw)) {
|
||||||
SendEditHelp(p, arg); return;
|
SendEditHelp(p, arg); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,10 +353,10 @@ namespace MCGalaxy.Network {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] SetInventoryOrder(BlockDefinition def, bool extBlocks) {
|
public static byte[] SetInventoryOrder(BlockDefinition def, bool extBlocks) {
|
||||||
byte[] buffer = new byte[extBlocks ? 4 : 3];
|
byte[] buffer = new byte[extBlocks ? 5 : 3];
|
||||||
buffer[0] = Opcode.CpeSetInventoryOrder;
|
buffer[0] = Opcode.CpeSetInventoryOrder;
|
||||||
NetUtils.WriteBlock(def.BlockID, buffer, 1, extBlocks);
|
NetUtils.WriteBlock(def.BlockID, buffer, 1, extBlocks);
|
||||||
buffer[extBlocks ? 3 : 2] = (byte)def.InventoryOrder;
|
NetUtils.WriteBlock((BlockID)def.InventoryOrder, buffer, extBlocks ? 3 : 2, extBlocks);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user