mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9861)
This commit is contained in:
parent
5abcfb3d6b
commit
3a4d982c0f
19 changed files with 171 additions and 61 deletions
|
@ -100,7 +100,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
-
|
||||
+ this.logger = com.destroystokyo.paper.utils.PaperPluginLogger.getLogger(description); // Paper - Register logger early
|
||||
// Paper start
|
||||
this.dependencyContext = dependencyContext;
|
||||
|
|
|
@ -503,8 +503,8 @@ diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/P
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -0,0 +0,0 @@ public enum Particle {
|
||||
return dataType;
|
||||
@@ -0,0 +0,0 @@ public enum Particle implements Keyed {
|
||||
return key;
|
||||
}
|
||||
|
||||
+ // Paper start - Particle API expansion
|
||||
|
@ -518,6 +518,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return new com.destroystokyo.paper.ParticleBuilder(this);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Options which can be applied to redstone dust particles - a particle
|
||||
* color and size.
|
||||
|
|
|
@ -108,8 +108,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
* @param name Name of the world that will be created
|
||||
*/
|
||||
public WorldCreator(@NotNull String name) {
|
||||
- if (name == null) {
|
||||
- throw new IllegalArgumentException("World name cannot be null");
|
||||
- Preconditions.checkArgument(name != null, "World name cannot be null");
|
||||
+ // Paper start
|
||||
+ this(name, getWorldKey(name));
|
||||
+ }
|
||||
|
@ -124,7 +123,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return NamespacedKey.minecraft("the_end");
|
||||
+ } else {
|
||||
+ return NamespacedKey.minecraft(name.toLowerCase(java.util.Locale.ENGLISH).replace(" ", "_"));
|
||||
}
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- this.name = name;
|
||||
|
|
|
@ -132,10 +132,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
*
|
||||
* @param namespace namespace
|
||||
* @param key key
|
||||
- * @deprecated should never be used by plugins, for internal use only!!
|
||||
- * @apiNote should never be used by plugins, for internal use only!!
|
||||
+ * @see #NamespacedKey(Plugin, String)
|
||||
*/
|
||||
- @Deprecated
|
||||
- @ApiStatus.Internal
|
||||
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
|
||||
Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
||||
Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
||||
|
@ -155,6 +155,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public enum NetherWartsState {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -0,0 +0,0 @@ public enum Particle implements Keyed {
|
||||
BLOCK_CRACK("block", BlockData.class),
|
||||
/**
|
||||
* Uses {@link BlockData} as DataType
|
||||
+ * @deprecated use {@link #BLOCK_CRACK}
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
BLOCK_DUST("block", BlockData.class, false),
|
||||
WATER_DROP("rain"),
|
||||
MOB_APPEARANCE("elder_guardian"),
|
||||
@@ -0,0 +0,0 @@ public enum Particle implements Keyed {
|
||||
// ----- Legacy Separator -----
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_BLOCK_CRACK(null, MaterialData.class, false),
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_BLOCK_DUST(null, MaterialData.class, false),
|
||||
/**
|
||||
* Uses {@link MaterialData} as DataType
|
||||
+ * @deprecated {@link MaterialData} is deprecated API
|
||||
*/
|
||||
+ @Deprecated // Paper
|
||||
LEGACY_FALLING_DUST(null, MaterialData.class, false);
|
||||
|
||||
private final NamespacedKey key;
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
|
|
|
@ -74,25 +74,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
* @param z Z-coordinate (0-15)
|
||||
* @return temperature at given coordinate
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -0,0 +0,0 @@ public enum Particle {
|
||||
SCRAPE,
|
||||
SONIC_BOOM,
|
||||
SCULK_SOUL,
|
||||
+ /**
|
||||
+ * Uses {@link Float} as DataType, representing the angle the particle displays at in radians
|
||||
+ */
|
||||
SCULK_CHARGE(Float.class),
|
||||
SCULK_CHARGE_POP,
|
||||
+ /**
|
||||
+ * Uses {@link Integer} as DataType, representing the delay in ticks until the particle shows up
|
||||
+ */
|
||||
SHRIEK(Integer.class),
|
||||
CHERRY_LEAVES,
|
||||
EGG_CRACK,
|
||||
diff --git a/src/main/java/org/bukkit/RegionAccessor.java b/src/main/java/org/bukkit/RegionAccessor.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/RegionAccessor.java
|
||||
|
|
|
@ -2130,14 +2130,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
||||
+
|
||||
+ // Paper start
|
||||
+ this.dependencyContext = dependencyContext;
|
||||
+ this.classLoaderGroup = io.papermc.paper.plugin.provider.classloader.PaperClassLoaderStorage.instance().registerSpigotGroup(this);
|
||||
+ // Paper end
|
||||
+
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
jarClass = Class.forName(description.getMain(), true, this);
|
||||
@@ -0,0 +0,0 @@ final class PluginClassLoader extends URLClassLoader {
|
||||
return findResources(name);
|
||||
}
|
||||
|
|
|
@ -12,17 +12,63 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private boolean generateStructures = true;
|
||||
private String generatorSettings = "";
|
||||
private boolean hardcore = false;
|
||||
- private boolean keepSpawnInMemory = true;
|
||||
+ private net.kyori.adventure.util.TriState keepSpawnLoaded = net.kyori.adventure.util.TriState.NOT_SET; // Paper
|
||||
|
||||
/**
|
||||
* Creates an empty WorldCreationOptions for the given world name
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
type = world.getWorldType();
|
||||
generateStructures = world.canGenerateStructures();
|
||||
hardcore = world.isHardcore();
|
||||
- keepSpawnInMemory = world.getKeepSpawnInMemory();
|
||||
+ this.keepSpawnLoaded = net.kyori.adventure.util.TriState.byBoolean(world.getKeepSpawnInMemory()); // Paper
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
generateStructures = creator.generateStructures();
|
||||
generatorSettings = creator.generatorSettings();
|
||||
hardcore = creator.hardcore();
|
||||
- keepSpawnInMemory = creator.keepSpawnInMemory();
|
||||
+ keepSpawnLoaded = creator.keepSpawnLoaded(); // Paper
|
||||
|
||||
return this;
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
*
|
||||
* @param keepSpawnInMemory Whether the spawn chunks will be kept loaded
|
||||
* @return This object, for chaining
|
||||
+ * @deprecated use {@link #keepSpawnLoaded(net.kyori.adventure.util.TriState)}
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public WorldCreator keepSpawnInMemory(boolean keepSpawnInMemory) {
|
||||
- this.keepSpawnInMemory = keepSpawnInMemory;
|
||||
-
|
||||
- return this;
|
||||
+ return this.keepSpawnLoaded(net.kyori.adventure.util.TriState.byBoolean(keepSpawnInMemory)); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether or not the spawn chunks will be kept loaded.
|
||||
*
|
||||
* @return True if the spawn chunks will be kept loaded
|
||||
+ * @deprecated use {@link #keepSpawnLoaded()}
|
||||
*/
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public boolean keepSpawnInMemory() {
|
||||
- return keepSpawnInMemory;
|
||||
+ return this.keepSpawnLoaded() == net.kyori.adventure.util.TriState.TRUE; // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public class WorldCreator {
|
||||
|
||||
return result;
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
+
|
||||
+ // Paper start - keep spawn loaded tristate
|
||||
+ /**
|
||||
+ * Returns the current intent to keep the world loaded, @see {@link WorldCreator#keepSpawnLoaded(net.kyori.adventure.util.TriState)}
|
||||
+ *
|
||||
|
@ -42,10 +88,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ */
|
||||
+ @NotNull
|
||||
+ public WorldCreator keepSpawnLoaded(@NotNull net.kyori.adventure.util.TriState keepSpawnLoaded) {
|
||||
+ java.util.Objects.requireNonNull(keepSpawnLoaded, "keepSpawnLoaded");
|
||||
+ Preconditions.checkArgument(keepSpawnLoaded != null, "keepSpawnLoaded");
|
||||
+ this.keepSpawnLoaded = keepSpawnLoaded;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ // Paper end
|
||||
+ // Paper end - keep spawn loaded tristate
|
||||
}
|
||||
|
|
|
@ -1550,9 +1550,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private final int z;
|
||||
- private static final PalettedContainer<net.minecraft.world.level.block.state.BlockState> emptyBlockIDs = new PalettedContainer<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES);
|
||||
+ private static final PalettedContainer<net.minecraft.world.level.block.state.BlockState> emptyBlockIDs = new PalettedContainer<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES, null); // Paper - Anti-Xray - Add preset block states
|
||||
private static final byte[] emptyLight = new byte[2048];
|
||||
private static final byte[] FULL_LIGHT = new byte[2048];
|
||||
private static final byte[] EMPTY_LIGHT = new byte[2048];
|
||||
|
||||
public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
|
|
|
@ -148,7 +148,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
|
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Paper start - Particle API Expansion
|
||||
+ return sendParticles(players, sender, t0, d0, d1, d2, i, d3, d4, d5, d6, force);
|
||||
+ }
|
||||
+ public <T extends ParticleOptions> int sendParticles(List<ServerPlayer> receivers, ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
+ public <T extends ParticleOptions> int sendParticles(List<ServerPlayer> receivers, @Nullable ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
+ // Paper end
|
||||
ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(t0, force, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
|
||||
// CraftBukkit end
|
||||
|
@ -41,19 +41,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@Override
|
||||
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
|
||||
- if (data != null) {
|
||||
+ // Paper start - Particle API Expansion
|
||||
+ spawnParticle(particle, null, null, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, force);
|
||||
+ }
|
||||
+ @Override
|
||||
+ public <T> void spawnParticle(Particle particle, List<Player> receivers, Player sender, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
|
||||
+ // Paper end
|
||||
+ if (data != null && !particle.getDataType().isInstance(data)) {
|
||||
particle = CraftParticle.convertLegacy(particle);
|
||||
data = CraftParticle.convertLegacy(data);
|
||||
if (data != null) {
|
||||
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
|
||||
}
|
||||
this.getHandle().sendParticles(
|
||||
- null, // Sender
|
||||
+ receivers == null ? getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API Expansion
|
||||
+ sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API Expansion
|
||||
CraftParticle.toNMS(particle, data), // Particle
|
||||
CraftParticle.createParticleParam(particle, data), // Particle
|
||||
x, y, z, // Position
|
||||
count, // Count
|
||||
|
|
|
@ -4,19 +4,6 @@ Date: Fri, 20 Oct 2023 19:50:22 +0200
|
|||
Subject: [PATCH] Fix NPE in SculkBloomEvent world access
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SculkSpreader.java
|
||||
@@ -0,0 +0,0 @@ public class SculkSpreader {
|
||||
private final int additionalDecayRate;
|
||||
private List<SculkSpreader.ChargeCursor> cursors = new ArrayList();
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
- Level level; // CraftBukkit
|
||||
+ public Level level; // CraftBukkit // Paper - package-private -> public
|
||||
|
||||
public SculkSpreader(boolean worldGen, TagKey<Block> replaceableTag, int extraBlockChance, int maxDistance, int spreadChance, int decayChance) {
|
||||
this.isWorldGeneration = worldGen;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
|
@ -47,3 +34,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
public CatalystListener(BlockState state, PositionSource positionSource) {
|
||||
this.blockState = state;
|
||||
this.positionSource = positionSource;
|
||||
this.sculkSpreader = SculkSpreader.createLevelSpreader();
|
||||
- this.sculkSpreader.level = this.level; // CraftBukkit
|
||||
+ // this.sculkSpreader.level = this.level; // CraftBukkit // Paper - bad fix
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (data != null) {
|
||||
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
|
||||
}
|
||||
- ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.toNMS(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count);
|
||||
+ ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.toNMS(particle, data), true, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); // Paper - Fix x/y/z coordinate precision loss
|
||||
- ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.createParticleParam(particle, data), true, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count);
|
||||
+ ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.createParticleParam(particle, data), true, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count); // Paper - Fix x/y/z coordinate precision loss
|
||||
this.getHandle().connection.send(packetplayoutworldparticles);
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
||||
|
|
|
@ -88,6 +88,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
private LootContextParamSet paramSet;
|
||||
private Optional<ResourceLocation> randomSequence;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftParticle<D> implements Keyed {
|
||||
private static final BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> VOID_FUNCTION = (name, particle) -> new CraftParticle<>(name, particle, Void.class) {
|
||||
@Override
|
||||
public ParticleOptions createParticleParam(Void data) {
|
||||
- return (SimpleParticleType) CraftParticle.this.getHandle();
|
||||
+ return (SimpleParticleType) this.getHandle(); // Paper - fix?
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftParticle<D> implements Keyed {
|
||||
BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> itemStackFunction = (name, particle) -> new CraftParticle<>(name, particle, ItemStack.class) {
|
||||
@Override
|
||||
public ParticleOptions createParticleParam(ItemStack data) {
|
||||
- return new ItemParticleOption((net.minecraft.core.particles.ParticleType<ItemParticleOption>) CraftParticle.this.getHandle(), CraftItemStack.asNMSCopy(data));
|
||||
+ return new ItemParticleOption((net.minecraft.core.particles.ParticleType<ItemParticleOption>) this.getHandle(), CraftItemStack.asNMSCopy(data)); // Paper - fix?
|
||||
}
|
||||
};
|
||||
|
||||
BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> blockDataFunction = (name, particle) -> new CraftParticle<>(name, particle, BlockData.class) {
|
||||
@Override
|
||||
public ParticleOptions createParticleParam(BlockData data) {
|
||||
- return new BlockParticleOption((net.minecraft.core.particles.ParticleType<BlockParticleOption>) CraftParticle.this.getHandle(), ((CraftBlockData) data).getState());
|
||||
+ return new BlockParticleOption((net.minecraft.core.particles.ParticleType<BlockParticleOption>) this.getHandle(), ((CraftBlockData) data).getState()); // Paper - fix?
|
||||
}
|
||||
};
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/DyeColorsTest.java
|
||||
|
@ -118,6 +148,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
assertThat(color, is(Color.fromRGB(nmsColor)));
|
||||
}
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/ParticleTest.java
|
||||
+++ b/src/test/java/org/bukkit/ParticleTest.java
|
||||
@@ -0,0 +0,0 @@ public class ParticleTest extends AbstractTestingBase {
|
||||
Check in CraftParticle if the conversion is still correct.
|
||||
""", bukkit.getKey()));
|
||||
|
||||
- DataResult<Tag> encoded = assertDoesNotThrow(() -> minecraft.codec().encodeStart(DynamicOpsNBT.INSTANCE, particleParam),
|
||||
+ DataResult<Tag> encoded = assertDoesNotThrow(() -> minecraft.codec().encodeStart(NbtOps.INSTANCE, particleParam), // Paper - remap fix
|
||||
String.format("""
|
||||
Could not encoded particle param for particle %s.
|
||||
This can indicated, that the wrong particle param is created in CraftParticle.
|
||||
diff --git a/src/test/java/org/bukkit/RegistryConstantsTest.java b/src/test/java/org/bukkit/RegistryConstantsTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/RegistryConstantsTest.java
|
||||
|
|
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -7);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
|
|
@ -8,6 +8,15 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/ja
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
||||
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
|
||||
worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, this.console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider);
|
||||
- internal.keepSpawnInMemory = creator.keepSpawnInMemory();
|
||||
+ // internal.keepSpawnInMemory = creator.keepSpawnInMemory(); // Paper - replace
|
||||
|
||||
if (!(this.worlds.containsKey(name.toLowerCase(java.util.Locale.ENGLISH)))) {
|
||||
return null;
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
internal.setSpawnSettings(true, true);
|
||||
// Paper - move up
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 897a0a238bc989f9ca89613f0ee413254bd1106b
|
||||
Subproject commit 5010ed00d3f83b7c7acbf4c1b16f7c89f309eb9a
|
|
@ -1 +1 @@
|
|||
Subproject commit 71b0135cc7986690f2e0950dbcf679271e894245
|
||||
Subproject commit 75502b6ddcae5aa84b7e97fd02d2e1551afddebc
|
|
@ -1 +1 @@
|
|||
Subproject commit e0e223fe5197272feb12eba337cfbbc567316a84
|
||||
Subproject commit dba3cdc33be9abb98bb8d13b612b33b18a812db6
|
Loading…
Reference in a new issue