From 80541eafc3f5a415b95cd057afea5e8b9141cfe5 Mon Sep 17 00:00:00 2001 From: OLEGSHA Date: Thu, 5 Aug 2021 19:39:39 +0300 Subject: [PATCH] Renamed BlockFace contexts into TileStack contexts --- .../common/world/context/TileDataContext.java | 2 +- .../common/world/context/TileDataContextRO.java | 2 +- ...eDataContext.java => TileStackDataContext.java} | 8 ++++---- ...aContextRO.java => TileStackDataContextRO.java} | 6 +++--- .../generic/context/TileGenericContextRO.java | 2 +- .../generic/context/TileGenericContextWO.java | 2 +- ...ntextRO.java => TileStackGenericContextRO.java} | 2 +- ...ntextWO.java => TileStackGenericContextWO.java} | 2 +- .../world/generic/context/WorldContexts.java | 2 +- .../server/world/context/ServerTileContext.java | 4 ++-- .../server/world/context/ServerTileContextRO.java | 4 ++-- ...aceContext.java => ServerTileStackContext.java} | 10 +++++----- ...ontextRO.java => ServerTileStackContextRO.java} | 12 ++++++------ .../world/context/impl/ReusableServerContext.java | 14 +++----------- 14 files changed, 32 insertions(+), 40 deletions(-) rename src/main/java/ru/windcorp/progressia/common/world/context/{BlockFaceDataContext.java => TileStackDataContext.java} (82%) rename src/main/java/ru/windcorp/progressia/common/world/context/{BlockFaceDataContextRO.java => TileStackDataContextRO.java} (84%) rename src/main/java/ru/windcorp/progressia/common/world/generic/context/{BlockFaceGenericContextRO.java => TileStackGenericContextRO.java} (98%) rename src/main/java/ru/windcorp/progressia/common/world/generic/context/{BlockFaceGenericContextWO.java => TileStackGenericContextWO.java} (98%) rename src/main/java/ru/windcorp/progressia/server/world/context/{ServerBlockFaceContext.java => ServerTileStackContext.java} (73%) rename src/main/java/ru/windcorp/progressia/server/world/context/{ServerBlockFaceContextRO.java => ServerTileStackContextRO.java} (73%) diff --git a/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContext.java b/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContext.java index 3f4a0d6..78538c4 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContext.java +++ b/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContext.java @@ -24,7 +24,7 @@ import ru.windcorp.progressia.common.world.tile.TileData; public interface TileDataContext extends TileGenericContextWO, - BlockFaceDataContext, + TileStackDataContext, TileDataContextRO { // currently empty diff --git a/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContextRO.java b/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContextRO.java index e143e03..e9f2d41 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContextRO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/context/TileDataContextRO.java @@ -24,7 +24,7 @@ import ru.windcorp.progressia.common.world.tile.TileData; public interface TileDataContextRO extends TileGenericContextRO, - BlockFaceDataContextRO { + TileStackDataContextRO { // currently empty diff --git a/src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContext.java b/src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContext.java similarity index 82% rename from src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContext.java rename to src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContext.java index b12c36c..12ded3c 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContext.java +++ b/src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContext.java @@ -19,13 +19,13 @@ package ru.windcorp.progressia.common.world.context; import ru.windcorp.progressia.common.world.block.BlockData; import ru.windcorp.progressia.common.world.entity.EntityData; -import ru.windcorp.progressia.common.world.generic.context.BlockFaceGenericContextWO; +import ru.windcorp.progressia.common.world.generic.context.TileStackGenericContextWO; import ru.windcorp.progressia.common.world.tile.TileData; -public interface BlockFaceDataContext - extends BlockFaceGenericContextWO, +public interface TileStackDataContext + extends TileStackGenericContextWO, BlockDataContext, - BlockFaceDataContextRO { + TileStackDataContextRO { // currently empty diff --git a/src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContextRO.java b/src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContextRO.java similarity index 84% rename from src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContextRO.java rename to src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContextRO.java index a20355a..1e3a46d 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/context/BlockFaceDataContextRO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/context/TileStackDataContextRO.java @@ -19,11 +19,11 @@ package ru.windcorp.progressia.common.world.context; import ru.windcorp.progressia.common.world.block.BlockData; import ru.windcorp.progressia.common.world.entity.EntityData; -import ru.windcorp.progressia.common.world.generic.context.BlockFaceGenericContextRO; +import ru.windcorp.progressia.common.world.generic.context.TileStackGenericContextRO; import ru.windcorp.progressia.common.world.tile.TileData; -public interface BlockFaceDataContextRO - extends BlockFaceGenericContextRO, +public interface TileStackDataContextRO + extends TileStackGenericContextRO, BlockDataContext { // currently empty diff --git a/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextRO.java b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextRO.java index daf7fb8..bdc5b69 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextRO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextRO.java @@ -30,7 +30,7 @@ public interface TileGenericContextRO< B extends BlockGeneric, T extends TileGeneric, E extends EntityGeneric -> extends WorldContexts.Tile, BlockFaceGenericContextRO { +> extends WorldContexts.Tile, TileStackGenericContextRO { //@formatter:on /** diff --git a/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextWO.java b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextWO.java index 4c2b4dd..ae8a2ff 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextWO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileGenericContextWO.java @@ -32,7 +32,7 @@ public interface TileGenericContextWO< B extends BlockGeneric, T extends TileGeneric, E extends EntityGeneric -> extends WorldContexts.Tile, BlockFaceGenericContextWO { +> extends WorldContexts.Tile, TileStackGenericContextWO { //@formatter:on /** diff --git a/src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextRO.java b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextRO.java similarity index 98% rename from src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextRO.java rename to src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextRO.java index 0ca350a..082788b 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextRO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextRO.java @@ -26,7 +26,7 @@ import ru.windcorp.progressia.common.world.generic.*; * not actually exist. */ //@formatter:off -public interface BlockFaceGenericContextRO< +public interface TileStackGenericContextRO< B extends BlockGeneric, T extends TileGeneric, E extends EntityGeneric diff --git a/src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextWO.java b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextWO.java similarity index 98% rename from src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextWO.java rename to src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextWO.java index dd6c5ad..28c87ee 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/generic/context/BlockFaceGenericContextWO.java +++ b/src/main/java/ru/windcorp/progressia/common/world/generic/context/TileStackGenericContextWO.java @@ -28,7 +28,7 @@ import ru.windcorp.progressia.common.world.generic.*; * stack may or may not actually exist. */ //@formatter:off -public interface BlockFaceGenericContextWO< +public interface TileStackGenericContextWO< B extends BlockGeneric, T extends TileGeneric, E extends EntityGeneric diff --git a/src/main/java/ru/windcorp/progressia/common/world/generic/context/WorldContexts.java b/src/main/java/ru/windcorp/progressia/common/world/generic/context/WorldContexts.java index 69c5f94..4dd8c19 100644 --- a/src/main/java/ru/windcorp/progressia/common/world/generic/context/WorldContexts.java +++ b/src/main/java/ru/windcorp/progressia/common/world/generic/context/WorldContexts.java @@ -78,7 +78,7 @@ class WorldContexts { /** * A {@link Context} with a world instance, a block location and a block face * (block side). This interface should not be implemented directly; see - * {@link BlockFaceGenericContextRO} or {@link BlockFaceGenericContextWO}. + * {@link TileStackGenericContextRO} or {@link TileStackGenericContextWO}. * * @author javapony * diff --git a/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContext.java b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContext.java index 7682287..bc5fe6c 100644 --- a/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContext.java +++ b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContext.java @@ -19,9 +19,9 @@ package ru.windcorp.progressia.server.world.context; import ru.windcorp.progressia.common.world.context.TileDataContext; -public interface ServerTileContext extends TileDataContext, ServerBlockFaceContext, ServerTileContextRO { +public interface ServerTileContext extends TileDataContext, ServerTileStackContext, ServerTileContextRO { - public interface Logic extends ServerTileContextRO.Logic, ServerBlockFaceContext.Logic { + public interface Logic extends ServerTileContextRO.Logic, ServerTileStackContext.Logic { @Override ServerTileContext data(); diff --git a/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContextRO.java b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContextRO.java index b5a42df..87faf0c 100644 --- a/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContextRO.java +++ b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileContextRO.java @@ -23,10 +23,10 @@ import ru.windcorp.progressia.common.world.generic.context.TileGenericContextRO; import ru.windcorp.progressia.server.world.block.BlockLogic; import ru.windcorp.progressia.server.world.tile.TileLogic; -public interface ServerTileContextRO extends ServerBlockFaceContextRO, TileDataContextRO { +public interface ServerTileContextRO extends ServerTileStackContextRO, TileDataContextRO { public interface Logic - extends ServerBlockFaceContextRO.Logic, TileGenericContextRO { + extends ServerTileStackContextRO.Logic, TileGenericContextRO { @Override ServerTileContextRO data(); diff --git a/src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContext.java b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContext.java similarity index 73% rename from src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContext.java rename to src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContext.java index 499408d..938271b 100644 --- a/src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContext.java +++ b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContext.java @@ -17,18 +17,18 @@ */ package ru.windcorp.progressia.server.world.context; -import ru.windcorp.progressia.common.world.context.BlockFaceDataContext; +import ru.windcorp.progressia.common.world.context.TileStackDataContext; -public interface ServerBlockFaceContext extends BlockFaceDataContext, ServerBlockContext, ServerBlockFaceContextRO { +public interface ServerTileStackContext extends TileStackDataContext, ServerBlockContext, ServerTileStackContextRO { - public interface Logic extends ServerBlockFaceContextRO.Logic, ServerBlockContext.Logic { + public interface Logic extends ServerTileStackContextRO.Logic, ServerBlockContext.Logic { @Override - ServerBlockFaceContext data(); + ServerTileStackContext data(); } @Override - ServerBlockFaceContext.Logic logic(); + ServerTileStackContext.Logic logic(); } diff --git a/src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContextRO.java b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContextRO.java similarity index 73% rename from src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContextRO.java rename to src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContextRO.java index b1a3f05..0b33933 100644 --- a/src/main/java/ru/windcorp/progressia/server/world/context/ServerBlockFaceContextRO.java +++ b/src/main/java/ru/windcorp/progressia/server/world/context/ServerTileStackContextRO.java @@ -17,23 +17,23 @@ */ package ru.windcorp.progressia.server.world.context; -import ru.windcorp.progressia.common.world.context.BlockFaceDataContextRO; +import ru.windcorp.progressia.common.world.context.TileStackDataContextRO; import ru.windcorp.progressia.common.world.entity.EntityData; -import ru.windcorp.progressia.common.world.generic.context.BlockFaceGenericContextRO; +import ru.windcorp.progressia.common.world.generic.context.TileStackGenericContextRO; import ru.windcorp.progressia.server.world.block.BlockLogic; import ru.windcorp.progressia.server.world.tile.TileLogic; -public interface ServerBlockFaceContextRO extends ServerBlockContextRO, BlockFaceDataContextRO { +public interface ServerTileStackContextRO extends ServerBlockContextRO, TileStackDataContextRO { public interface Logic - extends ServerBlockContextRO.Logic, BlockFaceGenericContextRO { + extends ServerBlockContextRO.Logic, TileStackGenericContextRO { @Override - ServerBlockFaceContextRO data(); + ServerTileStackContextRO data(); } @Override - ServerBlockFaceContextRO.Logic logic(); + ServerTileStackContextRO.Logic logic(); } diff --git a/src/main/java/ru/windcorp/progressia/server/world/context/impl/ReusableServerContext.java b/src/main/java/ru/windcorp/progressia/server/world/context/impl/ReusableServerContext.java index 6131776..345ff37 100644 --- a/src/main/java/ru/windcorp/progressia/server/world/context/impl/ReusableServerContext.java +++ b/src/main/java/ru/windcorp/progressia/server/world/context/impl/ReusableServerContext.java @@ -20,15 +20,7 @@ package ru.windcorp.progressia.server.world.context.impl; import ru.windcorp.progressia.common.world.context.Context; import ru.windcorp.progressia.server.world.WorldLogic; import ru.windcorp.progressia.server.world.WorldLogicRO; -import ru.windcorp.progressia.server.world.context.ServerBlockContext; -import ru.windcorp.progressia.server.world.context.ServerBlockContextRO; -import ru.windcorp.progressia.server.world.context.ServerBlockFaceContext; -import ru.windcorp.progressia.server.world.context.ServerBlockFaceContextRO; -import ru.windcorp.progressia.server.world.context.ServerContext; -import ru.windcorp.progressia.server.world.context.ServerTileContext; -import ru.windcorp.progressia.server.world.context.ServerTileContextRO; -import ru.windcorp.progressia.server.world.context.ServerWorldContext; -import ru.windcorp.progressia.server.world.context.ServerWorldContextRO; +import ru.windcorp.progressia.server.world.context.*; /** * An implementation of the entire {@link ServerContext} tree. The objects of @@ -75,8 +67,8 @@ public abstract class ReusableServerContext implements ServerTileContext { */ LOCATION, /** - * This object conforms to {@link ServerBlockFaceContext} or - * {@link ServerBlockFaceContextRO}. + * This object conforms to {@link ServerTileStackContext} or + * {@link ServerTileStackContextRO}. */ TILE_STACK, /**