Merge pull request #579 from PrismarineJS/1.13

1.13 support
This commit is contained in:
Romain Beaumont 2018-08-26 01:26:29 +02:00 committed by GitHub
commit 91b1c87463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 22 deletions

View file

@ -32,7 +32,7 @@
"devDependencies": {
"espower-loader": "^1.0.0",
"intelli-espower-loader": "^1.0.0",
"minecraft-wrap": "^1.0.0",
"minecraft-wrap": "^1.2.0",
"mocha": "^5.0.5",
"power-assert": "^1.0.0",
"require-self": "^0.2.1",
@ -44,7 +44,7 @@
"endian-toggle": "^0.0.0",
"lodash.get": "^4.1.2",
"lodash.merge": "^4.3.0",
"minecraft-data": "^2.26.0",
"minecraft-data": "^2.27.0",
"node-rsa": "^0.4.2",
"prismarine-nbt": "^1.2.0",
"protodef": "^1.6.7",

View file

@ -2,5 +2,5 @@
module.exports = {
defaultVersion: '1.12.2',
supportedVersions: ['1.7', '1.8', '1.9', '1.10', '1.11.2', '1.12.2', '17w50a']
supportedVersions: ['1.7', '1.8', '1.9', '1.10', '1.11.2', '1.12.2', '1.13']
}

View file

@ -13,6 +13,25 @@ function evalCount (count, fields) {
return count['default']
}
const slotValue = {
blockId: 5,
itemCount: 56,
itemDamage: 2,
nbtData: {
type: 'compound',
name: 'test',
value: {
test1: {type: 'int', value: 4},
test2: {type: 'long', value: [12, 42]},
test3: {type: 'byteArray', value: [32]},
test4: {type: 'string', value: 'ohi'},
test5: {type: 'list', value: {type: 'int', value: [4]}},
test6: {type: 'compound', value: {test: {type: 'int', value: 4}}},
test7: {type: 'intArray', value: [12, 42]}
}
}
}
const values = {
'i32': 123456,
'i16': -123,
@ -61,24 +80,7 @@ const values = {
'bool': true,
'f64': 99999.2222,
'f32': -333.444,
'slot': {
blockId: 5,
itemCount: 56,
itemDamage: 2,
nbtData: {
type: 'compound',
name: 'test',
value: {
test1: {type: 'int', value: 4},
test2: {type: 'long', value: [12, 42]},
test3: {type: 'byteArray', value: [32]},
test4: {type: 'string', value: 'ohi'},
test5: {type: 'list', value: {type: 'int', value: [4]}},
test6: {type: 'compound', value: {test: {type: 'int', value: 4}}},
test7: {type: 'intArray', value: [12, 42]}
}
}
},
'slot': slotValue,
'nbt': {
type: 'compound',
name: 'test',
@ -156,7 +158,9 @@ const values = {
})
return results
},
'tags': [{'tagName': 'hi', 'entries': [1, 2, 3, 4, 5]}]
'tags': [{'tagName': 'hi', 'entries': [1, 2, 3, 4, 5]}],
'ingredient': [slotValue],
'particleData': null
}
function getValue (_type, packet) {