mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
more patches done
This commit is contained in:
parent
c4ef2add48
commit
4664528315
@ -5,7 +5,7 @@ Subject: [PATCH] Add more line of sight methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 34a9b8248409c0d077049944e40b710d97455723..77577de113b1413ed1474850b4ef8e7fd0c07dd6 100644
|
||||
index 5f9daafea35f9763189e3436eaf20c975158e712..5810bcf92ddff080511dd07326769c8fef53d7b9 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -74,6 +74,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
@ -330,7 +330,7 @@ index 0000000000000000000000000000000000000000..edf8d0ae398f123ab25cb7954df07f60
|
||||
+ @NotNull <T extends Entity> T spawn(@NotNull Vector location, @NotNull Class<T> clazz, @Nullable Consumer<T> function, @NotNull CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException;
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/generator/ChunkGenerator.java b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
index 0667315e2bd10254aef59c2a6bcceee9d927b6d5..e96d8877f73de12a56a2b36e32381a0b48bce297 100644
|
||||
index 80fcd02e9cb5f432f21b1f68fd8266f296becaa0..41f4f9903369c85545d3ba00366c819371a536df 100644
|
||||
--- a/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
+++ b/src/main/java/org/bukkit/generator/ChunkGenerator.java
|
||||
@@ -343,6 +343,20 @@ public abstract class ChunkGenerator {
|
@ -104,7 +104,7 @@ index 0000000000000000000000000000000000000000..02ad04c41b9c3ec68b1dcdc22c538340
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 5ec72f013c6c94a6590e78e87d2f97e57176c6a1..a4fd6f6e51c478efa9b125d3878c246b5f762999 100644
|
||||
index 0521781a48d326c0a4a01b920188e9ce00b51ef0..ca64f6c0b3f89231a7d8a2bb08d732270831bd2d 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -51,6 +51,7 @@ import org.bukkit.util.CachedServerIcon;
|
||||
@ -115,7 +115,7 @@ index 5ec72f013c6c94a6590e78e87d2f97e57176c6a1..a4fd6f6e51c478efa9b125d3878c246b
|
||||
|
||||
/**
|
||||
* Represents the Bukkit core, for version and Server singleton handling
|
||||
@@ -86,7 +87,25 @@ public final class Bukkit {
|
||||
@@ -100,7 +101,25 @@ public final class Bukkit {
|
||||
}
|
||||
|
||||
Bukkit.server = server;
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 9778c18a2822b00d48134583de87ea281623427d..19d4a798427de2c78b62a92246d47607a050a11d 100644
|
||||
index 9778c18a2822b00d48134583de87ea281623427d..3d10012abdc43d4cf29f53a2271434991da798be 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -14,10 +14,9 @@ repositories {
|
||||
@ -21,7 +21,24 @@ index 9778c18a2822b00d48134583de87ea281623427d..19d4a798427de2c78b62a92246d47607
|
||||
implementation("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
// This includes junit transitively for whatever reason
|
||||
isTransitive = false
|
||||
@@ -74,10 +73,18 @@ relocation {
|
||||
@@ -41,6 +40,7 @@ tasks.jar {
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
||||
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
@@ -49,6 +49,8 @@ tasks.jar {
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
+ "Git-Branch" to gitBranch, // Paper
|
||||
+ "Git-Commit" to gitHash, // Paper
|
||||
)
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
||||
@@ -74,10 +76,18 @@ relocation {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index caf8a5d3797883b4dad64a9da6b566c92cf1c506..99ab6194dbcea67875c6cdf3f29bb41fff4a39b9 100644
|
||||
index 410c7fbc0a776c4a206cbdbdbd9a570af9b6a0c2..0889860f3de2a6ebd073638676f837c993805658 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,4 +1,6 @@
|
||||
@ -45,7 +45,7 @@ index caf8a5d3797883b4dad64a9da6b566c92cf1c506..99ab6194dbcea67875c6cdf3f29bb41f
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
}
|
||||
@@ -106,6 +116,45 @@ tasks.shadowJar {
|
||||
@@ -109,6 +119,45 @@ tasks.shadowJar {
|
||||
}
|
||||
}
|
||||
|
||||
@ -496,7 +496,7 @@ index 2d5494d2813b773e60ddba6790b750a9a08f21f8..7695bf44503f161523ea612ef8a884ae
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index 62c3c597732e6fb30ed5367d902ea8763507a6b8..b9a618eba86656289e20d051c3f0023ec93bb733 100644
|
||||
index 35c9b3e6c5a2d11b4dbd491b16647df105960d1a..cc0576e8e5e1dc77c22856f0f9c4376b6bf36677 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -30,6 +30,7 @@ public class CrashReport {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals
|
||||
MC-108513
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index d8ed734450a14ffeed6d7a42eed238645b0cb380..b1a8c0e6c07bcc3625e834592923da462977af5e 100644
|
||||
index 06878b0a9b57e3024179edea70e763a7893fbb95..a121c3bd970b65783bf7482e022ca3c170309d66 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -868,5 +868,10 @@ public class PaperWorldConfig {
|
||||
@@ -777,4 +777,9 @@ public class PaperWorldConfig {
|
||||
private void fixItemsMergingThroughWalls() {
|
||||
fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls);
|
||||
}
|
||||
@ -19,12 +19,11 @@ index d8ed734450a14ffeed6d7a42eed238645b0cb380..b1a8c0e6c07bcc3625e834592923da46
|
||||
+ fixInvulnerableEndCrystalExploit = getBoolean("unsupported-settings.fix-invulnerable-end-crystal-exploit", fixInvulnerableEndCrystalExploit);
|
||||
+ }
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
index 2c4c1fc2a2afe88864b72d86708a3ddb6a1f50a0..b643a2449e329560c936c0a06fb4cc494d0737a7 100644
|
||||
index 78b0456a3f9e3f66d467386c3e5f68d07adf1977..d8c4f36ae0e65c6d0398fac80c93b78646bdf6a4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
@@ -31,6 +31,7 @@ public class EndCrystal extends Entity {
|
||||
@@ -30,6 +30,7 @@ public class EndCrystal extends Entity {
|
||||
private static final EntityDataAccessor<Optional<BlockPos>> DATA_BEAM_TARGET = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.OPTIONAL_BLOCK_POS);
|
||||
private static final EntityDataAccessor<Boolean> DATA_SHOW_BOTTOM = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.BOOLEAN);
|
||||
public int time;
|
||||
@ -32,7 +31,7 @@ index 2c4c1fc2a2afe88864b72d86708a3ddb6a1f50a0..b643a2449e329560c936c0a06fb4cc49
|
||||
|
||||
public EndCrystal(EntityType<? extends EndCrystal> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -67,6 +68,17 @@ public class EndCrystal extends Entity {
|
||||
@@ -66,6 +67,17 @@ public class EndCrystal extends Entity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
@ -50,7 +49,7 @@ index 2c4c1fc2a2afe88864b72d86708a3ddb6a1f50a0..b643a2449e329560c936c0a06fb4cc49
|
||||
}
|
||||
|
||||
}
|
||||
@@ -78,6 +90,7 @@ public class EndCrystal extends Entity {
|
||||
@@ -77,6 +89,7 @@ public class EndCrystal extends Entity {
|
||||
}
|
||||
|
||||
nbt.putBoolean("ShowBottom", this.showsBottom());
|
||||
@ -58,7 +57,7 @@ index 2c4c1fc2a2afe88864b72d86708a3ddb6a1f50a0..b643a2449e329560c936c0a06fb4cc49
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,6 +102,7 @@ public class EndCrystal extends Entity {
|
||||
@@ -88,6 +101,7 @@ public class EndCrystal extends Entity {
|
||||
if (nbt.contains("ShowBottom", 1)) {
|
||||
this.setShowBottom(nbt.getBoolean("ShowBottom"));
|
||||
}
|
@ -11,12 +11,12 @@ Move the tick logic into the post tick, where portaling was
|
||||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5703949d5ffa56602418d40a85f2fa1827690254..4f1a57c24688d1ae537f5fd1c1649e035f20abfd 100644
|
||||
index 392b2745821077d4d3a99872a8b4d50da305c97c..9abbde2f0e8076c9986bc805abd2e71ba4a0af04 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -386,6 +386,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -355,6 +355,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
// Paper end - optimise entity tracking
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - make end portalling safe
|
||||
+ public BlockPos portalBlock;
|
||||
@ -35,7 +35,7 @@ index 5703949d5ffa56602418d40a85f2fa1827690254..4f1a57c24688d1ae537f5fd1c1649e03
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ResourceKey<Level> resourcekey = world.getTypeKey() == DimensionType.END_LOCATION ? Level.OVERWORLD : Level.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends
|
||||
+ ResourceKey<Level> resourcekey = world.getTypeKey() == LevelStem.END ? Level.OVERWORLD : Level.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends
|
||||
+ ServerLevel worldserver = world.getServer().getLevel(resourcekey);
|
||||
+
|
||||
+ org.bukkit.event.entity.EntityPortalEnterEvent event = new org.bukkit.event.entity.EntityPortalEnterEvent(this.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
||||
@ -52,7 +52,7 @@ index 5703949d5ffa56602418d40a85f2fa1827690254..4f1a57c24688d1ae537f5fd1c1649e03
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
this.passengers = ImmutableList.of();
|
||||
@@ -2537,6 +2568,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -2492,6 +2523,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
this.processPortalCooldown();
|
||||
@ -61,7 +61,7 @@ index 5703949d5ffa56602418d40a85f2fa1827690254..4f1a57c24688d1ae537f5fd1c1649e03
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index 739c9c3a49fd3893ac39962a02a5e3620dc4fe06..62c2f947a77570228dfdf4dae16c64eb97ee2f40 100644
|
||||
index b8305112c759ecb62ef9ad972e57ff85ceff20dc..19892cb3cb290add4f094dc87bb22106e4f07a24 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -53,16 +53,10 @@ public class EndPortalBlock extends BaseEntityBlock {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
|
||||
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
index 4e06bb1fbda33e79044ac54758b559f7436882a7..86528ff031014e788d72a8bf7c1c9443512096bb 100644
|
||||
index c8857376cdeecea8fa53ca5fe3bb1f32d51d9a8e..46d0003a9c912af522575b7d0c9665e8ce36cf25 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java
|
||||
@@ -70,11 +70,43 @@ public class MobSpawnSettings {
|
||||
@@ -60,11 +60,43 @@ public class MobSpawnSettings {
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
@ -54,4 +54,4 @@ index 4e06bb1fbda33e79044ac54758b559f7436882a7..86528ff031014e788d72a8bf7c1c9443
|
||||
+ // Paper end
|
||||
private final Map<EntityType<?>, MobSpawnSettings.MobSpawnCost> mobSpawnCosts = Maps.newLinkedHashMap();
|
||||
private float creatureGenerationProbability = 0.1F;
|
||||
private boolean playerCanSpawn;
|
||||
|
@ -5,12 +5,12 @@ Subject: [PATCH] Make item validations configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 247c172c3b722cb1b753fd92839ab427233d7a13..939744ef6850d4e59e5c94bc4781d045041b977d 100644
|
||||
index 1a7f2074de8938b59c06d3a891265c574e3899dc..ce2cc249439d525d2089302f3febde758aa96929 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -510,4 +510,19 @@ public class PaperConfig {
|
||||
enableBrigadierConsoleHighlighting = getBoolean("settings.console.enable-brigadier-highlighting", enableBrigadierConsoleHighlighting);
|
||||
enableBrigadierConsoleCompletions = getBoolean("settings.console.enable-brigadier-completions", enableBrigadierConsoleCompletions);
|
||||
@@ -492,4 +492,19 @@ public class PaperConfig {
|
||||
config.set("settings.unsupported-settings.allow-headless-pistons-readme", "This setting controls if players should be able to create headless pistons.");
|
||||
allowHeadlessPistons = getBoolean("settings.unsupported-settings.allow-headless-pistons", false);
|
||||
}
|
||||
+
|
||||
+ public static int itemValidationDisplayNameLength = 8192;
|
||||
@ -56,7 +56,7 @@ index 0f753f4868141ecc383877ea3a666a383f2e3339..ebb643fc0477409d1efb4e9af5967504
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 808eb6b9ec535b1179a1d7b88877c9ce1755c45b..c88ab49f60857d5687facc8523f9edc4d652c81b 100644
|
||||
index bfede0c5dac43e063d465e386a080d2ffb89eb6f..fcd61bcf69518047fec7d838207e7d36e477f9c7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -357,18 +357,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b84e20cd955fd75582a2c52f0c571d54ead555b2..a60d289f3cf3826ac5368f3de77584fb63bf5e64 100644
|
||||
index 7fb05333ffb052373af613f52bafd0684c39c1af..4c0c2bc9fae878304eab1c18b5ef0cae1b780cfd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3430,7 +3430,8 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3433,7 +3433,8 @@ public abstract class LivingEntity extends Entity {
|
||||
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
||||
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
|
||||
|
||||
@ -19,7 +19,7 @@ index b84e20cd955fd75582a2c52f0c571d54ead555b2..a60d289f3cf3826ac5368f3de77584fb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 483ca752016c0d5e669b462396e50e83b66d3ef1..6a4c379a2905455b14c3cbd4a46a0f95c5f78aac 100644
|
||||
index ddaf83de1392c631e7c7a8aa13a8a2e02d2ec04d..67fccf65437d791d4008542b250301b2c1f45da8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -188,6 +188,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -42,7 +42,7 @@ index 483ca752016c0d5e669b462396e50e83b66d3ef1..6a4c379a2905455b14c3cbd4a46a0f95
|
||||
|
||||
private static final Random rand = new Random();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 20e619baa4bce6a133ade5e5d6a6f04f49a1b176..1c684244213d04b36589dd50ea66052a9cdad072 100644
|
||||
index 8fe1f5deddfee329c020d93c990dc686fe2b458e..ca176b9331345e343c19a02b6ba2ea886d20962d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -29,6 +29,9 @@ import net.minecraft.world.entity.projectile.ThrownEgg;
|
@ -6,18 +6,18 @@ Subject: [PATCH] add per world spawn limits
|
||||
Taken from #2982. Credit to Chasewhip8
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index b1a8c0e6c07bcc3625e834592923da462977af5e..d40d6ead65bd0f6ae64155ee7960245fd0e72b77 100644
|
||||
index a121c3bd970b65783bf7482e022ca3c170309d66..bdecc8ea27253150d0b5c57fe7a018155739647f 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.world.entity.EntityType;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.world.Difficulty;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.monster.Vindicator;
|
||||
import net.minecraft.world.entity.monster.Zombie;
|
||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
||||
+import net.minecraft.world.level.NaturalSpawner;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.spigotmc.SpigotWorldConfig;
|
||||
@@ -57,6 +58,11 @@ public class PaperWorldConfig {
|
||||
@@ -55,6 +56,11 @@ public class PaperWorldConfig {
|
||||
|
||||
set("despawn-ranges.soft", null);
|
||||
set("despawn-ranges.hard", null);
|
||||
@ -29,7 +29,7 @@ index b1a8c0e6c07bcc3625e834592923da462977af5e..d40d6ead65bd0f6ae64155ee7960245f
|
||||
}
|
||||
|
||||
if (needsSave) {
|
||||
@@ -721,6 +727,21 @@ public class PaperWorldConfig {
|
||||
@@ -671,6 +677,21 @@ public class PaperWorldConfig {
|
||||
zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance);
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ index b1a8c0e6c07bcc3625e834592923da462977af5e..d40d6ead65bd0f6ae64155ee7960245f
|
||||
private void lightQueueSize() {
|
||||
lightQueueSize = getInt("light-queue-size", lightQueueSize);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6a4c379a2905455b14c3cbd4a46a0f95c5f78aac..4430385a758906239b8573c59b18d19470339ec5 100644
|
||||
index 67fccf65437d791d4008542b250301b2c1f45da8..7ebd935c7c43fb9ed50d5c8e9e5bb8e28080338b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -210,6 +210,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionSplashEvent for water splash potions
|
||||
Fixes SPIGOT-6221: https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-6221
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
index 4dc6ab94a50a1dca8603129b28405578d381a06e..8676796ff65cd0bd3f215dc7edcf3a5b2291ca27 100644
|
||||
index 517a0f6bf847c5bf01851ae326d1b12332c2672c..1adcc0321b5528a4a173027be67139a9e9be5770 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
|
||||
@@ -126,6 +126,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
@@ -125,6 +125,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
private void applyWater() {
|
||||
AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
|
||||
List<net.minecraft.world.entity.LivingEntity> list = this.level.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE);
|
||||
@ -17,15 +17,15 @@ index 4dc6ab94a50a1dca8603129b28405578d381a06e..8676796ff65cd0bd3f215dc7edcf3a5b
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
Iterator iterator = list.iterator();
|
||||
@@ -135,11 +136,23 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
double d0 = this.distanceToSqr(entityliving);
|
||||
@@ -134,11 +135,23 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
double d0 = this.distanceToSqr((Entity) entityliving);
|
||||
|
||||
if (d0 < 16.0D && entityliving.isSensitiveToWater()) {
|
||||
- entityliving.hurt(DamageSource.indirectMagic(entityliving, this.getOwner()), 1.0F);
|
||||
- entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F);
|
||||
+ // Paper start
|
||||
+ double intensity = 1.0D - Math.sqrt(d0) / 4.0D;
|
||||
+ affected.put(entityliving.getBukkitLivingEntity(), intensity);
|
||||
+ // entityliving.damageEntity(DamageSource.c(entityliving, this.getShooter()), 1.0F); // Paper - moved down
|
||||
+ // entityliving.hurt(DamageSource.indirectMagic(this, this.getOwner()), 1.0F); // Paper - moved down
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -42,8 +42,8 @@ index 4dc6ab94a50a1dca8603129b28405578d381a06e..8676796ff65cd0bd3f215dc7edcf3a5b
|
||||
List<Axolotl> list1 = this.level.getEntitiesOfClass(Axolotl.class, axisalignedbb);
|
||||
Iterator iterator1 = list1.iterator();
|
||||
|
||||
@@ -167,6 +180,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
double d0 = this.distanceToSqr(entityliving);
|
||||
@@ -166,6 +179,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
double d0 = this.distanceToSqr((Entity) entityliving);
|
||||
|
||||
if (d0 < 16.0D) {
|
||||
+ // Paper - diff on change, used when calling the splash event for water splash potions
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add more LimitedRegion API
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/world/generation/CraftProtoWorld.java b/src/main/java/io/papermc/paper/world/generation/CraftProtoWorld.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1c6668c2b5e1816db7e0ebabc99af3586849e606
|
||||
index 0000000000000000000000000000000000000000..3160766243e2ce90d07f71d02c7410ff4e9d9562
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/world/generation/CraftProtoWorld.java
|
||||
@@ -0,0 +1,116 @@
|
||||
@ -65,19 +65,19 @@ index 0000000000000000000000000000000000000000..1c6668c2b5e1816db7e0ebabc99af358
|
||||
+ @Override
|
||||
+ public @NotNull BlockState getBlockState(int x, int y, int z) {
|
||||
+ BlockEntity entity = getDelegate().getBlockEntity(new BlockPos(x, y, z));
|
||||
+ return CraftMetaBlockState.createBlockState(entity.getBlockState().getBukkitMaterial(), entity.save(new CompoundTag()));
|
||||
+ return CraftMetaBlockState.createBlockState(entity.getBlockState().getBukkitMaterial(), entity.saveWithFullMetadata());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void scheduleBlockUpdate(int x, int y, int z) {
|
||||
+ BlockPos position = new BlockPos(x, y, z);
|
||||
+ getDelegate().getBlockTicks().scheduleTick(position, getDelegate().getBlockIfLoaded(position), 0);
|
||||
+ getDelegate().scheduleTick(position, getDelegate().getBlockIfLoaded(position), 0);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void scheduleFluidUpdate(int x, int y, int z) {
|
||||
+ BlockPos position = new BlockPos(x, y, z);
|
||||
+ getDelegate().getLiquidTicks().scheduleTick(position, getDelegate().getFluidState(position).getType(), 0);
|
||||
+ getDelegate().scheduleTick(position, getDelegate().getFluidState(position).getType(), 0);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..1c6668c2b5e1816db7e0ebabc99af358
|
||||
+ function.accept((T) entity.getBukkitEntity());
|
||||
+ }
|
||||
+
|
||||
+ getDelegate().addEntity(entity, reason);
|
||||
+ getDelegate().addFreshEntity(entity, reason);
|
||||
+ return (T) entity.getBukkitEntity();
|
||||
+ }
|
||||
+
|
||||
@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..1c6668c2b5e1816db7e0ebabc99af358
|
||||
+}
|
||||
+
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
|
||||
index d91c88d7bdfd954fa81fbf1c9ad92161d70993a6..f5ef7e026061351590f1ce77694e2d8fb8521048 100644
|
||||
index 94fee76f0b2145e3cf99460c407815bb32bd19d0..671ec060981790043f5685a5b647324ddfee6af2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
|
||||
@@ -151,7 +151,10 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
|
||||
@ -137,7 +137,7 @@ index d91c88d7bdfd954fa81fbf1c9ad92161d70993a6..f5ef7e026061351590f1ce77694e2d8f
|
||||
- return super.getBlockState(x, y, z);
|
||||
+ // Paper start
|
||||
+ net.minecraft.world.level.block.entity.BlockEntity entity = getHandle().getBlockEntity(new BlockPos(x, y, z));
|
||||
+ return org.bukkit.craftbukkit.inventory.CraftMetaBlockState.createBlockState(entity.getBlockState().getBukkitMaterial(), entity.save(new CompoundTag()));
|
||||
+ return org.bukkit.craftbukkit.inventory.CraftMetaBlockState.createBlockState(entity.getBlockState().getBukkitMaterial(), entity.saveWithFullMetadata());
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@ -169,13 +169,13 @@ index d91c88d7bdfd954fa81fbf1c9ad92161d70993a6..f5ef7e026061351590f1ce77694e2d8f
|
||||
+ @Override
|
||||
+ public void scheduleBlockUpdate(int x, int y, int z) {
|
||||
+ BlockPos position = new BlockPos(x, y, z);
|
||||
+ getHandle().getBlockTicks().scheduleTick(position, getHandle().getBlockIfLoaded(position), 0);
|
||||
+ getHandle().scheduleTick(position, getHandle().getBlockIfLoaded(position), 0);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void scheduleFluidUpdate(int x, int y, int z) {
|
||||
+ BlockPos position = new BlockPos(x, y, z);
|
||||
+ getHandle().getLiquidTicks().scheduleTick(position, getHandle().getFluidState(position).getType(), 0);
|
||||
+ getHandle().scheduleTick(position, getHandle().getFluidState(position).getType(), 0);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@ -198,12 +198,12 @@ index d91c88d7bdfd954fa81fbf1c9ad92161d70993a6..f5ef7e026061351590f1ce77694e2d8f
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
index eb82aaf9dcbc912d780a90842601da85497fa443..1b05bb78eaee548806df8ebfff1a1401e30d52e0 100644
|
||||
index c8e81b0a5495cd138a7b7a4aed98fd64beda59aa..cb49867045b1fdd9802ec815ab6bc17a6923c822 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
|
||||
@@ -196,6 +196,12 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
@@ -205,6 +205,12 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
for (BlockPos lightPosition : craftData.getLights()) {
|
||||
((ProtoChunk) chunk).addLight(new BlockPos((x << 4) + lightPosition.getX(), lightPosition.getY(), (z << 4) + lightPosition.getZ())); // PAIL rename addLightBlock
|
||||
((ProtoChunk) chunk).addLight(new BlockPos((x << 4) + lightPosition.getX(), lightPosition.getY(), (z << 4) + lightPosition.getZ()));
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d309e2c460654c2fa7a6668e9f31d330e8e35967..3833c0c863c49c2ff5552030e7a0799cf2ec0614 100644
|
||||
index aec3fd5bd9103af17eb476d5411b84d76f72bfe4..d3984faa2566e61eeb6c77b327f3ea951c8c8179 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2161,7 +2161,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2158,7 +2158,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
if (retainOwnership) {
|
||||
if (!itemstack1.isEmpty()) {
|
||||
@ -18,10 +18,10 @@ index d309e2c460654c2fa7a6668e9f31d330e8e35967..3833c0c863c49c2ff5552030e7a0799c
|
||||
|
||||
this.awardStat(Stats.DROP);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 3e462d68ce5fa37735c5328997767fa1ef3b869d..fb66da46d2b3a46fe4b8d43f99a1a60f768f5f19 100644
|
||||
index 6f406d8d945f3938961fe1a0df42f8cb558d8716..44c2820a33ed40b4ef2ebd20708347d3cc2437ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -705,6 +705,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -703,6 +703,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
double d0 = this.getEyeY() - 0.30000001192092896D;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Missing Entity Behavior API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index 630b6491ee186e1e3f17489311a91681e52b7ff5..bf610ede1232d18239f210d32db88466350c5aca 100644
|
||||
index cd278a859c87fc89c421378ffab1bd36a45bd65d..a726006888bbbdb290bcda3ac4fd45d68ba51b79 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -658,6 +658,14 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -660,6 +660,14 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ index 630b6491ee186e1e3f17489311a91681e52b7ff5..bf610ede1232d18239f210d32db88466
|
||||
private void openMouth() {
|
||||
if (!this.level.isClientSide) {
|
||||
this.mouthCounter = 1;
|
||||
@@ -670,6 +678,11 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -672,6 +680,11 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
this.setFlag(16, eatingGrass);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ index 630b6491ee186e1e3f17489311a91681e52b7ff5..bf610ede1232d18239f210d32db88466
|
||||
if (angry) {
|
||||
this.setEating(false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||
index 69c95644b2531c1fe1c4a6cf7fee12e997dd67f4..ff2bbdfd01b8fbcae6630184d5bc5954f13a8f2e 100644
|
||||
index 32c7dc33ac0a41902bc841692a8b64b18e4355b6..1aa2f9c537f908807c7f323112c8cde27c34306c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||||
@@ -105,4 +105,36 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b9f1384d742d612dd4d40929dfe812e5ebba4371..373280eed4acd146a3c71d944030382bc3c5067e 100644
|
||||
index 85e24920e774e84f9fa63a4fb088c07caf2833da..b0c319175b40b0f1ac87152eb64b6b60ddc36464 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1099,7 +1099,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1098,7 +1098,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// Paper end
|
||||
// CraftBukkit start
|
||||
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index ea1fa9758fcaa87de11b84d5a2e1d36b0e8930ee..e3944d0f4fd18ef6c545dc4a131c0b120dff753a 100644
|
||||
index 011f34034bf6d8481e91b08894c68d87de41f2c1..ee24edb7f3821ae3a1881824257d21226f909adb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -517,7 +517,7 @@ public class CraftBlock implements Block {
|
||||
@@ -520,7 +520,7 @@ public class CraftBlock implements Block {
|
||||
Direction direction = CraftBlock.blockFaceToNotch(face);
|
||||
UseOnContext context = new UseOnContext(this.getCraftWorld().getHandle(), null, InteractionHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new BlockHitResult(Vec3.ZERO, direction, this.getPosition(), false));
|
||||
|
@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
|
||||
load in that case).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5f28cca2793cc9b9c795033e112043d89642c858..43a740eb644629bf88d60d7ab559793a1965f9d8 100644
|
||||
index 095a1850fbc0f86ed73d9e321b09e059715dd1e0..27f03389f905e8e051eb4148016de7868c385819 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -203,7 +203,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -211,7 +211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@ -19,12 +19,12 @@ index 5f28cca2793cc9b9c795033e112043d89642c858..43a740eb644629bf88d60d7ab559793a
|
||||
+ return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index d4f0fcff776012841798a0962207e2cb951ac28e..d40c4c491c4ce19b59cb095cdb5f5e83373356f1 100644
|
||||
index b0c319175b40b0f1ac87152eb64b6b60ddc36464..8705df3ca3df6b4aa77b38e1a0b6ad5fc3bc3f28 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1310,7 +1310,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1309,7 +1309,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
speed = this.player.getAbilities().walkingSpeed * 10f;
|
||||
}
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@ -34,7 +34,7 @@ index d4f0fcff776012841798a0962207e2cb951ac28e..d40c4c491c4ce19b59cb095cdb5f5e83
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 4dae0525be49bedadd75276c2668209b602ff967..d0cfa782498eca8a13ce7d7f28d5e55ae4e402fa 100644
|
||||
index 4def51a0b2a133cf1fb2358974db2533aae0a807..e5cb991543c695bc90256ef250a1d695ac5bc17d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -193,6 +193,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -44,14 +44,14 @@ index 4dae0525be49bedadd75276c2668209b602ff967..d0cfa782498eca8a13ce7d7f28d5e55a
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public boolean hasChunk(int chunkX, int chunkZ) {
|
||||
+ return ((ServerLevel) this).getChunkIfLoaded(chunkX, chunkZ) != null;
|
||||
+ return this.getChunkIfLoaded(chunkX, chunkZ) != null;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public ResourceKey<DimensionType> getTypeKey() {
|
||||
return this.typeKey;
|
||||
}
|
||||
@@ -1362,7 +1369,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, final DimensionType dimensionmanager, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
@@ -1363,7 +1370,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
for (int l1 = j; l1 <= l; ++l1) {
|
||||
for (int i2 = k; i2 <= i1; ++i2) {
|
@ -10,10 +10,10 @@ This patch changes sign command logic so that `run_command` click events:
|
||||
- sends failure messages to the player who clicked the sign
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index d40d6ead65bd0f6ae64155ee7960245fd0e72b77..37cb74b27763db6f4a6a68030f88c37fc731affc 100644
|
||||
index bdecc8ea27253150d0b5c57fe7a018155739647f..3af1cfc75af23edd3cbfbf202427856761b42ce7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -894,5 +894,10 @@ public class PaperWorldConfig {
|
||||
@@ -803,4 +803,9 @@ public class PaperWorldConfig {
|
||||
private void fixInvulnerableEndCrystalExploit() {
|
||||
fixInvulnerableEndCrystalExploit = getBoolean("unsupported-settings.fix-invulnerable-end-crystal-exploit", fixInvulnerableEndCrystalExploit);
|
||||
}
|
||||
@ -23,7 +23,6 @@ index d40d6ead65bd0f6ae64155ee7960245fd0e72b77..37cb74b27763db6f4a6a68030f88c37f
|
||||
+ showSignClickCommandFailureMessagesToPlayer = getBoolean("show-sign-click-command-failure-msgs-to-player", showSignClickCommandFailureMessagesToPlayer);
|
||||
+ }
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java b/src/main/java/io/papermc/paper/commands/DelegatingCommandSource.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..1f6747d7a4c33f0ee7b0dc2120081bb87a855d35
|
||||
@ -73,10 +72,10 @@ index 0000000000000000000000000000000000000000..1f6747d7a4c33f0ee7b0dc2120081bb8
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
index 9b5d11ece006d7aa893360a84ba652c666517ac1..344d3a8c1162f1a4ab5fc2b7676680ddace46649 100644
|
||||
index 615c4f9d9841f7ddc3e5c854e90f41c3905c2e8f..6371176fba41218a209ea59b4cafe5b2d4a685fd 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||
@@ -41,6 +41,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -40,6 +40,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
private boolean renderMessagedFiltered;
|
||||
private DyeColor color;
|
||||
private boolean hasGlowingText;
|
||||
@ -84,7 +83,7 @@ index 9b5d11ece006d7aa893360a84ba652c666517ac1..344d3a8c1162f1a4ab5fc2b7676680dd
|
||||
|
||||
public SignBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.SIGN, pos, state);
|
||||
@@ -227,7 +228,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -224,7 +225,17 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
ClickEvent chatclickable = chatmodifier.getClickEvent();
|
||||
|
||||
if (chatclickable != null && chatclickable.getAction() == ClickEvent.Action.RUN_COMMAND) {
|
||||
@ -103,14 +102,14 @@ index 9b5d11ece006d7aa893360a84ba652c666517ac1..344d3a8c1162f1a4ab5fc2b7676680dd
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,8 +274,21 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
@@ -260,8 +271,21 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||
String s = player == null ? "Sign" : player.getName().getString();
|
||||
Object object = player == null ? new TextComponent("Sign") : player.getDisplayName();
|
||||
|
||||
+ // Paper start - send messages back to the player
|
||||
+ CommandSource commandSource = this.level.paperConfig.showSignClickCommandFailureMessagesToPlayer ? new io.papermc.paper.commands.DelegatingCommandSource(this) {
|
||||
+ @Override
|
||||
+ public void sendMessage(net.minecraft.network.chat.Component message, java.util.UUID sender) {
|
||||
+ public void sendMessage(Component message, UUID sender) {
|
||||
+ player.sendMessage(message, sender);
|
||||
+ }
|
||||
+
|
||||
@ -121,8 +120,8 @@ index 9b5d11ece006d7aa893360a84ba652c666517ac1..344d3a8c1162f1a4ab5fc2b7676680dd
|
||||
+ } : this;
|
||||
+ // Paper end
|
||||
// CraftBukkit - this
|
||||
- return new CommandSourceStack(this, Vec3.atCenterOf((Vec3i) this.worldPosition), Vec2.ZERO, (ServerLevel) this.level, 2, s, (Component) object, this.level.getServer(), player);
|
||||
+ return new CommandSourceStack(commandSource, Vec3.atCenterOf((Vec3i) this.worldPosition), Vec2.ZERO, (ServerLevel) this.level, 2, s, (Component) object, this.level.getServer(), player); // Paper
|
||||
- return new CommandSourceStack(this, Vec3.atCenterOf(this.worldPosition), Vec2.ZERO, (ServerLevel) this.level, 2, s, (Component) object, this.level.getServer(), player);
|
||||
+ return new CommandSourceStack(commandSource, Vec3.atCenterOf(this.worldPosition), Vec2.ZERO, (ServerLevel) this.level, 2, s, (Component) object, this.level.getServer(), player); // Paper
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e639cbdf9cf070e749da4c90ff475b250ab8e2c9..cdfdad5932f0e03a41cddd8cb7acb0ede43a6a3d 100644
|
||||
index 8705df3ca3df6b4aa77b38e1a0b6ad5fc3bc3f28..d66c9c09ae3874dd53ef298f94a0e5c6177f2b35 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2225,7 +2225,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2230,7 +2230,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
}
|
||||
|
||||
// Arm swing animation
|
@ -1,27 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Professor Bloodstone <git@bloodstone.dev>
|
||||
Date: Sun, 20 Jun 2021 01:14:41 +0200
|
||||
Subject: [PATCH] Add git branch and commit to manifest
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1e4e3c6fbac820fa03e2a6f5d76c008d5879d2e6..c7ebad49e04c36c27341cabc4a024f170d762f3f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -69,6 +69,7 @@ tasks.jar {
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
||||
+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
@@ -78,6 +79,8 @@ tasks.jar {
|
||||
"Specification-Version" to project.version,
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
"Multi-Release" to "true", // Paper
|
||||
+ "Git-Branch" to gitBranch, // Paper
|
||||
+ "Git-Commit" to gitHash, // Paper
|
||||
)
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
Loading…
Reference in New Issue
Block a user