minecraft-data 2.100.0 → 2.103.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data.js CHANGED
@@ -1037,7 +1037,7 @@ module.exports =
1037
1037
  '1.18': {
1038
1038
  get blocks () { return require("./minecraft-data/data/pc/1.18/blocks.json") },
1039
1039
  get blockCollisionShapes () { return require("./minecraft-data/data/pc/1.17/blockCollisionShapes.json") },
1040
- get biomes () { return require("./minecraft-data/data/pc/1.17/biomes.json") },
1040
+ get biomes () { return require("./minecraft-data/data/pc/1.18/biomes.json") },
1041
1041
  get effects () { return require("./minecraft-data/data/pc/1.17/effects.json") },
1042
1042
  get items () { return require("./minecraft-data/data/pc/1.18/items.json") },
1043
1043
  get enchantments () { return require("./minecraft-data/data/pc/1.17/enchantments.json") },
@@ -1053,7 +1053,7 @@ module.exports =
1053
1053
  get particles () { return require("./minecraft-data/data/pc/1.18/particles.json") },
1054
1054
  get blockLoot () { return require("./minecraft-data/data/pc/1.18/blockLoot.json") },
1055
1055
  get entityLoot () { return require("./minecraft-data/data/pc/1.18/entityLoot.json") },
1056
- get loginPacket () { return require("./minecraft-data/data/pc/1.17/loginPacket.json") },
1056
+ get loginPacket () { return require("./minecraft-data/data/pc/1.18/loginPacket.json") },
1057
1057
  get tints () { return require("./minecraft-data/data/pc/1.17/tints.json") },
1058
1058
  get mapIcons () { return require("./minecraft-data/data/pc/1.16/mapIcons.json") }
1059
1059
  }
package/doc/api.md CHANGED
@@ -216,6 +216,20 @@ effects indexed by name
216
216
 
217
217
  unindexed effects
218
218
 
219
+ ## Attributes
220
+
221
+ ### minecraft-data.attributes
222
+
223
+ attributes indexed by resource name (generic.movementSpeed || minecraft:generic.movement_speed)
224
+
225
+ ### minecraft-data.attributesByName
226
+
227
+ attributes indexed by minecraft-data name (movementSpeed)
228
+
229
+ ### minecraft-data.attributesArray
230
+
231
+ unindexed attributes
232
+
219
233
  ## Particles
220
234
 
221
235
  ### minecraft-data.particles
package/doc/history.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 2.103.0
2
+ * update mcdata
3
+
4
+ ## 2.102.0
5
+ * update mcdata
6
+
7
+ ## 2.101.0
8
+ * update mcdata
9
+
10
+ ## 2.100.1
11
+ * add attribute support (@U5B)
12
+ *
1
13
  ## 2.100.0
2
14
  * update mcdata
3
15
 
package/example.js CHANGED
@@ -47,3 +47,8 @@ console.log(require('minecraft-data')('1.16.1').loginPacket)
47
47
  console.log(require('minecraft-data')('1.16.4').mapIconsByName.player)
48
48
 
49
49
  console.log(require('minecraft-data').legacy.pc.blocks['0:0'])
50
+
51
+ console.log(require('minecraft-data')('1.15.2').attributes['generic.movementSpeed'])
52
+ console.log(require('minecraft-data')('1.16').attributes['minecraft:generic.movement_speed'])
53
+ console.log(require('minecraft-data')('1.15.2').attributesByName.movementSpeed)
54
+ console.log(require('minecraft-data')('1.16').attributesByName.movementSpeed)
package/index.d.ts CHANGED
@@ -905,6 +905,10 @@ declare namespace MinecraftData {
905
905
  effectsByName: { [name: string]: Effect; };
906
906
  effectsArray: Effect[];
907
907
 
908
+ attributes: { [resource: string]: string; };
909
+ attributesByName: { [name: string]: string; };
910
+ attributesArray: [];
911
+
908
912
  version: Version;
909
913
 
910
914
  type: string;
package/lib/indexes.js CHANGED
@@ -43,6 +43,10 @@ module.exports = function (mcData) {
43
43
  entityLootByName: indexer.buildIndexFromArray(mcData.entityLoot, 'entity'),
44
44
 
45
45
  mapIconsById: indexer.buildIndexFromArray(mcData.mapIcons, 'id'),
46
- mapIconsByName: indexer.buildIndexFromArray(mcData.mapIcons, 'name')
46
+ mapIconsByName: indexer.buildIndexFromArray(mcData.mapIcons, 'name'),
47
+
48
+ attributesByName: indexer.buildIndexFromArray(mcData.attributes, 'name'),
49
+ attributesByResource: indexer.buildIndexFromArray(mcData.attributes, 'resource')
50
+
47
51
  }
48
52
  }
package/lib/loader.js CHANGED
@@ -58,6 +58,10 @@ function mcDataToNode (mcData) {
58
58
  effectsByName: indexes.effectsByName,
59
59
  effectsArray: mcData.effects,
60
60
 
61
+ attributes: indexes.attributesByResource,
62
+ attributesByName: indexes.attributesByName,
63
+ attributesArray: mcData.attributes,
64
+
61
65
  particles: indexes.particlesById,
62
66
  particlesByName: indexes.particlesByName,
63
67
  particlesArray: mcData.particles,
@@ -1036,7 +1036,7 @@
1036
1036
  "1.18": {
1037
1037
  "blocks": "pc/1.18",
1038
1038
  "blockCollisionShapes": "pc/1.17",
1039
- "biomes": "pc/1.17",
1039
+ "biomes": "pc/1.18",
1040
1040
  "effects": "pc/1.17",
1041
1041
  "items": "pc/1.18",
1042
1042
  "enchantments": "pc/1.17",
@@ -1052,7 +1052,7 @@
1052
1052
  "particles": "pc/1.18",
1053
1053
  "blockLoot": "pc/1.18",
1054
1054
  "entityLoot": "pc/1.18",
1055
- "loginPacket": "pc/1.17",
1055
+ "loginPacket": "pc/1.18",
1056
1056
  "tints": "pc/1.17",
1057
1057
  "mapIcons": "pc/1.16"
1058
1058
  }