mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 23:52:11 -07:00
Fixes
This commit is contained in:
@@ -38,12 +38,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ java.net.SocketAddress bindAddress;
|
+ java.net.SocketAddress bindAddress;
|
||||||
+ if (this.getLocalIp().startsWith("unix:")) {
|
+ if (this.getLocalIp().startsWith("unix:")) {
|
||||||
+ if (!io.netty.channel.epoll.Epoll.isAvailable()) {
|
+ if (!io.netty.channel.epoll.Epoll.isAvailable()) {
|
||||||
+ DedicatedServer.LOGGER.fatal("**** INVALID CONFIGURATION!");
|
+ DedicatedServer.LOGGER.error("**** INVALID CONFIGURATION!");
|
||||||
+ DedicatedServer.LOGGER.fatal("You are trying to use a Unix domain socket but you're not on a supported OS.");
|
+ DedicatedServer.LOGGER.error("You are trying to use a Unix domain socket but you're not on a supported OS.");
|
||||||
+ return false;
|
+ return false;
|
||||||
+ } else if (!com.destroystokyo.paper.PaperConfig.velocitySupport && !org.spigotmc.SpigotConfig.bungee) {
|
+ } else if (!com.destroystokyo.paper.PaperConfig.velocitySupport && !org.spigotmc.SpigotConfig.bungee) {
|
||||||
+ DedicatedServer.LOGGER.fatal("**** INVALID CONFIGURATION!");
|
+ DedicatedServer.LOGGER.error("**** INVALID CONFIGURATION!");
|
||||||
+ DedicatedServer.LOGGER.fatal("Unix domain sockets require IPs to be forwarded from a proxy.");
|
+ DedicatedServer.LOGGER.error("Unix domain sockets require IPs to be forwarded from a proxy.");
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ bindAddress = new io.netty.channel.unix.DomainSocketAddress(this.getLocalIp().substring("unix:".length()));
|
+ bindAddress = new io.netty.channel.unix.DomainSocketAddress(this.getLocalIp().substring("unix:".length()));
|
||||||
|
@@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
Preconditions.checkArgument(velocity != null, "velocity");
|
Preconditions.checkArgument(velocity != null, "velocity");
|
||||||
velocity.checkFinite();
|
velocity.checkFinite();
|
||||||
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
+ // Paper start - Warn server owners when plugins try to set super high velocities
|
||||||
+ if (!(this instanceof org.bukkit.entity.Projectile) && isUnsafeVelocity(velocity)) {
|
+ if (!(this instanceof org.bukkit.entity.Projectile || this instanceof org.bukkit.entity.Minecart) && isUnsafeVelocity(velocity)) {
|
||||||
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
+ CraftServer.excessiveVelEx = new Exception("Excessive velocity set detected: tried to set velocity of entity " + entity.getScoreboardName() + " id #" + getEntityId() + " to (" + velocity.getX() + "," + velocity.getY() + "," + velocity.getZ() + ").");
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
@@ -15,14 +15,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start - add cause
|
+ // Paper start - add cause
|
||||||
+ @Deprecated
|
+ @Deprecated
|
||||||
public CompletableFuture<Void> reloadResources(Collection<String> dataPacks) {
|
public CompletableFuture<Void> reloadResources(Collection<String> dataPacks) {
|
||||||
- RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
|
|
||||||
+ return this.reloadResources(dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN);
|
+ return this.reloadResources(dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN);
|
||||||
+ }
|
+ }
|
||||||
+ public CompletableFuture<Void> reloadResources(Collection<String> dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause) {
|
+ public CompletableFuture<Void> reloadResources(Collection<String> dataPacks, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause cause) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
|
||||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||||
PackRepository resourcepackrepository = this.packRepository;
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.packRepository.setSelected(dataPacks);
|
this.packRepository.setSelected(dataPacks);
|
||||||
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
|
||||||
|
@@ -1581,11 +1581,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
PalettedContainer<Holder<Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
|
PalettedContainer<Holder<Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
|
||||||
|
|
||||||
Registry<Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
Registry<Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
||||||
+<<<<<<< HEAD
|
- Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS));
|
||||||
Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS));
|
|
||||||
+=======
|
|
||||||
+ Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes
|
+ Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes
|
||||||
+>>>>>>> Anti-Xray
|
|
||||||
|
|
||||||
for (int i = 0; i < cs.length; i++) {
|
for (int i = 0; i < cs.length; i++) {
|
||||||
CompoundTag data = new CompoundTag();
|
CompoundTag data = new CompoundTag();
|
||||||
@@ -1593,12 +1590,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
empty[i] = true;
|
empty[i] = true;
|
||||||
|
|
||||||
if (biome != null) {
|
if (biome != null) {
|
||||||
+<<<<<<< HEAD
|
- biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||||
biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
+ biome[i] = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes
|
||||||
+=======
|
|
||||||
+ Registry<Biome> iregistry = world.getHandle().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
|
||||||
+ biome[i] = new PalettedContainer<>(iregistry, iregistry.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes
|
|
||||||
+>>>>>>> Anti-Xray
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,16 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
boolean[] sectionEmpty = new boolean[cs.length];
|
boolean[] sectionEmpty = new boolean[cs.length];
|
||||||
PalettedContainer<Holder<Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
|
PalettedContainer<Holder<Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
|
||||||
|
|
||||||
+<<<<<<< HEAD
|
- Registry<Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
||||||
Registry<Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY);
|
- Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes
|
||||||
<<<<<<< HEAD
|
-
|
||||||
Codec<PalettedContainer<Holder<Biome>>> biomeCodec = PalettedContainer.codec(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS));
|
|
||||||
=======
|
|
||||||
Codec<PalettedContainer<Biome>> biomeCodec = PalettedContainer.codec(iregistry, iregistry.byNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS), null); // Paper - Anti-Xray - Add preset biomes
|
|
||||||
>>>>>>> Anti-Xray
|
|
||||||
+=======
|
|
||||||
+>>>>>>> Fix ChunkSnapshot#isSectionEmpty(int) and optimize PalettedContainer copying by not using codecs
|
|
||||||
|
|
||||||
for (int i = 0; i < cs.length; i++) {
|
for (int i = 0; i < cs.length; i++) {
|
||||||
- CompoundTag data = new CompoundTag();
|
- CompoundTag data = new CompoundTag();
|
||||||
|
|
||||||
|
@@ -297,7 +297,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper start - fix and optimise world upgrading
|
+ // Paper start - fix and optimise world upgrading
|
||||||
+ if (options.has("forceUpgrade")) {
|
+ if (options.has("forceUpgrade")) {
|
||||||
+ net.minecraft.server.Main.convertWorldButItWorks(
|
+ net.minecraft.server.Main.convertWorldButItWorks(
|
||||||
+ dimensionKey, Level.getDimensionKey(dimensionmanager), worldSession, DataFixers.getDataFixer(), chunkgenerator.getTypeNameForDataFixer(), options.has("eraseCache")
|
+ dimensionKey, Level.getDimensionKey(holder.value()), worldSession, DataFixers.getDataFixer(), chunkgenerator.getTypeNameForDataFixer(), options.has("eraseCache")
|
||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - fix and optimise world upgrading
|
+ // Paper end - fix and optimise world upgrading
|
||||||
|
@@ -964,8 +964,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean canStandOnFluid(final FluidState state, final FlowingFluid fluid) {
|
+ public boolean canStandOnFluid(final FluidState state, final FluidState fluidState) {
|
||||||
+ return this.getDelegate().canStandOnFluid(state, fluid);
|
+ return this.getDelegate().canStandOnFluid(state, fluidState);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ public static void ensureTickThread(final String reason) {
|
+ public static void ensureTickThread(final String reason) {
|
||||||
+ if (!Bukkit.isPrimaryThread()) {
|
+ if (!Bukkit.isPrimaryThread()) {
|
||||||
+ MinecraftServer.LOGGER.fatal("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable());
|
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable());
|
||||||
+ throw new IllegalStateException(reason);
|
+ throw new IllegalStateException(reason);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Reference in New Issue
Block a user