Tofpu / SpeedBridge2

Undocumented method found JAVA-D1001
Documentation
Minor
9 months agoa year old
 50        world.setGameRuleValue("doDaylightCycle", "false");
 51    }
 52
 53    public @NotNull IslandLand justReservePlot(final GameIsland gameIsland) { 54        return justGetPlot(gameIsland.getIsland(), gameIsland); 55    } 56
 57    public @Nullable IslandLand reservePlot(final GameIsland gameIsland) {
 58        if (world == null) {
199        return new double[]{COUNTER.get(), 100, 100};
200    }
201
202    @NotNull203    private static String serializeVector(Vector vector) {204        return String.format("%s, %s, %s", vector.getX(), vector.getY(), vector.getZ());205    }206
207    public void resetWorld() {
208        final File worldFile = getWorldDirectory();
195        return islandLand;
196    }
197
198    public double[] getPositions() {199        return new double[]{COUNTER.get(), 100, 100};200    }201
202    @NotNull
203    private static String serializeVector(Vector vector) {
158        return islandLand;
159    }
160
161    private IslandLand createIslandPlot(final Collection<IslandLand> islandLandList162            , final Island target, final GameIsland gameIsland) {163        BridgeUtil.debug("SchematicManager#createIslandPlot: Creating a new island plot for " + target.getSlot() + " slot!");164165        final double[] positions = getPositions();166167        positions[0] += Math.abs(positions[0] - new IslandLand(target, world, positions).region().getMinimumPoint().getX());168169        BridgeUtil.debug("=== island " + target.getSlot() + " ===");170        BridgeUtil.debug("Placing schematic at: " + Arrays.toString(positions));171172        final IslandLand islandLand = getNewPlot(target, positions);173        BridgeUtil.debug("Island width is: " + islandLand.getWidth());174175        COUNTER.getAndAdd(islandLand.getWidth() + ConfigurationManager.INSTANCE.getGeneralCategory().getIslandSpaceGap());176177        BridgeUtil.debug("minimumPoint=" + serializeVector(islandLand.region().getMinimumPoint()));178        BridgeUtil.debug("maximumPoint=" + serializeVector(islandLand.region().getMaximumPoint()));179        BridgeUtil.debug("==========");180181        // reserving the plot to player182        islandLand.reserveWith(gameIsland);183        try {184            // attempt to generate the plot185            islandLand.generatePlot();186        } catch (WorldEditException e) {187            throw new IllegalStateException(e);188        }189190        // adding the plot for usability191        islandLandList.add(islandLand);192193        // adding the new island plot to the schematic plot map194        ISLAND_PLOTS.put(target.getSlot(), islandLandList);195        return islandLand;196    }197
198    public double[] getPositions() {
199        return new double[]{COUNTER.get(), 100, 100};
127        return new IslandLand(target, world, positions);
128    }
129
130    private IslandLand createIslandPlotWithNoGeneration(final Collection<IslandLand> islandLandList131            , final Island target, final GameIsland gameIsland) {132        BridgeUtil.debug("SchematicManager#createIslandPlot: Creating a new island plot for " + target.getSlot() + " slot!");133134        final double[] positions = getPositions();135136        positions[0] += Math.abs(positions[0] - new IslandLand(target, world, positions).region().getMinimumPoint().getX());137138        BridgeUtil.debug("=== island " + target.getSlot() + " ===");139        BridgeUtil.debug("Placing schematic at: " + Arrays.toString(positions));140141        final IslandLand islandLand = getNewPlot(target, positions);142        BridgeUtil.debug("Island width is: " + islandLand.getWidth());143144        COUNTER.getAndAdd(islandLand.getWidth() + ConfigurationManager.INSTANCE.getGeneralCategory().getIslandSpaceGap());145146        BridgeUtil.debug("minimumPoint=" + serializeVector(islandLand.region().getMinimumPoint()));147        BridgeUtil.debug("maximumPoint=" + serializeVector(islandLand.region().getMaximumPoint()));148        BridgeUtil.debug("==========");149150        // reserving the plot to player151        islandLand.reserveWith(gameIsland);152153        // adding the plot for usability154        islandLandList.add(islandLand);155156        // adding the new island plot to the schematic plot map157        ISLAND_PLOTS.put(target.getSlot(), islandLandList);158        return islandLand;159    }160
161    private IslandLand createIslandPlot(final Collection<IslandLand> islandLandList
162            , final Island target, final GameIsland gameIsland) {