mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
feat: try update paper
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
group=org.leavesmc.leaves
|
||||
version=1.21.10-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.10
|
||||
paperRef=a0ea7297c52bd5aee889c5c1b101c7d593c049b0
|
||||
paperRef=af06383701d3c02e3e3cbd2ef5c5b55e2bbd0742
|
||||
preVersion=true
|
||||
paper.runDisableWatchdog=true
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ index 74f704d4245199205afff5a992805f40a365cc81..9f9051214c81e1fc4a6f1a0b0d18ea98
|
||||
+ // Leaves end - Bytebuf API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 25c6779582284e793366401ee60d03143d36e8a1..6b63bd1d7d35351af82be8b40228fc3e6a3637f6 100644
|
||||
index 3eef8d533c2aa65d66fbd58f2260b4764a964ebe..73285735653a3aec90df4866b3f97f8ca38a5394 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3930,6 +3930,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3931,6 +3931,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
boolean isChunkSent(long chunkKey);
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
-import io.papermc.fill.model.BuildChannel
|
||||
import io.papermc.paperweight.attribute.DevBundleOutput
|
||||
import io.papermc.paperweight.util.*
|
||||
import io.papermc.paperweight.util.data.FileEntry
|
||||
@@ -10,22 +_,34 @@
|
||||
import java.time.Instant
|
||||
@@ -7,22 +_,34 @@
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
idea
|
||||
- id("io.papermc.paperweight.core")
|
||||
- id("io.papermc.fill.gradle") version "1.0.7"
|
||||
- id("io.papermc.fill.gradle") version "1.0.9"
|
||||
+ id("org.leavesmc.leavesweight.core") // Leaves - build change
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
+val leavesMavenPublicUrl = "https://repo.leavesmc.com/snapshots/" // Leaves - build change
|
||||
|
||||
dependencies {
|
||||
mache("io.papermc:mache:1.21.10+build.1")
|
||||
mache("io.papermc:mache:1.21.10+build.9")
|
||||
- paperclip("io.papermc:paperclip:3.0.3")
|
||||
+ leavesclip("org.leavesmc:leavesclip:3.0.8") // Leaves - build change
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
@@ -44,7 +44,7 @@
|
||||
spigot {
|
||||
enabled = true
|
||||
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
|
||||
@@ -49,6 +_,7 @@
|
||||
@@ -46,6 +_,7 @@
|
||||
libraryRepositories.addAll(
|
||||
"https://repo.maven.apache.org/maven2/",
|
||||
paperMavenPublicUrl,
|
||||
@@ -52,7 +52,7 @@
|
||||
)
|
||||
}
|
||||
|
||||
@@ -107,7 +_,22 @@
|
||||
@@ -104,7 +_,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
extendsFrom(configurations.compileClasspath.get())
|
||||
}
|
||||
@@ -130,7 +_,19 @@
|
||||
@@ -127,7 +_,19 @@
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -94,10 +94,10 @@
|
||||
+ exclude(group = "com.google.guava", module = "guava")
|
||||
+ }
|
||||
+ // Leaves end - leaves plugin
|
||||
implementation("ca.spottedleaf:concurrentutil:0.0.5")
|
||||
implementation("ca.spottedleaf:concurrentutil:0.0.7")
|
||||
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
||||
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
|
||||
@@ -157,7 +_,6 @@
|
||||
@@ -154,7 +_,6 @@
|
||||
implementation("org.spongepowered:configurate-yaml:4.2.0")
|
||||
|
||||
// Deps that were previously in the API but have now been moved here for backwards compat, eventually to be removed
|
||||
@@ -105,8 +105,8 @@
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:9.2.0")
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4")
|
||||
@@ -188,26 +_,36 @@
|
||||
implementation("me.lucko:spark-paper:1.10.133-20250413.112336-1")
|
||||
@@ -185,26 +_,36 @@
|
||||
implementation("me.lucko:spark-paper:1.10.152")
|
||||
}
|
||||
|
||||
+// Leaves start - hide irrelevant compilation warnings
|
||||
@@ -124,7 +124,7 @@
|
||||
val git = Git(rootProject.layout.projectDirectory.path)
|
||||
val mcVersion = rootProject.providers.gradleProperty("mcVersion").get()
|
||||
val build = System.getenv("BUILD_NUMBER") ?: null
|
||||
- val buildTime = if (build != null) Instant.now() else Instant.EPOCH
|
||||
- val buildTime = providers.environmentVariable("BUILD_STARTED_AT").map(Instant::parse).orElse(Instant.EPOCH).get()
|
||||
+ val buildTime = Instant.now() // Leaves - always use build time
|
||||
val gitHash = git.exec(providers, "rev-parse", "--short=7", "HEAD").get().trim()
|
||||
val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
|
||||
@@ -148,7 +148,7 @@
|
||||
"Build-Number" to (build ?: ""),
|
||||
"Build-Time" to buildTime.toString(),
|
||||
"Git-Branch" to gitBranch,
|
||||
@@ -266,7 +_,7 @@
|
||||
@@ -263,7 +_,7 @@
|
||||
jvmArgumentProviders.add(provider)
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
idea {
|
||||
module {
|
||||
generatedSourceDirs.add(generatedDir.toFile())
|
||||
@@ -303,6 +_,10 @@
|
||||
@@ -300,6 +_,10 @@
|
||||
}
|
||||
|
||||
args("--nogui")
|
||||
@@ -168,7 +168,7 @@
|
||||
systemProperty("net.kyori.adventure.text.warnWhenLegacyFormattingDetected", true)
|
||||
if (providers.gradleProperty("paper.runDisableWatchdog").getOrElse("false") == "true") {
|
||||
systemProperty("disable.watchdog", true)
|
||||
@@ -347,30 +_,26 @@
|
||||
@@ -344,30 +_,26 @@
|
||||
classpath(tasks.createReobfBundlerJar.flatMap { it.outputZip })
|
||||
mainClass.set(null as String?)
|
||||
}
|
||||
@@ -189,7 +189,7 @@
|
||||
- version(paperweight.minecraftVersion)
|
||||
-
|
||||
- build {
|
||||
- channel = BuildChannel.ALPHA
|
||||
- channel = BuildChannel.STABLE
|
||||
-
|
||||
- downloads {
|
||||
- register("server:default") {
|
||||
|
||||
@@ -18,10 +18,10 @@ index 4b87e48309323faee2bf5cc65428a28d8646ef7a..d129f160acf0da81cadeacab9587d86d
|
||||
private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 806184fac2b7fcb5b8cb3adc9b212bdc475699e9..8f83e03417ab02e31f3fdb3f2bd7659d6cfb46f6 100644
|
||||
index f63a5567a2e845de904c2dacfbb875049e3e0c65..e82584a516af3b08ca4b11ed2aaf28cfbf345825 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1283,7 +1283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
LOGGER.info("*************************************************************************************");
|
||||
LOGGER.info("This is the first time you're starting this server.");
|
||||
LOGGER.info("It's recommended you read our 'Getting Started' documentation for guidance.");
|
||||
@@ -30,7 +30,7 @@ index 806184fac2b7fcb5b8cb3adc9b212bdc475699e9..8f83e03417ab02e31f3fdb3f2bd7659d
|
||||
LOGGER.info("*************************************************************************************");
|
||||
}
|
||||
// Paper end - Add onboarding message for initial server start
|
||||
@@ -1926,7 +1926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1945,7 +1945,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@@ -40,7 +40,7 @@ index 806184fac2b7fcb5b8cb3adc9b212bdc475699e9..8f83e03417ab02e31f3fdb3f2bd7659d
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport systemReport) {
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 9b3894ec6d458a8d7ed8078fb51193c5dfa1641c..4693330ebbd1540559caa4ef5494e75b69351c24 100644
|
||||
index 354b48c88b113c4048e258f2402aad2647d3c364..d49ad0b4f697a0b50b287c0004ea98ea6ad5771e 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -275,9 +275,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Utils
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb0831e64c2b 100644
|
||||
index 2e3e038874757049445a91bf590d5a1a427a3f6d..9b122a3dc18c6dbc84683ab54e5a503d0a5b7e4b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -374,6 +374,8 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -373,6 +373,8 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
|
||||
@@ -17,7 +17,7 @@ index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb08
|
||||
public void inactiveTick() {
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -2642,6 +2644,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2634,6 +2636,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
output.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -25,7 +25,7 @@ index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb08
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
|
||||
@@ -2762,6 +2765,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2754,6 +2757,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
|
||||
// Paper end
|
||||
@@ -33,7 +33,7 @@ index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb08
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
||||
@@ -4546,7 +4550,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4512,7 +4516,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return this.getType().is(EntityTypeTags.DEFLECTS_PROJECTILES) ? ProjectileDeflection.REVERSE : ProjectileDeflection.NONE;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb08
|
||||
public net.minecraft.world.entity.LivingEntity getControllingPassenger() {
|
||||
return null;
|
||||
}
|
||||
@@ -5436,4 +5440,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -5402,4 +5406,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
@@ -53,10 +53,10 @@ index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb08
|
||||
+ // Leaves end - leaves ex data
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index a0cc94561c77b5e20b9dcee3190fe26cdaf55036..b6ec576ecc6f7924ee5f039ddacaf7195f02fef7 100644
|
||||
index d225267b1b07854b76c88ce461d7817a86d023a0..01e0dc28ef63456a45b800e72d76180b40811a72 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -915,7 +915,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -916,7 +916,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
return this.isClientSide;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index a0cc94561c77b5e20b9dcee3190fe26cdaf55036..b6ec576ecc6f7924ee5f039ddacaf719
|
||||
public MinecraftServer getServer() {
|
||||
return null;
|
||||
diff --git a/net/minecraft/world/level/LevelAccessor.java b/net/minecraft/world/level/LevelAccessor.java
|
||||
index 1c769bb3de2c3271db574e9cd81ccdfdb669e5f9..881d0b5dc336b15177fdad30af6584ee9feec4b1 100644
|
||||
index e4a9e59661f5b51caf5b4fb12b0c90b14c1f9647..f5e9e395f04d5335d5d9a220f94962a72e38577d 100644
|
||||
--- a/net/minecraft/world/level/LevelAccessor.java
|
||||
+++ b/net/minecraft/world/level/LevelAccessor.java
|
||||
@@ -46,7 +46,7 @@ public interface LevelAccessor extends CommonLevelAccessor, LevelTimeAccess, Sch
|
||||
@@ -79,7 +79,7 @@ index 1c769bb3de2c3271db574e9cd81ccdfdb669e5f9..881d0b5dc336b15177fdad30af6584ee
|
||||
|
||||
default Difficulty getDifficulty() {
|
||||
diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java
|
||||
index 4fd746ccfd0018f5e551490e24aa68265d609295..57574f93763ab98a4bc109f56cfc3af08962a878 100644
|
||||
index 572fcb33b14d16334e2ab92ddf8699f1ba975aff..c431d0c45e71e0c8b880784181c92967e40779bd 100644
|
||||
--- a/net/minecraft/world/level/block/Block.java
|
||||
+++ b/net/minecraft/world/level/block/Block.java
|
||||
@@ -649,6 +649,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -97,7 +97,7 @@ index 4fd746ccfd0018f5e551490e24aa68265d609295..57574f93763ab98a4bc109f56cfc3af0
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 07777e331251b7e2c4fdcb63fee41f733e775004..23a7c045b07b9b30b2c8fb99e254a65b390e6245 100644
|
||||
index d31da50baeb7f47f0e1d81ee3c05023370df8cd3..a38618c28819405f0fb35aa686d1f3f0e94e5da2 100644
|
||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -766,7 +766,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
|
||||
@@ -33,10 +33,10 @@ index fb263fa1f30a7dfcb7ec2656abfb38e5fe88eac9..56fd1ed7ccaf96e7eedea60fbdbf7f93
|
||||
};
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 8f83e03417ab02e31f3fdb3f2bd7659d6cfb46f6..83e69bb51b49b5366c884170aa3643cd9fbaf380 100644
|
||||
index e82584a516af3b08ca4b11ed2aaf28cfbf345825..2493722c47b92cbcd13c08af0caf38a543ac7e37 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1811,6 +1811,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1830,6 +1830,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
profilerFiller.popPush("server gui refresh");
|
||||
|
||||
@@ -126,10 +126,10 @@ index c6db2c96db96453daaf49779f588f75f7c3d3d60..adb26ae4dfd5dc111cc55000b71c15f9
|
||||
this.connection.setReadOnly();
|
||||
// CraftBukkit - Don't wait
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 9d7be1695f797c2c041d21a8326aeea46b0488d7..080f4e97422a8499923351e47c9e57e4dda203bd 100644
|
||||
index cc5d1e8007e2ea32605bd68d0a73683e8fb6886e..d9fbc5dc6665fd13cc2aa9978ea6edef4c736548 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -238,6 +238,8 @@ public abstract class PlayerList {
|
||||
@@ -239,6 +239,8 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ index 9d7be1695f797c2c041d21a8326aeea46b0488d7..080f4e97422a8499923351e47c9e57e4
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
@@ -423,6 +425,7 @@ public abstract class PlayerList {
|
||||
@@ -424,6 +426,7 @@ public abstract class PlayerList {
|
||||
return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName())));
|
||||
}
|
||||
public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player, net.kyori.adventure.text.Component leaveMessage) {
|
||||
@@ -146,7 +146,7 @@ index 9d7be1695f797c2c041d21a8326aeea46b0488d7..080f4e97422a8499923351e47c9e57e4
|
||||
// Paper end - Fix kick event leave message not being sent
|
||||
ServerLevel serverLevel = player.level();
|
||||
player.awardStat(Stats.LEAVE_GAME);
|
||||
@@ -1331,6 +1334,7 @@ public abstract class PlayerList {
|
||||
@@ -1279,6 +1282,7 @@ public abstract class PlayerList {
|
||||
serverPlayer.connection.send(clientboundUpdateRecipesPacket);
|
||||
serverPlayer.getRecipeBook().sendInitialRecipeBook(serverPlayer);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable trading with the void
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 84df4f20c5fc9d557ca93193437ed7cb2e2317b5..a8b58099b559f4099f0d962a44accb3deec26d4a 100644
|
||||
index c0ed4e023b35a076b554fa387e9a2324166b2fae..0c9002b6ceaf5f11a059db356976215d5acf5cce 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2804,7 +2804,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2794,7 +2794,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// Spigot start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
// Paper start - Fix merchant inventory not closing on entity removal
|
||||
@@ -18,10 +18,10 @@ index 84df4f20c5fc9d557ca93193437ed7cb2e2317b5..a8b58099b559f4099f0d962a44accb3d
|
||||
}
|
||||
// Paper end - Fix merchant inventory not closing on entity removal
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 080f4e97422a8499923351e47c9e57e4dda203bd..03ae88e05414a2e46d096e52039faabaf14d2b7f 100644
|
||||
index d9fbc5dc6665fd13cc2aa9978ea6edef4c736548..4abf4ea7f86955351b5e4da2c89a707003802d2e 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -467,7 +467,7 @@ public abstract class PlayerList {
|
||||
@@ -468,7 +468,7 @@ public abstract class PlayerList {
|
||||
player.stopRiding();
|
||||
rootVehicle.getPassengersAndSelf().forEach(entity -> {
|
||||
// Paper start - Fix villager boat exploit
|
||||
@@ -31,7 +31,7 @@ index 080f4e97422a8499923351e47c9e57e4dda203bd..03ae88e05414a2e46d096e52039faaba
|
||||
if (human != null) {
|
||||
villager.setTradingPlayer(null);
|
||||
diff --git a/net/minecraft/world/inventory/MerchantMenu.java b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
index d59f67ffe34201c63e3d9706a4434f33b6732edb..1bf2a015fa35981328c098f2fec363c84b85b2a7 100644
|
||||
index 6dfee62a46a5882df7f405e59d762647289d7866..ade7732b638b30ad0ae50605793cbf75754aad0e 100644
|
||||
--- a/net/minecraft/world/inventory/MerchantMenu.java
|
||||
+++ b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
@@ -74,6 +74,7 @@ public class MerchantMenu extends AbstractContainerMenu {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Make snowball and egg can knockback player
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/Snowball.java b/net/minecraft/world/entity/projectile/Snowball.java
|
||||
index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..1474cf208019cd46ca767374bceb3c9c31fdeab2 100644
|
||||
index cd36d3a988ae871fe93157c24c26f36308c71fbf..f8da22e77547916076056ea7202dd499fefd8f9f 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Snowball.java
|
||||
+++ b/net/minecraft/world/entity/projectile/Snowball.java
|
||||
@@ -54,6 +54,12 @@ public class Snowball extends ThrowableItemProjectile {
|
||||
@@ -55,6 +55,12 @@ public class Snowball extends ThrowableItemProjectile {
|
||||
Entity entity = result.getEntity();
|
||||
int i = entity instanceof Blaze ? 3 : 0;
|
||||
entity.hurt(this.damageSources().thrown(this, this.getOwner()), i);
|
||||
@@ -22,10 +22,10 @@ index 677b4b681f9c2c09a8ae3cfdec72102265547a7b..1474cf208019cd46ca767374bceb3c9c
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/entity/projectile/ThrownEgg.java b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
index 73ec34b43f3fb2aa3edc3f1cb48a923d1fa32036..6583f983129b2a90bd44104de9f4f992fa21a00c 100644
|
||||
index bbb364be2af16a3c200d2197166bb3ad28e5e35d..34deb006b1a81e8c6f65150ac7ab80f037ffa0c7 100644
|
||||
--- a/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
+++ b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
@@ -55,6 +55,12 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
@@ -56,6 +56,12 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
protected void onHitEntity(EntityHitResult result) {
|
||||
super.onHitEntity(result);
|
||||
result.getEntity().hurt(this.damageSources().thrown(this, this.getOwner()), 0.0F);
|
||||
|
||||
@@ -17,7 +17,7 @@ index a82d84283632342bd30bc3449983431ba43583e0..f59526f6bfa1b4af5b474f0b438513c9
|
||||
Set<CriterionTrigger.Listener<T>> set = (Set) advancements.criterionData.get(this); // Paper - fix PlayerAdvancements leak
|
||||
if (set != null && !set.isEmpty()) {
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index c5b3f7544a968f835b13819cc61cfacf06af53a2..d36a33a9ea2cc262f746314eda9770e19e328ddd 100644
|
||||
index 14addbaf68b7ad80490187d12d9c9b00891e2ce1..b186b5e0d3b32d7b51b2f58f0ef4b2bf36ae5c13 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -95,7 +95,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -30,10 +30,10 @@ index c5b3f7544a968f835b13819cc61cfacf06af53a2..d36a33a9ea2cc262f746314eda9770e1
|
||||
private DisconnectionDetails disconnectionDetails;
|
||||
private boolean encrypted;
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 83e69bb51b49b5366c884170aa3643cd9fbaf380..e4ade185f575d5dfaf639031ffff3ba116f89765 100644
|
||||
index 2493722c47b92cbcd13c08af0caf38a543ac7e37..309ff4c55b2a4ccf3d18951b51c2e10d0ff39bfc 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -355,6 +355,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -378,6 +378,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end - improve tick loop
|
||||
|
||||
@@ -42,7 +42,7 @@ index 83e69bb51b49b5366c884170aa3643cd9fbaf380..e4ade185f575d5dfaf639031ffff3ba1
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
|
||||
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
|
||||
AtomicReference<S> atomicReference = new AtomicReference<>();
|
||||
@@ -988,6 +990,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1013,6 +1015,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -50,7 +50,7 @@ index 83e69bb51b49b5366c884170aa3643cd9fbaf380..e4ade185f575d5dfaf639031ffff3ba1
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.spark.disable(); // Paper - spark
|
||||
@@ -1561,7 +1564,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1580,7 +1583,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
int i = this.pauseWhenEmptySeconds() * 20;
|
||||
this.removeDisabledPluginsBlockingSleep(); // Paper - API to allow/disallow tick sleeping
|
||||
if (i > 0) {
|
||||
@@ -59,7 +59,7 @@ index 83e69bb51b49b5366c884170aa3643cd9fbaf380..e4ade185f575d5dfaf639031ffff3ba1
|
||||
this.emptyTicks++;
|
||||
} else {
|
||||
this.emptyTicks = 0;
|
||||
@@ -1838,6 +1841,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1857,6 +1860,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public void tickConnection() {
|
||||
this.getConnection().tick();
|
||||
@@ -67,7 +67,7 @@ index 83e69bb51b49b5366c884170aa3643cd9fbaf380..e4ade185f575d5dfaf639031ffff3ba1
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel level) {
|
||||
@@ -2954,6 +2958,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2973,6 +2977,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.debugSubscribers;
|
||||
}
|
||||
|
||||
@@ -118,16 +118,16 @@ index 79910948d3d835ac0eaec5785efbf87440dc5489..ad29caa0cd6e8b84760f9a19252d6d4f
|
||||
return banIp(source, playerByName.getIpAddress(), reason);
|
||||
} else {
|
||||
diff --git a/net/minecraft/server/commands/BanPlayerCommands.java b/net/minecraft/server/commands/BanPlayerCommands.java
|
||||
index ac88de89b4a66e17f25ed4d36d911dc5e84dc892..ba44f6e7ada2903d217a6b327435f1f777d4c626 100644
|
||||
index 79e2647a61c2cc88f90ac8db662016038096a45e..3c8be23fe195a3dc4910ec50caadb180956124ec 100644
|
||||
--- a/net/minecraft/server/commands/BanPlayerCommands.java
|
||||
+++ b/net/minecraft/server/commands/BanPlayerCommands.java
|
||||
@@ -44,8 +44,15 @@ public class BanPlayerCommands {
|
||||
private static int banPlayers(CommandSourceStack source, Collection<NameAndId> gameProfiles, @Nullable Component reason) throws CommandSyntaxException {
|
||||
private static int banPlayers(CommandSourceStack source, Collection<NameAndId> players, @Nullable Component reason) throws CommandSyntaxException {
|
||||
UserBanList bans = source.getServer().getPlayerList().getBans();
|
||||
int i = 0;
|
||||
-
|
||||
+ boolean hasBot = false; // Leaves - disable kick
|
||||
for (NameAndId nameAndId : gameProfiles) {
|
||||
for (NameAndId nameAndId : players) {
|
||||
+ // Leaves start - disable ban
|
||||
+ if (nameAndId.isBot()) {
|
||||
+ source.sendFailure(Component.literal("Permission denied"));
|
||||
@@ -191,19 +191,19 @@ index a5e5b0e0cd67a65b9fe3f69416070429196c5fa8..1a756a09cd281e60e8802a4111f71b0b
|
||||
return i;
|
||||
}
|
||||
diff --git a/net/minecraft/server/commands/OpCommand.java b/net/minecraft/server/commands/OpCommand.java
|
||||
index 72e593966e66e27064030f5486f68a905885da1f..2682f6debf14ed3040a78b02d820e949ca3832c5 100644
|
||||
index 4c7bccc00b9e84c4744f6cdc2c2e574a33ffe324..065af7f615711d7830002cd8f3046fab706082c1 100644
|
||||
--- a/net/minecraft/server/commands/OpCommand.java
|
||||
+++ b/net/minecraft/server/commands/OpCommand.java
|
||||
@@ -43,6 +43,7 @@ public class OpCommand {
|
||||
int i = 0;
|
||||
|
||||
for (NameAndId nameAndId : gameProfiles) {
|
||||
for (NameAndId nameAndId : players) {
|
||||
+ if (nameAndId.isBot()) continue; // Leaves - disable op
|
||||
if (!playerList.isOp(nameAndId)) {
|
||||
playerList.op(nameAndId);
|
||||
i++;
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index ecdb937f08a437a1d2398e49ca835071015844f2..813ce64907b57f8452027ca65e44d9cecd2e0130 100644
|
||||
index 361034289bb5e4241f3313581ddbc4e33823a9eb..8d73fffb41346851d088ca0dee206661ff85ec29 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -255,6 +255,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -223,7 +223,7 @@ index ecdb937f08a437a1d2398e49ca835071015844f2..813ce64907b57f8452027ca65e44d9ce
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics // Leaves - down
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index 09af66f4da588835027f09406c2beb20372eb0e7..f7b3e3496e8ae9928da458f159a29b76179de843 100644
|
||||
index ce53eb1e966e07b04e6a13785a858a3318b2c573..1993907c606b231b879a7279d3880876f5307b1c 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1365,6 +1365,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -241,7 +241,7 @@ index 09af66f4da588835027f09406c2beb20372eb0e7..f7b3e3496e8ae9928da458f159a29b76
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051a9187672 100644
|
||||
index 0c9002b6ceaf5f11a059db356976215d5acf5cce..2bab1246cf658508228c7f662175692bfd82cad4 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -260,7 +260,7 @@ index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -2289,6 +2291,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2279,6 +2281,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
return this.players;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051
|
||||
@Override
|
||||
public void updatePOIOnBlockStateChange(BlockPos pos, BlockState oldState, BlockState newState) {
|
||||
Optional<Holder<PoiType>> optional = PoiTypes.forState(oldState);
|
||||
@@ -2738,6 +2746,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2728,6 +2736,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.add(serverPlayer);
|
||||
@@ -285,7 +285,7 @@ index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051
|
||||
if (serverPlayer.isReceivingWaypoints()) {
|
||||
ServerLevel.this.getWaypointManager().addPlayer(serverPlayer);
|
||||
}
|
||||
@@ -2816,6 +2829,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2806,6 +2819,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
ServerLevel.this.getChunkSource().removeEntity(entity);
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.remove(serverPlayer);
|
||||
@@ -298,10 +298,10 @@ index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051
|
||||
ServerLevel.this.updateSleepingPlayerList();
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..64e8d02fc674e4926a093c91bc6d15d69f86d5bd 100644
|
||||
index b4a996ac6c570e988b38237a32f90ec5042cbc17..04ea4e33504703c4074aef6e74ec06dc772b1bb9 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -227,7 +227,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -228,7 +228,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
private static final boolean DEFAULT_SPAWN_EXTRA_PARTICLES_ON_FALL = false;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
private final MinecraftServer server;
|
||||
@@ -310,7 +310,7 @@ index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..64e8d02fc674e4926a093c91bc6d15d6
|
||||
private final PlayerAdvancements advancements;
|
||||
private final ServerStatsCounter stats;
|
||||
private float lastRecordedHealthAndAbsorption = Float.MIN_VALUE;
|
||||
@@ -248,7 +248,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -249,7 +249,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
private Entity camera;
|
||||
public boolean isChangingDimension;
|
||||
public boolean seenCredits = false;
|
||||
@@ -319,7 +319,7 @@ index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..64e8d02fc674e4926a093c91bc6d15d6
|
||||
@Nullable
|
||||
private Vec3 levitationStartPos;
|
||||
private int levitationStartTime;
|
||||
@@ -1249,7 +1249,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1250,7 +1250,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.setClientLoaded(false);
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..64e8d02fc674e4926a093c91bc6d15d6
|
||||
AABB aabb = new AABB(this.blockPosition()).inflate(32.0, 10.0, 32.0);
|
||||
this.level()
|
||||
.getEntitiesOfClass(Mob.class, aabb, EntitySelector.NO_SPECTATORS)
|
||||
@@ -1565,6 +1565,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1562,6 +1562,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.lastSentHealth = -1.0F;
|
||||
this.lastSentFood = -1;
|
||||
this.teleportSpectators(teleportTransition, serverLevel);
|
||||
@@ -341,24 +341,24 @@ index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..64e8d02fc674e4926a093c91bc6d15d6
|
||||
org.bukkit.event.player.PlayerChangedWorldEvent changeEvent = new org.bukkit.event.player.PlayerChangedWorldEvent(this.getBukkitEntity(), serverLevel.getWorld());
|
||||
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
|
||||
diff --git a/net/minecraft/server/players/CachedUserNameToIdResolver.java b/net/minecraft/server/players/CachedUserNameToIdResolver.java
|
||||
index c4c1274481cf2353c8af5c1feb697a1bcf0ce5f4..a358e6727c6952e902689d3521393eeb9686b425 100644
|
||||
index 3dc78b91cc853cfa6dce69979273b5f35b5f87f1..0625ebf19b5c514e096e6a91539c807ccf0b3f87 100644
|
||||
--- a/net/minecraft/server/players/CachedUserNameToIdResolver.java
|
||||
+++ b/net/minecraft/server/players/CachedUserNameToIdResolver.java
|
||||
@@ -121,6 +121,12 @@ public class CachedUserNameToIdResolver implements UserNameToIdResolver {
|
||||
|
||||
@Override
|
||||
public Optional<NameAndId> get(String username) {
|
||||
public Optional<NameAndId> get(String name) {
|
||||
+ // Leaves start - fix bot
|
||||
+ org.leavesmc.leaves.bot.ServerBot bot = org.leavesmc.leaves.bot.BotList.INSTANCE.getBotByName(username);
|
||||
+ if (bot != null) {
|
||||
+ return Optional.of(bot.nameAndId());
|
||||
+ }
|
||||
+ // Leaves end - fix bot
|
||||
String string = username.toLowerCase(Locale.ROOT);
|
||||
String string = name.toLowerCase(Locale.ROOT);
|
||||
boolean stateLocked = true; try { this.stateLock.lock(); // Paper - Fix GameProfileCache concurrency
|
||||
CachedUserNameToIdResolver.GameProfileInfo gameProfileInfo = this.profilesByName.get(string);
|
||||
diff --git a/net/minecraft/server/players/NameAndId.java b/net/minecraft/server/players/NameAndId.java
|
||||
index 4888e84144c76edddee1a51dab3b05bc0f484c83..bba9101149c1b582fe261280fe4f6613ab4193b9 100644
|
||||
index fdcc23c618b5db59e384a38f9ef91b6d2e922a8a..ccb56f29e79805f3286bbb80ce6c4d4b36a6e9e8 100644
|
||||
--- a/net/minecraft/server/players/NameAndId.java
|
||||
+++ b/net/minecraft/server/players/NameAndId.java
|
||||
@@ -8,18 +8,22 @@ import java.util.UUID;
|
||||
@@ -398,18 +398,18 @@ index 4888e84144c76edddee1a51dab3b05bc0f484c83..bba9101149c1b582fe261280fe4f6613
|
||||
}
|
||||
@@ -47,7 +51,7 @@ public record NameAndId(UUID id, String name) {
|
||||
|
||||
public static NameAndId createOffline(String username) {
|
||||
UUID uuid = UUIDUtil.createOfflinePlayerUUID(username);
|
||||
- return new NameAndId(uuid, username);
|
||||
+ return new NameAndId(uuid, username, false); // Leaves - fakeplayer
|
||||
public static NameAndId createOffline(String name) {
|
||||
UUID uuid = UUIDUtil.createOfflinePlayerUUID(name);
|
||||
- return new NameAndId(uuid, name);
|
||||
+ return new NameAndId(uuid, name, false); // Leaves - fakeplayer
|
||||
}
|
||||
|
||||
// Paper start - utility method for common conversion back to the game profile
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 03ae88e05414a2e46d096e52039faabaf14d2b7f..8ee83a9f17ce729ea6144d9227cc2c45b1270139 100644
|
||||
index 4abf4ea7f86955351b5e4da2c89a707003802d2e..6dec8565e9d290302ce7766357a56b8c2295c163 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -240,6 +240,19 @@ public abstract class PlayerList {
|
||||
@@ -241,6 +241,19 @@ public abstract class PlayerList {
|
||||
|
||||
org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerJoin(player);
|
||||
|
||||
@@ -429,20 +429,20 @@ index 03ae88e05414a2e46d096e52039faabaf14d2b7f..8ee83a9f17ce729ea6144d9227cc2c45
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
@@ -745,6 +758,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end - Add PlayerPostRespawnEvent
|
||||
|
||||
@@ -700,6 +713,12 @@ public abstract class PlayerList {
|
||||
respawnReason
|
||||
).callEvent();
|
||||
// Paper end
|
||||
+ // Leaves start - bot support
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.fakeplayer.enable) {
|
||||
+ this.server.getBotList().bots.forEach(bot -> bot.sendFakeDataIfNeed(serverPlayer, true)); // Leaves - render bot
|
||||
+ }
|
||||
+ // Leaves end - bot support
|
||||
+
|
||||
// CraftBukkit end
|
||||
|
||||
return serverPlayer;
|
||||
@@ -848,11 +867,16 @@ public abstract class PlayerList {
|
||||
}
|
||||
@@ -802,11 +821,16 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public String[] getPlayerNamesArray() {
|
||||
@@ -460,7 +460,7 @@ index 03ae88e05414a2e46d096e52039faabaf14d2b7f..8ee83a9f17ce729ea6144d9227cc2c45
|
||||
|
||||
return strings;
|
||||
}
|
||||
@@ -967,7 +991,14 @@ public abstract class PlayerList {
|
||||
@@ -919,7 +943,14 @@ public abstract class PlayerList {
|
||||
|
||||
@Nullable
|
||||
public ServerPlayer getPlayerByName(String username) {
|
||||
@@ -476,7 +476,7 @@ index 03ae88e05414a2e46d096e52039faabaf14d2b7f..8ee83a9f17ce729ea6144d9227cc2c45
|
||||
}
|
||||
|
||||
public void broadcast(@Nullable Player except, double x, double y, double z, double radius, ResourceKey<Level> dimension, Packet<?> packet) {
|
||||
@@ -1008,6 +1039,7 @@ public abstract class PlayerList {
|
||||
@@ -960,6 +991,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Paper end - Incremental chunk and player saving
|
||||
}
|
||||
@@ -484,7 +484,7 @@ index 03ae88e05414a2e46d096e52039faabaf14d2b7f..8ee83a9f17ce729ea6144d9227cc2c45
|
||||
return null; }); // Paper - ensure main
|
||||
}
|
||||
|
||||
@@ -1278,7 +1310,13 @@ public abstract class PlayerList {
|
||||
@@ -1226,7 +1258,13 @@ public abstract class PlayerList {
|
||||
|
||||
@Nullable
|
||||
public ServerPlayer getPlayer(UUID playerUUID) {
|
||||
@@ -528,10 +528,10 @@ index f9e7532f86122a379692561a639a209a126e8bba..2412f46837e967694222730e68e7d25a
|
||||
|
||||
for (WaypointTransmitter waypointTransmitter : this.waypoints) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index c1e9c647c9115d1a21d665a90d5ddb0831e64c2b..28738f13c8fc17386bfafc5eb337b0fca5018c90 100644
|
||||
index 9b122a3dc18c6dbc84683ab54e5a503d0a5b7e4b..c6815ffef7fb2fd2e5ef2769c2c93135b52558f5 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1186,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1185,7 +1185,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
|
||||
BlockPos onPosLegacy = this.getOnPosLegacy();
|
||||
BlockState blockState = this.level().getBlockState(onPosLegacy);
|
||||
@@ -540,7 +540,7 @@ index c1e9c647c9115d1a21d665a90d5ddb0831e64c2b..28738f13c8fc17386bfafc5eb337b0fc
|
||||
this.checkFallDamage(vec3.y, this.onGround(), blockState, onPosLegacy);
|
||||
}
|
||||
|
||||
@@ -1507,7 +1507,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1506,7 +1506,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
// Paper start - optimise collisions
|
||||
@@ -550,10 +550,10 @@ index c1e9c647c9115d1a21d665a90d5ddb0831e64c2b..28738f13c8fc17386bfafc5eb337b0fc
|
||||
final boolean yZero = movement.y == 0.0;
|
||||
final boolean zZero = movement.z == 0.0;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 90483699b3f2efe9945c849adfdd38422e3a3458..b969a50ef263a5785571df7b299e92b5cc47b439 100644
|
||||
index 025ef0b83e5d481c8b2ef25206cafd30897caabd..c18b0155edd695524246e5c2134de94008d8a023 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3148,7 +3148,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3157,7 +3157,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
private void travelRidden(Player player, Vec3 travelVector) {
|
||||
Vec3 riddenInput = this.getRiddenInput(player, travelVector);
|
||||
this.tickRidden(player, riddenInput);
|
||||
@@ -562,7 +562,7 @@ index 90483699b3f2efe9945c849adfdd38422e3a3458..b969a50ef263a5785571df7b299e92b5
|
||||
this.setSpeed(this.getRiddenSpeed(player));
|
||||
this.travel(riddenInput);
|
||||
} else {
|
||||
@@ -3997,7 +3997,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -4006,7 +4006,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
// Paper start - lag compensate eating
|
||||
// we add 1 to the expected time to avoid lag compensating when we should not
|
||||
final boolean shouldLagCompensate = this.useItem.has(DataComponents.FOOD) && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1L + this.totalEatTimeTicks) * 50L * (1000L * 1000L));
|
||||
@@ -571,7 +571,7 @@ index 90483699b3f2efe9945c849adfdd38422e3a3458..b969a50ef263a5785571df7b299e92b5
|
||||
this.useItemRemaining = 0;
|
||||
// Paper end - lag compensate eating
|
||||
this.completeUsingItem();
|
||||
@@ -4174,6 +4174,23 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -4183,6 +4183,23 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.stopUsingItem();
|
||||
}
|
||||
|
||||
@@ -596,10 +596,10 @@ index 90483699b3f2efe9945c849adfdd38422e3a3458..b969a50ef263a5785571df7b299e92b5
|
||||
if (!this.level().isClientSide()) {
|
||||
boolean isUsingItem = this.isUsingItem();
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 14e8332cd07ebbd474015ad50abb191f4ad43b18..468097eafe73b45924697d36acc962b7bf9ca17b 100644
|
||||
index e95e259e5be5bb14a4ba2473d6ce850ebbedcb6d..e4c7262ded690e56ba2eef71bb7d46f9cd99b8b7 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -166,7 +166,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -167,7 +167,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
private int lastLevelUpTime;
|
||||
public GameProfile gameProfile;
|
||||
private boolean reducedDebugInfo;
|
||||
@@ -608,7 +608,7 @@ index 14e8332cd07ebbd474015ad50abb191f4ad43b18..468097eafe73b45924697d36acc962b7
|
||||
private final ItemCooldowns cooldowns = this.createItemCooldowns();
|
||||
private Optional<GlobalPos> lastDeathLocation = Optional.empty();
|
||||
@Nullable
|
||||
@@ -308,6 +308,12 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -309,6 +309,12 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ index 14e8332cd07ebbd474015ad50abb191f4ad43b18..468097eafe73b45924697d36acc962b7
|
||||
@Override
|
||||
protected float getMaxHeadRotationRelativeToBody() {
|
||||
return this.isBlocking() ? 15.0F : super.getMaxHeadRotationRelativeToBody();
|
||||
@@ -536,7 +542,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -537,7 +543,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
public void removeEntitiesOnShoulder() {
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ index 14e8332cd07ebbd474015ad50abb191f4ad43b18..468097eafe73b45924697d36acc962b7
|
||||
entity.playerTouch(this);
|
||||
}
|
||||
|
||||
@@ -1147,7 +1153,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -1148,7 +1154,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
this.sweepAttack();
|
||||
}
|
||||
|
||||
@@ -640,10 +640,10 @@ index 14e8332cd07ebbd474015ad50abb191f4ad43b18..468097eafe73b45924697d36acc962b7
|
||||
boolean cancelled = false;
|
||||
org.bukkit.entity.Player player = (org.bukkit.entity.Player) target.getBukkitEntity();
|
||||
diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 89767d2e8b2438db0f9bfe3504e637934725e995..0d761284b7d7bb8f4cb3919e1e8f216fb7c55f96 100644
|
||||
index 207e30f822f286a6358055fcd5bc3af6ee7a553d..2c79332e148375c2f277df94b16ce7dd2422c004 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -58,7 +58,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -59,7 +59,7 @@ public class FishingHook extends Projectile {
|
||||
public static final EntityDataAccessor<Integer> DATA_HOOKED_ENTITY = SynchedEntityData.defineId(FishingHook.class, EntityDataSerializers.INT);
|
||||
private static final EntityDataAccessor<Boolean> DATA_BITING = SynchedEntityData.defineId(FishingHook.class, EntityDataSerializers.BOOLEAN);
|
||||
private int life;
|
||||
@@ -653,7 +653,7 @@ index 89767d2e8b2438db0f9bfe3504e637934725e995..0d761284b7d7bb8f4cb3919e1e8f216f
|
||||
public int timeUntilHooked;
|
||||
public float fishAngle;
|
||||
diff --git a/net/minecraft/world/entity/vehicle/AbstractBoat.java b/net/minecraft/world/entity/vehicle/AbstractBoat.java
|
||||
index 4e3cd5974a872212eab8df8671da12df749a40a6..62f3c73818673ca294499480a45c8d0f5d4e0943 100644
|
||||
index adab5dc640a7a0299c04020225a68317282aebe9..e127a670935186ba3d96a8d85640cf465ef52b7e 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/AbstractBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java
|
||||
@@ -269,6 +269,11 @@ public abstract class AbstractBoat extends VehicleEntity implements Leashable {
|
||||
@@ -683,12 +683,12 @@ index 4e3cd5974a872212eab8df8671da12df749a40a6..62f3c73818673ca294499480a45c8d0f
|
||||
protected SoundEvent getPaddleSound() {
|
||||
return switch (this.getStatus()) {
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 06846950348954328c07f64cd9b3359e79a1a468..e1783ad0adbb791b2ff7441243c9f0aeaf37c7f6 100644
|
||||
index 670090c4466d6472a83263e1769f19e3e491c927..4e53e7c05af11cae2ce8cf313c69a83336e22ba6 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -400,6 +400,7 @@ public abstract class AbstractContainerMenu {
|
||||
|
||||
private void doClick(int slotId, int button, ClickType clickType, Player player) {
|
||||
private void doClick(int slotIndex, int button, ClickType clickType, Player player) {
|
||||
Inventory inventory = player.getInventory();
|
||||
+ if (!doClickCheck(slotId, button, clickType, player)) return; // Leaves - doClick check
|
||||
if (clickType == ClickType.QUICK_CRAFT) {
|
||||
@@ -718,7 +718,7 @@ index 06846950348954328c07f64cd9b3359e79a1a468..e1783ad0adbb791b2ff7441243c9f0ae
|
||||
FeatureFlagSet featureFlagSet = player.level().enabledFeatures();
|
||||
return carriedItem.isItemEnabled(featureFlagSet) && carriedItem.overrideStackedOnOther(slot, action, player)
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 25bc90eb527547487fb5191dc135f2c6030f3a19..671216613df044fb47e728070490beabb008fb04 100644
|
||||
index 47862c00e9e01c7cdd5fcd808cc1b76740b85a57..14c74eb71b5bfb67d0fcf9d660f748c7b1dba63d 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -443,7 +443,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -752,7 +752,7 @@ index 25bc90eb527547487fb5191dc135f2c6030f3a19..671216613df044fb47e728070490beab
|
||||
return this.getItem().useOnRelease(this);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
index 564a8f9465c5768a6e9bbace4cc5ed580403cac2..e8f556f175bb9192445b9c464c6b587296ce8e1b 100644
|
||||
index 59a002711531f8337a86d85b6e8b11b5fad8ced7..0a76cf42aaaaf210a4e43ed9bd3d177f0003ba57 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
@@ -135,7 +135,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index b969a50ef263a5785571df7b299e92b5cc47b439..410d75b148920f38ceb04d63d93166bd3b8e35c4 100644
|
||||
index c18b0155edd695524246e5c2134de94008d8a023..f4a45a39afae0befa5c6048bb5f2001395d5cbfc 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1740,14 +1740,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1741,14 +1741,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
|
||||
final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Stick can change ArmorStand arm status
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 46369e554be8c72e6fc2e6d58374dbfc77d94879..d7725b5ca689e3d5b512baab04e113be77c0b2ee 100644
|
||||
index 15479a9fc47cca3d6627b42c31ba8ff114bbe362..9420ca7e32ae71ce9cecf8afd808ae6e9f8f4258 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -228,6 +228,13 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -229,6 +229,13 @@ public class ArmorStand extends LivingEntity {
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -106,10 +106,10 @@ index 88447fc2108126ccfad2fb7eb79ac94537f132d3..1bca4150c63da064bd2d1ee8f504f2eb
|
||||
private static final String PREFIX = "data:image/png;base64,";
|
||||
public static final Codec<ServerStatus.Favicon> CODEC = Codec.STRING.comapFlatMap(string -> {
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 813ce64907b57f8452027ca65e44d9cecd2e0130..677ad1a39e76efc98fc3b953ad66b329184612e0 100644
|
||||
index 8d73fffb41346851d088ca0dee206661ff85ec29..4fdc743f56cdc4f92bfa8004c33e2f34cc9e9c70 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -782,7 +782,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -781,7 +781,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper start - Add setting for proxy online mode status
|
||||
return properties.enforceSecureProfile
|
||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||
@@ -148,10 +148,10 @@ index adb26ae4dfd5dc111cc55000b71c15f95239b090..20b9dfe68dfbcd5bb999ee4ec0500bdf
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 8ee83a9f17ce729ea6144d9227cc2c45b1270139..23e58f03b04a85611d1b4bb0e5f009a94f2fa57d 100644
|
||||
index 6dec8565e9d290302ce7766357a56b8c2295c163..bf5d8fe260aaca48a73d6ffe9d1312f5161f9365 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1238,7 +1238,7 @@ public abstract class PlayerList {
|
||||
@@ -1186,7 +1186,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean verifyChatTrusted(PlayerChatMessage message) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimize suffocation
|
||||
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 410d75b148920f38ceb04d63d93166bd3b8e35c4..77146c7ec122825231bb8039e6562f832355c266 100644
|
||||
index f4a45a39afae0befa5c6048bb5f2001395d5cbfc..ccc6900644f666729dc47cc0cfcdef66dd65b90a 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -439,7 +439,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -440,7 +440,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
profilerFiller.push("livingEntityBaseTick");
|
||||
if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) {
|
||||
boolean flag = this instanceof Player;
|
||||
@@ -18,7 +18,7 @@ index 410d75b148920f38ceb04d63d93166bd3b8e35c4..77146c7ec122825231bb8039e6562f83
|
||||
this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F);
|
||||
} else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||
double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getSafeZone();
|
||||
@@ -1410,6 +1410,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1411,6 +1411,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Only check for spooky season once an hour
|
||||
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java
|
||||
index 912b099a51269f92f250c7d6094ad41817749f93..af661d572d2bab00a392f858dd910c8be5e16e81 100644
|
||||
index c0198c0b6d00667c9591a5cd254b0bfedc3fb627..ec713dd16a842119c02b760ed45f7de2a839cb3b 100644
|
||||
--- a/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -245,12 +245,30 @@ public class Bat extends AmbientCreature {
|
||||
@@ -246,12 +246,30 @@ public class Bat extends AmbientCreature {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Config to disable method profiler
|
||||
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index e4ade185f575d5dfaf639031ffff3ba116f89765..cb8aee9a42a453944e809bf432faa8afd2b8081e 100644
|
||||
index 309ff4c55b2a4ccf3d18951b51c2e10d0ff39bfc..19b89c3d0a21c0223bac1844081099d2bf8296ab 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1314,7 +1314,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1333,7 +1333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// Paper - improve tick loop - done above
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..b3e536400efa41ba754e52f1ee224365
|
||||
}
|
||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 77146c7ec122825231bb8039e6562f832355c266..2320b7bfc93d14ba9e5809c8f9551a8a5af2d572 100644
|
||||
index ccc6900644f666729dc47cc0cfcdef66dd65b90a..ce4c8e14d3d7b5837dcce006fa67722f3f430fa4 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2157,6 +2157,22 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -2164,6 +2164,22 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] InstantBlockUpdater Reintroduced
|
||||
This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 9c3362e52def414c553fbac22bb8d8304fc3bfd2..2b7e9b5836d717bfcb34816ef70a6e67c8e3a1f1 100644
|
||||
index 145c8e1791638c78b81222181e9f3679a33795a9..015c49c8170ba8d73b2bc9386192681a8ececb3f 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -871,12 +871,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -31,10 +31,10 @@ index 9c3362e52def414c553fbac22bb8d8304fc3bfd2..2b7e9b5836d717bfcb34816ef70a6e67
|
||||
this.debugSynchronizers.tick(this.server.debugSubscribers());
|
||||
profilerFiller.pop();
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index b6ec576ecc6f7924ee5f039ddacaf7195f02fef7..70e67f6f8a6020b65b59d907bd0e335017fb04d0 100644
|
||||
index 01e0dc28ef63456a45b800e72d76180b40811a72..feafaaeca7ffa6fda5af9897c448b61ee1760290 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -112,7 +112,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -113,7 +113,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
.add(new ExplosionParticleInfo(ParticleTypes.SMOKE, 1.0F, 1.0F))
|
||||
.build();
|
||||
public final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList();
|
||||
@@ -43,7 +43,7 @@ index b6ec576ecc6f7924ee5f039ddacaf7195f02fef7..70e67f6f8a6020b65b59d907bd0e3350
|
||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||
private boolean tickingBlockEntities;
|
||||
public final Thread thread;
|
||||
@@ -862,7 +862,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -863,7 +863,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
this.thread = Thread.currentThread();
|
||||
this.biomeManager = new BiomeManager(this, biomeZoomSeed);
|
||||
this.isDebug = isDebug;
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Random flatten triangular distribution
|
||||
This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition)
|
||||
|
||||
diff --git a/net/minecraft/util/RandomSource.java b/net/minecraft/util/RandomSource.java
|
||||
index 8516d47b0ba79d91638837199e7ae0fb6cb44a79..49a70e860eafdeca28ca3684a75bd3c8c4668b9c 100644
|
||||
index 98a54bc4de251014342cda6d0951b7fea79ce553..17a79cef7dac1b407e4e62883b4a943d172fa6b9 100644
|
||||
--- a/net/minecraft/util/RandomSource.java
|
||||
+++ b/net/minecraft/util/RandomSource.java
|
||||
@@ -52,13 +52,25 @@ public interface RandomSource {
|
||||
@@ -14,23 +14,23 @@ index 8516d47b0ba79d91638837199e7ae0fb6cb44a79..49a70e860eafdeca28ca3684a75bd3c8
|
||||
double nextGaussian();
|
||||
|
||||
+ // Leaves start - flattenTriangularDistribution
|
||||
default double triangle(double min, double max) {
|
||||
- return min + max * (this.nextDouble() - this.nextDouble());
|
||||
default double triangle(double center, double maxDeviation) {
|
||||
- return center + maxDeviation * (this.nextDouble() - this.nextDouble());
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.flattenTriangularDistribution) {
|
||||
+ this.nextDouble();
|
||||
+ return min + max * (-1 + this.nextDouble() * 2);
|
||||
+ return center + maxDeviation * (-1 + this.nextDouble() * 2);
|
||||
+ } else {
|
||||
+ return min + max * (this.nextDouble() - this.nextDouble());
|
||||
+ return center + maxDeviation * (this.nextDouble() - this.nextDouble());
|
||||
+ }
|
||||
}
|
||||
|
||||
default float triangle(float min, float max) {
|
||||
- return min + max * (this.nextFloat() - this.nextFloat());
|
||||
default float triangle(float center, float maxDeviation) {
|
||||
- return center + maxDeviation * (this.nextFloat() - this.nextFloat());
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.flattenTriangularDistribution) {
|
||||
+ this.nextFloat();
|
||||
+ return min + max * (-1 + this.nextFloat() * 2);
|
||||
+ return center + maxDeviation * (-1 + this.nextFloat() * 2);
|
||||
+ } else {
|
||||
+ return min + max * (this.nextFloat() - this.nextFloat());
|
||||
+ return center + maxDeviation * (this.nextFloat() - this.nextFloat());
|
||||
+ }
|
||||
}
|
||||
+ // Leaves end - flattenTriangularDistribution
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] BBOR Protocol
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 4dcec2e8a3120a3dfa078e8cf6857ba99ca01a2d..90287336da43a8eefd5f154c00fba6ee90eda211 100644
|
||||
index de59760d27280555a334bda4f436164568cffbd6..bdc564c24982c196f151121fb769c7cfad4a08b0 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -757,6 +757,11 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -759,6 +759,11 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
|
||||
public void setLoaded(boolean loaded) {
|
||||
this.loaded = loaded;
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] PCA sync protocol
|
||||
This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index fde1f235332127f727da8491e03b54680e42ea4a..32e8f67e61b7611c846a75cac042dcf7860d5f69 100644
|
||||
index c87a1a5e3696e40f9f0d6f4d93e102e73325d4f8..b01f53af58afdde22f062e6d16888bf09ee98805 100644
|
||||
--- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -305,6 +305,13 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory
|
||||
@@ -306,6 +306,13 @@ public abstract class AbstractHorse extends Animal implements HasCustomInventory
|
||||
public void createInventory() {
|
||||
SimpleContainer simpleContainer = this.inventory;
|
||||
this.inventory = new SimpleContainer(this.getInventorySize(), (org.bukkit.entity.AbstractHorse) this.getBukkitEntity()); // CraftBukkit
|
||||
@@ -24,11 +24,11 @@ index fde1f235332127f727da8491e03b54680e42ea4a..32e8f67e61b7611c846a75cac042dcf7
|
||||
int min = Math.min(simpleContainer.getContainerSize(), this.inventory.getContainerSize());
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index cf4703cb909aa5906fdd689082208ea4dd77fc0f..54ba469380b51b38327c107e3a1c5574395f3507 100644
|
||||
index 6bb17ecbd93f6ced5436cf75f3695f44eedd4bd9..ea7364f3cc9f339578232ba1103008a9ed50234a 100644
|
||||
--- a/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -48,6 +48,15 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
super(entityType, level);
|
||||
super(type, level);
|
||||
this.setPathfindingMalus(PathType.DANGER_FIRE, 16.0F);
|
||||
this.setPathfindingMalus(PathType.DAMAGE_FIRE, -1.0F);
|
||||
+ // Leaves start - pca
|
||||
@@ -44,7 +44,7 @@ index cf4703cb909aa5906fdd689082208ea4dd77fc0f..54ba469380b51b38327c107e3a1c5574
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
index 8643d46d21852e9e14f9b2448f1c0eb26a737ebb..991ae9f719e63cb77e692213d4a80f0486b86528 100644
|
||||
index 0f9bfcd1eab023c1772e9fafcda85d110904bd1c..8fdde0cc090c80b65b4c0d679bf4b412b6b761ee 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
@@ -65,6 +65,11 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||
@@ -60,10 +60,10 @@ index 8643d46d21852e9e14f9b2448f1c0eb26a737ebb..991ae9f719e63cb77e692213d4a80f04
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 36a72a11d28f99bfe85868461925b778cc01478e..bebe8737b71fc37336342f14b6ea4cfab12d3f34 100644
|
||||
index d8176f1f36f12fe179b5a63e6bf8f290a7a7461d..37bbd8d2cf412983fc4eb89737b3343f17364cae 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -429,6 +429,16 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -430,6 +430,16 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +81,10 @@ index 36a72a11d28f99bfe85868461925b778cc01478e..bebe8737b71fc37336342f14b6ea4cfa
|
||||
public void setRecipeUsed(@Nullable RecipeHolder<?> recipe) {
|
||||
if (recipe != null) {
|
||||
diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
index f8cad05f5f1692c9a8701ff01f33d83477600c34..e265dbe8f84f80314f3e19c3724fff24929e3a13 100644
|
||||
index 75c09a2079c89f9346391abdd01ef8790b9cbb13..6741fe3abc4396236dc0ca31074e36d66e42c39a 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
@@ -123,6 +123,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -124,6 +124,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index f8cad05f5f1692c9a8701ff01f33d83477600c34..e265dbe8f84f80314f3e19c3724fff24
|
||||
protected Component getDefaultName() {
|
||||
return DEFAULT_NAME;
|
||||
diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
index 2e58d918abe1d825af3b05dfd38d76cc12df3403..be0693e53eb7dc6851a8bc642a072797cf2efe90 100644
|
||||
index f0673167d6273c7689cd58ac8f51e51649cb3ad0..03c9a2d253ba6fec39a0322eb74ac611fdc8b7f0 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
@@ -149,6 +149,11 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
@@ -154,10 +154,10 @@ index 2e58d918abe1d825af3b05dfd38d76cc12df3403..be0693e53eb7dc6851a8bc642a072797
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
index 8602a42967ebc28821d6156c07e0aad69c12fa9d..6124a10814c1122ea1685646541395b452e9d4b3 100644
|
||||
index 5b28e257982c911f4d8ffe286dc125b3f9b64ee4..a4d3d5b6830d156c76e381c5437867c0ed104016 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
@@ -332,4 +332,14 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -334,4 +334,14 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
protected AbstractContainerMenu createMenu(int id, Inventory player) {
|
||||
return new BrewingStandMenu(id, player, this, this.dataAccess);
|
||||
}
|
||||
@@ -173,7 +173,7 @@ index 8602a42967ebc28821d6156c07e0aad69c12fa9d..6124a10814c1122ea1685646541395b4
|
||||
+ // Leaves end - pca
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/ChestBlockEntity.java b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
index c0d4dd95812172a86e5b6f4217bf3cb9d7ee6f2a..8a6593f99525bc3375d8c4a263f2fd12635ca7c5 100644
|
||||
index 6b1299c20573ca009f6bffce829a4a593f548fce..5b209de34bd425bf6c209a5317603f1c6d7280bf 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
@@ -214,6 +214,16 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement
|
||||
@@ -269,7 +269,7 @@ index 28348e3881c3c8591053a01b193fb2a956f79726..ab88bca97fe275528a2feb22e5da8925
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
index e2a2811464ff7455e513944b7565f9f226a5ed34..10c123b9cffdc79d069a82d09e57b24bc1572771 100644
|
||||
index 4d268864656ad67e6971b74534e25ac47d922cbd..68fcb64d13bbd61ad78137f101ab20264f402df8 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
@@ -268,6 +268,16 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Jade Protocol
|
||||
This patch is Powered by Jade(https://github.com/Snownee/Jade)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
index 4792e7e6b720a315d64f18d9c3b12f703da8fb21..11ccba9fc53a68d7c7dd4b7938b931b92ba45e9a 100644
|
||||
index b5ce8de41b087812b02f22d538d5ca18eee60694..7b63c9aa70f070208e9a161fbee8d913204a2394 100644
|
||||
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
||||
@@ -63,7 +63,7 @@ public class Armadillo extends Animal {
|
||||
@@ -64,7 +64,7 @@ public class Armadillo extends Animal {
|
||||
public final AnimationState rollOutAnimationState = new AnimationState();
|
||||
public final AnimationState rollUpAnimationState = new AnimationState();
|
||||
public final AnimationState peekAnimationState = new AnimationState();
|
||||
@@ -17,9 +17,9 @@ index 4792e7e6b720a315d64f18d9c3b12f703da8fb21..11ccba9fc53a68d7c7dd4b7938b931b9
|
||||
+ public int scuteTime; // Leaves - private -> public
|
||||
private boolean peekReceivedClient = false;
|
||||
|
||||
public Armadillo(EntityType<? extends Animal> entityType, Level level) {
|
||||
public Armadillo(EntityType<? extends Animal> type, Level level) {
|
||||
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
index d216c2fbf2fe846c0d9b7164d24eb3815b7235ff..21ca8235f5b165bf9e83190883f6c25661a27396 100644
|
||||
index 3ce172c1bdaf8b8a8ad774dd37498e8e379c68bb..5736d20494d2aaad1d5ac3403d4a923199bdbf13 100644
|
||||
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
@@ -247,7 +247,7 @@ public class Tadpole extends AbstractFish {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Player operation limiter
|
||||
This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 96501267033fb79f2b7c55e275178f0233d261d2..86ba559fea4f8f5de4189155a27472f902726ef0 100644
|
||||
index 04ea4e33504703c4074aef6e74ec06dc772b1bb9..0110db0b1002b2007892e5c57b74de567d901d7b 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -442,6 +442,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -443,6 +443,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public boolean isRealPlayer; // Paper
|
||||
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
|
||||
@@ -20,7 +20,7 @@ index 96501267033fb79f2b7c55e275178f0233d261d2..86ba559fea4f8f5de4189155a27472f9
|
||||
|
||||
// Paper start - rewrite chunk system
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||
@@ -722,6 +726,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -723,6 +727,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.tickClientLoadTimeout();
|
||||
@@ -28,7 +28,7 @@ index 96501267033fb79f2b7c55e275178f0233d261d2..86ba559fea4f8f5de4189155a27472f9
|
||||
this.gameMode.tick();
|
||||
this.wardenSpawnTracker.tick();
|
||||
if (this.invulnerableTime > 0) {
|
||||
@@ -3112,4 +3117,31 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -3103,4 +3108,31 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -61,7 +61,7 @@ index 96501267033fb79f2b7c55e275178f0233d261d2..86ba559fea4f8f5de4189155a27472f9
|
||||
+ // Leaves end - player operation limiter
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 6133f70e72c56d09c5f9d4a988ae8913102f99df..0bcc7e50b57c7d48c65f329ab711fe847bb0c834 100644
|
||||
index 7166889bce8065508030ecd5b1400ee9be031bf3..65e2edf39857b2e03c5a32dfb3b822b5cb4ce93c 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -320,6 +320,19 @@ public class ServerPlayerGameMode {
|
||||
@@ -85,7 +85,7 @@ index 6133f70e72c56d09c5f9d4a988ae8913102f99df..0bcc7e50b57c7d48c65f329ab711fe84
|
||||
this.debugLogging(pos, true, sequence, message);
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
|
||||
index 19649f75889d1c4243519eb8ccb46f4b9abd0f68..27f6cb2e8104f1e12bed65d090d857b408297013 100644
|
||||
index 7bca36dd26afb02524022df74147f628edf51460..58ec8a43265ebf50fdd71f2cbb7dedf4762bc5b4 100644
|
||||
--- a/net/minecraft/world/item/BlockItem.java
|
||||
+++ b/net/minecraft/world/item/BlockItem.java
|
||||
@@ -64,6 +64,21 @@ public class BlockItem extends Item {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Renewable Elytra
|
||||
This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java
|
||||
index 16783b21906e0595d46c876f87c29d02920ca784..64d230eac0d5b28c7be86ca3f9eaaddb3b9d767e 100644
|
||||
index b0f0a70ef6d708917ac8278c7eebd81d1fd7df6a..25c02ce8a613adae374bf85ed282399d44fba2ef 100644
|
||||
--- a/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -241,6 +241,20 @@ public class Phantom extends Mob implements Enemy {
|
||||
@@ -242,6 +242,20 @@ public class Phantom extends Mob implements Enemy {
|
||||
return targetingConditions.test(level, this, entity);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] MC Technical Survival Mode
|
||||
Will automatically overwrite some configuration after startup
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index cda496fe531953a78c868fab96705e652ec41a99..a01c80065ecdabc89276fc755f0aee29a3fe4542 100644
|
||||
index 0110db0b1002b2007892e5c57b74de567d901d7b..d4df6ca7360d4bc605a51061444191d7929c7778 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1768,7 +1768,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1747,7 +1747,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public boolean isInvulnerableTo(ServerLevel level, DamageSource damageSource) {
|
||||
return (super.isInvulnerableTo(level, damageSource) // Paper - disable player cramming;
|
||||
|| this.isChangingDimension() && !damageSource.is(DamageTypes.ENDER_PEARL)
|
||||
@@ -32,7 +32,7 @@ index ffc960a4e66ed03a358b363a4ce1dcee0b29ac36..c1671664618428d5b82df721b559ce72
|
||||
map.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time));
|
||||
Predicate<BlockPos> predicate1 = pos -> {
|
||||
diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..d8effc3a9773d29319b8e2bd15abbf03f0996ce5 100644
|
||||
index 4fc773a0cb9d68e22e4d6cc7d819196a6cabf4f1..af87a79c58b41e625a83665ff0893c9a29386a35 100644
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
@@ -65,7 +65,7 @@ public class EndCrystal extends Entity {
|
||||
@@ -45,7 +45,7 @@ index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..d8effc3a9773d29319b8e2bd15abbf03
|
||||
|| ((ServerLevel) this.level()).getDragonFight() == null
|
||||
|| ((ServerLevel) this.level()).getDragonFight().respawnStage == null
|
||||
diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index e199ae22af6675fa602cf39d9e6bf1ffd73f64f7..c373eae8aa8df57d5925021635237a32bada444a 100644
|
||||
index c685b5123c88fc73c26a3ba31225ab1226e52702..d36ce16724e9f5a79960f0aa265a0354f5240abc 100644
|
||||
--- a/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -100,7 +100,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
@@ -58,7 +58,7 @@ index e199ae22af6675fa602cf39d9e6bf1ffd73f64f7..c373eae8aa8df57d5925021635237a32
|
||||
this.applyGravity();
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 6198d6d4952088f1fef28e84f65f22e702b4435d..a5c43adaa560540670f083302e79004edad6829a 100644
|
||||
index 911c5099a2bbb3e955c9314219114873642c7355..74d5ef7e0a63661f8b314846b8985c5f04cae87e 100644
|
||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -84,7 +84,7 @@ public final class NaturalSpawner {
|
||||
@@ -71,7 +71,7 @@ index 6198d6d4952088f1fef28e84f65f22e702b4435d..a5c43adaa560540670f083302e79004e
|
||||
entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) {
|
||||
continue;
|
||||
diff --git a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
index be0693e53eb7dc6851a8bc642a072797cf2efe90..17f8827e86e4bc9d326a0daee7855fc0188410e1 100644
|
||||
index 03c9a2d253ba6fec39a0322eb74ac611fdc8b7f0..7ffcc21a6c4d679e860e845492429af838491444 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
||||
@@ -344,7 +344,7 @@ public class BeehiveBlockEntity extends BlockEntity {
|
||||
|
||||
@@ -39,10 +39,10 @@ index 4f56cdcf658234b1ca92d38c3df3d31e9be34a15..f6e18d62db18616a422ae74d6f329d1b
|
||||
if (count > i) {
|
||||
source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", i, itemStack.getDisplayName()));
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7f6cc8f111f6f5df311397a7e31e25fa2c93c685..827fa1551235954d8d9b0894465f885d98d1c0ba 100644
|
||||
index ef7d44ea1c1582bbf1d544819825778c414fe40d..a77a7b77c27a0d1257f4eaa071b1c5934aff0f47 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2997,7 +2997,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2998,7 +2998,7 @@ public class ServerGamePacketListenerImpl
|
||||
} else if (slot.mayPlace(cursor)) {
|
||||
if (ItemStack.isSameItemSameComponents(clickedItem, cursor)) {
|
||||
int toPlace = packet.buttonNum() == 0 ? cursor.getCount() : 1;
|
||||
@@ -51,7 +51,7 @@ index 7f6cc8f111f6f5df311397a7e31e25fa2c93c685..827fa1551235954d8d9b0894465f885d
|
||||
toPlace = Math.min(toPlace, slot.container.getMaxStackSize() - clickedItem.getCount());
|
||||
if (toPlace == 1) {
|
||||
action = InventoryAction.PLACE_ONE;
|
||||
@@ -3033,7 +3033,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3034,7 +3034,7 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
} else if (ItemStack.isSameItemSameComponents(cursor, clickedItem)) {
|
||||
if (clickedItem.getCount() >= 0) {
|
||||
@@ -60,7 +60,7 @@ index 7f6cc8f111f6f5df311397a7e31e25fa2c93c685..827fa1551235954d8d9b0894465f885d
|
||||
// As of 1.5, this is result slots only
|
||||
action = InventoryAction.PICKUP_ALL;
|
||||
}
|
||||
@@ -3250,6 +3250,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3251,6 +3251,7 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.containerMenu.broadcastFullState();
|
||||
} else {
|
||||
this.player.containerMenu.broadcastChanges();
|
||||
@@ -68,7 +68,7 @@ index 7f6cc8f111f6f5df311397a7e31e25fa2c93c685..827fa1551235954d8d9b0894465f885d
|
||||
}
|
||||
if (packet.buttonNum() == Inventory.SLOT_OFFHAND && this.player.containerMenu != this.player.inventoryMenu) this.player.containerSynchronizer.sendOffHandSlotChange(); // Paper - update offhand data when the player is clicking in an inventory not their own as the sychronizer does not include offhand slots
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes.
|
||||
@@ -3361,7 +3362,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3362,7 +3363,7 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
boolean flag1 = packet.slotNum() >= 1 && packet.slotNum() <= 45;
|
||||
@@ -77,7 +77,7 @@ index 7f6cc8f111f6f5df311397a7e31e25fa2c93c685..827fa1551235954d8d9b0894465f885d
|
||||
if (flag || (flag1 && !ItemStack.matches(this.player.inventoryMenu.getSlot(packet.slotNum()).getItem(), packet.itemStack()))) { // Insist on valid slot
|
||||
// CraftBukkit start - Call click event
|
||||
org.bukkit.inventory.InventoryView inventory = this.player.inventoryMenu.getBukkitView();
|
||||
@@ -3403,6 +3404,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3404,6 +3405,7 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.inventoryMenu.getSlot(packet.slotNum()).setByPlayer(itemStack);
|
||||
this.player.inventoryMenu.setRemoteSlot(packet.slotNum(), itemStack);
|
||||
this.player.inventoryMenu.broadcastChanges();
|
||||
@@ -125,7 +125,7 @@ index d907e24d563e27acab2f2bf9711b1755ea9afd19..75170c8d3be477a6ea2a1d62018a6ab6
|
||||
if (min > 0) {
|
||||
other.grow(min);
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index e9a7630b7f2a4b49e2794fcd64dc19b7002d27a1..9c898022b8985a42a653d1c6ddc03f4e9e840b8e 100644
|
||||
index 6be576368695c902a0d6da74b1d77d3018b4585a..e198e4c1ee267c6738117959e71cf4018bf6ef1d 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -270,10 +270,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -214,7 +214,7 @@ index 83ccde54c625d40dc595e000c533f60aa929bd5a..6779503888e6d311758cffde582b0efb
|
||||
|
||||
public void accountStack(ItemStack stack, int maxStackSize) {
|
||||
diff --git a/net/minecraft/world/entity/vehicle/ContainerEntity.java b/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
index 02d2efef2dc0f0e12eac0c71fa290af706f7694d..99f109e2653eff10c011f380694bd77a76381cee 100644
|
||||
index 6e756ed4a811d9fe7d78d7dc89b3b5a735e0e857..358de981544b220bde770410c24e5f6b10520d91 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
@@ -163,7 +163,7 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
@@ -225,9 +225,9 @@ index 02d2efef2dc0f0e12eac0c71fa290af706f7694d..99f109e2653eff10c011f380694bd77a
|
||||
+ stack.limitSize(this.getMaxStackLeaves(stack)); // Leaves - item over-stack util
|
||||
}
|
||||
|
||||
default SlotAccess getChestVehicleSlot(final int index) {
|
||||
default SlotAccess getChestVehicleSlot(final int slot) {
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index e1783ad0adbb791b2ff7441243c9f0aeaf37c7f6..47963968763cbee60016853d617f159c0761d282 100644
|
||||
index 4e53e7c05af11cae2ce8cf313c69a83336e22ba6..e78baa9433b6f5cb32142fe583fe95831b173d5a 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -295,6 +295,13 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -263,14 +263,14 @@ index e1783ad0adbb791b2ff7441243c9f0aeaf37c7f6..47963968763cbee60016853d617f159c
|
||||
carried2.grow(itemStack2.getCount());
|
||||
slot.onTake(player, itemStack2);
|
||||
@@ -626,7 +633,7 @@ public abstract class AbstractContainerMenu {
|
||||
Slot slot2 = this.slots.get(slotId);
|
||||
Slot slot2 = this.slots.get(slotIndex);
|
||||
if (slot2.hasItem()) {
|
||||
ItemStack itemStack = slot2.getItem();
|
||||
- this.setCarried(itemStack.copyWithCount(itemStack.getMaxStackSize()));
|
||||
+ this.setCarried(itemStack.copyWithCount(org.leavesmc.leaves.util.ItemOverstackUtils.getItemStackMaxCount(itemStack))); // Leaves - item over-stack util
|
||||
}
|
||||
} else if (clickType == ClickType.THROW && this.getCarried().isEmpty() && slotId >= 0) {
|
||||
Slot slot2 = this.slots.get(slotId);
|
||||
} else if (clickType == ClickType.THROW && this.getCarried().isEmpty() && slotIndex >= 0) {
|
||||
Slot slot2 = this.slots.get(slotIndex);
|
||||
@@ -657,15 +664,15 @@ public abstract class AbstractContainerMenu {
|
||||
int maxStackSize = button == 0 ? 1 : -1;
|
||||
|
||||
@@ -353,7 +353,7 @@ index 5ceb8964476b40db4511bec91ff13c4f522a1357..f416d7976e41a06b5a8be93485eaa233
|
||||
|
||||
@Nullable
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 671216613df044fb47e728070490beabb008fb04..13d5cb566f31ce0657b93c24c8e20a5ce3559fa4 100644
|
||||
index 14c74eb71b5bfb67d0fcf9d660f748c7b1dba63d..695f377155018d2b919086f0c29bdfb0abe1a2b2 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -164,7 +164,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -405,7 +405,7 @@ index 671216613df044fb47e728070490beabb008fb04..13d5cb566f31ce0657b93c24c8e20a5c
|
||||
return DataResult.error(() -> "Item stack with count of " + count + " was larger than maximum: " + maxStackSize);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
index 6dd3c0f60b04bc690ebd4a33ec57ef806961ee32..b64f3a574e86f80e1fb45ed674a9c64ff658421b 100644
|
||||
index a132883d85d515edb131049714915902444e4c3e..59cea0d226829267e9a5dff9f81789673bd3f062 100644
|
||||
--- a/net/minecraft/world/level/block/CrafterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
@@ -192,7 +192,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@@ -418,10 +418,10 @@ index 6dd3c0f60b04bc690ebd4a33ec57ef806961ee32..b64f3a574e86f80e1fb45ed674a9c64f
|
||||
org.bukkit.craftbukkit.inventory.CraftItemStack oitemstack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack);
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index bebe8737b71fc37336342f14b6ea4cfab12d3f34..4fdb3c36b39213f01f86ba281c7b62af99f5dcce 100644
|
||||
index 37bbd8d2cf412983fc4eb89737b3343f17364cae..8a93c4b9571b3088dc92317544d209603880d3fa 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -409,7 +409,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -410,7 +410,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
ItemStack itemStack = this.items.get(index);
|
||||
boolean flag = !stack.isEmpty() && ItemStack.isSameItemSameComponents(itemStack, stack);
|
||||
this.items.set(index, stack);
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Return nether portal fix
|
||||
This patch is powered by NetherPortalFix(https://github.com/TwelveIterationMods/NetherPortalFix)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index a01c80065ecdabc89276fc755f0aee29a3fe4542..5402ed9510037b49d26e512be6d35a07ad183420 100644
|
||||
index d4df6ca7360d4bc605a51061444191d7929c7778..134f6eba6655b7294ebcdf5cf5d9e2183e2ecf5b 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1579,6 +1579,21 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1576,6 +1576,21 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
org.bukkit.event.player.PlayerChangedWorldEvent changeEvent = new org.bukkit.event.player.PlayerChangedWorldEvent(this.getBukkitEntity(), serverLevel.getWorld());
|
||||
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
|
||||
// CraftBukkit end
|
||||
@@ -32,13 +32,13 @@ index a01c80065ecdabc89276fc755f0aee29a3fe4542..5402ed9510037b49d26e512be6d35a07
|
||||
if (this.isBlocking()) {
|
||||
this.stopUsingItem();
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index f951ea1c6c2b63cc6b7f330cd3100adb507f8e54..248c08b4f1dc6cf47ac311d5872ae56485e3b425 100644
|
||||
index bf5d8fe260aaca48a73d6ffe9d1312f5161f9365..7977a0cfe18c99c4c6ba8c5b56387b690ede554d 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -738,6 +738,20 @@ public abstract class PlayerList {
|
||||
if (fromWorld != level) {
|
||||
org.bukkit.event.player.PlayerChangedWorldEvent event = new org.bukkit.event.player.PlayerChangedWorldEvent(player.getBukkitEntity(), fromWorld.getWorld());
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
@@ -700,6 +700,20 @@ public abstract class PlayerList {
|
||||
// It's possible for respawn to be in a diff dimension
|
||||
if (fromLevel != level) {
|
||||
new org.bukkit.event.player.PlayerChangedWorldEvent(serverPlayer.getBukkitEntity(), fromLevel.getWorld()).callEvent();
|
||||
+ // Leaves start - nether portal fix
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.netherPortalFix) {
|
||||
+ final ResourceKey<Level> fromDim = player.level().dimension();
|
||||
@@ -53,14 +53,14 @@ index f951ea1c6c2b63cc6b7f330cd3100adb507f8e54..248c08b4f1dc6cf47ac311d5872ae564
|
||||
+ }
|
||||
+ }
|
||||
+ // Leaves end - nether portal fix
|
||||
serverPlayer.triggerDimensionChangeTriggers(level);
|
||||
}
|
||||
|
||||
// Save player file again if they were disconnected
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 16154e00d4548dfef44b0a8926bb86397fb8e5f2..4f4331cfb39f3ec30983ef510580ddedcec6795d 100644
|
||||
index ce4c8e14d3d7b5837dcce006fa67722f3f430fa4..759c320fc331704efe5df10d3f1f33aa87262290 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -258,7 +258,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -259,7 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
protected ItemStack useItem = ItemStack.EMPTY;
|
||||
public int useItemRemaining;
|
||||
protected int fallFlyTicks;
|
||||
@@ -70,14 +70,14 @@ index 16154e00d4548dfef44b0a8926bb86397fb8e5f2..4f4331cfb39f3ec30983ef510580dded
|
||||
@Nullable
|
||||
private DamageSource lastDamageSource;
|
||||
diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index c4ca30c8696e63e78d1b798343a429657cfb8d4d..e6bd9a79dfcf9fa835897933d83abda9e4a8b15d 100644
|
||||
index d3f0a61c0c91d3a6a1dc4e59d57743ba89a9c19a..1ad863dc255a7b91d0b163000b6bb5d43e2ad204 100644
|
||||
--- a/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -179,7 +179,18 @@ public class NetherPortalBlock extends Block implements Portal {
|
||||
|
||||
@Nullable
|
||||
private TeleportTransition getExitPortal(ServerLevel level, Entity entity, BlockPos pos, BlockPos exitPos, boolean isNether, WorldBorder worldBorder, int searchRadius, boolean canCreatePortal, int createRadius) { // CraftBukkit
|
||||
- Optional<BlockPos> optional = level.getPortalForcer().findClosestPortalPosition(exitPos, worldBorder, searchRadius); // CraftBukkit
|
||||
private TeleportTransition getExitPortal(ServerLevel level, Entity entity, BlockPos pos, BlockPos exitPos, WorldBorder worldBorder, org.bukkit.craftbukkit.event.PortalEventResult result) { // CraftBukkit
|
||||
- Optional<BlockPos> optional = level.getPortalForcer().findClosestPortalPosition(exitPos, worldBorder, result.searchRadius()); // CraftBukkit
|
||||
+ // Leaves start - fix return portal
|
||||
+ Optional<BlockPos> optional = Optional.empty();
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.netherPortalFix && entity instanceof net.minecraft.server.level.ServerPlayer player) {
|
||||
@@ -87,7 +87,7 @@ index c4ca30c8696e63e78d1b798343a429657cfb8d4d..e6bd9a79dfcf9fa835897933d83abda9
|
||||
+ }
|
||||
+ }
|
||||
+ if (optional.isEmpty()) {
|
||||
+ optional = level.getPortalForcer().findClosestPortalPosition(exitPos, worldBorder, searchRadius); // CraftBukkit
|
||||
+ level.getPortalForcer().findClosestPortalPosition(exitPos, worldBorder, result.searchRadius()); // CraftBukkit
|
||||
+ }
|
||||
+ // Leaves end - fix return portal
|
||||
BlockUtil.FoundRectangle largestRectangleAround;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable vanilla random
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6b380737fa5faa510b6c816fb0d8cba6563b7457..537223e73dbc6e1f76752b6cd8fc059ffea635d4 100644
|
||||
index c6815ffef7fb2fd2e5ef2769c2c93135b52558f5..f6dd8e81f6881400c3278ea53e2ed248625744e1 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -283,7 +283,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -282,7 +282,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
public double yOld;
|
||||
public double zOld;
|
||||
public boolean noPhysics;
|
||||
@@ -18,10 +18,10 @@ index 6b380737fa5faa510b6c816fb0d8cba6563b7457..537223e73dbc6e1f76752b6cd8fc059f
|
||||
private int remainingFireTicks;
|
||||
public boolean wasTouchingWater;
|
||||
diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java
|
||||
index d2d0dcc742b6e28c7c3a5771fa94a4e1ce9e634e..723b3a0492de7e5d673f8b97f4e49ceafa5c91a6 100644
|
||||
index e94c6c1ee969a7d0953b933fb0633cebb510a68c..97fbdb90db218c6f2f81487cc30430d7c90afa8e 100644
|
||||
--- a/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -809,7 +809,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -808,7 +808,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@VisibleForDebug
|
||||
public class BeeGoToHiveGoal extends Bee.BaseBeeGoal {
|
||||
public static final int MAX_TRAVELLING_TICKS = 2400;
|
||||
@@ -30,7 +30,7 @@ index d2d0dcc742b6e28c7c3a5771fa94a4e1ce9e634e..723b3a0492de7e5d673f8b97f4e49cea
|
||||
private static final int MAX_BLACKLISTED_TARGETS = 3;
|
||||
final List<BlockPos> blacklistedTargets = Lists.newArrayList();
|
||||
@Nullable
|
||||
@@ -925,7 +925,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -924,7 +924,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
public class BeeGoToKnownFlowerGoal extends Bee.BaseBeeGoal {
|
||||
private static final int MAX_TRAVELLING_TICKS = 2400;
|
||||
@@ -40,20 +40,20 @@ index d2d0dcc742b6e28c7c3a5771fa94a4e1ce9e634e..723b3a0492de7e5d673f8b97f4e49cea
|
||||
BeeGoToKnownFlowerGoal() {
|
||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
||||
diff --git a/net/minecraft/world/entity/animal/Squid.java b/net/minecraft/world/entity/animal/Squid.java
|
||||
index 1ec68ca8c25939cdbc43f9db579cdf0a5e90def8..149cf78ebe2826a0eb1602722fcf272d9f4ace48 100644
|
||||
index 8313ea146ba6910d92653c29887c94b75f68cce4..9b8775a9069db99605ac5367804923d537320d68 100644
|
||||
--- a/net/minecraft/world/entity/animal/Squid.java
|
||||
+++ b/net/minecraft/world/entity/animal/Squid.java
|
||||
@@ -46,7 +46,7 @@ public class Squid extends AgeableWaterCreature {
|
||||
@@ -47,7 +47,7 @@ public class Squid extends AgeableWaterCreature {
|
||||
|
||||
public Squid(EntityType<? extends Squid> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
- //this.random.setSeed(this.getId()); // Paper - Share random for entities to make them more random
|
||||
public Squid(EntityType<? extends Squid> type, Level level) {
|
||||
super(type, level);
|
||||
- // this.random.setSeed(this.getId()); // Paper - Share random for entities to make them more random
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.modify.useVanillaRandom) this.random.setSeed(this.getId()); // Paper - Share random for entities to make them more random // Leaves - vanilla plz
|
||||
this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 9c898022b8985a42a653d1c6ddc03f4e9e840b8e..78edda120dd53be66f3e995dcf4e62799a837532 100644
|
||||
index e198e4c1ee267c6738117959e71cf4018bf6ef1d..671ae6195c86b44dfb2df4414a35287e3acd954f 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -66,7 +66,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -68,11 +68,11 @@ index 9c898022b8985a42a653d1c6ddc03f4e9e840b8e..78edda120dd53be66f3e995dcf4e6279
|
||||
+ this.setDeltaMovement(this.random.nextDouble() * 0.2 - 0.1, 0.2, this.random.nextDouble() * 0.2 - 0.1);
|
||||
+ }
|
||||
+ // Leaves end - vanilla yes, safe no
|
||||
this.setItem(itemStack);
|
||||
this.setItem(stack);
|
||||
// Paper end - Don't use level random in entity constructors
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index c373eae8aa8df57d5925021635237a32bada444a..ee305b69b35e02aa4ca3f49ce48de67466f2b06b 100644
|
||||
index d36ce16724e9f5a79960f0aa265a0354f5240abc..8230b42919bd8888acf656c5846601bead39598f 100644
|
||||
--- a/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -68,7 +68,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
|
||||
@@ -30,10 +30,10 @@ index 3e4241976fdfe65bc0aae90a9097770745c0ddf1..8e3e9a8aaee8fd4fbe986f9f07994517
|
||||
throw PacketUtils.makeReportedException(var3, this.packet, this.listener);
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 9c90374a34b749fd69a8e82cae8109e65222e1b3..0dbff3296d56822fd94912d1ac5c05e3d6558299 100644
|
||||
index c8135525666da2cedc134025327e240fbe6cd63c..bd9d83675d40b383678c6066b73b9e053b5ea6a6 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1789,7 +1789,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1808,7 +1808,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
serverLevel.tick(hasTimeLeft);
|
||||
@@ -51,7 +51,7 @@ index 9c90374a34b749fd69a8e82cae8109e65222e1b3..0dbff3296d56822fd94912d1ac5c05e3
|
||||
serverLevel.fillReportDetails(crashReport);
|
||||
throw new ReportedException(crashReport);
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 2b7e9b5836d717bfcb34816ef70a6e67c8e3a1f1..90822a9976a6829fbd4159aef0f2075aaf2f54f7 100644
|
||||
index 015c49c8170ba8d73b2bc9386192681a8ececb3f..b4000881962db5fe9c6de38f406647d95a395ec3 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -842,6 +842,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -67,10 +67,10 @@ index 2b7e9b5836d717bfcb34816ef70a6e67c8e3a1f1..90822a9976a6829fbd4159aef0f2075a
|
||||
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 033ea42f807ab1c4373a351bd7662488a959a18c..93dc94ec1e4e93af7ceea21fb01d35ae65b40b92 100644
|
||||
index 134f6eba6655b7294ebcdf5cf5d9e2183e2ecf5b..97e133f3555057e36e3e7157f1411ba923ab2823 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -901,6 +901,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -902,6 +902,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
((org.bukkit.craftbukkit.CraftWorldBorder) this.getBukkitEntity().getWorldBorder()).getHandle().tick();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -84,10 +84,10 @@ index 033ea42f807ab1c4373a351bd7662488a959a18c..93dc94ec1e4e93af7ceea21fb01d35ae
|
||||
CrashReport crashReport = CrashReport.forThrowable(var4, "Ticking player");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Player being ticked");
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index ee4bc2a82d577012a9431e558643bb88c571df10..14483297df08ee275d32ab8fab5f9e042ff95be8 100644
|
||||
index f6dd8e81f6881400c3278ea53e2ed248625744e1..0129274ab88a151600f4fdde92dae73bec352fb2 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1364,9 +1364,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1363,9 +1363,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
this.walkingStepSound(pos, state);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ index ee4bc2a82d577012a9431e558643bb88c571df10..14483297df08ee275d32ab8fab5f9e04
|
||||
return true;
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index f3bc957110ef60ad5e4384b934b60dccea76d5a7..ffca65d881ee6f4bde8e579d012ee5c1a11a0c2d 100644
|
||||
index e08083fbb6c3090c9a6f78dbbe487cbd4fec485a..4ed941783ed038df8e94ea92cdebb72b31921d90 100644
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -183,7 +183,17 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
@@ -154,7 +154,7 @@ index 040919c61ed29b3eda73b5d0f8ed905011e969a4..22dae9cf15fafda4b398025d85bad3e2
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 90287336da43a8eefd5f154c00fba6ee90eda211..e96a7693eb0d94888a3b1db680378374e7aebb91 100644
|
||||
index bdc564c24982c196f151121fb769c7cfad4a08b0..7c5f827134e0fa81031660a78d4d404c21840cb6 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -380,7 +380,7 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -166,7 +166,7 @@ index 90287336da43a8eefd5f154c00fba6ee90eda211..e96a7693eb0d94888a3b1db680378374
|
||||
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING).update(i, y, i2, state);
|
||||
this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES).update(i, y, i2, state);
|
||||
this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR).update(i, y, i2, state);
|
||||
@@ -452,6 +452,7 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -454,6 +454,7 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
this.markUnsaved();
|
||||
return blockState;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ index 90287336da43a8eefd5f154c00fba6ee90eda211..e96a7693eb0d94888a3b1db680378374
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
index 332b33a004ab11150cca0cc2cefc26d0286648f5..8942aa2ca4796c7c36c0955141627ea905e0ec64 100644
|
||||
index f45cf0136e77ed5a903d033a7b0611e5edc23db9..77ed7a6a4bea3dfc77d060c49f77f4e080da200b 100644
|
||||
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
@@ -60,9 +60,22 @@ public interface NeighborUpdater {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Bedrock break list
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 0dbff3296d56822fd94912d1ac5c05e3d6558299..617f8f6b39727603d5d44bd97e08c21c10630b3a 100644
|
||||
index bd9d83675d40b383678c6066b73b9e053b5ea6a6..fa2ae16481541308d525d0ac70a8bbc2c66a8851 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1824,6 +1824,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1843,6 +1843,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
profilerFiller.popPush("server gui refresh");
|
||||
|
||||
org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleTick(tickCount); // Leaves - protocol
|
||||
@@ -17,7 +17,7 @@ index 0dbff3296d56822fd94912d1ac5c05e3d6558299..617f8f6b39727603d5d44bd97e08c21c
|
||||
for (int i = 0; i < this.tickables.size(); i++) {
|
||||
this.tickables.get(i).run();
|
||||
diff --git a/net/minecraft/server/ServerScoreboard.java b/net/minecraft/server/ServerScoreboard.java
|
||||
index fc1c377ad05edcefacd407671801ae605f3fc31a..5c9f2a8476ff260ec7f0843f7c956c71e9b0d34d 100644
|
||||
index 5886de75a8be3b7134b52520e5bc635812fda659..07294b9cfa788313da7433946312939d93956021 100644
|
||||
--- a/net/minecraft/server/ServerScoreboard.java
|
||||
+++ b/net/minecraft/server/ServerScoreboard.java
|
||||
@@ -158,6 +158,7 @@ public class ServerScoreboard extends Scoreboard {
|
||||
@@ -37,10 +37,10 @@ index fc1c377ad05edcefacd407671801ae605f3fc31a..5c9f2a8476ff260ec7f0843f7c956c71
|
||||
this.stopTrackingObjective(objective);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index 1ec81224f5e048ffe6342c8d698713f30ebe96b8..26c9ee02de0d5d9f556c947b5461cd10cd03d649 100644
|
||||
index b0df1f59baf2c56c6eced429315e02aaac2cc325..114aa0f1ac9feefdb856bfc821489b864aba18f3 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -74,6 +74,11 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -75,6 +75,11 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@Override
|
||||
public void setPlacedBy(Level level, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) {
|
||||
if (!level.isClientSide()) {
|
||||
@@ -52,7 +52,7 @@ index 1ec81224f5e048ffe6342c8d698713f30ebe96b8..26c9ee02de0d5d9f556c947b5461cd10
|
||||
this.checkIfExtend(level, pos, state);
|
||||
}
|
||||
}
|
||||
@@ -229,7 +234,13 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -230,7 +235,13 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
}
|
||||
}
|
||||
// Paper end - Fix sticky pistons and BlockPistonRetractEvent
|
||||
@@ -67,7 +67,7 @@ index 1ec81224f5e048ffe6342c8d698713f30ebe96b8..26c9ee02de0d5d9f556c947b5461cd10
|
||||
} else {
|
||||
this.moveBlocks(level, pos, direction, false);
|
||||
}
|
||||
@@ -238,6 +249,11 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -239,6 +250,11 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
// Paper start - Protect Bedrock and End Portal/Frames from being destroyed; fix headless pistons breaking blocks
|
||||
BlockPos headPos = pos.relative(direction);
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits || level.getBlockState(headPos) == Blocks.PISTON_HEAD.defaultBlockState().setValue(FACING, direction)) { // double check to make sure we're not a headless piston
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable distance check for UseItemOnPacket
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0708331ed67723b6d9aef0486b7d89771e07a60a..bec2943bf4535dee57490423c91924e2c2b905d6 100644
|
||||
index a77a7b77c27a0d1257f4eaa071b1c5934aff0f47..28fe3e0c8bb743237ddf324f633e986fb91bb405 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2045,7 +2045,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2046,7 +2046,7 @@ public class ServerGamePacketListenerImpl
|
||||
if (this.player.canInteractWithBlock(blockPos, 1.0)) {
|
||||
Vec3 vec3 = location.subtract(Vec3.atCenterOf(blockPos));
|
||||
double d = 1.0000001;
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Disable packet limit
|
||||
|
||||
|
||||
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
||||
index d36a33a9ea2cc262f746314eda9770e19e328ddd..39a703a95cf3e80f8be24514aa7216d6aab76b81 100644
|
||||
index b186b5e0d3b32d7b51b2f58f0ef4b2bf36ae5c13..c6fa04cc5e0352fef675baff93300b7e33fdfca5 100644
|
||||
--- a/net/minecraft/network/Connection.java
|
||||
+++ b/net/minecraft/network/Connection.java
|
||||
@@ -245,8 +245,8 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -20,10 +20,10 @@ index d36a33a9ea2cc262f746314eda9770e19e328ddd..39a703a95cf3e80f8be24514aa7216d6
|
||||
synchronized (PACKET_LIMIT_LOCK) {
|
||||
if (this.allPacketCounts != null) {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a7696c735686a2b4fa8f511dab880528dc31e592..1295306865264071c46c1d8d007fb0d787863c6c 100644
|
||||
index 28fe3e0c8bb743237ddf324f633e986fb91bb405..55374283f8cb1e7f3485eae7dc1da2db3cc98a0c 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -827,7 +827,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -828,7 +828,7 @@ public class ServerGamePacketListenerImpl
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); // Paper - AsyncTabCompleteEvent; run this async
|
||||
// CraftBukkit start
|
||||
@@ -32,7 +32,7 @@ index a7696c735686a2b4fa8f511dab880528dc31e592..1295306865264071c46c1d8d007fb0d7
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
||||
return;
|
||||
}
|
||||
@@ -2009,6 +2009,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2010,6 +2010,7 @@ public class ServerGamePacketListenerImpl
|
||||
private static int getSpamThreshold() { return io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold; } // Paper - Configurable threshold
|
||||
|
||||
private boolean checkLimit(long timestamp) {
|
||||
@@ -40,7 +40,7 @@ index a7696c735686a2b4fa8f511dab880528dc31e592..1295306865264071c46c1d8d007fb0d7
|
||||
if (this.lastLimitedPacket != -1 && timestamp - this.lastLimitedPacket < getSpamThreshold() && this.limitedPackets++ >= 8) { // Paper - Configurable threshold; raise packet limit to 8
|
||||
return false;
|
||||
}
|
||||
@@ -2543,6 +2544,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2544,6 +2545,7 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
// Spigot start - spam exclusions
|
||||
private void detectRateSpam(String message) {
|
||||
@@ -48,7 +48,7 @@ index a7696c735686a2b4fa8f511dab880528dc31e592..1295306865264071c46c1d8d007fb0d7
|
||||
// CraftBukkit start - replaced with thread safe throttle
|
||||
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
||||
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
|
||||
@@ -3262,7 +3264,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3263,7 +3265,7 @@ public class ServerGamePacketListenerImpl
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
// Paper start - auto recipe limit
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Syncmatica Protocol
|
||||
This patch is Powered by Syncmatica(https://github.com/End-Tech/syncmatica)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index d2693b19a8bffd598188fa821771350660c6a98e..84242a60d399c77599d24105e123ff664cc05d5d 100644
|
||||
index 55374283f8cb1e7f3485eae7dc1da2db3cc98a0c..ea9e98313c25e7ce94b011f5bc74a4318145c6f6 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -325,9 +325,12 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -326,9 +326,12 @@ public class ServerGamePacketListenerImpl
|
||||
this.signedMessageDecoder = SignedMessageChain.Decoder.unsigned(player.getUUID(), server::enforceSecureProfile);
|
||||
this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat
|
||||
this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event
|
||||
|
||||
@@ -18,10 +18,10 @@ index f7bb979f08634a7e1b77c59040f59fb5e11aafa5..3cad7d6bca9af77bace18bfd7cc013ac
|
||||
for (int i1 = 0; i1 < this.height; i1++) {
|
||||
for (int i2 = 0; i2 < this.depth; i2++) {
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 8ccd40c70e150bd5a8d89818c229258642f2349e..18a567b676f0bfcd725f19c5ed9e3fdbc8e65573 100644
|
||||
index fcb0fb9ca663ec40e1541d099bc3d710963f6c9d..d2e49f8490bff739a3726e73a303b2c24c47617f 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -273,8 +273,68 @@ public class EndDragonFight {
|
||||
@@ -274,8 +274,68 @@ public class EndDragonFight {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ index 8ccd40c70e150bd5a8d89818c229258642f2349e..18a567b676f0bfcd725f19c5ed9e3fdb
|
||||
ChunkPos chunkPos = new ChunkPos(this.origin);
|
||||
|
||||
for (int i = -8 + chunkPos.x; i <= 8 + chunkPos.x; i++) {
|
||||
@@ -572,6 +632,11 @@ public class EndDragonFight {
|
||||
@@ -573,6 +633,11 @@ public class EndDragonFight {
|
||||
}
|
||||
|
||||
public boolean respawnDragon(List<EndCrystal> crystals) { // CraftBukkit - return boolean
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Creative fly no clip
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index c452ee3f26bf3f9e055d5055473b1ef76a8a5884..8bd430c5c417c76db02cf1e2c0bc6f229ed150f1 100644
|
||||
index 85c5a8497ee45de232a87c3f152e7ca67c1821ee..47bdbf9c73f19ff85ae93f3e31e45d35fe8c0a92 100644
|
||||
--- a/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -202,7 +202,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -18,10 +18,10 @@ index c452ee3f26bf3f9e055d5055473b1ef76a8a5884..8bd430c5c417c76db02cf1e2c0bc6f22
|
||||
} else {
|
||||
this.followingPlayer = null;
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 468097eafe73b45924697d36acc962b7bf9ca17b..a79f70af6c9c4939007307728c87d25808fce372 100644
|
||||
index e4c7262ded690e56ba2eef71bb7d46f9cd99b8b7..7b0fdecf7ca4a5b6dd910369d6546a909926dff2 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -246,8 +246,8 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -247,8 +247,8 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -32,7 +32,7 @@ index 468097eafe73b45924697d36acc962b7bf9ca17b..a79f70af6c9c4939007307728c87d258
|
||||
this.setOnGround(false);
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -375,7 +375,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
if (this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.SWIMMING)) {
|
||||
Pose desiredPose = this.getDesiredPose();
|
||||
Pose pose;
|
||||
@@ -41,7 +41,7 @@ index 468097eafe73b45924697d36acc962b7bf9ca17b..a79f70af6c9c4939007307728c87d258
|
||||
pose = desiredPose;
|
||||
} else if (this.canPlayerFitWithinBlocksAndEntitiesWhen(Pose.CROUCHING)) {
|
||||
pose = Pose.CROUCHING;
|
||||
@@ -506,7 +506,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -507,7 +507,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
this.updateSwingTime();
|
||||
this.yHeadRot = this.getYRot();
|
||||
this.setSpeed((float)this.getAttributeValue(Attributes.MOVEMENT_SPEED));
|
||||
@@ -50,7 +50,7 @@ index 468097eafe73b45924697d36acc962b7bf9ca17b..a79f70af6c9c4939007307728c87d258
|
||||
AABB aabb;
|
||||
if (this.isPassenger() && !this.getVehicle().isRemoved()) {
|
||||
aabb = this.getBoundingBox().minmax(this.getVehicle().getBoundingBox()).inflate(1.0, 0.0, 1.0);
|
||||
@@ -1732,9 +1732,29 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -1733,9 +1733,29 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
return this.gameMode() == GameType.SPECTATOR;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ index 468097eafe73b45924697d36acc962b7bf9ca17b..a79f70af6c9c4939007307728c87d258
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/item/BlockItem.java b/net/minecraft/world/item/BlockItem.java
|
||||
index 27f6cb2e8104f1e12bed65d090d857b408297013..cf00493cbf131d0af2137a852c9ffba9dbeaddb3 100644
|
||||
index 58ec8a43265ebf50fdd71f2cbb7dedf4762bc5b4..c269fd74bb2157f5c5f38d9dd6e1a0a032c9f29c 100644
|
||||
--- a/net/minecraft/world/item/BlockItem.java
|
||||
+++ b/net/minecraft/world/item/BlockItem.java
|
||||
@@ -184,8 +184,9 @@ public class BlockItem extends Item {
|
||||
@@ -110,7 +110,7 @@ index 1f0e7c391d02b18e2c89700025713ec3d759f2ea..300ee12ca9584e53e9d72e3ebfd039be
|
||||
|
||||
org.bukkit.event.block.BlockCanBuildEvent event = new org.bukkit.event.block.BlockCanBuildEvent(org.bukkit.craftbukkit.block.CraftBlock.at(context.getLevel(), clickedPos), player, org.bukkit.craftbukkit.block.data.CraftBlockData.fromData(blockState), defaultReturn, org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(context.getHand())); // Paper - Expose hand in BlockCanBuildEvent
|
||||
diff --git a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
index 10c123b9cffdc79d069a82d09e57b24bc1572771..85ba7ef0c2e50269427e168336cf29f5375f731d 100644
|
||||
index 68fcb64d13bbd61ad78137f101ab20264f402df8..7e8ca373a48f89d30d4efdfcfe2acdc903a1fed9 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
@@ -153,7 +153,7 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl
|
||||
@@ -123,7 +123,7 @@ index 10c123b9cffdc79d069a82d09e57b24bc1572771..85ba7ef0c2e50269427e168336cf29f5
|
||||
MoverType.SHULKER_BOX,
|
||||
new Vec3(
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
index e8f556f175bb9192445b9c464c6b587296ce8e1b..7b73bb1c48d7ca6a4bb3a3b71caaf98fdd4b4c6c 100644
|
||||
index 0a76cf42aaaaf210a4e43ed9bd3d177f0003ba57..13bd8dc66ad1a6f882d13dc0cbc3f6ae710fab90 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
||||
@@ -151,7 +151,7 @@ public class PistonMovingBlockEntity extends BlockEntity {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Shave snow layers
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/item/ShovelItem.java b/net/minecraft/world/item/ShovelItem.java
|
||||
index 410739a0656836502717969bcedbb20812a2fe54..7d7c8d455210c9673eaa17063d38901ca2e29f72 100644
|
||||
index ba0609f4d9166e66599f9d4430885ab03d53ef41..c50ea91c477a9b59222faab629cdf32049899519 100644
|
||||
--- a/net/minecraft/world/item/ShovelItem.java
|
||||
+++ b/net/minecraft/world/item/ShovelItem.java
|
||||
@@ -42,6 +42,26 @@ public class ShovelItem extends Item {
|
||||
@@ -43,6 +43,26 @@ public class ShovelItem extends Item {
|
||||
return InteractionResult.PASS;
|
||||
} else {
|
||||
Player player = context.getPlayer();
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Elytra aeronautics no chunk load
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index f7b3e3496e8ae9928da458f159a29b76179de843..e345ad7d9fb716e45b06be588cfe03b343dc177d 100644
|
||||
index 1993907c606b231b879a7279d3880876f5307b1c..85c957c547b8a90157308dccbcfb961caa0b9201 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -862,7 +862,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -27,7 +27,7 @@ index f7b3e3496e8ae9928da458f159a29b76179de843..e345ad7d9fb716e45b06be588cfe03b3
|
||||
|
||||
SectionPos lastSectionPos = player.getLastSectionPos();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 90822a9976a6829fbd4159aef0f2075aaf2f54f7..b3e9eb700d7af3ab0b0c0b05702d9c736f25274b 100644
|
||||
index b4000881962db5fe9c6de38f406647d95a395ec3..b4edd659a77139c1771b0714eaa35b6810d96d78 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -868,6 +868,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -41,10 +41,10 @@ index 90822a9976a6829fbd4159aef0f2075aaf2f54f7..b3e9eb700d7af3ab0b0c0b05702d9c73
|
||||
profilerFiller.pop();
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index d8ef2f96772c62cd3ff20ac7ff297d7f8038219b..af98702ff29d400f82a8ae223488f42bd184e2bf 100644
|
||||
index ea9e98313c25e7ce94b011f5bc74a4318145c6f6..8d3151a6cc4d3a53601d41abce9d61323ce86a8c 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -590,7 +590,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -591,7 +591,7 @@ public class ServerGamePacketListenerImpl
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
// Paper start - Prevent moving into unloaded chunks
|
||||
@@ -53,7 +53,7 @@ index d8ef2f96772c62cd3ff20ac7ff297d7f8038219b..af98702ff29d400f82a8ae223488f42b
|
||||
!serverLevel.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position()))) ||
|
||||
!serverLevel.areChunksLoadedForMove(rootVehicle.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(rootVehicle.position())))
|
||||
)) {
|
||||
@@ -1602,6 +1602,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1603,6 +1603,7 @@ public class ServerGamePacketListenerImpl
|
||||
allowMovement = !this.hasNewCollision(serverLevel, this.player, boundingBox, newBox);
|
||||
} // else: no collision at all detected, why do we care?
|
||||
}
|
||||
@@ -62,10 +62,10 @@ index d8ef2f96772c62cd3ff20ac7ff297d7f8038219b..af98702ff29d400f82a8ae223488f42b
|
||||
if (!allowMovement) {
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.CLIPPED_INTO_BLOCK,
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 14483297df08ee275d32ab8fab5f9e042ff95be8..163c0a34c93bbc4f6ede5e3b278c31056783673f 100644
|
||||
index 0129274ab88a151600f4fdde92dae73bec352fb2..37f6e22d9f8f0fffede79b1d273d65a69f8d675c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1128,7 +1128,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1127,7 +1127,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ index 14483297df08ee275d32ab8fab5f9e042ff95be8..163c0a34c93bbc4f6ede5e3b278c3105
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
profilerFiller.push("move");
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) {
|
||||
@@ -2194,6 +2200,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2193,6 +2199,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
this.yo = y;
|
||||
this.zo = d1;
|
||||
this.setPos(d, y, d1);
|
||||
@@ -89,10 +89,10 @@ index 14483297df08ee275d32ab8fab5f9e042ff95be8..163c0a34c93bbc4f6ede5e3b278c3105
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index f40b52f06469eeb9c85685fdfc749cd6f2894eeb..bc95e632f5bd64c71e587e3f7dc70c59d9a76674 100644
|
||||
index 759c320fc331704efe5df10d3f1f33aa87262290..545e9c5f46dd4f8e016ed0a93f2049d1b687dd3c 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3359,6 +3359,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3368,6 +3368,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.fallFlyTicks++;
|
||||
} else {
|
||||
this.fallFlyTicks = 0;
|
||||
@@ -105,10 +105,10 @@ index f40b52f06469eeb9c85685fdfc749cd6f2894eeb..bc95e632f5bd64c71e587e3f7dc70c59
|
||||
|
||||
if (this.isSleeping()) {
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index a79f70af6c9c4939007307728c87d25808fce372..8af6895986c8695f67fe36e67eda54867cdbe227 100644
|
||||
index 7b0fdecf7ca4a5b6dd910369d6546a909926dff2..4e7e8b8f4004cab2cf5af0dafe81e72df78f7258 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -180,6 +180,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -181,6 +181,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
private int currentImpulseContextResetGraceTime = 0;
|
||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
||||
@@ -117,10 +117,10 @@ index a79f70af6c9c4939007307728c87d25808fce372..8af6895986c8695f67fe36e67eda5486
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
index 9b13991088a5e5f4d7697588777e5252ae67b73a..4c219aa7c8f44b7dbe581dce0a2a16432899d978 100644
|
||||
index 145ed3c5f5823c7505767b6d7f4f4d16cc863948..e2662b4574366dd734f5e68db3bf5505ff4e4767 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -324,7 +324,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@@ -325,7 +325,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
this.spawningEntity = input.read("SpawningEntity", net.minecraft.core.UUIDUtil.CODEC).orElse(null); // Paper
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] No block update command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 3a1108b1e98629a7d2ade8c25a604175cedcd42e..fc205e54941d40a5583129b0c6540950f97a6b49 100644
|
||||
index 65e2edf39857b2e03c5a32dfb3b822b5cb4ce93c..1a680c491ae2ed764d3f24b465de72372b65f68d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -401,7 +401,7 @@ public class ServerPlayerGameMode {
|
||||
@@ -18,10 +18,10 @@ index 3a1108b1e98629a7d2ade8c25a604175cedcd42e..fc205e54941d40a5583129b0c6540950
|
||||
if (SharedConstants.DEBUG_BLOCK_BREAK) {
|
||||
LOGGER.info("server broke {} {} -> {}", pos, blockState1, this.level.getBlockState(pos));
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 2518ddaa6bd35e6df88ce74531b772a7a1017e66..f8e23a0a2a0b0680c277b4c2cb1fd5922bb939da 100644
|
||||
index feafaaeca7ffa6fda5af9897c448b61ee1760290..48eca978dc58c3c2045c5746aac5d7f5b732ff89 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1042,6 +1042,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1043,6 +1043,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockPos pos, BlockState state, int flags, int recursionLeft) {
|
||||
@@ -33,7 +33,7 @@ index 2518ddaa6bd35e6df88ce74531b772a7a1017e66..f8e23a0a2a0b0680c277b4c2cb1fd592
|
||||
// CraftBukkit start - tree generation
|
||||
if (this.captureTreeGeneration) {
|
||||
// Paper start - Protect Bedrock and End Portal/Frames from being destroyed
|
||||
@@ -1143,6 +1148,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1144,6 +1149,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
BlockState state = newState;
|
||||
BlockState blockState = oldState;
|
||||
BlockState blockState1 = currentState;
|
||||
@@ -45,7 +45,7 @@ index 2518ddaa6bd35e6df88ce74531b772a7a1017e66..f8e23a0a2a0b0680c277b4c2cb1fd592
|
||||
if (blockState1 == state) {
|
||||
if (blockState != blockState1) {
|
||||
this.setBlocksDirty(pos, blockState, blockState1);
|
||||
@@ -1161,7 +1171,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1162,7 +1172,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
|
||||
if ((flags & 16) == 0 && recursionLeft > 0) {
|
||||
int i = flags & -34;
|
||||
@@ -60,10 +60,10 @@ index 2518ddaa6bd35e6df88ce74531b772a7a1017e66..f8e23a0a2a0b0680c277b4c2cb1fd592
|
||||
blockState.updateIndirectNeighbourShapes(this, pos, i, recursionLeft - 1); // Don't call an event for the old block to limit event spam
|
||||
boolean cancelledUpdates = false; // Paper - Fix block place logic
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index 26c9ee02de0d5d9f556c947b5461cd10cd03d649..3de51052525e5bc1e35418caa7d904ab441f3769 100644
|
||||
index 114aa0f1ac9feefdb856bfc821489b864aba18f3..295357c842a4a4e9e18de68c570168b1cae9593a 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -105,6 +105,7 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
@@ -106,6 +106,7 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||
}
|
||||
|
||||
private void checkIfExtend(Level level, BlockPos pos, BlockState state) {
|
||||
@@ -72,7 +72,7 @@ index 26c9ee02de0d5d9f556c947b5461cd10cd03d649..3de51052525e5bc1e35418caa7d904ab
|
||||
boolean neighborSignal = this.getNeighborSignal(level, pos, direction);
|
||||
if (neighborSignal && !state.getValue(EXTENDED)) {
|
||||
diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
index 8942aa2ca4796c7c36c0955141627ea905e0ec64..dc0137ed3aecc783654c30889649584d6fb761a6 100644
|
||||
index 77ed7a6a4bea3dfc77d060c49f77f4e080da200b..be5d8ca78b4e293766add81ed6cacdae7cb02436 100644
|
||||
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
@@ -34,6 +34,11 @@ public interface NeighborUpdater {
|
||||
@@ -85,7 +85,7 @@ index 8942aa2ca4796c7c36c0955141627ea905e0ec64..dc0137ed3aecc783654c30889649584d
|
||||
+ }
|
||||
+ // Leaves end - no block update
|
||||
BlockState blockState = level.getBlockState(pos);
|
||||
if ((flags & 128) == 0 || !blockState.is(Blocks.REDSTONE_WIRE)) {
|
||||
if ((flags & Block.UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE) == 0 || !blockState.is(Blocks.REDSTONE_WIRE)) {
|
||||
BlockState blockState1 = blockState.updateShape(level, level, pos, direction, neighborPos, neighborState, level.getRandom());
|
||||
@@ -48,6 +53,7 @@ public interface NeighborUpdater {
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..bdbeff9c93b6775cf9d4a2db878dada7
|
||||
+ @Override public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out, net.minecraft.world.level.chunk.PalettedContainer<T> resizeHandler) {} // Leaves - Gale - Lithium - faster chunk serialization
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 1843046fe145bb23f2e9cf3269fb05c0fb617603..26fd253ea8a078526c01532f081ea6e22b35b041 100644
|
||||
index 54d71bd666a946bdf6eece520e080c3f96003452..f16484ab8cd77d34b6e061282dd08b049ba915bc 100644
|
||||
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -23,6 +23,22 @@ import net.minecraft.util.ThreadingDetector;
|
||||
@@ -114,7 +114,7 @@ index 1843046fe145bb23f2e9cf3269fb05c0fb617603..26fd253ea8a078526c01532f081ea6e2
|
||||
private static final int MIN_PALETTE_BITS = 0;
|
||||
public volatile PalettedContainer.Data<T> data; // Paper - optimise collisions - public
|
||||
private final Strategy<T> strategy;
|
||||
@@ -340,6 +356,56 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -338,6 +354,56 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
public synchronized PalettedContainerRO.PackedData<T> pack(Strategy<T> strategy) { // Paper - synchronize
|
||||
this.acquire();
|
||||
|
||||
@@ -171,7 +171,7 @@ index 1843046fe145bb23f2e9cf3269fb05c0fb617603..26fd253ea8a078526c01532f081ea6e2
|
||||
PalettedContainerRO.PackedData var14;
|
||||
try {
|
||||
BitStorage bitStorage = this.data.storage;
|
||||
@@ -412,13 +478,43 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@@ -410,13 +476,43 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
|
||||
@Override
|
||||
public void count(PalettedContainer.CountConsumer<T> countConsumer) {
|
||||
@@ -179,8 +179,8 @@ index 1843046fe145bb23f2e9cf3269fb05c0fb617603..26fd253ea8a078526c01532f081ea6e2
|
||||
- countConsumer.accept(this.data.palette.valueFor(0), this.data.storage.getSize());
|
||||
- } else {
|
||||
- Int2IntOpenHashMap map = new Int2IntOpenHashMap();
|
||||
- this.data.storage.getAll(i -> map.addTo(i, 1));
|
||||
- map.int2IntEntrySet().forEach(entry -> countConsumer.accept(this.data.palette.valueFor(entry.getIntKey()), entry.getIntValue()));
|
||||
- this.data.storage.getAll(id -> map.addTo(id, 1));
|
||||
- map.int2IntEntrySet().forEach(idEntry -> countConsumer.accept(this.data.palette.valueFor(idEntry.getIntKey()), idEntry.getIntValue()));
|
||||
+ // Leaves start - Gale - Lithium - faster chunk serialization
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.performance.fasterChunkSerialization) {
|
||||
+ if (this.data.palette.getSize() == 1) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimize sun burn tick
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 1299d200d7fc1e9a9b0c5901940dba2273003e19..258118a57a9ba493ec6390c5647ab4066fe573ac 100644
|
||||
index 37f6e22d9f8f0fffede79b1d273d65a69f8d675c..39e31c547dcd60f48e607a9c98cfe03a38ae88b1 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2175,9 +2175,20 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2174,9 +2174,20 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
@@ -33,7 +33,7 @@ index 1299d200d7fc1e9a9b0c5901940dba2273003e19..258118a57a9ba493ec6390c5647ab406
|
||||
}
|
||||
|
||||
public void absSnapTo(double x, double y, double z, float yRot, float xRot) {
|
||||
@@ -2192,6 +2203,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2191,6 +2202,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
this.xRotO = this.getXRot();
|
||||
this.setYHeadRot(yRot); // Paper - Update head rotation
|
||||
}
|
||||
@@ -42,7 +42,7 @@ index 1299d200d7fc1e9a9b0c5901940dba2273003e19..258118a57a9ba493ec6390c5647ab406
|
||||
public void absSnapTo(double x, double y, double z) {
|
||||
double d = Mth.clamp(x, -3.0E7, 3.0E7);
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 37ad911648aa88bdb5132a819806a5a303438dbf..a1cc9cf5a0967c5fd605a9fd309908314121e975 100644
|
||||
index 0659e1b95055e85e3eefd206ccb01ee4a4949a5b..1cefdab82744600c6e5886646450d4c3fab03181 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -1565,17 +1565,39 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
|
||||
@@ -7,23 +7,23 @@ Subject: [PATCH] Reduce lambda and Optional allocation in
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java b/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
index 52cb2dcd714cf8c16f167466333eeb923e4ff183..8f2fbfb8d0a24d53697442addf940fa18ae4c69b 100644
|
||||
index b1ee207527d1bf43bcc1c9d2c2a1ae2ad7993371..4bceb069ecf2e4137940ff16128ca6b5a17524fb 100644
|
||||
--- a/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
+++ b/net/minecraft/world/level/EntityBasedExplosionDamageCalculator.java
|
||||
@@ -15,8 +15,20 @@ public class EntityBasedExplosionDamageCalculator extends ExplosionDamageCalcula
|
||||
|
||||
@Override
|
||||
public Optional<Float> getBlockExplosionResistance(Explosion explosion, BlockGetter reader, BlockPos pos, BlockState state, FluidState fluid) {
|
||||
- return super.getBlockExplosionResistance(explosion, reader, pos, state, fluid)
|
||||
- .map(resistance -> this.source.getBlockExplosionResistance(explosion, reader, pos, state, fluid, resistance));
|
||||
public Optional<Float> getBlockExplosionResistance(Explosion explosion, BlockGetter level, BlockPos pos, BlockState state, FluidState fluid) {
|
||||
- return super.getBlockExplosionResistance(explosion, level, pos, state, fluid)
|
||||
- .map(resistance -> this.source.getBlockExplosionResistance(explosion, level, pos, state, fluid, resistance));
|
||||
+ if (!org.leavesmc.leaves.LeavesConfig.performance.remove.damageLambda) {
|
||||
+ return super.getBlockExplosionResistance(explosion, reader, pos, state, fluid)
|
||||
+ .map(max -> this.source.getBlockExplosionResistance(explosion, reader, pos, state, fluid, max));
|
||||
+ return super.getBlockExplosionResistance(explosion, level, pos, state, fluid)
|
||||
+ .map(max -> this.source.getBlockExplosionResistance(explosion, level, pos, state, fluid, max));
|
||||
+ } else {
|
||||
+ Optional<Float> optionalBlastResistance = super.getBlockExplosionResistance(explosion, reader, pos, state, fluid);
|
||||
+ Optional<Float> optionalBlastResistance = super.getBlockExplosionResistance(explosion, level, pos, state, fluid);
|
||||
+ if (optionalBlastResistance.isPresent()) {
|
||||
+ float blastResistance = optionalBlastResistance.get();
|
||||
+ float effectiveExplosionResistance = this.source.getBlockExplosionResistance(explosion, reader, pos, state, fluid, blastResistance);
|
||||
+ float effectiveExplosionResistance = this.source.getBlockExplosionResistance(explosion, level, pos, state, fluid, blastResistance);
|
||||
+ if (effectiveExplosionResistance != blastResistance) {
|
||||
+ return Optional.of(effectiveExplosionResistance);
|
||||
+ }
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Check frozen ticks before landing block
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index bc95e632f5bd64c71e587e3f7dc70c59d9a76674..5b6be93ee2b65931c3305f51bcf2a50537222100 100644
|
||||
index 545e9c5f46dd4f8e016ed0a93f2049d1b687dd3c..1a7135f2fda41265c75448e8ca9fec1c64de8e97 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -543,10 +543,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -544,10 +544,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
|
||||
protected void tryAddFrost() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Skip entity move if movement is zero
|
||||
This patch is Powered by Gale(https://github.com/GaleMC/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 258118a57a9ba493ec6390c5647ab4066fe573ac..dac749d176c5b0f37d4f3f6e6a157121b96329c2 100644
|
||||
index 39e31c547dcd60f48e607a9c98cfe03a38ae88b1..d2fafdbce9fe1db0451bb4ad819d8e075122530e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -264,6 +264,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -263,6 +263,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
public float yRotO;
|
||||
public float xRotO;
|
||||
private AABB bb = INITIAL_AABB;
|
||||
@@ -17,7 +17,7 @@ index 258118a57a9ba493ec6390c5647ab4066fe573ac..dac749d176c5b0f37d4f3f6e6a157121
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1100,6 +1101,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1099,6 +1100,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -31,7 +31,7 @@ index 258118a57a9ba493ec6390c5647ab4066fe573ac..dac749d176c5b0f37d4f3f6e6a157121
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -4500,6 +4508,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4466,6 +4474,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Avoid anvil too expensive
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/inventory/AnvilMenu.java b/net/minecraft/world/inventory/AnvilMenu.java
|
||||
index 2346e1fc0c94084c3bb95c00be8aac36ae5f26ae..fa5fb93e2d3abd7171f4f7db9a74d42ec37b8ecd 100644
|
||||
index 9a3887752aa4b39224c9bf6e6145e20fa6962439..a7f84100b350b097d33b571be65296fe76d13e82 100644
|
||||
--- a/net/minecraft/world/inventory/AnvilMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AnvilMenu.java
|
||||
@@ -266,7 +266,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
@@ -268,7 +268,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||
this.onlyRenaming = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Bow infinity fix
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 8af6895986c8695f67fe36e67eda54867cdbe227..e4733cdedf9bfbd187c5e2a4402d44e908186a3c 100644
|
||||
index 4e7e8b8f4004cab2cf5af0dafe81e72df78f7258..d894741db7ce97f9809d835270148093f3293f30 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1967,8 +1967,10 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -1968,8 +1968,10 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Replay Mod API
|
||||
This patch is Powered by ReplayMod(https://github.com/ReplayMod)
|
||||
|
||||
diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java
|
||||
index 6ead209287ab021b8245fa5c3b7f18ca7d9c66b3..cc0213907d1291e31261e923c74bdeaae2765e2e 100644
|
||||
index be42e2bd05a7468911698e53a33d87abf4a1080b..76350460f530d2edf3d58c30bff0291e7e498106 100644
|
||||
--- a/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -580,7 +580,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS
|
||||
@@ -80,10 +80,10 @@ index d438e31a082b675d7eb0eead7067a0b92363a9f9..c08f34bc17bec9f73c377b45389a7755
|
||||
players.add(serverPlayer1);
|
||||
if (players.size() >= resultLimit) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 617f8f6b39727603d5d44bd97e08c21c10630b3a..635e6ce5292ea9d372c221fc7c89d67208ad50c5 100644
|
||||
index fa2ae16481541308d525d0ac70a8bbc2c66a8851..89067dceacb1f4fb6f7acacd4ec16874da049efe 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1701,7 +1701,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1720,7 +1720,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private ServerStatus.Players buildPlayerStatus() {
|
||||
@@ -92,7 +92,7 @@ index 617f8f6b39727603d5d44bd97e08c21c10630b3a..635e6ce5292ea9d372c221fc7c89d672
|
||||
int maxPlayers = this.getMaxPlayers();
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(maxPlayers, players.size(), List.of());
|
||||
@@ -1933,7 +1933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1952,7 +1952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public int getPlayerCount() {
|
||||
@@ -101,7 +101,7 @@ index 617f8f6b39727603d5d44bd97e08c21c10630b3a..635e6ce5292ea9d372c221fc7c89d672
|
||||
}
|
||||
|
||||
public String[] getPlayerNames() {
|
||||
@@ -2157,7 +2157,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2176,7 +2176,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} else {
|
||||
int i = 0;
|
||||
|
||||
@@ -110,7 +110,7 @@ index 617f8f6b39727603d5d44bd97e08c21c10630b3a..635e6ce5292ea9d372c221fc7c89d672
|
||||
// Paper start - Expand PlayerGameModeChangeEvent
|
||||
org.bukkit.event.player.PlayerGameModeChangeEvent event = serverPlayer.setGameMode(gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, null);
|
||||
if (event == null || event.isCancelled()) {
|
||||
@@ -2325,7 +2325,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2344,7 +2344,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (Thread.currentThread() != this.serverThread) return; // Paper
|
||||
// Paper start - we don't need to save everything, just advancements
|
||||
// this.getPlayerList().saveAll();
|
||||
@@ -119,7 +119,7 @@ index 617f8f6b39727603d5d44bd97e08c21c10630b3a..635e6ce5292ea9d372c221fc7c89d672
|
||||
player.getAdvancements().save();
|
||||
}
|
||||
// Paper end - we don't need to save everything, just advancements
|
||||
@@ -2463,7 +2463,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2482,7 +2482,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
PlayerList playerList = this.getPlayerList();
|
||||
UserWhiteList whiteList = playerList.getWhiteList();
|
||||
|
||||
@@ -142,7 +142,7 @@ index a14401edec04964e6c596c16ba58643b835ef9c1..924829d46f789752aab52c0a51f4d092
|
||||
}
|
||||
// Leaves end - bot can't get advancement
|
||||
diff --git a/net/minecraft/server/ServerScoreboard.java b/net/minecraft/server/ServerScoreboard.java
|
||||
index 5c9f2a8476ff260ec7f0843f7c956c71e9b0d34d..22d67e72e0bf2dbe8c7a936260bb3577c2cfa10b 100644
|
||||
index 07294b9cfa788313da7433946312939d93956021..292bd07552606fbc25af7fd590fcae40614c38fa 100644
|
||||
--- a/net/minecraft/server/ServerScoreboard.java
|
||||
+++ b/net/minecraft/server/ServerScoreboard.java
|
||||
@@ -244,7 +244,7 @@ public class ServerScoreboard extends Scoreboard {
|
||||
@@ -177,7 +177,7 @@ index e7c778a7f292fd0749cbd5e6586ad1b93ac7f29e..024b56405bb58801b17a6adad7fec7a4
|
||||
org.bukkit.entity.Player sender = (org.bukkit.entity.Player) source.getBukkitSender();
|
||||
playersTemp = playersTemp.stream().filter((ep) -> sender.canSee(ep.getBukkitEntity())).collect(java.util.stream.Collectors.toList());
|
||||
diff --git a/net/minecraft/server/commands/OpCommand.java b/net/minecraft/server/commands/OpCommand.java
|
||||
index 2682f6debf14ed3040a78b02d820e949ca3832c5..6569b1be4fda23de9dea5e4a5373bd52b62ce514 100644
|
||||
index 065af7f615711d7830002cd8f3046fab706082c1..d78fbc78369aab0139b99a008300b799b1dc369f 100644
|
||||
--- a/net/minecraft/server/commands/OpCommand.java
|
||||
+++ b/net/minecraft/server/commands/OpCommand.java
|
||||
@@ -25,7 +25,7 @@ public class OpCommand {
|
||||
@@ -190,7 +190,7 @@ index 2682f6debf14ed3040a78b02d820e949ca3832c5..6569b1be4fda23de9dea5e4a5373bd52
|
||||
.filter(serverPlayer -> !playerList.isOp(serverPlayer.nameAndId()))
|
||||
.map(serverPlayer -> serverPlayer.getGameProfile().name()),
|
||||
diff --git a/net/minecraft/server/commands/ParticleCommand.java b/net/minecraft/server/commands/ParticleCommand.java
|
||||
index 33d96239f4b72a5587dc70f9602847a870d6d6a5..a83ce2cd112fca02cf3545f8c38e5cafae2c7c0e 100644
|
||||
index 51f76f7a711257e5ee432ee0b2ebe7b2e129cda0..802322cccaff58e4fcd754a8f73ac2967fbab298 100644
|
||||
--- a/net/minecraft/server/commands/ParticleCommand.java
|
||||
+++ b/net/minecraft/server/commands/ParticleCommand.java
|
||||
@@ -36,7 +36,7 @@ public class ParticleCommand {
|
||||
@@ -239,7 +239,7 @@ index 33d96239f4b72a5587dc70f9602847a870d6d6a5..a83ce2cd112fca02cf3545f8c38e5caf
|
||||
)
|
||||
.then(
|
||||
diff --git a/net/minecraft/server/commands/TeamMsgCommand.java b/net/minecraft/server/commands/TeamMsgCommand.java
|
||||
index 134d7b1a9d5a5a47ebf4aabff110dde914cd6fe1..894dd1d048904b8a775416ea6cb3112215c567bc 100644
|
||||
index 0ae4d68dfe42004839a0c5ad457de592f6b4af8b..1d1e396e4b29f33669872fb39e3a7f1d474a49f7 100644
|
||||
--- a/net/minecraft/server/commands/TeamMsgCommand.java
|
||||
+++ b/net/minecraft/server/commands/TeamMsgCommand.java
|
||||
@@ -40,7 +40,7 @@ public class TeamMsgCommand {
|
||||
@@ -252,7 +252,7 @@ index 134d7b1a9d5a5a47ebf4aabff110dde914cd6fe1..894dd1d048904b8a775416ea6cb31122
|
||||
.filter(player -> player == entityOrException || player.getTeam() == team)
|
||||
.toList();
|
||||
diff --git a/net/minecraft/server/commands/WhitelistCommand.java b/net/minecraft/server/commands/WhitelistCommand.java
|
||||
index cfe62a56ce1b4222ed6d73fc6390b7726542a9cd..234478bca5f8b1ea768b487c943b44e022bb378e 100644
|
||||
index 9f4715c1214d6848b67637622bd24fc8f6fa5f2a..d69333e308ea772515c440f89b0b39fbd458f85c 100644
|
||||
--- a/net/minecraft/server/commands/WhitelistCommand.java
|
||||
+++ b/net/minecraft/server/commands/WhitelistCommand.java
|
||||
@@ -44,7 +44,7 @@ public class WhitelistCommand {
|
||||
@@ -280,10 +280,10 @@ index 5a8cd3e6b448a4472092690cf589bca10b142126..8f22d5faf89006153b1fff4ff0b622f8
|
||||
|
||||
this.setListData(list);
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index b3e9eb700d7af3ab0b0c0b05702d9c736f25274b..3c1fbd18a50a703a8e60afaf0b1a250118bdf8e7 100644
|
||||
index b4edd659a77139c1771b0714eaa35b6810d96d78..ead3e1d538f138dc5370db49d8b4293aff376d46 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2774,7 +2774,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2764,7 +2764,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.add(serverPlayer);
|
||||
// Leaves start - skip
|
||||
@@ -292,7 +292,7 @@ index b3e9eb700d7af3ab0b0c0b05702d9c736f25274b..3c1fbd18a50a703a8e60afaf0b1a2501
|
||||
ServerLevel.this.realPlayers.add(serverPlayer);
|
||||
}
|
||||
// Leaves end - skip
|
||||
@@ -2857,7 +2857,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2847,7 +2847,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (entity instanceof ServerPlayer serverPlayer) {
|
||||
ServerLevel.this.players.remove(serverPlayer);
|
||||
// Leaves start - skip
|
||||
@@ -302,10 +302,10 @@ index b3e9eb700d7af3ab0b0c0b05702d9c736f25274b..3c1fbd18a50a703a8e60afaf0b1a2501
|
||||
}
|
||||
// Leaves end - skip
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 93dc94ec1e4e93af7ceea21fb01d35ae65b40b92..c72d272c6d48d12bda8ee99fafee5d27ac838b83 100644
|
||||
index 97e133f3555057e36e3e7157f1411ba923ab2823..44b1d56fb3ce3827290ef4cf987aa2386d07eb9c 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -522,7 +522,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -523,7 +523,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
// Paper start - Expand PlayerGameModeChangeEvent
|
||||
this.loadGameTypes(input);
|
||||
}
|
||||
@@ -315,10 +315,10 @@ index 93dc94ec1e4e93af7ceea21fb01d35ae65b40b92..c72d272c6d48d12bda8ee99fafee5d27
|
||||
if (new org.bukkit.event.player.PlayerGameModeChangeEvent(this.getBukkitEntity(), org.bukkit.GameMode.getByValue(this.server.getDefaultGameType().getId()), org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, null).callEvent()) {
|
||||
this.gameMode.setGameModeForPlayer(this.server.getForcedGameType(), GameType.DEFAULT_MODE);
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c892498282859a 100644
|
||||
index 7977a0cfe18c99c4c6ba8c5b56387b690ede554d..c8628c6d505a7599b0765decfcd037c8b3212054 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -125,6 +125,7 @@ public abstract class PlayerList {
|
||||
@@ -126,6 +126,7 @@ public abstract class PlayerList {
|
||||
private int simulationDistance;
|
||||
private boolean allowCommandsForAllPlayers;
|
||||
private int sendAllPlayerInfoIn;
|
||||
@@ -326,7 +326,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
|
||||
// CraftBukkit start
|
||||
private org.bukkit.craftbukkit.CraftServer cserver;
|
||||
@@ -148,6 +149,125 @@ public abstract class PlayerList {
|
||||
@@ -149,6 +150,125 @@ public abstract class PlayerList {
|
||||
|
||||
abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor
|
||||
|
||||
@@ -452,7 +452,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
@@ -215,6 +335,7 @@ public abstract class PlayerList {
|
||||
@@ -216,6 +336,7 @@ public abstract class PlayerList {
|
||||
|
||||
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
|
||||
this.players.add(player);
|
||||
@@ -460,7 +460,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
@@ -419,6 +540,7 @@ public abstract class PlayerList {
|
||||
@@ -420,6 +541,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
protected void save(ServerPlayer player) {
|
||||
@@ -468,7 +468,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
player.lastSave = MinecraftServer.currentTick; // Paper - Incremental chunk and player saving
|
||||
this.playerIo.save(player);
|
||||
@@ -433,6 +555,43 @@ public abstract class PlayerList {
|
||||
@@ -434,6 +556,43 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player) { // CraftBukkit - return string // Paper - return Component
|
||||
// Paper start - Fix kick event leave message not being sent
|
||||
return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName())));
|
||||
@@ -506,6 +665,7 @@ public abstract class PlayerList {
|
||||
@@ -507,6 +666,7 @@ public abstract class PlayerList {
|
||||
player.retireScheduler(); // Paper - Folia schedulers
|
||||
player.getAdvancements().stopListening();
|
||||
this.players.remove(player);
|
||||
@@ -520,7 +520,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||
UUID uuid = player.getUUID();
|
||||
@@ -881,14 +1041,14 @@ public abstract class PlayerList {
|
||||
@@ -835,14 +995,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public String[] getPlayerNamesArray() {
|
||||
@@ -540,7 +540,7 @@ index 39098ec97660f5b7f951efcfd90d3a355e27b945..b4fe935660bf4c0456412926a9c89249
|
||||
}
|
||||
// Leaves end - fakeplayer support
|
||||
|
||||
@@ -959,7 +1119,7 @@ public abstract class PlayerList {
|
||||
@@ -911,7 +1071,7 @@ public abstract class PlayerList {
|
||||
|
||||
// Paper start - whitelist verify event / login event
|
||||
public LoginResult canBypassFullServerLogin(final NameAndId nameAndId, final LoginResult currentResult) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] RNG Fishing
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 0d761284b7d7bb8f4cb3919e1e8f216fb7c55f96..d91fe96bfcad0a7c0ad571f938b304bf7555f524 100644
|
||||
index 2c79332e148375c2f277df94b16ce7dd2422c004..a22590c8c48049733d751306a2daa5686cbcf082 100644
|
||||
--- a/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -533,7 +533,7 @@ public class FishingHook extends Projectile {
|
||||
@@ -534,7 +534,7 @@ public class FishingHook extends Projectile {
|
||||
.withLuck(this.luck + playerOwner.getLuck())
|
||||
.create(LootContextParamSets.FISHING);
|
||||
LootTable lootTable = this.level().getServer().reloadableRegistries().getLootTable(BuiltInLootTables.FISHING);
|
||||
|
||||
@@ -4,24 +4,11 @@ Date: Tue, 5 Sep 2023 08:49:01 +0800
|
||||
Subject: [PATCH] Spider jockeys drop gapples
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Creeper.java b/net/minecraft/world/entity/monster/Creeper.java
|
||||
index fccb328fbad2dafe1655acbcbca3e05d85864f23..ad72fbbf8fd27a7fc1e9dd599e8721bc4a7294ff 100644
|
||||
--- a/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -54,7 +54,7 @@ public class Creeper extends Monster {
|
||||
public int swell;
|
||||
public int maxSwell = 30;
|
||||
public int explosionRadius = 3;
|
||||
- private boolean droppedSkulls;
|
||||
+ public boolean droppedSkulls; // Leaves - private -> public
|
||||
public @Nullable Entity entityIgniter; // CraftBukkit
|
||||
|
||||
public Creeper(EntityType<? extends Creeper> entityType, Level level) {
|
||||
diff --git a/net/minecraft/world/entity/monster/Skeleton.java b/net/minecraft/world/entity/monster/Skeleton.java
|
||||
index 4eb35a7a2dfcb4803c00e1e9179fea8186b15d41..7f564227fb022e38a28190683cf54406c764a06f 100644
|
||||
index 37a60cf7b00adaadbca129659b3aea3d8f10c4e2..f1dab982211cf9e1018f98d238cea04cfd82e31b 100644
|
||||
--- a/net/minecraft/world/entity/monster/Skeleton.java
|
||||
+++ b/net/minecraft/world/entity/monster/Skeleton.java
|
||||
@@ -129,4 +129,25 @@ public class Skeleton extends AbstractSkeleton {
|
||||
@@ -130,4 +130,25 @@ public class Skeleton extends AbstractSkeleton {
|
||||
SoundEvent getStepSound() {
|
||||
return SoundEvents.SKELETON_STEP;
|
||||
}
|
||||
@@ -48,7 +35,7 @@ index 4eb35a7a2dfcb4803c00e1e9179fea8186b15d41..7f564227fb022e38a28190683cf54406
|
||||
+ // Leaves end - spider jockeys drop gapples
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/monster/Spider.java b/net/minecraft/world/entity/monster/Spider.java
|
||||
index 13f49a2e43adbbbb4ec9cd5b479814fefcca1cce..44a40741128b719626a793ded9e314371c99ad3f 100644
|
||||
index a0008c2c5338d442040598ee79a667060a649695..3b578eb1a4bffb790b2baec7ba35d027158ea8d2 100644
|
||||
--- a/net/minecraft/world/entity/monster/Spider.java
|
||||
+++ b/net/minecraft/world/entity/monster/Spider.java
|
||||
@@ -139,6 +139,18 @@ public class Spider extends Monster {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Force Void Trade
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/AbstractVillager.java b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 54ba469380b51b38327c107e3a1c5574395f3507..0f734c87ad5f25e646d69b35bf68448614d63893 100644
|
||||
index ea7364f3cc9f339578232ba1103008a9ed50234a..99ec0cac20dac363cd5a6b97bddf900266fc4498 100644
|
||||
--- a/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -43,6 +43,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@@ -14,8 +14,8 @@ index 54ba469380b51b38327c107e3a1c5574395f3507..0f734c87ad5f25e646d69b35bf684486
|
||||
private final SimpleContainer inventory = new SimpleContainer(8, (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity()); // CraftBukkit - add argument
|
||||
+ protected boolean voidTrade = false; // Leaves - force void trade
|
||||
|
||||
public AbstractVillager(EntityType<? extends AbstractVillager> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
public AbstractVillager(EntityType<? extends AbstractVillager> type, Level level) {
|
||||
super(type, level);
|
||||
@@ -144,7 +145,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@Override
|
||||
public void processTrade(MerchantOffer offer, @Nullable io.papermc.paper.event.player.PlayerPurchaseEvent event) { // The MerchantRecipe passed in here is the one set by the PlayerPurchaseEvent
|
||||
@@ -74,10 +74,10 @@ index 54ba469380b51b38327c107e3a1c5574395f3507..0f734c87ad5f25e646d69b35bf684486
|
||||
+ // Leaves end - force void trade
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
|
||||
index ae2f000083556cdc1cbb637e6210c4c4e22c974f..40ecdb60ad37a00a2e8f95bd2e752187e532a572 100644
|
||||
index d10a407bef7da29a24582e48d8ee599c981384c5..9fb83137caeee95d35bce9265e1f86cef1adac0e 100644
|
||||
--- a/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -383,6 +383,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -384,6 +384,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
|
||||
private void startTrading(Player player) {
|
||||
@@ -85,7 +85,7 @@ index ae2f000083556cdc1cbb637e6210c4c4e22c974f..40ecdb60ad37a00a2e8f95bd2e752187
|
||||
this.updateSpecialPrices(player);
|
||||
this.setTradingPlayer(player);
|
||||
this.openTradingScreen(player, this.getDisplayName(), this.getVillagerData().level());
|
||||
@@ -622,8 +623,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -623,8 +624,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
protected void rewardTradeXp(MerchantOffer offer) {
|
||||
int i = 3 + this.random.nextInt(4);
|
||||
@@ -101,10 +101,10 @@ index ae2f000083556cdc1cbb637e6210c4c4e22c974f..40ecdb60ad37a00a2e8f95bd2e752187
|
||||
this.updateMerchantTimer = 40;
|
||||
this.increaseProfessionLevelOnUpdate = true;
|
||||
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 2cbd671fc5b5d35ed4bba5f33b540a96f446aaf0..e57a4a5b2da555680fdf4b4ada12b883bcf05e55 100644
|
||||
index 4c7287c4a081b4e1f0049c8c9bdf6a42b51e8274..c87bf6a5cfaaa1a68cba6b734e67db49709c6c5b 100644
|
||||
--- a/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -124,9 +124,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
@@ -124,9 +124,10 @@ public class WanderingTrader extends AbstractVillager implements Consumable.Over
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ index 2cbd671fc5b5d35ed4bba5f33b540a96f446aaf0..e57a4a5b2da555680fdf4b4ada12b883
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/inventory/MerchantMenu.java b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
index 1bf2a015fa35981328c098f2fec363c84b85b2a7..8aa4079e7fb5fb81f33859d106a425d0183f13df 100644
|
||||
index ade7732b638b30ad0ae50605793cbf75754aad0e..8ca85b07ad3a9902359704bf7071146d99153959 100644
|
||||
--- a/net/minecraft/world/inventory/MerchantMenu.java
|
||||
+++ b/net/minecraft/world/inventory/MerchantMenu.java
|
||||
@@ -25,7 +25,7 @@ public class MerchantMenu extends AbstractContainerMenu {
|
||||
@@ -178,7 +178,7 @@ index 6afeb92c2e00ca5b945b7c7de9257bd741d53c3d..f5b82f56a59dd150938e35dde0333e7e
|
||||
|
||||
public void setToOutOfStock() {
|
||||
diff --git a/net/minecraft/world/level/block/EndGatewayBlock.java b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
index c70401544b4764518e62e42e3284ea185e4d997d..b81cdb0ceba03fcc4b34495ca0c26714c90ab2de 100644
|
||||
index 6161cd82dade8b4119ab0b8ba84451d592ce5858..cc90b8ebfe8c5d451710c202c5e87433e2a45c7b 100644
|
||||
--- a/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndGatewayBlock.java
|
||||
@@ -109,6 +109,17 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Crafter 1 gt delay
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
index caf31218a1aff84367da126ee1dc46b8c8a1e5d1..a073188275456ee2eee776b149a14f68e4557f4a 100644
|
||||
index 59cea0d226829267e9a5dff9f81789673bd3f062..9ff207acba5584480481e0df63ad3ca9bced0354 100644
|
||||
--- a/net/minecraft/world/level/block/CrafterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
@@ -75,7 +75,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@@ -14,7 +14,7 @@ index caf31218a1aff84367da126ee1dc46b8c8a1e5d1..a073188275456ee2eee776b149a14f68
|
||||
if (hasNeighborSignal && !triggeredValue) {
|
||||
- level.scheduleTick(pos, this, 4);
|
||||
+ level.scheduleTick(pos, this, !org.leavesmc.leaves.LeavesConfig.modify.oldMC.crafter1gt ? 4 : 1); // Leaves - crafter 1 gt delay
|
||||
level.setBlock(pos, state.setValue(TRIGGERED, true), 2);
|
||||
level.setBlock(pos, state.setValue(TRIGGERED, true), Block.UPDATE_CLIENTS);
|
||||
this.setBlockEntityTriggered(blockEntity, true);
|
||||
} else if (!hasNeighborSignal && triggeredValue) {
|
||||
@@ -125,7 +125,7 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
|
||||
@@ -21,10 +21,10 @@ index a814512fcfb85312474ae2c2c21443843bf57831..2b0349568f38321c893a8ffa16607350
|
||||
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite(
|
||||
final int chunkX, final int chunkZ, final CompoundTag compound
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
index b83ccf7bbd134e97e14bfe8331cc9d2a26b9ec9c..95b9ffd06f2796067aeee02410e1482207084f96 100644
|
||||
index aa3d5a6ea59ac77665f2cfaa56a7d383016d08d0..2f56cda82824053b3f5321cec2e93f9c6a7e84e8 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
@@ -1261,7 +1261,7 @@ public final class MoonriseRegionFileIO {
|
||||
@@ -1274,7 +1274,7 @@ public final class MoonriseRegionFileIO {
|
||||
this.regionDataController.finishWrite(this.chunkX, this.chunkZ, writeData);
|
||||
// Paper start - flush regionfiles on save
|
||||
if (this.world.paperConfig().chunks.flushRegionsOnSave) {
|
||||
@@ -33,7 +33,7 @@ index b83ccf7bbd134e97e14bfe8331cc9d2a26b9ec9c..95b9ffd06f2796067aeee02410e14822
|
||||
if (regionFile != null) {
|
||||
regionFile.flush();
|
||||
} // else: evicted from cache, which should have called flush
|
||||
@@ -1477,7 +1477,7 @@ public final class MoonriseRegionFileIO {
|
||||
@@ -1490,7 +1490,7 @@ public final class MoonriseRegionFileIO {
|
||||
|
||||
public static interface IORunnable {
|
||||
|
||||
@@ -54,10 +54,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..a6573e327ace16b7ea320eb1440ffcbc
|
||||
+ public void moonrise$write(final org.leavesmc.leaves.region.IRegionFile regionFile) throws IOException; // Leaves - more region format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 635e6ce5292ea9d372c221fc7c89d67208ad50c5..55de124c496d1b8009f24c77840c9a7bf94d1dbf 100644
|
||||
index 89067dceacb1f4fb6f7acacd4ec16874da049efe..d4409971d20e19266ff80b940b05edf07e8d52e3 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -935,10 +935,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -960,10 +960,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
if (flush) {
|
||||
for (ServerLevel serverLevel : this.getAllLevels()) {
|
||||
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] No TNT place update
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TntBlock.java b/net/minecraft/world/level/block/TntBlock.java
|
||||
index 93d6e05578622b057d8e973c71f880a17036a6b5..807b2d9bde6d9a365feff13adc4a8b546bec6d0c 100644
|
||||
index 938dbdbbaa90181865ad9f19446c99cf301ab653..0862ef425b518e8d322f9fa7d9a3aacdd03f8237 100644
|
||||
--- a/net/minecraft/world/level/block/TntBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TntBlock.java
|
||||
@@ -47,7 +47,7 @@ public class TntBlock extends Block {
|
||||
@Override
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
|
||||
if (!oldState.is(state.getBlock())) {
|
||||
- if (level.hasNeighborSignal(pos) && prime(level, pos, () -> org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null))) { // CraftBukkit - TNTPrimeEvent
|
||||
+ if (level.hasNeighborSignal(pos) && !org.leavesmc.leaves.LeavesConfig.modify.noTNTPlaceUpdate && prime(level, pos, () -> org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(level, pos, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.REDSTONE, null, null))) { // CraftBukkit - TNTPrimeEvent // Leaves - prevent update
|
||||
|
||||
@@ -20,10 +20,10 @@ index 4257c47d33e3773fac766817138cc21c55d9ab76..8638f3f7aa853802a60ddeb681d089e0
|
||||
+ // Leaves end - servux
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 3c1fbd18a50a703a8e60afaf0b1a250118bdf8e7..80c57f604ace47ce39c800b78b115efaf320f1e5 100644
|
||||
index ead3e1d538f138dc5370db49d8b4293aff376d46..dbebfec31e8bd9b9ea6bbf486875396fdcba93b6 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2295,9 +2295,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2285,9 +2285,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// Paper end
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Placing locked hopper no longer send NC updates
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index f8e23a0a2a0b0680c277b4c2cb1fd5922bb939da..06c90d5aa8e308f8931b5477e03ac94e3cfbe108 100644
|
||||
index 48eca978dc58c3c2045c5746aac5d7f5b732ff89..07ab2907bb9e4de5810889bec6d2b08f9abfec0c 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1163,7 +1163,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1164,7 +1164,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
|
||||
if ((flags & 1) != 0) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Renewable deepslate
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/LiquidBlock.java b/net/minecraft/world/level/block/LiquidBlock.java
|
||||
index 05a04c03ed529ee4bda6db676cc97781a07e7a6a..b3ff440b4bf28569415ccff10362cc4f5b65b1cd 100644
|
||||
index 70cb8b2cf79833d8b5f9cee6d9c5495e5b706078..24e0484f0570d071c9ccdc67250a2b5ecd112dfd 100644
|
||||
--- a/net/minecraft/world/level/block/LiquidBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LiquidBlock.java
|
||||
@@ -194,7 +194,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
@@ -196,7 +196,7 @@ public class LiquidBlock extends Block implements BucketPickup {
|
||||
for (Direction direction : POSSIBLE_FLOW_DIRECTIONS) {
|
||||
BlockPos blockPos = pos.relative(direction.getOpposite());
|
||||
if (level.getFluidState(blockPos).is(FluidTags.WATER)) {
|
||||
@@ -18,12 +18,12 @@ index 05a04c03ed529ee4bda6db676cc97781a07e7a6a..b3ff440b4bf28569415ccff10362cc4f
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level, pos, block.defaultBlockState(), 3)) {
|
||||
this.fizz(level, pos);
|
||||
diff --git a/net/minecraft/world/level/material/LavaFluid.java b/net/minecraft/world/level/material/LavaFluid.java
|
||||
index 22b18c4de4ee8eb94847c2e9df559c579cb26409..36a7500880877604d8adc37c421b401a5e7905e7 100644
|
||||
index 6f9e277f8ec94169e2ff8b70b63d5ef52729b069..371b864b85da51a0444cafc4b127ff8f036c7f1b 100644
|
||||
--- a/net/minecraft/world/level/material/LavaFluid.java
|
||||
+++ b/net/minecraft/world/level/material/LavaFluid.java
|
||||
@@ -224,7 +224,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
@@ -226,7 +226,7 @@ public abstract class LavaFluid extends FlowingFluid {
|
||||
if (this.is(FluidTags.LAVA) && fluidState1.is(FluidTags.WATER)) {
|
||||
if (blockState.getBlock() instanceof LiquidBlock) {
|
||||
if (state.getBlock() instanceof LiquidBlock) {
|
||||
// CraftBukkit start
|
||||
- if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level.getMinecraftWorld(), pos, Blocks.STONE.defaultBlockState(), 3)) {
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(level.getMinecraftWorld(), pos, org.leavesmc.leaves.LeavesConfig.modify.renewableDeepslate && level.getMinecraftWorld().dimension() == Level.OVERWORLD && pos.getY() < 0 ? Blocks.DEEPSLATE.defaultBlockState() : Blocks.STONE.defaultBlockState(), 3)) { // Leaves - renewable deepslate
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Renewable sponges
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Guardian.java b/net/minecraft/world/entity/monster/Guardian.java
|
||||
index a36f0181e1aa24538d6c868a8675da89427bdeae..b9c08ae9579ab5867adff4e0c5e7824b56203b3c 100644
|
||||
index c907feb2ab6862d980f89f6341402131a8a966f2..daad38e533360501529f2f7a0bdfee213ac56ca6 100644
|
||||
--- a/net/minecraft/world/entity/monster/Guardian.java
|
||||
+++ b/net/minecraft/world/entity/monster/Guardian.java
|
||||
@@ -452,6 +452,28 @@ public class Guardian extends Monster {
|
||||
@@ -453,6 +453,28 @@ public class Guardian extends Monster {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix falling block's block location
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 398923e1a1727fd874da37427a362c61c4200464..7eaf45cdb3a8e7090f7ba1ddb7f88704bfb01deb 100644
|
||||
index d2fafdbce9fe1db0451bb4ad819d8e075122530e..a18f2f0d1df0fecb6f8b22a252d7a6d715eb8439 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -5086,6 +5086,15 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -5052,6 +5052,15 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
int floor = Mth.floor(x);
|
||||
int floor1 = Mth.floor(y);
|
||||
int floor2 = Mth.floor(z);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Bytebuf API
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 39e624aca0cc803b682ea8d2304dcd86480265bb..6fb2170c777ca0ac333f9663beb43644120cc9d6 100644
|
||||
index c8628c6d505a7599b0765decfcd037c8b3212054..f376b03e267ae9c3acc9636b6ccee733497027d2 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -289,6 +289,13 @@ public abstract class PlayerList {
|
||||
@@ -290,6 +290,13 @@ public abstract class PlayerList {
|
||||
boolean _boolean = gameRules.getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN);
|
||||
boolean _boolean1 = gameRules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
||||
boolean _boolean2 = gameRules.getBoolean(GameRules.RULE_LIMITED_CRAFTING);
|
||||
|
||||
@@ -22,7 +22,7 @@ index 75170c8d3be477a6ea2a1d62018a6ab630b0e54e..e5f348daf1ae9e604ae12928e5c8618c
|
||||
this.setChanged();
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/vehicle/ContainerEntity.java b/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
index 99f109e2653eff10c011f380694bd77a76381cee..3d7ea706747a6bcd8db8dd62139989669acb9c08 100644
|
||||
index 358de981544b220bde770410c24e5f6b10520d91..d079513d0fcafc1f9d0b6384602d0d3f4093b9db 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
@@ -163,6 +163,11 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
@@ -38,7 +38,7 @@ index 99f109e2653eff10c011f380694bd77a76381cee..3d7ea706747a6bcd8db8dd6213998966
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 47963968763cbee60016853d617f159c0761d282..c1ca84cf0dbb4fd091cfab517721c87e0f9074a0 100644
|
||||
index e78baa9433b6f5cb32142fe583fe95831b173d5a..509d368f7fa9e6330da02615d7bf78debb932623 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -607,7 +607,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -91,10 +91,10 @@ index 47963968763cbee60016853d617f159c0761d282..c1ca84cf0dbb4fd091cfab517721c87e
|
||||
if (isCheck) {
|
||||
stack.shrink(Math.min(stack.getCount(), i1));
|
||||
diff --git a/net/minecraft/world/inventory/GrindstoneMenu.java b/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index 18c15a7657e6fd994a8f17d0812c822d6adc8eab..00a0ce28632a7f515a94087c2752e8787212f0d9 100644
|
||||
index ad70a0f7debee27d9f3b2ff39cb0429b39485190..c8d3a8b9087460b20547dc49c1bf70bda87c218d 100644
|
||||
--- a/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -178,7 +178,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@@ -179,7 +179,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
int i2 = i + i1 + max * 5 / 100;
|
||||
int i3 = 1;
|
||||
if (!inputItem.isDamageableItem()) {
|
||||
@@ -103,20 +103,20 @@ index 18c15a7657e6fd994a8f17d0812c822d6adc8eab..00a0ce28632a7f515a94087c2752e878
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@@ -248,7 +248,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
ItemStack item1 = this.repairSlots.getItem(0);
|
||||
ItemStack item2 = this.repairSlots.getItem(1);
|
||||
if (index == 2) {
|
||||
if (slotIndex == 2) {
|
||||
- if (!this.moveItemStackTo(item, 3, 39, true)) {
|
||||
+ if (!this.moveItemStackTo(item, 3, 39, true, false, org.leavesmc.leaves.LeavesConfig.modify.oldMC.allowGrindstoneOverstacking)) { // Leaves - allowGrindstoneOverstacking: Disable stack check
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 4fdb3c36b39213f01f86ba281c7b62af99f5dcce..646d4c26870bb03f6d397b5e03ad97923d0928b2 100644
|
||||
index 8a93c4b9571b3088dc92317544d209603880d3fa..005fd35dcae20d404922ef797cf22ef69ecd6c3a 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -409,7 +409,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -410,7 +410,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
ItemStack itemStack = this.items.get(index);
|
||||
boolean flag = !stack.isEmpty() && ItemStack.isSameItemSameComponents(itemStack, stack);
|
||||
this.items.set(index, stack);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable MC-67
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index a93318b4de6b06ed9ec7321fdab869ac53af8506..12c4762bce6954935700e6d5f30c1f3dd85fb470 100644
|
||||
index a18f2f0d1df0fecb6f8b22a252d7a6d715eb8439..8bd5f957d61c429cf75e5a14296f735c33149e39 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4279,6 +4279,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4245,6 +4245,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
|
||||
@@ -27,10 +27,10 @@ index 05ec512839898f96d9769bb0d00f6ba11dda0c4b..27b225344c34e561d4913b3a6ca1c4a4
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 37d74a98689166355e7ed6165f1611cdb8cd1db7..7d7656cf8fdec9073ad3a1d026cbeb1f2f297d6a 100644
|
||||
index d2e49f8490bff739a3726e73a303b2c24c47617f..5a616d89522aacd1230e356197dec49abcfef872 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -576,12 +576,14 @@ public class EndDragonFight {
|
||||
@@ -577,12 +577,14 @@ public class EndDragonFight {
|
||||
}
|
||||
|
||||
public boolean tryRespawn() { // CraftBukkit - return boolean
|
||||
@@ -45,7 +45,7 @@ index 37d74a98689166355e7ed6165f1611cdb8cd1db7..7d7656cf8fdec9073ad3a1d026cbeb1f
|
||||
if (this.dragonKilled && this.respawnStage == null) {
|
||||
BlockPos blockPos = this.portalLocation;
|
||||
if (blockPos == null) {
|
||||
@@ -596,6 +598,7 @@ public class EndDragonFight {
|
||||
@@ -597,6 +599,7 @@ public class EndDragonFight {
|
||||
|
||||
blockPos = this.portalLocation;
|
||||
}
|
||||
@@ -53,7 +53,7 @@ index 37d74a98689166355e7ed6165f1611cdb8cd1db7..7d7656cf8fdec9073ad3a1d026cbeb1f
|
||||
// Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
||||
if (placedEndCrystalPos != null && !level.paperConfig().misc.allowRemoteEnderDragonRespawning) {
|
||||
// The end crystal must be 0 or 1 higher than the portal origin
|
||||
@@ -611,7 +614,7 @@ public class EndDragonFight {
|
||||
@@ -612,7 +615,7 @@ public class EndDragonFight {
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Can disable LivingEntity aiStep alive check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 5b6be93ee2b65931c3305f51bcf2a50537222100..ab992004f1c0f528b45cf9be90121e5ae1fd67e4 100644
|
||||
index 1a7135f2fda41265c75448e8ca9fec1c64de8e97..0f2a3002ec01451e92b3e4869373a910be6ccab2 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3316,7 +3316,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3325,7 +3325,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ index 95a1e4c332becb284af0e71c55f02e8e6338fdce..0597ec660c85c2ae5c50588016b2c15e
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/BasePressurePlateBlock.java b/net/minecraft/world/level/block/BasePressurePlateBlock.java
|
||||
index 02289b88710f9305192e3fa7eed3e7c45eda1178..5fc859518c89bd0c3a9111b8d709a98d102c747b 100644
|
||||
index a9c511e7debb8d47125d31291a0867791d9ab41b..aace49e366d2723c552d2efb082ab53b786fb5c5 100644
|
||||
--- a/net/minecraft/world/level/block/BasePressurePlateBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BasePressurePlateBlock.java
|
||||
@@ -125,6 +125,19 @@ public abstract class BasePressurePlateBlock extends Block {
|
||||
@@ -99,7 +99,7 @@ index 02289b88710f9305192e3fa7eed3e7c45eda1178..5fc859518c89bd0c3a9111b8d709a98d
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston && this.getSignalForState(state) > 0) {
|
||||
diff --git a/net/minecraft/world/level/block/BaseRailBlock.java b/net/minecraft/world/level/block/BaseRailBlock.java
|
||||
index 83ea4d44edfe98d2b2089d4d35caaa170575ab62..1e4df5fb66fd9d601a4ac95af6a3b6d32deef89b 100644
|
||||
index 37705ccc6b12113d22a1b7c2d8f8a05e4c812604..e6c732e29b0d3c7217e80e287483ce15fa29c043 100644
|
||||
--- a/net/minecraft/world/level/block/BaseRailBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BaseRailBlock.java
|
||||
@@ -121,6 +121,23 @@ public abstract class BaseRailBlock extends Block implements SimpleWaterloggedBl
|
||||
@@ -146,7 +146,7 @@ index 265736cb7b96dae60e9c6c7911d10f9a430a548c..687ea91d4e18adf97a5277340af976d0
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/ButtonBlock.java b/net/minecraft/world/level/block/ButtonBlock.java
|
||||
index 969678cd1635b9579146577404fcc2ecc68a6e7b..60079ee02f32c0f04b58dda6bf5a96bb3cc2f247 100644
|
||||
index a0d4f27ec05a18fcd460a01507a004897abb1e4f..924b11ed548bd069c21c411f4ec1ec0d5ee573e5 100644
|
||||
--- a/net/minecraft/world/level/block/ButtonBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ButtonBlock.java
|
||||
@@ -132,6 +132,19 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock {
|
||||
@@ -170,7 +170,7 @@ index 969678cd1635b9579146577404fcc2ecc68a6e7b..60079ee02f32c0f04b58dda6bf5a96bb
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston && state.getValue(POWERED)) {
|
||||
diff --git a/net/minecraft/world/level/block/CampfireBlock.java b/net/minecraft/world/level/block/CampfireBlock.java
|
||||
index f183f8e443e2183624288dcecdea587d51db6fae..af85c78c33ee05cdb444891f48e0627a86965f53 100644
|
||||
index d6aaebacfb9b713dafb718d1e7ade8da8111ebb5..99fd2486c16c8d9d299862002cd82decc7442410 100644
|
||||
--- a/net/minecraft/world/level/block/CampfireBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CampfireBlock.java
|
||||
@@ -105,6 +105,20 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB
|
||||
@@ -192,10 +192,10 @@ index f183f8e443e2183624288dcecdea587d51db6fae..af85c78c33ee05cdb444891f48e0627a
|
||||
+ // Leaves end - behaviour 1.21.1-
|
||||
+
|
||||
@Override
|
||||
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean flag) {
|
||||
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean pastEdges) {
|
||||
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent
|
||||
diff --git a/net/minecraft/world/level/block/ChestBlock.java b/net/minecraft/world/level/block/ChestBlock.java
|
||||
index b4d190a2f6ff8d21635c20bb8c1940d789e5c254..9365a9adcc9900648a99dc4696f89154ace6dddb 100644
|
||||
index 3cce87fd6e1d9d65d6b28bf44dd218541e815788..2b4260aef5bc56a9b2a5834f16c7d3ef2c8c2d2f 100644
|
||||
--- a/net/minecraft/world/level/block/ChestBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ChestBlock.java
|
||||
@@ -276,6 +276,14 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
|
||||
@@ -246,7 +246,7 @@ index 77eee6728ecb0d5cb035a6a7969d5b3498a19b62..899508fbf9f59287d6ece9635e9cf071
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/CrafterBlock.java b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
index ad318cb7cd6d536d53ce9f911d5290bd9128b6f5..dbff3f9e20ed1fdadd596ce5ef3be196bdce2144 100644
|
||||
index 9ff207acba5584480481e0df63ad3ca9bced0354..3e011483a74bd45269b5623e5f423495d0300120 100644
|
||||
--- a/net/minecraft/world/level/block/CrafterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CrafterBlock.java
|
||||
@@ -129,6 +129,14 @@ public class CrafterBlock extends BaseEntityBlock {
|
||||
@@ -265,7 +265,7 @@ index ad318cb7cd6d536d53ce9f911d5290bd9128b6f5..dbff3f9e20ed1fdadd596ce5ef3be196
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/CreakingHeartBlock.java b/net/minecraft/world/level/block/CreakingHeartBlock.java
|
||||
index a995afde495fc698e6881f272bf75e90fa4d2664..d2ce1e547ce72b263d1cef32a25848778c238bab 100644
|
||||
index 80fe93eedad9ff6cd5308c8039f988d2635cd574..6c1f1a00ad32bf579643b37b932f6aa3db50d77c 100644
|
||||
--- a/net/minecraft/world/level/block/CreakingHeartBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CreakingHeartBlock.java
|
||||
@@ -152,6 +152,16 @@ public class CreakingHeartBlock extends BaseEntityBlock {
|
||||
@@ -286,7 +286,7 @@ index a995afde495fc698e6881f272bf75e90fa4d2664..d2ce1e547ce72b263d1cef32a2584877
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/DecoratedPotBlock.java b/net/minecraft/world/level/block/DecoratedPotBlock.java
|
||||
index beef5ba8bd0b12b0012c7d063515b5dee596bd6b..d0795c4f2f7e7c1428eed088f1e15760a3d2b5f5 100644
|
||||
index ba27d15c674582607f4be6a99541475f790aeb1a..b2a0d53f7480ec7e152d77b239345b21919678ed 100644
|
||||
--- a/net/minecraft/world/level/block/DecoratedPotBlock.java
|
||||
+++ b/net/minecraft/world/level/block/DecoratedPotBlock.java
|
||||
@@ -165,6 +165,14 @@ public class DecoratedPotBlock extends BaseEntityBlock implements SimpleWaterlog
|
||||
@@ -305,7 +305,7 @@ index beef5ba8bd0b12b0012c7d063515b5dee596bd6b..d0795c4f2f7e7c1428eed088f1e15760
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/DiodeBlock.java b/net/minecraft/world/level/block/DiodeBlock.java
|
||||
index 558751ade918a92a1173096ccfeacf238f4260d0..94d35e4812705771756a0ee1a9b0255be75e3770 100644
|
||||
index 1158bdc1993a1c8f907070d6190c5a7d02d4bdb6..b975297c0475049935c38554a8c736abbf9882de 100644
|
||||
--- a/net/minecraft/world/level/block/DiodeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/DiodeBlock.java
|
||||
@@ -175,6 +175,16 @@ public abstract class DiodeBlock extends HorizontalDirectionalBlock {
|
||||
@@ -326,7 +326,7 @@ index 558751ade918a92a1173096ccfeacf238f4260d0..94d35e4812705771756a0ee1a9b0255b
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston) {
|
||||
diff --git a/net/minecraft/world/level/block/DispenserBlock.java b/net/minecraft/world/level/block/DispenserBlock.java
|
||||
index 3db7260752e5978c6a1c75e15ac78587949dac94..5b6cbc0adbbb32b30ea35c4a76b0fe29ed1cb0e5 100644
|
||||
index 78375f2ec7e62db803961f4b9feb3e467db20477..58e65813461b76baa6ec01a691549650e65468a2 100644
|
||||
--- a/net/minecraft/world/level/block/DispenserBlock.java
|
||||
+++ b/net/minecraft/world/level/block/DispenserBlock.java
|
||||
@@ -147,6 +147,14 @@ public class DispenserBlock extends BaseEntityBlock {
|
||||
@@ -345,7 +345,7 @@ index 3db7260752e5978c6a1c75e15ac78587949dac94..5b6cbc0adbbb32b30ea35c4a76b0fe29
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/HopperBlock.java b/net/minecraft/world/level/block/HopperBlock.java
|
||||
index 73b602eee0da94f657b4b4cb654147f7ba41c1a4..cf3a1122a9581b1a322990c1660711c1c72df570 100644
|
||||
index 3140269761935201882173e568004488147a4110..32b2f73d371b4dd53cdadfc94ff5e4d7bdaf7e37 100644
|
||||
--- a/net/minecraft/world/level/block/HopperBlock.java
|
||||
+++ b/net/minecraft/world/level/block/HopperBlock.java
|
||||
@@ -125,6 +125,14 @@ public class HopperBlock extends BaseEntityBlock {
|
||||
@@ -364,7 +364,7 @@ index 73b602eee0da94f657b4b4cb654147f7ba41c1a4..cf3a1122a9581b1a322990c1660711c1
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/JukeboxBlock.java b/net/minecraft/world/level/block/JukeboxBlock.java
|
||||
index a1acd044d6f1ccd4f79e582d61d4dd8002854af3..5267f5349677cfa6370042e4fa82018ad89fc937 100644
|
||||
index c48ffdca3adb53005af18a743fc368a0e9e78f0a..5a095afc88f31cab4be59f2bd5962b67d9236b27 100644
|
||||
--- a/net/minecraft/world/level/block/JukeboxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/JukeboxBlock.java
|
||||
@@ -73,6 +73,19 @@ public class JukeboxBlock extends BaseEntityBlock {
|
||||
@@ -388,7 +388,7 @@ index a1acd044d6f1ccd4f79e582d61d4dd8002854af3..5267f5349677cfa6370042e4fa82018a
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/LecternBlock.java b/net/minecraft/world/level/block/LecternBlock.java
|
||||
index 31e793474a1787be2c737417b849d0e3bc79ed10..b7af47f00042de5c491809255d0d911c65747f25 100644
|
||||
index 8e18ff02e9773a76ec27e2f62b75a05ec0241dc0..c2615055354ef2539052096ef9ff042ac52460ba 100644
|
||||
--- a/net/minecraft/world/level/block/LecternBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LecternBlock.java
|
||||
@@ -198,6 +198,36 @@ public class LecternBlock extends BaseEntityBlock {
|
||||
@@ -429,7 +429,7 @@ index 31e793474a1787be2c737417b849d0e3bc79ed10..b7af47f00042de5c491809255d0d911c
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (state.getValue(POWERED)) {
|
||||
diff --git a/net/minecraft/world/level/block/LeverBlock.java b/net/minecraft/world/level/block/LeverBlock.java
|
||||
index 7639201a15dfef7ad84a63c2217aeacd626041c2..ad689677be3c6a331684a62b3687ed83718733a2 100644
|
||||
index 20207bcd2a9def5d94e994e2b7807d18df551015..358abfa6f4e4cfc648923caa4fa26e0fab9986bc 100644
|
||||
--- a/net/minecraft/world/level/block/LeverBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LeverBlock.java
|
||||
@@ -125,6 +125,19 @@ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock {
|
||||
@@ -453,7 +453,7 @@ index 7639201a15dfef7ad84a63c2217aeacd626041c2..ad689677be3c6a331684a62b3687ed83
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston && state.getValue(POWERED)) {
|
||||
diff --git a/net/minecraft/world/level/block/LightningRodBlock.java b/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
index e33238331d9f7f421c05959fc6653f31b7a00704..62cd2cfc0456f07a9c5cebfe4f9410658bd3c689 100644
|
||||
index 622f28a3661eec0487179aa9798f5771c0d957f7..4175957f56ddaaaa6e7fd7639f8173e39ce92d71 100644
|
||||
--- a/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
+++ b/net/minecraft/world/level/block/LightningRodBlock.java
|
||||
@@ -120,6 +120,18 @@ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBloc
|
||||
@@ -476,7 +476,7 @@ index e33238331d9f7f421c05959fc6653f31b7a00704..62cd2cfc0456f07a9c5cebfe4f941065
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (state.getValue(POWERED)) {
|
||||
diff --git a/net/minecraft/world/level/block/ObserverBlock.java b/net/minecraft/world/level/block/ObserverBlock.java
|
||||
index bd2aa00ce8b78c16f6107064dd00bfbb072df0df..6db3a21bcc37ae79f82b19ee0a851f539d4a654d 100644
|
||||
index 3c12d8e23f20b666b0005e597ba2e803c02d5d78..17c371f4c24e8a81705bdd322b1de5de4b8be8b7 100644
|
||||
--- a/net/minecraft/world/level/block/ObserverBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ObserverBlock.java
|
||||
@@ -127,6 +127,17 @@ public class ObserverBlock extends DirectionalBlock {
|
||||
@@ -498,7 +498,7 @@ index bd2aa00ce8b78c16f6107064dd00bfbb072df0df..6db3a21bcc37ae79f82b19ee0a851f53
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (state.getValue(POWERED) && level.getBlockTicks().hasScheduledTick(pos, this)) {
|
||||
diff --git a/net/minecraft/world/level/block/RedStoneWireBlock.java b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
index 813dbd68dc7b939444050399f881a938df116a56..0fee20208ca95ae4fcf3aeb73c11eee7860bab5e 100644
|
||||
index 6f9ab1b41222832c29949bca1bdfb717ceecf5fa..6e6d10b0a9c2cf4516d29fb747f7e6e7f6063666 100644
|
||||
--- a/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
+++ b/net/minecraft/world/level/block/RedStoneWireBlock.java
|
||||
@@ -363,6 +363,27 @@ public class RedStoneWireBlock extends Block {
|
||||
@@ -530,7 +530,7 @@ index 813dbd68dc7b939444050399f881a938df116a56..0fee20208ca95ae4fcf3aeb73c11eee7
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston) {
|
||||
diff --git a/net/minecraft/world/level/block/RedstoneTorchBlock.java b/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||
index 33e2f2de19208b7af6551132887e310744b4b702..d36c3bdb59bf9b9467d1a9807ab789b4c180010d 100644
|
||||
index 1ecf736ceeca45bb91dbe31a1dcb0262cbb9c1c7..52cc39babc8b884d01e6e50f04d113130b87eaa8 100644
|
||||
--- a/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||
+++ b/net/minecraft/world/level/block/RedstoneTorchBlock.java
|
||||
@@ -53,6 +53,15 @@ public class RedstoneTorchBlock extends BaseTorchBlock {
|
||||
@@ -550,7 +550,7 @@ index 33e2f2de19208b7af6551132887e310744b4b702..d36c3bdb59bf9b9467d1a9807ab789b4
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston) {
|
||||
diff --git a/net/minecraft/world/level/block/SculkSensorBlock.java b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
index 8a6c7e3b7e0aa7f13373d5d860bdc2a06d4084e0..b4c5e16d23238ac89e739269e04e16be54394e66 100644
|
||||
index 957f019773d5c042086c1f7c3887ac85b97960ed..de3d5e6eb82c13667f21a3af95b1d2dca02bea94 100644
|
||||
--- a/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SculkSensorBlock.java
|
||||
@@ -129,6 +129,18 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg
|
||||
@@ -573,7 +573,7 @@ index 8a6c7e3b7e0aa7f13373d5d860bdc2a06d4084e0..b4c5e16d23238ac89e739269e04e16be
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (getPhase(state) == SculkSensorPhase.ACTIVE) {
|
||||
diff --git a/net/minecraft/world/level/block/SculkShriekerBlock.java b/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
index ef9f879e7819fcb977dadcfbb4b95b4f7b2f4266..15ca094bb0378fd4eaebf1b2f7626de53cf2e5ce 100644
|
||||
index 465d13a748b5b6773bc0ee26ac3eda582c9f5bcd..484b97494ff45f9d1bc1ca80d01b74995dc220f9 100644
|
||||
--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
|
||||
@@ -68,6 +68,16 @@ public class SculkShriekerBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -594,7 +594,7 @@ index ef9f879e7819fcb977dadcfbb4b95b4f7b2f4266..15ca094bb0378fd4eaebf1b2f7626de5
|
||||
protected void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) {
|
||||
if (state.getValue(SHRIEKING)) {
|
||||
diff --git a/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
index efb25d556f2192b1ee499c28d14aa7d11bcabef8..188fd15cce078db6eac14aff933a3c762397d602 100644
|
||||
index c64685c9aef0ec3c95dc27d631318d2293c1a361..f69f9fa1ec89baafeef9e6a0f01a108c2f443259 100644
|
||||
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
||||
@@ -152,6 +152,19 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
||||
@@ -618,7 +618,7 @@ index efb25d556f2192b1ee499c28d14aa7d11bcabef8..188fd15cce078db6eac14aff933a3c76
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
Containers.updateNeighboursAfterDestroy(state, level, pos);
|
||||
diff --git a/net/minecraft/world/level/block/TripWireBlock.java b/net/minecraft/world/level/block/TripWireBlock.java
|
||||
index 43b46d04634a96d373cf9adac15a6f61e42e821f..87a6a27c38408269c1f9740687de6625d3b0a6c1 100644
|
||||
index 9d005c3db8f0c784cdd7217e7b110daa703a9cf3..190d7cd818f768bd44fc1b4e62af2c9b3aacbe4d 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireBlock.java
|
||||
@@ -108,6 +108,16 @@ public class TripWireBlock extends Block {
|
||||
@@ -639,7 +639,7 @@ index 43b46d04634a96d373cf9adac15a6f61e42e821f..87a6a27c38408269c1f9740687de6625
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating
|
||||
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index a92462c76a648e6c175b8c2ef3e925aba81ba774..b32760f1096581059418f479b060019f7dccbd67 100644
|
||||
index 219cbb38de6452fcc0a7b4db1cf648bbf2f1feac..dbefb8bbcc84ee910287d80ddc5d9abe46721f8f 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -245,6 +245,25 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -669,7 +669,7 @@ index a92462c76a648e6c175b8c2ef3e925aba81ba774..b32760f1096581059418f479b060019f
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
if (!movedByPiston) {
|
||||
diff --git a/net/minecraft/world/level/block/entity/BlockEntityType.java b/net/minecraft/world/level/block/entity/BlockEntityType.java
|
||||
index 42865515fd8c6a321cc68f3c507738b86dc55d35..5577661dc430c11a692aec576c56c17cb8bef84c 100644
|
||||
index 33e8479f20d1a07c518ba736322517c422cd2763..caaf5a1324e1a3d8447145b8deb55e6c8cf8c56a 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntityType.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntityType.java
|
||||
@@ -303,7 +303,7 @@ public class BlockEntityType<T extends BlockEntity> {
|
||||
@@ -682,7 +682,7 @@ index 42865515fd8c6a321cc68f3c507738b86dc55d35..5577661dc430c11a692aec576c56c17c
|
||||
|
||||
@Deprecated
|
||||
diff --git a/net/minecraft/world/level/block/piston/MovingPistonBlock.java b/net/minecraft/world/level/block/piston/MovingPistonBlock.java
|
||||
index 16f14dffcbca21e0c6d369d557ab6c036523b8bd..85ea573faf87f6c58ccbec69b77dbc981768c52e 100644
|
||||
index 9f013b6a87a18f83188d6efec9f84d8895876f24..3594d97bd7e233bd418e0763db75330a27759c7a 100644
|
||||
--- a/net/minecraft/world/level/block/piston/MovingPistonBlock.java
|
||||
+++ b/net/minecraft/world/level/block/piston/MovingPistonBlock.java
|
||||
@@ -67,6 +67,18 @@ public class MovingPistonBlock extends BaseEntityBlock {
|
||||
@@ -705,7 +705,7 @@ index 16f14dffcbca21e0c6d369d557ab6c036523b8bd..85ea573faf87f6c58ccbec69b77dbc98
|
||||
public void destroy(LevelAccessor level, BlockPos pos, BlockState state) {
|
||||
BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite());
|
||||
diff --git a/net/minecraft/world/level/block/piston/PistonHeadBlock.java b/net/minecraft/world/level/block/piston/PistonHeadBlock.java
|
||||
index 72e39ceeca8d684569c4250263b41034362f8abd..29cf6e44e328ffc3c311149f383c4bd390c515c4 100644
|
||||
index 8c35c7e54373f8be187a84bd4b4a9ce9d6341dff..894e0532cf4cdc0a92300b5ead2398da3a836d8e 100644
|
||||
--- a/net/minecraft/world/level/block/piston/PistonHeadBlock.java
|
||||
+++ b/net/minecraft/world/level/block/piston/PistonHeadBlock.java
|
||||
@@ -78,6 +78,19 @@ public class PistonHeadBlock extends DirectionalBlock {
|
||||
@@ -729,7 +729,7 @@ index 72e39ceeca8d684569c4250263b41034362f8abd..29cf6e44e328ffc3c311149f383c4bd3
|
||||
protected void affectNeighborsAfterRemoval(BlockState state, ServerLevel level, BlockPos pos, boolean movedByPiston) {
|
||||
BlockPos blockPos = pos.relative(state.getValue(FACING).getOpposite());
|
||||
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 23a7c045b07b9b30b2c8fb99e254a65b390e6245..bf1842b30074cde4ad6ce4c95e48e9d831c9e055 100644
|
||||
index a38618c28819405f0fb35aa686d1f3f0e94e5da2..683a6a48593218b7504d6c99a0357278fb380665 100644
|
||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -170,6 +170,15 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -762,13 +762,13 @@ index 23a7c045b07b9b30b2c8fb99e254a65b390e6245..bf1842b30074cde4ad6ce4c95e48e9d8
|
||||
this.getBlock().affectNeighborsAfterRemoval(this.asState(), level, pos, movedByPiston);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index e96a7693eb0d94888a3b1db680378374e7aebb91..836aa1926079515df166cd76d27b2d24a2f99646 100644
|
||||
index 7c5f827134e0fa81031660a78d4d404c21840cb6..479723aaee1cf9ea6be8606a63f721236b3e2424 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -403,20 +403,26 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -403,22 +403,28 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
boolean flag = !blockState.is(block);
|
||||
boolean flag1 = (flags & 64) != 0;
|
||||
boolean flag2 = (flags & 256) == 0;
|
||||
boolean flag1 = (flags & Block.UPDATE_MOVE_BY_PISTON) != 0;
|
||||
boolean flag2 = (flags & Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS) == 0;
|
||||
- if (flag && blockState.hasBlockEntity() && !state.shouldChangedStateKeepBlockEntity(blockState)) {
|
||||
- if (!this.level.isClientSide() && flag2) {
|
||||
- BlockEntity blockEntity = this.level.getBlockEntity(pos);
|
||||
@@ -790,9 +790,13 @@ index e96a7693eb0d94888a3b1db680378374e7aebb91..836aa1926079515df166cd76d27b2d24
|
||||
+ this.removeBlockEntity(pos);
|
||||
+ }
|
||||
|
||||
- if ((flag || block instanceof BaseRailBlock) && this.level instanceof ServerLevel serverLevel && ((flags & 1) != 0 || flag1)) {
|
||||
- if ((flag || block instanceof BaseRailBlock)
|
||||
- && this.level instanceof ServerLevel serverLevel
|
||||
- && ((flags & Block.UPDATE_NEIGHBORS) != 0 || flag1)) {
|
||||
- blockState.affectNeighborsAfterRemoval(serverLevel, pos, flag1);
|
||||
+ if ((flag || block instanceof BaseRailBlock) && this.level instanceof ServerLevel serverLevel && ((flags & 1) != 0 || flag1)) {
|
||||
+ if ((flag || block instanceof BaseRailBlock)
|
||||
+ && this.level instanceof ServerLevel serverLevel
|
||||
+ && ((flags & Block.UPDATE_NEIGHBORS) != 0 || flag1)) {
|
||||
+ blockState.affectNeighborsAfterRemoval(serverLevel, pos, flag1);
|
||||
+ }
|
||||
+ } else {
|
||||
|
||||
@@ -164,7 +164,7 @@ index 5181a9334066a15e0d502d3522c23337e5eef2b5..36b4aeeb63319d28d637541c3b97a481
|
||||
+ // Leaves end - old FindSpawnPosition
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||
index a495789b2d21fa9a24d5dca4ecfa196ddce49466..86e8ca07a1163094b14c55fe8913c7312eeff124 100644
|
||||
index 8d8315edfb69b062ed5e3d957f4043ec411dd5d7..1c668b9dd246d29c37fc0de9d27e320d6b899a3f 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -128,6 +128,43 @@ public abstract class Raider extends PatrollingMonster {
|
||||
@@ -210,4 +210,4 @@ index a495789b2d21fa9a24d5dca4ecfa196ddce49466..86e8ca07a1163094b14c55fe8913c731
|
||||
+ // Leaves end - Revert raid changes
|
||||
}
|
||||
|
||||
super.die(cause);
|
||||
super.die(damageSource);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix EntityPortalExitEvent logic
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 12c4762bce6954935700e6d5f30c1f3dd85fb470..0467680b8c1c6e2bbc05d273975aa3792a5b7b0a 100644
|
||||
index 8bd5f957d61c429cf75e5a14296f735c33149e39..7376b7f56009865ba2db24b68f008b077bcf34d3 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4061,19 +4061,21 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4052,19 +4052,21 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
);
|
||||
event.callEvent();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix CraftPortalEvent logic
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index cbd8c06f5bf4319dd2470c289442237c465cff57..1df34a29925ba40e6c4af5a8ba4c2480e5c58cbe 100644
|
||||
index fb51a78e16fd461d95f670eae43ef93c64b46843..dca30a02110181bf45306ca6b2f9508e20cd643f 100644
|
||||
--- a/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -111,10 +111,10 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
@@ -16,8 +16,8 @@ index cbd8c06f5bf4319dd2470c289442237c465cff57..1df34a29925ba40e6c4af5a8ba4c2480
|
||||
+ // set.removeAll(Relative.ROTATION); // remove relative rotation flags to simplify event mutation // Leaves - no
|
||||
float absoluteYaw = !flag ? f : entity.getYRot() + f;
|
||||
float absolutePitch = entity.getXRot() + f1;
|
||||
- org.bukkit.craftbukkit.event.CraftPortalEvent event = entity.callPortalEvent(entity, org.bukkit.craftbukkit.util.CraftLocation.toBukkit(bottomCenter, level1, absoluteYaw, absolutePitch), org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL, 0, 0);
|
||||
+ org.bukkit.craftbukkit.event.CraftPortalEvent event = entity.callPortalEvent(entity, org.bukkit.craftbukkit.util.CraftLocation.toBukkit(bottomCenter, level1.getWorld(), absoluteYaw, 0.0F), org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL, 0, 0); // Leaves - fix
|
||||
if (event == null) {
|
||||
- org.bukkit.craftbukkit.event.PortalEventResult result = org.bukkit.craftbukkit.event.CraftEventFactory.handlePortalEvents(entity, org.bukkit.craftbukkit.util.CraftLocation.toBukkit(bottomCenter, level1, absoluteYaw, absolutePitch), org.bukkit.PortalType.ENDER, 0, 0);
|
||||
+ org.bukkit.craftbukkit.event.PortalEventResult result = org.bukkit.craftbukkit.event.CraftEventFactory.handlePortalEvents(entity, org.bukkit.craftbukkit.util.CraftLocation.toBukkit(bottomCenter, level1.getWorld(), absoluteYaw, 0.0F), org.bukkit.PortalType.ENDER, 0, 0);
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ Subject: [PATCH] Xaero Map Protocol
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 5775b4bf6377d2e39707cb259b4228f03b19cafc..f89bf5b325a1077e42321e117be445b8a11f9ecb 100644
|
||||
index f376b03e267ae9c3acc9636b6ccee733497027d2..5661e05cc1ffbfc7015ca45cf0820e0ba616bcc6 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1248,6 +1248,7 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundInitializeBorderPacket(worldBorder));
|
||||
player.connection.send(new ClientboundSetTimePacket(level.getGameTime(), level.getDayTime(), level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
|
||||
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getRespawnData()));
|
||||
@@ -1204,6 +1204,7 @@ public abstract class PlayerList {
|
||||
player.connection.send(new ClientboundSetChunkCacheRadiusPacket(level.spigotConfig.viewDistance));
|
||||
player.connection.send(new ClientboundSetSimulationDistancePacket(level.spigotConfig.simulationDistance));
|
||||
// Paper end
|
||||
+ org.leavesmc.leaves.protocol.XaeroMapProtocol.onSendWorldInfo(player); // Leaves - xaero map protocol
|
||||
if (level.isRaining()) {
|
||||
// CraftBukkit start - handle player weather
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Skip negligible planar movement multiplication
|
||||
This patch is Powered by Gale(https://github.com/Dreeam-qwq/Gale)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 0467680b8c1c6e2bbc05d273975aa3792a5b7b0a..131afee833ff108401c6cfd20d709e94084b0dae 100644
|
||||
index 7376b7f56009865ba2db24b68f008b077bcf34d3..0260ccee26a4dad7c7ea53504a45c645abe3c28f 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1247,8 +1247,17 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -1246,8 +1246,17 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Vanilla player display name
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0981f5d07144f75148b035e41f82190d0cd6526a..38326b17208612caadf0f94881631f89d774b2b4 100644
|
||||
index 44b1d56fb3ce3827290ef4cf987aa2386d07eb9c..77f82c8bf2ffbe642f1149aa4a5269818964296a 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -490,7 +490,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -491,7 +491,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.object = null;
|
||||
// CraftBukkit start
|
||||
this.displayName = this.getScoreboardName();
|
||||
@@ -18,7 +18,7 @@ index 0981f5d07144f75148b035e41f82190d0cd6526a..38326b17208612caadf0f94881631f89
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
// CraftBukkit end
|
||||
diff --git a/net/minecraft/world/scores/Scoreboard.java b/net/minecraft/world/scores/Scoreboard.java
|
||||
index 4275d048a8f5e98c7436f5bf2d55a9b68f7ba818..c68399f1ada71f6b301b41bdc83af024a9d2f1d3 100644
|
||||
index e25075f6436a8020bd1b0d9e53ed93d0eb914d6a..e20fe2d12b28e108763156781444a59a9dbdc25d 100644
|
||||
--- a/net/minecraft/world/scores/Scoreboard.java
|
||||
+++ b/net/minecraft/world/scores/Scoreboard.java
|
||||
@@ -282,6 +282,16 @@ public class Scoreboard {
|
||||
@@ -40,11 +40,11 @@ index 4275d048a8f5e98c7436f5bf2d55a9b68f7ba818..c68399f1ada71f6b301b41bdc83af024
|
||||
|
||||
@@ -301,6 +311,14 @@ public class Scoreboard {
|
||||
} else {
|
||||
this.teamsByPlayer.remove(username);
|
||||
playerTeam.getPlayers().remove(username);
|
||||
this.teamsByPlayer.remove(playerName);
|
||||
team.getPlayers().remove(playerName);
|
||||
+ // Leaves start - vanilla display name
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.fix.vanillaDisplayName) {
|
||||
+ net.minecraft.server.level.ServerPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayerByName(username);
|
||||
+ net.minecraft.server.level.ServerPlayer player = net.minecraft.server.MinecraftServer.getServer().getPlayerList().getPlayerByName(playerName);
|
||||
+ if (player != null) {
|
||||
+ player.adventure$displayName = io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName());
|
||||
+ }
|
||||
|
||||
@@ -5,19 +5,19 @@ Subject: [PATCH] Fix SculkCatalyst exp skip
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6c4e73cf5db1f004e10553932903b9046f17ef60..ad68599760506223ba506c75d7297adce445f6ac 100644
|
||||
index 77f82c8bf2ffbe642f1149aa4a5269818964296a..60a5bf1fa503dab25a7fef9d094fd6dc5a80fdca 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1213,7 +1213,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1214,7 +1214,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
// SPIGOT-5478 must be called manually now
|
||||
- if (event.shouldDropExperience()) this.dropExperience(this.level(), cause.getEntity()); // Paper - tie to event
|
||||
+ if (shouldDropExperience(event.shouldDropExperience(), event.forceUseEventDropStatus())) this.dropExperience(this.level(), cause.getEntity()); // Paper - tie to event // Leaves - exp fix
|
||||
- if (event.shouldDropExperience()) this.dropExperience(this.level(), damageSource.getEntity()); // Paper - tie to event
|
||||
+ if (shouldDropExperience(event.shouldDropExperience(), event.forceUseEventDropStatus())) this.dropExperience(this.level(), damageSource.getEntity()); // Paper - tie to event // Leaves - exp fix
|
||||
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
if (!event.getKeepInventory()) {
|
||||
// Paper start - PlayerDeathEvent#getItemsToKeep
|
||||
@@ -1260,6 +1260,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1261,6 +1261,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.setClientLoaded(false);
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ index 6c4e73cf5db1f004e10553932903b9046f17ef60..ad68599760506223ba506c75d7297adc
|
||||
AABB aabb = new AABB(this.blockPosition()).inflate(32.0, 10.0, 32.0);
|
||||
this.level()
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index ab992004f1c0f528b45cf9be90121e5ae1fd67e4..1e601d9066dd0521530ab6185e87eecb708b3e44 100644
|
||||
index 0f2a3002ec01451e92b3e4869373a910be6ccab2..0610df1c343f1c5cf724a79fbc68ed1372de5da5 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -278,6 +278,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -279,6 +279,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
private Waypoint.Icon locatorBarIcon = new Waypoint.Icon();
|
||||
// CraftBukkit start
|
||||
public int expToDrop;
|
||||
@@ -45,7 +45,7 @@ index ab992004f1c0f528b45cf9be90121e5ae1fd67e4..1e601d9066dd0521530ab6185e87eecb
|
||||
public List<DefaultDrop> drops = new java.util.ArrayList<>(); // Paper - Restore vanilla drops behavior
|
||||
public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||
public boolean collides = true;
|
||||
@@ -1868,6 +1869,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1872,6 +1873,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
entity.killedEntity((ServerLevel) this.level(), this, damageSource);
|
||||
}
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
@@ -53,7 +53,7 @@ index ab992004f1c0f528b45cf9be90121e5ae1fd67e4..1e601d9066dd0521530ab6185e87eecb
|
||||
} else {
|
||||
this.dead = false;
|
||||
this.setHealth((float) deathEvent.getReviveHealth());
|
||||
@@ -1941,7 +1943,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1948,7 +1950,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.drops = new java.util.ArrayList<>();
|
||||
// this.dropEquipment(level); // CraftBukkit - moved up
|
||||
// CraftBukkit end
|
||||
@@ -63,10 +63,10 @@ index ab992004f1c0f528b45cf9be90121e5ae1fd67e4..1e601d9066dd0521530ab6185e87eecb
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
index 0a94670dc20bb9c521b0395633eb100393895f6a..a2f73e8210ac554a7529067bbe9f50267f2bf0e2 100644
|
||||
index ab7be4298be22af32c4726f178b93896b96f599d..7bce957dca7ef797100b685f0e5a25820be0f4b4 100644
|
||||
--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
@@ -96,8 +96,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -97,8 +97,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
public boolean handleGameEvent(ServerLevel level, Holder<GameEvent> gameEvent, GameEvent.Context context, Vec3 pos) {
|
||||
if (gameEvent.is(GameEvent.ENTITY_DIE) && context.sourceEntity() instanceof LivingEntity livingEntity) {
|
||||
if (!livingEntity.wasExperienceConsumed()) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Vanilla portal handle
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index e31d0ee67f418d1b0bf2734c24a75c4dc2c1feca..ab558281d064cd3a776f7d7c1a021b0d727b22e1 100644
|
||||
index 0260ccee26a4dad7c7ea53504a45c645abe3c28f..03972434172ff8615f0f5defa1076d348e0b6b19 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -842,6 +842,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -841,6 +841,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
|
||||
// CraftBukkit start
|
||||
public void postTick() {
|
||||
@@ -16,7 +16,7 @@ index e31d0ee67f418d1b0bf2734c24a75c4dc2c1feca..ab558281d064cd3a776f7d7c1a021b0d
|
||||
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
||||
if (!(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities
|
||||
this.handlePortal();
|
||||
@@ -862,7 +863,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -861,7 +862,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
this.boardingCooldown--;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ index e31d0ee67f418d1b0bf2734c24a75c4dc2c1feca..ab558281d064cd3a776f7d7c1a021b0d
|
||||
this.spawnSprintParticle();
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index 2ae92078d69e5ab3cc27085a9c5e5ccf9f2c175d..7ef959c5d192c78002fb37f624162abe250a1854 100644
|
||||
index 3454506b2d7ada401600e2adccd462a15bd86723..c8b053b01b06af6033b9a74452946333dbeb77fa 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -293,7 +293,7 @@ public abstract class AbstractMinecart extends VehicleEntity {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not prevent block entity and entity crash at LevelChunk
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 3915d0fbb26b9f3042ba3e3d22d61b251117c774..ff76f9ddc97c326bbe56a7ec138b11bf8e2d108d 100644
|
||||
index 479723aaee1cf9ea6be8606a63f721236b3e2424..e6cc97e21e31faab0562e2a43766bd00f0451a19 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -986,12 +986,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -988,12 +988,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
|
||||
profilerFiller.pop();
|
||||
} catch (Throwable var5) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Spawn invulnerable time
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 16ff518eb1583e4640ad52ccf73f1a667822b693..885681d6f6257d734ba03f375a9054a8c6b4222a 100644
|
||||
index 60a5bf1fa503dab25a7fef9d094fd6dc5a80fdca..2d957b4bd98497100a9fc62fa4709b6898a6374f 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -240,6 +240,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -241,6 +241,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
private int lastSentFood = -99999999;
|
||||
private boolean lastFoodSaturationZero = true;
|
||||
public int lastSentExp = -99999999;
|
||||
@@ -16,7 +16,7 @@ index 16ff518eb1583e4640ad52ccf73f1a667822b693..885681d6f6257d734ba03f375a9054a8
|
||||
private ChatVisiblity chatVisibility = ChatVisiblity.FULL;
|
||||
public ParticleStatus particleStatus = ParticleStatus.ALL;
|
||||
private boolean canChatColor = true;
|
||||
@@ -729,6 +730,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -730,6 +731,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.resetOperationCountPerTick(); // Leaves - player operation limiter
|
||||
this.gameMode.tick();
|
||||
this.wardenSpawnTracker.tick();
|
||||
@@ -24,7 +24,7 @@ index 16ff518eb1583e4640ad52ccf73f1a667822b693..885681d6f6257d734ba03f375a9054a8
|
||||
if (this.invulnerableTime > 0) {
|
||||
this.invulnerableTime--;
|
||||
}
|
||||
@@ -1312,6 +1314,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1313,6 +1315,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
if (this.isInvulnerableTo(level, damageSource)) {
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Old zombie reinforcement
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
|
||||
index c0f7b625ca135772f3f979d64b1003699b4109f8..3f87bcaa806de4541d3f4f389e897d9875330009 100644
|
||||
index afe4a2304268224f6b0a1cc40a41f7b67f9d3275..1a5f3bdfcd6811bd26f75f43e325cc0bd3bbc814 100644
|
||||
--- a/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -340,7 +340,7 @@ public class Zombie extends Monster {
|
||||
@@ -341,7 +341,7 @@ public class Zombie extends Monster {
|
||||
int floor = Mth.floor(this.getX());
|
||||
int floor1 = Mth.floor(this.getY());
|
||||
int floor2 = Mth.floor(this.getZ());
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Vanilla Fluid Pushing
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index a2aeab3e35937cacea9c6f38ce2d4aa388c9b6ab..adaaa88baa946b109f740a024dde1408d53613fa 100644
|
||||
index 03972434172ff8615f0f5defa1076d348e0b6b19..5c63b9603f7b6f6c4ceca0d836df4a4972568631 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4804,8 +4804,82 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4770,8 +4770,82 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return Mth.lerp(partialTick, this.yRotO, this.yRot);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,26 +32,26 @@ index f6e18d62db18616a422ae74d6f329d1b3a96300b..eb34f3f9821f50f0a31fb22d9314c26b
|
||||
|
||||
return targets.size();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index adaaa88baa946b109f740a024dde1408d53613fa..00243f26fdb61959331d72fb49ab4f23b38d43c1 100644
|
||||
index 5c63b9603f7b6f6c4ceca0d836df4a4972568631..01b4bcf6f975a9d7d083909f23c9bfb02fc074b2 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2896,10 +2896,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2888,10 +2888,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
- ItemEntity itemEntity = new ItemEntity(level, this.getX() + offset.x, this.getY() + offset.y, this.getZ() + offset.z, stack.copy()); // Paper - copy so we can destroy original
|
||||
- stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
|
||||
-
|
||||
- itemEntity.setDefaultPickUpDelay();
|
||||
- itemEntity.setDefaultPickUpDelay(); // Paper - diff on change (in dropConsumer)
|
||||
+ ItemEntity itemEntity = new ItemEntity(level, this.getX() + offset.x, this.getY() + offset.y, this.getZ() + offset.z, stack.copy()); // Paper - copy
|
||||
itemEntity.setDefaultPickUpDelay(); // Paper - diff on change (in dropConsumer)
|
||||
// Paper start - Call EntityDropItemEvent
|
||||
return this.spawnAtLocation(level, itemEntity);
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1e601d9066dd0521530ab6185e87eecb708b3e44..e7737ba60e7e2460553b096fbdf9550242eb75b6 100644
|
||||
index 0610df1c343f1c5cf724a79fbc68ed1372de5da5..7a849ba0e22574f00f3580a432e2fe8343c883c6 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3987,11 +3987,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3996,11 +3996,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return null;
|
||||
} else {
|
||||
double d = this.getEyeY() - 0.3F;
|
||||
@@ -64,7 +64,7 @@ index 1e601d9066dd0521530ab6185e87eecb708b3e44..e7737ba60e7e2460553b096fbdf95502
|
||||
itemEntity.setPickUpDelay(40);
|
||||
if (includeThrower) {
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index c1ca84cf0dbb4fd091cfab517721c87e0f9074a0..403afadbd2280325f1289e302a1ff409f8f0941c 100644
|
||||
index 509d368f7fa9e6330da02615d7bf78debb932623..5ac49ee4743f7c4847e40dae6575f559df25abeb 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -652,7 +652,11 @@ public abstract class AbstractContainerMenu {
|
||||
|
||||
@@ -26,10 +26,10 @@ This patch is Powered by CrystalCarpetAddition(https://github.com/Crystal0404/Cr
|
||||
*/
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 00243f26fdb61959331d72fb49ab4f23b38d43c1..b8ec8fc15092a16a0743bfb537556d8f57cd145a 100644
|
||||
index 01b4bcf6f975a9d7d083909f23c9bfb02fc074b2..4e0f223aaa3d719e6216ee8ab8415e32490a0da7 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -187,7 +187,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -186,7 +186,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
// Paper end - Share random for entities to make them more random
|
||||
public @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper - Entity#getEntitySpawnReason
|
||||
|
||||
@@ -38,7 +38,7 @@ index 00243f26fdb61959331d72fb49ab4f23b38d43c1..b8ec8fc15092a16a0743bfb537556d8f
|
||||
|
||||
public org.bukkit.craftbukkit.entity.CraftEntity getBukkitEntity() {
|
||||
if (this.bukkitEntity == null) {
|
||||
@@ -4029,7 +4029,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4020,7 +4020,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@Nullable
|
||||
public Entity teleport(TeleportTransition teleportTransition) {
|
||||
// Paper start - Fix item duplication and teleport issues
|
||||
@@ -47,7 +47,7 @@ index 00243f26fdb61959331d72fb49ab4f23b38d43c1..b8ec8fc15092a16a0743bfb537556d8f
|
||||
LOGGER.warn("Illegal Entity Teleport {} to {}:{}", this, teleportTransition.newLevel(), teleportTransition.position(), new Throwable());
|
||||
return null;
|
||||
}
|
||||
@@ -4145,7 +4145,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4136,7 +4136,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
// Paper end - Fix item duplication and teleport issues
|
||||
entityx.restoreFrom(this);
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -56,7 +56,7 @@ index 00243f26fdb61959331d72fb49ab4f23b38d43c1..b8ec8fc15092a16a0743bfb537556d8f
|
||||
if (this.inWorld) newLevel.addDuringTeleport(entityx); // CraftBukkit - Don't spawn the new entity if the current entity isn't spawned
|
||||
|
||||
for (Entity entity2 : list) {
|
||||
@@ -4288,6 +4288,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4254,6 +4254,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
@@ -65,7 +65,7 @@ index 00243f26fdb61959331d72fb49ab4f23b38d43c1..b8ec8fc15092a16a0743bfb537556d8f
|
||||
if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues
|
||||
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index a1cc9cf5a0967c5fd605a9fd309908314121e975..580d903921388701be7b4153fb7cc4163e3765c2 100644
|
||||
index 1cefdab82744600c6e5886646450d4c3fab03181..e783710f312b8c7b97dfd227866b71cee45c4d21 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -395,6 +395,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
|
||||
@@ -74,7 +74,7 @@ index 766b6080160d87742ef4d8caa73b3b8fa52d5589..10c811e960fe8e68908a7216c78ddd19
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/server/commands/data/EntityDataAccessor.java b/net/minecraft/server/commands/data/EntityDataAccessor.java
|
||||
index 3092454bf7071deca75fecfc203072593fe5c7e7..c20e12726a020429f36b9fbe0d6da2afccb220a2 100644
|
||||
index 2b8d394dc30d459127289a1afeee0780003f4c79..6b7a9a05cebdf53ab7eb4d389c48090c6c2a2983 100644
|
||||
--- a/net/minecraft/server/commands/data/EntityDataAccessor.java
|
||||
+++ b/net/minecraft/server/commands/data/EntityDataAccessor.java
|
||||
@@ -55,6 +55,7 @@ public class EntityDataAccessor implements DataAccessor {
|
||||
@@ -86,10 +86,10 @@ index 3092454bf7071deca75fecfc203072593fe5c7e7..c20e12726a020429f36b9fbe0d6da2af
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 80c57f604ace47ce39c800b78b115efaf320f1e5..d09b72d878e71a15b85147c4ac58517263bbcb97 100644
|
||||
index dbebfec31e8bd9b9ea6bbf486875396fdcba93b6..fa5d582843387e3846b70c01ac85c71e9031f2f1 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2482,6 +2482,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -2472,6 +2472,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
for (TickingBlockEntity tickingBlockEntity : this.blockEntityTickers) {
|
||||
BlockPos pos = tickingBlockEntity.getPos();
|
||||
@@ -111,10 +111,10 @@ index 5493576c54e87823f68bbf8a18441b373aae0461..10d786ef9f29f1af1cb5088f5e054f19
|
||||
|
||||
int getContainerSize();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index ad62e33fc75882395e9bfaa497a67a617fda1104..74f8744c473c0424a8e29f5d7b8dd7af8c38e94d 100644
|
||||
index 4e0f223aaa3d719e6216ee8ab8415e32490a0da7..d9fe2e6d424231c7acd15cd5bb6a05afa2e263c6 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -311,7 +311,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -310,7 +310,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
private static final EntityDataAccessor<Boolean> DATA_NO_GRAVITY = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.BOOLEAN);
|
||||
protected static final EntityDataAccessor<Pose> DATA_POSE = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.POSE);
|
||||
public static final EntityDataAccessor<Integer> DATA_TICKS_FROZEN = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.INT);
|
||||
@@ -123,7 +123,7 @@ index ad62e33fc75882395e9bfaa497a67a617fda1104..74f8744c473c0424a8e29f5d7b8dd7af
|
||||
private final VecDeltaCodec packetPositionCodec = new VecDeltaCodec();
|
||||
public boolean hasImpulse;
|
||||
@Nullable
|
||||
@@ -5210,6 +5210,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -5176,6 +5176,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
this.setBoundingBox(this.makeBoundingBox());
|
||||
}
|
||||
// Paper end - Block invalid positions and bounding box
|
||||
@@ -144,7 +144,7 @@ index ad62e33fc75882395e9bfaa497a67a617fda1104..74f8744c473c0424a8e29f5d7b8dd7af
|
||||
|
||||
public void checkDespawn() {
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 4bd9b16ad73114c457eb5987adeb18231ec6eea7..f9a1ccee0c1e608fd5f48de466046fc4e6a7dfc7 100644
|
||||
index ca0905258d6308a71a0cda552feef6ee6f082a4b..dadd06970b02a3cd220c6db2ccc2ffd066168530 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -34,8 +34,12 @@ import net.minecraft.world.level.portal.TeleportTransition;
|
||||
@@ -265,7 +265,7 @@ index 4bd9b16ad73114c457eb5987adeb18231ec6eea7..f9a1ccee0c1e608fd5f48de466046fc4
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
index 991ae9f719e63cb77e692213d4a80f0486b86528..2754c4d13aaa62c6d6bdcc265898d0019c6e1026 100644
|
||||
index 8fdde0cc090c80b65b4c0d679bf4b412b6b761ee..92aa3950ec751378c5e2b17dc109bbf79df758b3 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.world.level.storage.ValueOutput;
|
||||
@@ -294,7 +294,7 @@ index 991ae9f719e63cb77e692213d4a80f0486b86528..2754c4d13aaa62c6d6bdcc265898d001
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 403afadbd2280325f1289e302a1ff409f8f0941c..029b8fcc951875c7bc845c507e4f7a91cebc1156 100644
|
||||
index 5ac49ee4743f7c4847e40dae6575f559df25abeb..80c3e83882fd43926b5d964a3b44320f19a910de 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -935,6 +935,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -306,7 +306,7 @@ index 403afadbd2280325f1289e302a1ff409f8f0941c..029b8fcc951875c7bc845c507e4f7a91
|
||||
ItemStack item = container.getItem(i);
|
||||
if (!item.isEmpty()) {
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index 33df00727e42ee0728dfb6a8c0816395fab5d4a9..2dea299ef9e78f9be6137506f163cc38fa70f748 100644
|
||||
index b60e6e198e50e5d3794bb27a32023f9952121e86..024785b39c60776ce73e14bb9cd12cd4de013d27 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -95,8 +95,12 @@ import net.minecraft.world.level.block.state.pattern.BlockInWorld;
|
||||
@@ -447,10 +447,10 @@ index 33df00727e42ee0728dfb6a8c0816395fab5d4a9..2dea299ef9e78f9be6137506f163cc38
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index c213b23e06422f4632986db3b1e2579fae1c3650..22d132a4e1c41107220d41becbed97f48d4fc236 100644
|
||||
index 07ab2907bb9e4de5810889bec6d2b08f9abfec0c..a8d8dce19cf780ecb8dd1025a36c642d50ee5f06 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1177,6 +1177,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1178,6 +1178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
int i = flags & -34;
|
||||
// Leaves start - no block update
|
||||
if (org.leavesmc.leaves.command.leaves.subcommands.BlockUpdateCommand.isNoBlockUpdate()) {
|
||||
@@ -458,7 +458,7 @@ index c213b23e06422f4632986db3b1e2579fae1c3650..22d132a4e1c41107220d41becbed97f4
|
||||
this.updatePOIOnBlockStateChange(pos, blockState, blockState1);
|
||||
return;
|
||||
}
|
||||
@@ -1438,7 +1439,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1439,7 +1440,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
// Spigot end
|
||||
if (tickingBlockEntity.isRemoved()) {
|
||||
toRemove.add(tickingBlockEntity); // Paper - Fix MC-117075; use removeAll
|
||||
@@ -467,7 +467,7 @@ index c213b23e06422f4632986db3b1e2579fae1c3650..22d132a4e1c41107220d41becbed97f4
|
||||
tickingBlockEntity.tick();
|
||||
// Paper start - rewrite chunk system
|
||||
if ((++tickedEntities & 7) == 0) {
|
||||
@@ -2137,4 +2138,25 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -2138,4 +2139,25 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
@@ -494,7 +494,7 @@ index c213b23e06422f4632986db3b1e2579fae1c3650..22d132a4e1c41107220d41becbed97f4
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index 5d434ebe7bb7cfea02d1a7dc05825ff59eac23d1..8a098c1c308a5988257415f2f8dc6fe9da55d043 100644
|
||||
index 0707e08970a325f6a21f3fc2f48c0b7bfbcbcd45..e3d3875c9befe09587ce4318fbdf642bb3c8ae58 100644
|
||||
--- a/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -411,7 +411,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -518,7 +518,7 @@ index 5d434ebe7bb7cfea02d1a7dc05825ff59eac23d1..8a098c1c308a5988257415f2f8dc6fe9
|
||||
@@ -479,12 +479,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
}
|
||||
// Paper end - Add CompostItemEvent and EntityCompostItemEvent
|
||||
this.level.levelEvent(1500, this.pos, blockState != this.state ? 1 : 0);
|
||||
this.level.levelEvent(LevelEvent.COMPOSTER_FILL, this.pos, blockState != this.state ? 1 : 0);
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity) this.changed = false; // Leaves - Lithium Sleeping Block Entity
|
||||
this.removeItemNoUpdate(0);
|
||||
}
|
||||
@@ -531,19 +531,19 @@ index 5d434ebe7bb7cfea02d1a7dc05825ff59eac23d1..8a098c1c308a5988257415f2f8dc6fe9
|
||||
private final LevelAccessor level;
|
||||
private final BlockPos pos;
|
||||
diff --git a/net/minecraft/world/level/block/DiodeBlock.java b/net/minecraft/world/level/block/DiodeBlock.java
|
||||
index 94d35e4812705771756a0ee1a9b0255be75e3770..f2e19b6e89195fa99a2eca7f1c647e94b5594689 100644
|
||||
index b975297c0475049935c38554a8c736abbf9882de..0457761189ffd179c6cc1b7f9ffb4e67d9e5790a 100644
|
||||
--- a/net/minecraft/world/level/block/DiodeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/DiodeBlock.java
|
||||
@@ -173,6 +173,7 @@ public abstract class DiodeBlock extends HorizontalDirectionalBlock {
|
||||
@Override
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
|
||||
this.updateNeighborsInFront(level, pos, state);
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && this instanceof ComparatorBlock && !oldState.is(Blocks.COMPARATOR)) org.leavesmc.leaves.lithium.common.block.entity.inventory_comparator_tracking.ComparatorTracking.notifyNearbyBlockEntitiesAboutNewComparator(level, pos); // Leaves - Lithium Sleeping Block Entity
|
||||
}
|
||||
|
||||
// Leaves start - behaviour 1.21.1-
|
||||
diff --git a/net/minecraft/world/level/block/HopperBlock.java b/net/minecraft/world/level/block/HopperBlock.java
|
||||
index cf3a1122a9581b1a322990c1660711c1c72df570..1866b876380ca181ed7a63adfd72d6490ea292ec 100644
|
||||
index 32b2f73d371b4dd53cdadfc94ff5e4d7bdaf7e37..870df1a752e676fc8a6879250393c388496b1597 100644
|
||||
--- a/net/minecraft/world/level/block/HopperBlock.java
|
||||
+++ b/net/minecraft/world/level/block/HopperBlock.java
|
||||
@@ -38,7 +38,7 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
@@ -556,7 +556,7 @@ index cf3a1122a9581b1a322990c1660711c1c72df570..1866b876380ca181ed7a63adfd72d649
|
||||
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING_HOPPER;
|
||||
public static final BooleanProperty ENABLED = BlockStateProperties.ENABLED;
|
||||
@@ -101,6 +101,17 @@ public class HopperBlock extends BaseEntityBlock {
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean isMoving) {
|
||||
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) {
|
||||
if (!oldState.is(state.getBlock())) {
|
||||
this.checkPoweredState(level, pos, state);
|
||||
+ // Leaves start - Lithium Sleeping Block Entity
|
||||
@@ -608,10 +608,10 @@ index cf3a1122a9581b1a322990c1660711c1c72df570..1866b876380ca181ed7a63adfd72d649
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 646d4c26870bb03f6d397b5e03ad97923d0928b2..6abdcd09c522b8278a381f08151c1a5fc33d1b2e 100644
|
||||
index 005fd35dcae20d404922ef797cf22ef69ecd6c3a..7f2b702ec1dfc900e87a8871944e7b7ad2896b5e 100644
|
||||
--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
@@ -40,7 +40,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
@@ -620,7 +620,7 @@ index 646d4c26870bb03f6d397b5e03ad97923d0928b2..6abdcd09c522b8278a381f08151c1a5f
|
||||
protected static final int SLOT_INPUT = 0;
|
||||
protected static final int SLOT_FUEL = 1;
|
||||
protected static final int SLOT_RESULT = 2;
|
||||
@@ -164,6 +164,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -165,6 +165,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
this.recipesUsed.clear();
|
||||
this.recipesUsed.putAll(input.read("RecipesUsed", RECIPES_USED_CODEC).orElse(Map.of()));
|
||||
this.cookSpeedMultiplier = input.getDoubleOr("Paper.CookSpeedMultiplier", 1); // Paper - cook speed multiplier API
|
||||
@@ -628,7 +628,7 @@ index 646d4c26870bb03f6d397b5e03ad97923d0928b2..6abdcd09c522b8278a381f08151c1a5f
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -269,6 +270,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -270,6 +271,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
if (flag) {
|
||||
setChanged(level, pos, state);
|
||||
}
|
||||
@@ -636,7 +636,7 @@ index 646d4c26870bb03f6d397b5e03ad97923d0928b2..6abdcd09c522b8278a381f08151c1a5f
|
||||
}
|
||||
|
||||
private static boolean canBurn(
|
||||
@@ -541,4 +543,53 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -542,4 +544,53 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
this.getRecipesToAwardAndPopExperience(serverLevel, Vec3.atCenterOf(pos));
|
||||
}
|
||||
}
|
||||
@@ -691,10 +691,10 @@ index 646d4c26870bb03f6d397b5e03ad97923d0928b2..6abdcd09c522b8278a381f08151c1a5f
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
index e265dbe8f84f80314f3e19c3724fff24929e3a13..50df79fff61ea34c6da11467db62572c6c1f8e8f 100644
|
||||
index 6741fe3abc4396236dc0ca31074e36d66e42c39a..780474a3f7b7128ca571356e26d0ae32b848d7b0 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
|
||||
@@ -703,7 +703,7 @@ index e265dbe8f84f80314f3e19c3724fff24929e3a13..50df79fff61ea34c6da11467db62572c
|
||||
// CraftBukkit start - add fields and methods
|
||||
public java.util.List<org.bukkit.entity.HumanEntity> transaction = new java.util.ArrayList<>();
|
||||
private int maxStack = MAX_STACK;
|
||||
@@ -121,6 +121,7 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -122,6 +122,7 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@Override
|
||||
protected void setItems(NonNullList<ItemStack> items) {
|
||||
this.items = items;
|
||||
@@ -711,7 +711,7 @@ index e265dbe8f84f80314f3e19c3724fff24929e3a13..50df79fff61ea34c6da11467db62572c
|
||||
}
|
||||
|
||||
// Leaves start - pca
|
||||
@@ -180,4 +181,18 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -181,4 +182,18 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
double d2 = this.worldPosition.getZ() + 0.5 + unitVec3i.getZ() / 2.0;
|
||||
this.level.playSound(null, d, d1, d2, sound, SoundSource.BLOCKS, 0.5F, this.level.random.nextFloat() * 0.1F + 0.9F);
|
||||
}
|
||||
@@ -860,7 +860,7 @@ index 1e6819928ffab524197003bd9469adb3976dce3a..cb9b653af455847312e4298b1acd2c79
|
||||
+ }
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/BlockEntity.java b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index 39691f6ff8dc08c7d4ebff0612cb9777d809c6ed..ae23afeb3e4059db8ad829e9d276ef8942ef8a59 100644
|
||||
index bd038bdaa00fb1e09b098b4d2809d17e2382288b..fb53735c637bee86237d6a411d14569d48a0c915 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -35,8 +35,16 @@ import net.minecraft.world.level.storage.TagValueOutput;
|
||||
@@ -950,10 +950,10 @@ index 39691f6ff8dc08c7d4ebff0612cb9777d809c6ed..ae23afeb3e4059db8ad829e9d276ef89
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d311489185b1e 100644
|
||||
index a4d3d5b6830d156c76e381c5437867c0ed104016..db6a4c2ca481796cfde8e5e5a6e38217a37a027c 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
|
||||
@@ -962,7 +962,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
private static final int INGREDIENT_SLOT = 3;
|
||||
private static final int FUEL_SLOT = 4;
|
||||
private static final int[] SLOTS_FOR_UP = new int[]{3};
|
||||
@@ -136,6 +136,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -138,6 +138,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
}
|
||||
|
||||
public static void serverTick(Level level, BlockPos pos, BlockState state, BrewingStandBlockEntity blockEntity) {
|
||||
@@ -970,7 +970,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
ItemStack itemStack = blockEntity.items.get(4);
|
||||
if (blockEntity.fuel <= 0 && itemStack.is(ItemTags.BREWING_FUEL)) {
|
||||
// CraftBukkit start
|
||||
@@ -153,6 +154,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -155,6 +156,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
itemStack.shrink(1);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -978,7 +978,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
setChanged(level, pos, state);
|
||||
}
|
||||
|
||||
@@ -167,7 +169,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -169,7 +171,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
} else if (!isBrewable || !itemStack1.is(blockEntity.ingredient)) {
|
||||
blockEntity.brewTime = 0;
|
||||
}
|
||||
@@ -987,7 +987,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
setChanged(level, pos, state);
|
||||
} else if (isBrewable && blockEntity.fuel > 0) {
|
||||
blockEntity.fuel--;
|
||||
@@ -180,6 +182,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -182,6 +184,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
blockEntity.brewTime = event.getBrewingTime(); // 400 -> event.getTotalBrewTime() // Paper - use brewing time from event
|
||||
// CraftBukkit end
|
||||
blockEntity.ingredient = itemStack1.getItem();
|
||||
@@ -995,7 +995,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
setChanged(level, pos, state);
|
||||
}
|
||||
|
||||
@@ -286,6 +289,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -288,6 +291,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
}
|
||||
|
||||
this.fuel = input.getByteOr("Fuel", (byte)0);
|
||||
@@ -1003,7 +1003,7 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -342,4 +346,52 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
@@ -344,4 +348,52 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||
}
|
||||
}
|
||||
// Leaves end - pca
|
||||
@@ -1057,10 +1057,10 @@ index 6124a10814c1122ea1685646541395b452e9d4b3..dee84b63df0a077dd90c8c432b1d3114
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f5120cae2dc5 100644
|
||||
index 78c4d1fc052d72f8599c82291d2233ec2e552137..a961ec0cfa334d924cf6016e729256987309d64c 100644
|
||||
--- a/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
@@ -38,7 +38,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
@@ -39,7 +39,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -1069,7 +1069,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final int BURN_COOL_SPEED = 2;
|
||||
private static final int NUM_SLOTS = 4;
|
||||
@@ -112,7 +112,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -113,7 +113,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
|
||||
if (flag) {
|
||||
setChanged(level, pos, state);
|
||||
@@ -1078,7 +1078,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
}
|
||||
|
||||
public static void cooldownTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) {
|
||||
@@ -127,7 +127,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -128,7 +128,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
|
||||
if (flag) {
|
||||
setChanged(level, pos, state);
|
||||
@@ -1087,7 +1087,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
}
|
||||
|
||||
public static void particleTick(Level level, BlockPos pos, BlockState state, CampfireBlockEntity blockEntity) {
|
||||
@@ -183,6 +183,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -184,6 +184,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
System.arraycopy(cookingState, 0, this.stopCooking, 0, Math.min(this.stopCooking.length, bytes.capacity()));
|
||||
});
|
||||
// Paper end - Add more Campfire API
|
||||
@@ -1095,7 +1095,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -237,6 +238,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -238,6 +239,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
this.cookingTime[i] = event.getTotalCookTime(); // i -> event.getTotalCookTime()
|
||||
// CraftBukkit end
|
||||
this.cookingProgress[i] = 0;
|
||||
@@ -1103,7 +1103,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
this.items.set(i, stack.consumeAndReturn(1, entity));
|
||||
level.gameEvent(GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(entity, this.getBlockState()));
|
||||
this.markUpdated();
|
||||
@@ -280,4 +282,30 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -281,4 +283,30 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
public void removeComponentsFromTag(ValueOutput output) {
|
||||
output.discard("Items");
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ index fb7932e17d7d00ee3050e71c88510fa23befb1bb..6e3cfa4bb776299be4faf48fe165f512
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/ChestBlockEntity.java b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
index 8a6593f99525bc3375d8c4a263f2fd12635ca7c5..da8fc115f9285f69aa01ea3ae479de52c2645116 100644
|
||||
index 5b209de34bd425bf6c209a5317603f1c6d7280bf..4e294825c2e8c15839629eadeb3ee956d7180bef 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.world.level.block.state.properties.ChestType;
|
||||
@@ -1225,10 +1225,10 @@ index 8a6593f99525bc3375d8c4a263f2fd12635ca7c5..da8fc115f9285f69aa01ea3ae479de52
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java b/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||||
index 6b05556a84ae6a8f08025439db29db207325bb7a..f02904e9be89dd4e6ee416d0d383b71822bfccfd 100644
|
||||
index 25cde0c41ef94f9fb602ed346baad7b4b0ae77f9..a5ca4fd18d4a7f66b41392627f63e61c6762e0e9 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@@ -1237,7 +1237,7 @@ index 6b05556a84ae6a8f08025439db29db207325bb7a..f02904e9be89dd4e6ee416d0d383b718
|
||||
public static final int MAX_BOOKS_IN_STORAGE = 6;
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final int DEFAULT_LAST_INTERACTED_SLOT = -1;
|
||||
@@ -170,4 +170,6 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements ListBac
|
||||
@@ -171,4 +171,6 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements ListBac
|
||||
public void removeComponentsFromTag(ValueOutput output) {
|
||||
output.discard("Items");
|
||||
}
|
||||
@@ -1245,10 +1245,10 @@ index 6b05556a84ae6a8f08025439db29db207325bb7a..f02904e9be89dd4e6ee416d0d383b718
|
||||
+ @Override public boolean lithium$itemInsertionTestRequiresStackSize1() {return true;} // Leaves - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/CrafterBlockEntity.java b/net/minecraft/world/level/block/entity/CrafterBlockEntity.java
|
||||
index a631ad830d4820fbf983ef321b40f3192db4527f..8c515d1164fe62b13633d30894e8291cc242cbb3 100644
|
||||
index ffb5f2a07afcd6a3df0442ba48faa1557184d27c..2fa18d7dbfeccade1d47c7e8c4f1e13503c14210 100644
|
||||
--- a/net/minecraft/world/level/block/entity/CrafterBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/CrafterBlockEntity.java
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
|
||||
@@ -1257,7 +1257,7 @@ index a631ad830d4820fbf983ef321b40f3192db4527f..8c515d1164fe62b13633d30894e8291c
|
||||
public static final int CONTAINER_WIDTH = 3;
|
||||
public static final int CONTAINER_HEIGHT = 3;
|
||||
public static final int CONTAINER_SIZE = 9;
|
||||
@@ -170,6 +170,7 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
@@ -171,6 +171,7 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
}
|
||||
});
|
||||
this.containerData.set(9, input.getIntOr("triggered", 0));
|
||||
@@ -1265,8 +1265,8 @@ index a631ad830d4820fbf983ef321b40f3192db4527f..8c515d1164fe62b13633d30894e8291c
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -279,10 +280,12 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
level.setBlock(pos, state.setValue(CrafterBlock.CRAFTING, false), 3);
|
||||
@@ -280,10 +281,12 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
level.setBlock(pos, state.setValue(CrafterBlock.CRAFTING, false), Block.UPDATE_ALL);
|
||||
}
|
||||
}
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && i < 0) crafter.checkSleep(); // Leaves - Lithium Sleeping Block Entity
|
||||
@@ -1278,7 +1278,7 @@ index a631ad830d4820fbf983ef321b40f3192db4527f..8c515d1164fe62b13633d30894e8291c
|
||||
}
|
||||
|
||||
public int getRedstoneSignal() {
|
||||
@@ -301,4 +304,43 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
@@ -302,4 +305,43 @@ public class CrafterBlockEntity extends RandomizableContainerBlockEntity impleme
|
||||
private boolean slotCanBeDisabled(int slot) {
|
||||
return slot > -1 && slot < 9 && this.items.get(slot).isEmpty();
|
||||
}
|
||||
@@ -1360,7 +1360,7 @@ index 2fbfe925c81126cb99a4330a232d7d1b1f035973..36445dbf5e4691ce32ef996d32fbb228
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/EnderChestBlockEntity.java b/net/minecraft/world/level/block/entity/EnderChestBlockEntity.java
|
||||
index e5cbc9f6d7989e993da566f5f9c239a3fe8c7e8b..8fa445445790543fe6eef16ac6195c29909b98be 100644
|
||||
index 775928cfe700202a70b19589ca72afd9768b62f1..c87e57f4f0aa2ffcf5531a55d971c8042a1b3eaf 100644
|
||||
--- a/net/minecraft/world/level/block/entity/EnderChestBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/EnderChestBlockEntity.java
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.world.level.Level;
|
||||
@@ -1386,9 +1386,9 @@ index e5cbc9f6d7989e993da566f5f9c239a3fe8c7e8b..8fa445445790543fe6eef16ac6195c29
|
||||
this.chestLidController.shouldBeOpen(type > 0);
|
||||
return true;
|
||||
} else {
|
||||
@@ -97,4 +99,36 @@ public class EnderChestBlockEntity extends BlockEntity implements LidBlockEntity
|
||||
public float getOpenNess(float partialTicks) {
|
||||
return this.chestLidController.getOpenness(partialTicks);
|
||||
@@ -99,4 +101,36 @@ public class EnderChestBlockEntity extends BlockEntity implements LidBlockEntity
|
||||
public float getOpenNess(float partialTick) {
|
||||
return this.chestLidController.getOpenness(partialTick);
|
||||
}
|
||||
+
|
||||
+ // Leaves start - Lithium Sleeping Block Entity
|
||||
@@ -2344,7 +2344,7 @@ index 83a8dc51d0346fb5b28922e7b54d5ee58b315228..b67a1cacad31a93276988560ef03879a
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
index 85ba7ef0c2e50269427e168336cf29f5375f731d..faf41dcb07f0259fde4098b39a149c273fcc9c80 100644
|
||||
index 7e8ca373a48f89d30d4efdfcfe2acdc903a1fed9..7ba5024c645fd0026c77ab0bef64dafddc88f33d 100644
|
||||
--- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
|
||||
@@ -32,7 +32,7 @@ import net.minecraft.world.level.storage.ValueOutput;
|
||||
@@ -2421,7 +2421,7 @@ index 85ba7ef0c2e50269427e168336cf29f5375f731d..faf41dcb07f0259fde4098b39a149c27
|
||||
+ // Leaves end - Lithium Sleeping Block Entity
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index bf1842b30074cde4ad6ce4c95e48e9d831c9e055..04df018b2582e7440584ea3ad3b8aa3cd49b81d2 100644
|
||||
index 683a6a48593218b7504d6c99a0357278fb380665..d9f20b103361a788955b11048dbd91e405cca733 100644
|
||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -84,7 +84,7 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
@@ -2442,25 +2442,25 @@ index bf1842b30074cde4ad6ce4c95e48e9d831c9e055..04df018b2582e7440584ea3ad3b8aa3c
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index e5175fe703a103f7056618ca6322624c7fd8ad95..faf16d133286fe10a46048e8cb750ccaef48d704 100644
|
||||
index e6cc97e21e31faab0562e2a43766bd00f0451a19..0ae3b15906b0bee7c55dce64a4fe46623ee2ebe2 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -932,12 +932,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
(blockPos, rebindableTickingBlockEntityWrapper) -> {
|
||||
@@ -934,12 +934,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
(pos, ticker1) -> {
|
||||
TickingBlockEntity tickingBlockEntity = this.createTicker(blockEntity, ticker);
|
||||
if (rebindableTickingBlockEntityWrapper != null) {
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(rebindableTickingBlockEntityWrapper); // Leaves - Lithium Sleeping Block Entity
|
||||
rebindableTickingBlockEntityWrapper.rebind(tickingBlockEntity);
|
||||
return (LevelChunk.RebindableTickingBlockEntityWrapper)rebindableTickingBlockEntityWrapper;
|
||||
if (ticker1 != null) {
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(ticker1); // Leaves - Lithium Sleeping Block Entity
|
||||
ticker1.rebind(tickingBlockEntity);
|
||||
return (LevelChunk.RebindableTickingBlockEntityWrapper)ticker1;
|
||||
} else if (this.isInLevel()) {
|
||||
LevelChunk.RebindableTickingBlockEntityWrapper rebindableTickingBlockEntityWrapper1 = new LevelChunk.RebindableTickingBlockEntityWrapper(
|
||||
LevelChunk.RebindableTickingBlockEntityWrapper rebindableTickingBlockEntityWrapper = new LevelChunk.RebindableTickingBlockEntityWrapper(
|
||||
tickingBlockEntity
|
||||
);
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(rebindableTickingBlockEntityWrapper1); // Leaves - Lithium Sleeping Block Entity
|
||||
this.level.addBlockEntityTicker(rebindableTickingBlockEntityWrapper1);
|
||||
return rebindableTickingBlockEntityWrapper1;
|
||||
+ if (org.leavesmc.leaves.LeavesConfig.performance.sleepingBlockEntity && blockEntity instanceof org.leavesmc.leaves.lithium.common.block.entity.SleepingBlockEntity sleepingBlockEntity) sleepingBlockEntity.lithium$setTickWrapper(rebindableTickingBlockEntityWrapper); // Leaves - Lithium Sleeping Block Entity
|
||||
this.level.addBlockEntityTicker(rebindableTickingBlockEntityWrapper);
|
||||
return rebindableTickingBlockEntityWrapper;
|
||||
} else {
|
||||
@@ -1031,14 +1033,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -1033,14 +1035,14 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
void run(LevelChunk chunk);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Bring back LivingEntity effect CME
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index e7737ba60e7e2460553b096fbdf9550242eb75b6..d4a3e4261301e587be1ee4ac7331b64a69608c17 100644
|
||||
index 7a849ba0e22574f00f3580a432e2fe8343c883c6..b0db5cec1293109b32fd6bb40b350d81ea0afc7a 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1157,7 +1157,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1158,7 +1158,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
public boolean addEffect(MobEffectInstance effectInstance, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause, boolean fireEvent) {
|
||||
// Paper end - Don't fire sync event during generation
|
||||
// org.spigotmc.AsyncCatcher.catchOp("effect add"); // Spigot // Paper - move to API
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not tick Arrow life regardless
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 11adb3eacce9d46f15e6c5216e9b2494df158baf..85d358a86ff118ce34276d3b03c655c807cdea73 100644
|
||||
index 1be2a7f45866bfe69b8f181fee98d1336b0cfba3..1a60d8f993d28a2cd2364acdf68b353220de49ab 100644
|
||||
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -218,7 +218,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -212,7 +212,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
this.setSharedFlagOnFire(this.getRemainingFireTicks() > 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -195,10 +195,10 @@ index 1e00a7bd89d885cabb4b9ca3c86fbd8cd93cebf5..08e3d257ffdc5dfa996b1e16e477b4e0
|
||||
+ // Leaves end - Lithium - equipment tracking
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index d4a3e4261301e587be1ee4ac7331b64a69608c17..dab25442696d931348fe0abf70e9e8503e39b487 100644
|
||||
index b0db5cec1293109b32fd6bb40b350d81ea0afc7a..c275942cb57f2e5fe1e1cc8bee92abef4343297b 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -431,9 +431,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -432,9 +432,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.getSleepingPos().ifPresent(this::setPosToBed);
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ index d4a3e4261301e587be1ee4ac7331b64a69608c17..dab25442696d931348fe0abf70e9e850
|
||||
|
||||
super.baseTick();
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
@@ -3379,6 +3387,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3388,6 +3396,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
public void detectEquipmentUpdates() {
|
||||
Map<EquipmentSlot, ItemStack> map = this.collectEquipmentChanges();
|
||||
if (map != null) {
|
||||
@@ -226,7 +226,7 @@ index d4a3e4261301e587be1ee4ac7331b64a69608c17..dab25442696d931348fe0abf70e9e850
|
||||
this.handleHandSwap(map);
|
||||
if (!map.isEmpty()) {
|
||||
this.handleEquipmentChanges(map);
|
||||
@@ -3388,6 +3397,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3397,6 +3406,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
@Nullable
|
||||
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {
|
||||
@@ -242,10 +242,10 @@ index d4a3e4261301e587be1ee4ac7331b64a69608c17..dab25442696d931348fe0abf70e9e850
|
||||
// Paper start - EntityEquipmentChangedEvent
|
||||
record EquipmentChangeImpl(org.bukkit.inventory.ItemStack oldItem, org.bukkit.inventory.ItemStack newItem) implements io.papermc.paper.event.entity.EntityEquipmentChangedEvent.EquipmentChange {
|
||||
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index ea409f905088550b28d7c17437cb0c1aec1d2309..c3516e1e6a561a48b5c49be137819069858c15b6 100644
|
||||
index 9420ca7e32ae71ce9cecf8afd808ae6e9f8f4258..de89f78978ee5ae67049eb83fda3d56ef8371781 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -89,7 +89,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -90,7 +90,7 @@ public class ArmorStand extends LivingEntity {
|
||||
// Paper start - Allow ArmorStands not to tick
|
||||
public boolean canTick = true;
|
||||
public boolean canTickSetByAPI = false;
|
||||
@@ -253,8 +253,8 @@ index ea409f905088550b28d7c17437cb0c1aec1d2309..c3516e1e6a561a48b5c49be137819069
|
||||
+ public boolean noTickEquipmentDirty = false; // Leaves - private -> public
|
||||
// Paper end - Allow ArmorStands not to tick
|
||||
|
||||
public ArmorStand(EntityType<? extends ArmorStand> entityType, Level level) {
|
||||
@@ -530,8 +530,9 @@ public class ArmorStand extends LivingEntity {
|
||||
public ArmorStand(EntityType<? extends ArmorStand> type, Level level) {
|
||||
@@ -531,8 +531,9 @@ public class ArmorStand extends LivingEntity {
|
||||
public void tick() {
|
||||
if (!this.canTick) {
|
||||
if (this.noTickEquipmentDirty) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not check NaN values in entities
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f500ac59152d9a3b3a6167d3b99e55462c1c32dd..438402571f315f1abf6d54237d88420d762b2b0c 100644
|
||||
index d9fe2e6d424231c7acd15cd5bb6a05afa2e263c6..50c143bb15108f02918fbacdff1eebfc14ee8aa6 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2569,10 +2569,12 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2561,10 +2561,12 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
} // CraftBukkit
|
||||
|
||||
@@ -22,7 +22,7 @@ index f500ac59152d9a3b3a6167d3b99e55462c1c32dd..438402571f315f1abf6d54237d88420d
|
||||
if (Float.isNaN(this.yRot)) {
|
||||
this.yRot = 0;
|
||||
}
|
||||
@@ -2580,7 +2582,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2572,7 +2574,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
if (Float.isNaN(this.xRot)) {
|
||||
this.xRot = 0;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ index f500ac59152d9a3b3a6167d3b99e55462c1c32dd..438402571f315f1abf6d54237d88420d
|
||||
output.store("Rotation", Vec2.CODEC, new Vec2(this.getYRot(), this.getXRot()));
|
||||
output.putDouble("fall_distance", this.fallDistance);
|
||||
output.putShort("Fire", (short)this.remainingFireTicks);
|
||||
@@ -2703,7 +2707,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -2695,7 +2699,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
public void load(ValueInput input) {
|
||||
try {
|
||||
Vec3 vec3 = input.read("Pos", Vec3.CODEC).orElse(Vec3.ZERO);
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: CPCA (https://github.com/liuyuexiaoyu1/carpet_pc_additon)
|
||||
Licensed under: MIT (https://mit-license.org)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 61279074a2d47e1e499fb11159dcaa6810eed39c..e5c4ce72c7b778ba590cafbe11da605611ff8a9a 100644
|
||||
index 50c143bb15108f02918fbacdff1eebfc14ee8aa6..7e4cf37e85b15be40e74aaa5a5d2227d4d837c7c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4183,7 +4183,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
@@ -4174,7 +4174,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
teleportTransition.relatives().contains(Relative.Y) ? 0.0 : vec3.y(),
|
||||
teleportTransition.relatives().contains(Relative.Z) ? 0.0 : vec3.z()
|
||||
);
|
||||
@@ -26,7 +26,7 @@ index 61279074a2d47e1e499fb11159dcaa6810eed39c..e5c4ce72c7b778ba590cafbe11da6056
|
||||
|
||||
private void sendTeleportTransitionToRidingPlayers(TeleportTransition teleportTransition) {
|
||||
diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index 3cb89148b583f1248fc9ffca3a4436535b2f3d42..5f7d02d99b0160318fdf3aab054b5f1447d0dc6d 100644
|
||||
index 1ad863dc255a7b91d0b163000b6bb5d43e2ad204..512416c99e46d6eecc1fa4ca43f329923ceae868 100644
|
||||
--- a/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -259,14 +259,24 @@ public class NetherPortalBlock extends Block implements Portal {
|
||||
|
||||
Reference in New Issue
Block a user