minecraft-data
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -0,1 +1,6 @@ | ||
## 0.1.1 | ||
* some new wiki extractors : beginning of work for blocks, entities | ||
* fix some recipes | ||
* add entities.json file | ||
## 0.1.0 | ||
@@ -2,0 +7,0 @@ * add json schemas to check the enums schemas |
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "recipes", | ||
"description":"A dictionary of quoted numerical item IDs. Each ID maps to a list of recipes. There may be multiple different recipes per item (same ID and meta). The recipes may not be sorted.", | ||
"definitions": { | ||
"id": {"type":["integer","null"]}, | ||
"id": { | ||
"type":["integer","null"], | ||
"description":"A single numerical ID or null." | ||
}, | ||
"metadata": {"type":"integer"}, | ||
"amount": {"type":"integer"}, | ||
"item":{ | ||
"id_meta_array":{ | ||
"type":"array", | ||
"title":"[id,meta]", | ||
"description":"A list of id and meta. This is preferred if there are many items at once, e.g. in a shape.", | ||
"items":[ | ||
{"$ref" : "#/definitions/id"}, | ||
{"$ref" : "#/definitions/metadata"} | ||
], | ||
"additionalItems": false | ||
}, | ||
"id_meta_amount_object":{ | ||
"type":"object", | ||
"title":"{id:1,meta:1,amount:1}", | ||
"description":"A dictionary of at least id, optionally meta and amount. This is preferred if there are not many items at once, e.g. result in a recipe.", | ||
"properties":{ | ||
"id":{"$ref" : "#/definitions/id"}, | ||
"meta":{"$ref" : "#/definitions/metadata"}, | ||
"amount":{"$ref" : "#/definitions/amount"} | ||
}, | ||
"required": ["id"], | ||
"additionalProperties":false | ||
}, | ||
"recipeItem":{ | ||
"title":"recipe item", | ||
"description":"An item can be represented different ways.", | ||
"oneOf":[ | ||
{"$ref" : "#/definitions/id"}, | ||
{ | ||
"type":"array", | ||
"items":[ | ||
{"$ref" : "#/definitions/id"}, | ||
{"$ref" : "#/definitions/metadata"} | ||
], | ||
"additionalItems": false | ||
}, | ||
{ | ||
"type":"object", | ||
"properties":{ | ||
"id":{"$ref" : "#/definitions/id"}, | ||
"meta":{"$ref" : "#/definitions/metadata"}, | ||
"amount":{"$ref" : "#/definitions/amount"} | ||
}, | ||
"required": ["id"], | ||
"additionalProperties":false | ||
} | ||
{"$ref": "#/definitions/id_meta_array"}, | ||
{"$ref": "#/definitions/id_meta_amount_object"} | ||
] | ||
}, | ||
"shapeRow":{ | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 3, | ||
"items": {"$ref" : "#/definitions/recipeItem"} | ||
}, | ||
"shape": { | ||
"type": "array", | ||
"description":"A shape is a list of rows, which are lists of items. There must be at least one row with at least one item in it. All rows must have the same length. Empty rows at the beginning or end of a shape may be omitted. Empty colums at the end may also be omitted. When an item can be crafted in a 2x2 grid, the shape may not be larger than 2x2.", | ||
"minItems": 1, | ||
"maxItems": 3, | ||
"items": { | ||
"type": "array", | ||
"minItems": 1, | ||
"maxItems": 3, | ||
"items": {"$ref" : "#/definitions/item"} | ||
} | ||
"items": {"$ref" : "#/definitions/shapeRow"} | ||
}, | ||
@@ -46,8 +61,10 @@ "ingredients": { | ||
"minItems": 1, | ||
"items": {"$ref" : "#/definitions/item"} | ||
"items": {"$ref" : "#/definitions/recipeItem"} | ||
}, | ||
"shaped_recipe": { | ||
"title":"shaped recipe", | ||
"description":"A shaped recipe is a dictionary of result, inShape and optionally outShape", | ||
"type": "object", | ||
"properties": { | ||
"result":{"$ref" : "#/definitions/item"}, | ||
"result":{"$ref" : "#/definitions/recipeItem"}, | ||
"inShape":{"$ref" : "#/definitions/shape"}, | ||
@@ -60,5 +77,7 @@ "outShape":{"$ref" : "#/definitions/shape"} | ||
"shapeless_recipe": { | ||
"title":"shapeless recipe", | ||
"description":"A shapeless recipe is a dictionary of result and ingredients", | ||
"type": "object", | ||
"properties": { | ||
"result":{"$ref" : "#/definitions/item"}, | ||
"result":{"$ref" : "#/definitions/recipeItem"}, | ||
"ingredients":{"$ref" : "#/definitions/ingredients"} | ||
@@ -65,0 +84,0 @@ }, |
@@ -1383,15 +1383,15 @@ { | ||
[ | ||
55, | ||
55, | ||
55 | ||
331, | ||
331, | ||
331 | ||
], | ||
[ | ||
55, | ||
55, | ||
55 | ||
331, | ||
331, | ||
331 | ||
], | ||
[ | ||
55, | ||
55, | ||
55 | ||
331, | ||
331, | ||
331 | ||
] | ||
@@ -3512,3 +3512,3 @@ ], | ||
"result": { | ||
"amount": 2, | ||
"amount": 8, | ||
"id": 387, | ||
@@ -3515,0 +3515,0 @@ "meta": 0 |
{ | ||
"name": "minecraft-data", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "provide minecraft data for minecraft clients, servers and libraries", | ||
@@ -16,4 +16,6 @@ "main": "index.js", | ||
"jsonschema": "~1.0.1", | ||
"mocha": "~2.2.1" | ||
"mocha": "~2.2.1", | ||
"nodemw": "~0.4.2", | ||
"underscore" : "~1.8.2" | ||
} | ||
} |
@@ -8,3 +8,3 @@ var assert = require('assert'); | ||
var enums=["biomes","instruments","items","materials","blocks","recipes"]; | ||
var enums=["biomes","instruments","items","materials","blocks","recipes","entities"]; | ||
@@ -11,0 +11,0 @@ describe("minecraft-data", function() { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221670
45
9191
4
12