From 96d84ed2fa5bb20e29bec7acc4e4495c25f059d4 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Wed, 25 Jun 2014 16:17:26 -0400 Subject: [PATCH] Fixed Json Schema The schema incorrectly listed the array of children in LinkData as an Array of numbers, not an array of objects with properties. --- .../mod_pocketDim/blocks/IDimDoor.java | 23 +++++++++++++++++++ .../mod_pocketDim/blocks/TransTrapdoor.java | 1 - .../dimdoors/text/Dim_Data_Schema_v1-0-0.json | 22 +++++++++++++++--- .../text/Dim_Data_Schema_v982405775.json | 22 +++++++++++++++--- 4 files changed, 61 insertions(+), 7 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java index 9701b15b..942af4ed 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/IDimDoor.java @@ -6,14 +6,37 @@ import net.minecraft.world.World; public interface IDimDoor { + /** + * A function to enter a dim door and traverse its link, called when a player collides with an open door + * @param world + * @param x + * @param y + * @param z + * @param entity + */ public void enterDimDoor(World world, int x, int y, int z, Entity entity); + /** + * called when a door is placed to determine how it will place a link + * @param world + * @param x + * @param y + * @param z + */ public void placeLink(World world, int x, int y, int z); public int getDrops(); public TileEntity initDoorTE(World world, int x, int y, int z); + /** + * checks if any of this doors blocks are overlapping with a rift + * @param world + * @param x + * @param y + * @param z + * @return + */ public boolean isDoorOnRift(World world, int x, int y, int z); } diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/TransTrapdoor.java b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/TransTrapdoor.java index 52a0e9ed..5d864f0f 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/blocks/TransTrapdoor.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/blocks/TransTrapdoor.java @@ -97,7 +97,6 @@ public class TransTrapdoor extends BlockTrapDoor implements IDimDoor, ITileEntit { if (!world.isRemote && isTrapdoorOpen(world.getBlockMetadata(x, y, z))) { - DimLink link = PocketManager.getLink(x, y, z, world); if (link != null) { diff --git a/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v1-0-0.json b/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v1-0-0.json index cd2d416a..c08afe06 100644 --- a/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v1-0-0.json +++ b/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v1-0-0.json @@ -64,10 +64,26 @@ "type": "object", "properties": { "children": { - "type": "array", + "type":"array", "items":{ - "type": "number" - } + "type": "object", + "properties":{ + "x": { + "type": "integer" + }, + "y": { + "type": "integer" + }, + "z": { + "type": "integer" + } + }, + "required": [ + "x", + "y", + "z" + ] + } }, "orientation": { "type": "number" diff --git a/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v982405775.json b/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v982405775.json index 84d8cd3a..2fa616d3 100644 --- a/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v982405775.json +++ b/src/main/resources/assets/dimdoors/text/Dim_Data_Schema_v982405775.json @@ -64,10 +64,26 @@ "type": "object", "properties": { "children": { - "type": "array", + "type":"array", "items":{ - "type": "number" - } + "type": "object", + "properties":{ + "x": { + "type": "integer" + }, + "y": { + "type": "integer" + }, + "z": { + "type": "integer" + } + }, + "required": [ + "x", + "y", + "z" + ] + } }, "orientation": { "type": "number"