removed deprecated use of old DimensionType constructor and updated map file paths accordingly
This commit is contained in:
1 parent
7734b225eb
commit
26eff149d4
78 files changed
+17
-8
No files matched your search
+2
-1
@@ -26,6 +26,7 @@ import net.minestom.server.item.ItemStack;
|
||||
import net.minestom.server.item.Material;
|
||||
import net.minestom.server.timer.ExecutionType;
|
||||
import net.minestom.server.timer.TaskSchedule;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -41,7 +42,7 @@ public class Bedwars extends StatelessGame {
|
||||
|
||||
public Bedwars() throws IOException {
|
||||
super(Dimension.OVERWORLD.key, "Bedwars", new LastWinsScore());
|
||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("bedwars/test")));
|
||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("bedwars/test"), DimensionType.OVERWORLD.key()));
|
||||
|
||||
Configuration config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(Resource.GAME_MAP.getPath().resolve("bedwars/test/config.yml").toFile());
|
||||
List<String> teamNames = config.getStringList("setup.teams");
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@ import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.player.PlayerMoveEvent;
|
||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||
import net.minestom.server.instance.block.Block;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@@ -23,7 +24,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
public class BoatRace extends StatelessGame {
|
||||
public BoatRace() {
|
||||
super(Dimension.OVERWORLD.key, "boatRace", new FirstWinsScore());
|
||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("boatRace/woodlandMansion")));
|
||||
this.setChunkLoader(new AnvilLoader(Resource.GAME_MAP.getPath().resolve("boatRace/woodlandMansion"), DimensionType.OVERWORLD.key()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,8 +12,7 @@ import net.minestom.server.event.player.PlayerBlockBreakEvent;
|
||||
import net.minestom.server.event.player.PlayerBlockInteractEvent;
|
||||
import net.minestom.server.event.player.PlayerBlockPlaceEvent;
|
||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
|
||||
public class Hub extends MineNetInstance implements Spawnable {
|
||||
public static final Hub INSTANCE = new Hub();
|
||||
@@ -21,7 +20,7 @@ public class Hub extends MineNetInstance implements Spawnable {
|
||||
static {
|
||||
MinecraftServer.getInstanceManager().registerInstance(INSTANCE);
|
||||
|
||||
INSTANCE.setChunkLoader(new AnvilLoader(Resource.HUB_MAP.getPath()));
|
||||
INSTANCE.setChunkLoader(new AnvilLoader(Resource.HUB_MAP.getPath(), DimensionType.OVERWORLD.key()));
|
||||
|
||||
INSTANCE.eventNode()
|
||||
.addListener(PlayerBlockBreakEvent.class, CommonEventHandles::cancel)
|
||||
@@ -33,7 +32,6 @@ public class Hub extends MineNetInstance implements Spawnable {
|
||||
|
||||
private Hub() {
|
||||
super(Dimension.THE_END.key);
|
||||
this.setChunkLoader(new AnvilLoader(Path.of("maps/hub")));
|
||||
|
||||
this.setTime(18000);
|
||||
this.defaultClock().pause();
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.player.PlayerBlockBreakEvent;
|
||||
import net.minestom.server.event.player.PlayerDisconnectEvent;
|
||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
@@ -102,7 +103,7 @@ public class Room extends MineNetInstance implements Spawnable {
|
||||
|
||||
private void construct() {
|
||||
MinecraftServer.getInstanceManager().registerInstance(this);
|
||||
this.setChunkLoader(new AnvilLoader(Resource.LOBBY_MAP.getPath()));
|
||||
this.setChunkLoader(new AnvilLoader(Resource.LOBBY_MAP.getPath(), DimensionType.OVERWORLD.key()));
|
||||
|
||||
this.gameSelector = new GameSelector();
|
||||
this.gameSelector.setInstance(this, new Pos(0.5, 50, 19.5));
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minestom.server.entity.GameMode;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.event.player.PlayerMoveEvent;
|
||||
import net.minestom.server.instance.anvil.AnvilLoader;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@@ -29,7 +30,7 @@ public class TournamentDisplay extends MineNetInstance implements Spawnable {
|
||||
|
||||
public TournamentDisplay(Tournament tournament) {
|
||||
super(Dimension.OVERWORLD.key);
|
||||
this.setChunkLoader(new AnvilLoader(Resource.RESULT_DISPLAY.getPath()));
|
||||
this.setChunkLoader(new AnvilLoader(Resource.RESULT_DISPLAY.getPath(), DimensionType.OVERWORLD.key()));
|
||||
this.places = tournament.getPlaces();
|
||||
this.tournament = tournament;
|
||||
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user