9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

[ci skip] cleanup

This commit is contained in:
Dreeam
2025-01-23 05:54:25 -05:00
parent 5498887e08
commit 07b7aebd80
13 changed files with 147 additions and 204 deletions

View File

@@ -36,7 +36,7 @@
## 📫 Donation
If you love my work, feel free to donate :)
- afdian: https://afdian.com/a/Dreeam
- AFDIAN: https://afdian.com/a/Dreeam
## 📥 Download
You can find the latest successful build in [GitHub Action](https://github.com/Winds-Studio/Leaf/actions) or [Releases](https://github.com/Winds-Studio/Leaf/releases)
@@ -87,9 +87,9 @@ java {
```
## ⚖️ License
Paperweight files are licensed under MIT.
Patches are licensed under MIT, unless indicated differently in their header.
Binaries are licensed under GPL-3.0.
Paperweight files are licensed under [MIT](licenses/MIT.txt).
Patches are licensed under [MIT](licenses/MIT.txt), unless indicated differently in their header.
Binaries are licensed under [GPL-3.0](licenses/GPL-3.0.txt).
Also see [PaperMC/Paper](https://github.com/PaperMC/Paper) and [PaperMC/Paperweight](https://github.com/PaperMC/paperweight) for the license of some material used by this project.

View File

@@ -1,10 +1,17 @@
# This file is auto generated, any changes may be overridden!
# See CONTRIBUTING.md on how to add access transformers.
protected net.minecraft.world.entity.Entity dimensions
protected-f net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase$Cache largeCollisionShape
public net.minecraft.world.entity.Entity updateInWaterStateAndDoWaterCurrentPushing()V
public net.minecraft.world.entity.LivingEntity canGlide()Z
public net.minecraft.world.entity.monster.Shulker MAX_SCALE
public net.minecraft.world.entity.player.Player canGlide()Z
public net.minecraft.world.level.block.entity.FuelValues values
public net.minecraft.world.level.chunk.storage.RegionFile getOversizedData(II)Lnet/minecraft/nbt/CompoundTag;
public net.minecraft.world.level.chunk.storage.RegionFile isOversized(II)Z
public net.minecraft.world.level.chunk.storage.RegionFile recalculateHeader()Z
public net.minecraft.world.level.chunk.storage.RegionFile setOversized(IIZ)V
public net.minecraft.world.level.chunk.storage.RegionFile write(Lnet/minecraft/world/level/ChunkPos;Ljava/nio/ByteBuffer;)V
public net.minecraft.world.level.pathfinder.SwimNodeEvaluator allowBreaching
public-f net.minecraft.world.entity.EntityType dimensions
public-f net.minecraft.world.level.block.state.BlockBehaviour explosionResistance

View File

@@ -580,7 +580,7 @@ index 57c50ce5724b073b1aedf4df3129285143097303..91635b344ac02b66e51aa5620acf9ca4
}
}
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
index a962b06ac3fc15604b7fbf5e2109f1cc8d238ac7..035e7eac88ded12f9ca8f7e2a4d99c4156eb311f 100644
index 4aadf347811df904e634ea7ebcc5361ea6cb7e7a..2eb664047eab21a16627fece83ad4a4e5d4bf46f 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -478,9 +478,25 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
@@ -836,16 +836,3 @@ index d48057d387b6937a0194e5300eb1cb46dec2896b..9912ba3bc165dfbdd55fbf02dcec28dc
return best;
// Paper end - Perf: remove streams and optimize collection
}
diff --git a/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java b/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java
index f18aa938692a1c29228ff5e98ab9d58c4bfff094..6495dd7ace05dda1e8e39fa5ae682797dd5980bf 100644
--- a/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java
+++ b/net/minecraft/world/level/pathfinder/SwimNodeEvaluator.java
@@ -15,7 +15,7 @@ import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
public class SwimNodeEvaluator extends NodeEvaluator {
- private final boolean allowBreaching;
+ public final boolean allowBreaching; // Kaiiju - make this public
private final Long2ObjectMap<PathType> pathTypesByPosCache = new Long2ObjectOpenHashMap<>();
public SwimNodeEvaluator(boolean allowBreaching) {

View File

@@ -52,7 +52,7 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..4046f0aaa153e00277bf14f009fbe14a
+ public void moonrise$write(final org.stupidcraft.linearpaper.region.IRegionFile regionFile) throws IOException; // LinearPaper
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 449cfd4f6282f28d7470403c0063874b906a6003..742835ecfa0cba6dc3114dbe584409183ade9228 100644
index 8499ee1505c0390f98d1555d47a671541727dbf8..cb7df3a09bfaa1791450628095e9788f1d5da6fc 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -941,10 +941,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -118,7 +118,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..17cdff80683de3fc166cc38d27a9e80d
class PoiUpgrader extends WorldUpgrader.SimpleRegionStorageUpgrader {
diff --git a/net/minecraft/world/level/chunk/storage/RegionFile.java b/net/minecraft/world/level/chunk/storage/RegionFile.java
index 231d1905092532acf7e632197ba0e727adc4b1d7..dac802a8c70ff8ab96c000a48e1c5e1095ef7a79 100644
index 5d8917dd393b0583e5a45c291729ade48296e9a8..254ff19bed684d93d5be0b03f2ceb8783eb20743 100644
--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -22,7 +22,7 @@ import net.minecraft.util.profiling.jfr.JvmProfiler;
@@ -130,24 +130,6 @@ index 231d1905092532acf7e632197ba0e727adc4b1d7..dac802a8c70ff8ab96c000a48e1c5e10
private static final Logger LOGGER = LogUtils.getLogger();
public static final int MAX_CHUNK_SIZE = 500 * 1024 * 1024; // Paper - don't write garbage data to disk if writing serialization fails
private static final int SECTOR_BYTES = 4096;
@@ -124,7 +124,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
}
// note: only call for CHUNK regionfiles
- boolean recalculateHeader() throws IOException {
+ public boolean recalculateHeader() throws IOException { // LinearPaper - make public
if (!this.canRecalcHeader) {
return false;
}
@@ -786,7 +786,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
}
}
- protected synchronized void write(ChunkPos chunkPos, ByteBuffer chunkData) throws IOException {
+ public synchronized void write(ChunkPos chunkPos, ByteBuffer chunkData) throws IOException { // LinearPaper - protected -> public
int offsetIndex = getOffsetIndex(chunkPos);
int i = this.offsets.get(offsetIndex);
int sectorNumber = getSectorNumber(i);
@@ -904,7 +904,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
}
@@ -157,31 +139,8 @@ index 231d1905092532acf7e632197ba0e727adc4b1d7..dac802a8c70ff8ab96c000a48e1c5e10
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
}
// Paper end - rewrite chunk system
@@ -970,11 +970,11 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
return (x & 31) + (z & 31) * 32;
}
- synchronized boolean isOversized(int x, int z) {
+ public synchronized boolean isOversized(int x, int z) { // LinearPaper - make public
return this.oversized[getChunkIndex(x, z)] == 1;
}
- synchronized void setOversized(int x, int z, boolean oversized) throws IOException {
+ public synchronized void setOversized(int x, int z, boolean oversized) throws IOException { // LinearPaper - make public
final int offset = getChunkIndex(x, z);
boolean previous = this.oversized[offset] == 1;
this.oversized[offset] = (byte) (oversized ? 1 : 0);
@@ -1013,7 +1013,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
return this.path.getParent().resolve(this.path.getFileName().toString().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt");
}
- synchronized net.minecraft.nbt.CompoundTag getOversizedData(int x, int z) throws IOException {
+ public synchronized net.minecraft.nbt.CompoundTag getOversizedData(int x, int z) throws IOException { // LinearPaper - make public
Path file = getOversizedFile(x, z);
try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new java.util.zip.InflaterInputStream(Files.newInputStream(file))))) {
return net.minecraft.nbt.NbtIo.read((java.io.DataInput) out);
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9daad91a6e0 100644
index 320e9e24711d2a326313b3a202c7ef987f71f229..5d278003313fae60a5948eab207b5257cd8bb4bf 100644
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -18,7 +18,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -202,19 +161,20 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
return null;
}
@@ -57,7 +57,11 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
private static final int REGION_SHIFT = 5;
@@ -58,6 +58,12 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
private static final int MAX_NON_EXISTING_CACHE = 1024 * 4;
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet nonExistingRegionFiles = new it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet();
+ // Leaf start - Linear region format
private static String getRegionFileName(final int chunkX, final int chunkZ) {
+ // LinearPaper start
+ if (org.dreeam.leaf.config.modules.misc.RegionFormatConfig.regionFormatType == org.stupidcraft.linearpaper.region.EnumRegionFileExtension.LINEAR) {
+ return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + ".linear";
+ }
+ // LinearPaper end
+
return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + ".mca";
}
@@ -93,15 +97,15 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -93,15 +99,15 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}
@Override
@@ -233,7 +193,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
if (ret != null) {
return ret;
}
@@ -125,7 +129,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -125,7 +131,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
FileUtil.createDirectoriesSafe(this.folder);
@@ -242,7 +202,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
this.regionCache.putAndMoveToFirst(key, ret);
@@ -144,11 +148,11 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -144,11 +150,11 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
@@ -256,7 +216,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
try { // Paper - implement RegionFileSizeException
try {
@@ -178,7 +182,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -178,7 +184,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
) throws IOException {
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
if (writeData.result() == ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO.RegionDataController.WriteData.WriteResult.DELETE) {
@@ -265,7 +225,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
if (regionFile != null) {
regionFile.clear(pos);
} // else: didn't exist
@@ -193,7 +197,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -193,7 +199,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
public final ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO.RegionDataController.ReadData moonrise$readData(
final int chunkX, final int chunkZ
) throws IOException {
@@ -274,7 +234,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
@@ -237,7 +241,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -237,7 +243,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}
// Paper end - rewrite chunk system
// Paper start - rewrite chunk system
@@ -283,7 +243,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
return this.getRegionFile(chunkcoordintpair, false);
}
// Paper end - rewrite chunk system
@@ -249,7 +253,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -249,7 +255,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
this.isChunkData = isChunkDataFolder(this.folder); // Paper - recalculate region file headers
}
@@ -292,7 +252,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
// Paper start - rewrite chunk system
if (existingOnly) {
return this.moonrise$getRegionFileIfExists(chunkPos.x, chunkPos.z);
@@ -257,7 +261,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -257,7 +263,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
synchronized (this) {
final long key = ChunkPos.asLong(chunkPos.x >> REGION_SHIFT, chunkPos.z >> REGION_SHIFT);
@@ -301,7 +261,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
if (ret != null) {
return ret;
}
@@ -266,13 +270,13 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -266,13 +272,13 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
this.regionCache.removeLast().close();
}
@@ -317,7 +277,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
this.regionCache.putAndMoveToFirst(key, ret);
@@ -292,7 +296,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -292,7 +298,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
// Gale end - branding changes
}
@@ -326,7 +286,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
synchronized (regionfile) {
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z);
@@ -327,7 +331,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -327,7 +333,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@Nullable
public CompoundTag read(ChunkPos chunkPos) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
@@ -335,7 +295,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
if (regionFile == null) {
return null;
}
@@ -366,7 +370,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -366,7 +372,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
public void scanChunk(ChunkPos chunkPos, StreamTagVisitor visitor) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
@@ -344,7 +304,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
if (regionFile == null) {
return;
}
@@ -380,7 +384,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -380,7 +386,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
}
public void write(ChunkPos chunkPos, @Nullable CompoundTag chunkData) throws IOException { // Paper - rewrite chunk system - public
@@ -353,7 +313,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
// Paper start - rewrite chunk system
if (regionFile == null) {
// if the RegionFile doesn't exist, no point in deleting from it
@@ -410,7 +414,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -410,7 +416,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
// Paper start - rewrite chunk system
synchronized (this) {
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
@@ -362,7 +322,7 @@ index 7fff86a4956f59b2f4a9f7e283256879c034c1b8..329ac5cc12ba3e247ea4f513a347c9da
try {
regionFile.close();
} catch (final IOException ex) {
@@ -426,7 +430,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
@@ -426,7 +432,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
// Paper start - rewrite chunk system
synchronized (this) {
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();

View File

@@ -9,14 +9,14 @@ Original project: https://github.com/PlazmaMC/PlazmaBukkit
Add more Purpur configurable options for entities
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index 10d2a1138d814b83ce4233205a7f0ab2ed1f399d..86977d359f8eb8fcb2e441a9311f663337175113 100644
index a642533eddd1aca96ad57c2a219f00870a615f71..77e40bbfb567c2853d491343c203095bf5a81e0c 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -179,6 +179,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
}
// Purpur end - Configurable entity base attributes
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.allayTakeDamageFromWater;
@@ -26,20 +26,20 @@ index 10d2a1138d814b83ce4233205a7f0ab2ed1f399d..86977d359f8eb8fcb2e441a9311f6633
+ public boolean isAlwaysExperienceDropper() {
+ return level().purpurConfig.allayAlwaysDropExp;
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
protected Brain.Provider<Allay> brainProvider() {
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java
index a7168edb338c5a77c884e9eef1e48bcdc3623fa4..96836a1d5edda7e275fe1859e3bd661e7be1266b 100644
index a7168edb338c5a77c884e9eef1e48bcdc3623fa4..e5f24eaa18045f6a33248c6f907ebcd9003c245e 100644
--- a/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
@@ -95,6 +95,18 @@ public class Camel extends AbstractHorse {
}
// Purpur end - Make entity breeding times configurable
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.camelTakeDamageFromWater;
@@ -49,7 +49,7 @@ index a7168edb338c5a77c884e9eef1e48bcdc3623fa4..96836a1d5edda7e275fe1859e3bd661e
+ public boolean isAlwaysExperienceDropper() {
+ return level().purpurConfig.camelAlwaysDropExp;
+ }
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+
@Override
public void addAdditionalSaveData(CompoundTag compound) {
@@ -59,12 +59,12 @@ index a7168edb338c5a77c884e9eef1e48bcdc3623fa4..96836a1d5edda7e275fe1859e3bd661e
protected void customServerAiStep(ServerLevel level) {
Brain<?> brain = this.getBrain();
- if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configuration options
((Brain<Camel>)brain).tick(level, this);
CamelAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
index 2c28e97e76155fe4de309422f4913c1269972ff4..cb8e3e9f0dc7fa8673397e594dea6fd5da3e74aa 100644
index 2eb664047eab21a16627fece83ad4a4e5d4bf46f..fca179b8c30083eab1f4a3057d24f0f9100d490d 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -169,6 +169,24 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
@@ -72,7 +72,7 @@ index 2c28e97e76155fe4de309422f4913c1269972ff4..cb8e3e9f0dc7fa8673397e594dea6fd5
}
// Purpur end - Make entity breeding times configurable
+
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.frogTakeDamageFromWater;
@@ -87,20 +87,20 @@ index 2c28e97e76155fe4de309422f4913c1269972ff4..cb8e3e9f0dc7fa8673397e594dea6fd5
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
protected Brain.Provider<Frog> brainProvider() {
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
index 669f7d6e5f481fb209e800c8e4acc52cf0c6dfce..ec6897093948fc3641138dcf82b7834083fe37fa 100644
index 0fdda6b24aee95170e54079e53125b4aed19ac0b..b295b4f2f4e13dd7fd577d126cd0ae72b47126a0 100644
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -105,6 +105,23 @@ public class Tadpole extends AbstractFish {
}
// Purpur end - Ridables
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
@@ -115,20 +115,20 @@ index 669f7d6e5f481fb209e800c8e4acc52cf0c6dfce..ec6897093948fc3641138dcf82b78340
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
protected PathNavigation createNavigation(Level level) {
return new WaterBoundPathNavigation(this, level);
diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
index fec7ecfe6e692ee74762a6a53e51f92cf66a9177..16cdd65770b8d70e6bde3d4407d9a71b5d2da8c8 100644
index fec7ecfe6e692ee74762a6a53e51f92cf66a9177..8b30cb78eef2611ff8ff3973cafa87ccbdf64355 100644
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -118,6 +118,18 @@ public class Sniffer extends Animal {
}
// Purpur end - Make entity breeding times configurable
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.snifferTakeDamageFromWater;
@@ -138,7 +138,7 @@ index fec7ecfe6e692ee74762a6a53e51f92cf66a9177..16cdd65770b8d70e6bde3d4407d9a71b
+ public boolean isAlwaysExperienceDropper() {
+ return level().purpurConfig.snifferAlwaysDropExp;
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
@@ -148,19 +148,19 @@ index fec7ecfe6e692ee74762a6a53e51f92cf66a9177..16cdd65770b8d70e6bde3d4407d9a71b
@Override
protected void customServerAiStep(ServerLevel level) {
- if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configuration
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configuration options
this.getBrain().tick(level, this);
SnifferAi.updateActivity(this);
super.customServerAiStep(level);
diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java
index 07b60f61b4b676cab2072ad0cf1cf94fed9b44d6..f6d58fac537ee1f40d311c3146e89b82b01a6a58 100644
index 07b60f61b4b676cab2072ad0cf1cf94fed9b44d6..bd2248ed7da175dbf71f99cc3be978bc5e790096 100644
--- a/net/minecraft/world/entity/monster/creaking/Creaking.java
+++ b/net/minecraft/world/entity/monster/creaking/Creaking.java
@@ -131,6 +131,18 @@ public class Creaking extends Monster {
}
// Purpur end - Configurable entity base attributes
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.wardenTakeDamageFromWater;
@@ -170,7 +170,7 @@ index 07b60f61b4b676cab2072ad0cf1cf94fed9b44d6..f6d58fac537ee1f40d311c3146e89b82
+ public boolean isAlwaysExperienceDropper() {
+ return level().purpurConfig.wardenAlwaysDropExp;
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
protected BodyRotationControl createBodyControl() {
@@ -180,19 +180,19 @@ index 07b60f61b4b676cab2072ad0cf1cf94fed9b44d6..f6d58fac537ee1f40d311c3146e89b82
@Override
protected void customServerAiStep(ServerLevel level) {
- if (this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Leaf - Plazma - Add missing Pufferfish configurations // Leaf - Plazma - Add missing purpur configuration options
this.getBrain().tick((ServerLevel)this.level(), this);
CreakingAi.updateActivity(this);
}
diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java
index 3a43790fb91e778f4fc0730aecd0dde4a6d301c8..7aae3d82ab5dd66f3e85d0a1bf66c9ddaa3d65e9 100644
index 3a43790fb91e778f4fc0730aecd0dde4a6d301c8..fddd6a91b0fa9d4e9472d53f5056b7dae76b7cbd 100644
--- a/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
@@ -153,6 +153,23 @@ public class Warden extends Monster implements VibrationSystem {
}
// Purpur end - Ridables
+ // Leaf start - Plazma
+ // Leaf start - Plazma - Add missing purpur configuration options
+ @Override
+ public boolean isSensitiveToWater() {
+ return level().purpurConfig.wardenTakeDamageFromWater;
@@ -207,7 +207,7 @@ index 3a43790fb91e778f4fc0730aecd0dde4a6d301c8..7aae3d82ab5dd66f3e85d0a1bf66c9dd
+ public void initAttributes() {
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
+ }
+ // Leaf end - Plazma
+ // Leaf end - Plazma - Add missing purpur configuration options
+
@Override
public Packet<ClientGamePacketListener> getAddEntityPacket(ServerEntity entity) {
@@ -217,12 +217,12 @@ index 3a43790fb91e778f4fc0730aecd0dde4a6d301c8..7aae3d82ab5dd66f3e85d0a1bf66c9dd
@Override
protected void customServerAiStep(ServerLevel level) {
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Leaf - Plazma - Add missing purpur configurations
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Leaf - Plazma - Add missing purpur configuration options
this.getBrain().tick(level, this);
super.customServerAiStep(level);
if ((this.tickCount + this.getId()) % 120 == 0) {
diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
index b230955ae880d84fde40b4feffa5caf3c4449eb7..ff705de4cd2b126c1a6902a7225b6fef7a6b34d6 100644
index b230955ae880d84fde40b4feffa5caf3c4449eb7..c8bdfaaf41e2309e4865806b42677064f3f7bfcb 100644
--- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
+++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
@@ -27,7 +27,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@@ -230,7 +230,7 @@ index b230955ae880d84fde40b4feffa5caf3c4449eb7..ff705de4cd2b126c1a6902a7225b6fef
public abstract class AbstractChestBoat extends AbstractBoat implements HasCustomInventoryScreen, ContainerEntity {
private static final int CONTAINER_SIZE = 27;
- private NonNullList<ItemStack> itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
+ private NonNullList<ItemStack> itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Leaf - Plazma
+ private NonNullList<ItemStack> itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Leaf - Plazma - Add missing purpur configuration options
@Nullable
private ResourceKey<LootTable> lootTable;
private long lootTableSeed;
@@ -239,19 +239,19 @@ index b230955ae880d84fde40b4feffa5caf3c4449eb7..ff705de4cd2b126c1a6902a7225b6fef
@Override
public int getContainerSize() {
- return 27;
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Leaf - Plazma
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Leaf - Plazma - Add missing purpur configuration options
}
@Override
diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java
index aca85686fb0b9ec78d4e83574bbfe6313785f40f..b084fcbe57a1f57e97919aaa0b0c7d4ab5436bdf 100644
index aca85686fb0b9ec78d4e83574bbfe6313785f40f..c168e9d2c395044a662efd2d9ccde8b20c070b22 100644
--- a/org/purpurmc/purpur/PurpurConfig.java
+++ b/org/purpurmc/purpur/PurpurConfig.java
@@ -322,6 +322,7 @@ public class PurpurConfig {
}
public static int barrelRows = 3;
+ public static int chestBoatRows = 3; // Leaf - Plazma
+ public static int chestBoatRows = 3; // Leaf - Plazma - Add missing purpur configuration options
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
public static boolean cryingObsidianValidForPortalFrame = false;
@@ -259,32 +259,32 @@ index aca85686fb0b9ec78d4e83574bbfe6313785f40f..b084fcbe57a1f57e97919aaa0b0c7d4a
case 1 -> 9;
default -> 27;
});
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Leaf - Plazma
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Leaf - Plazma - Add missing purpur configuration options
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java
index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba824dc553 100644
index 8fd8732149f9f134ed6f8666918432c4a160556e..97e66a48cef89a57209a8ddff6e912d15bb82359 100644
--- a/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1137,12 +1137,20 @@ public class PurpurWorldConfig {
public boolean allayControllable = true;
public double allayMaxHealth = 20.0D;
public double allayScale = 1.0D;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public boolean allayTakeDamageFromWater = false;
+ public boolean allayAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void allaySettings() {
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
allayMaxHealth = getDouble("mobs.allay.attributes.max_health", allayMaxHealth);
allayScale = Mth.clamp(getDouble("mobs.allay.attributes.scale", allayScale), 0.0625D, 16.0D);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean armadilloRidable = false;
@@ -292,10 +292,10 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public double camelMovementSpeedMin = 0.09D;
public double camelMovementSpeedMax = 0.09D;
public int camelBreedingTicks = 6000;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public boolean camelTakeDamageFromWater = false;
+ public boolean camelAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void camelSettings() {
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
@@ -303,10 +303,10 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin);
camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax);
camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean catRidable = false;
@@ -314,20 +314,20 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public boolean creakingControllable = true;
public double creakingMaxHealth = 1.0D;
public double creakingScale = 1.0D;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public boolean creakingTakeDamageFromWater = false;
+ public boolean creakingAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void creakingSettings() {
creakingRidable = getBoolean("mobs.creaking.ridable", creakingRidable);
creakingRidableInWater = getBoolean("mobs.creaking.ridable-in-water", creakingRidableInWater);
creakingControllable = getBoolean("mobs.creaking.controllable", creakingControllable);
creakingMaxHealth = getDouble("mobs.creaking.attributes.max_health", creakingMaxHealth);
creakingScale = Mth.clamp(getDouble("mobs.creaking.attributes.scale", creakingScale), 0.0625D, 16.0D);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ creakingTakeDamageFromWater = getBoolean("mobs.creaking.takes-damage-from-water", creakingTakeDamageFromWater);
+ creakingAlwaysDropExp = getBoolean("mobs.creaking.always-drop-exp", creakingAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean creeperRidable = false;
@@ -335,22 +335,22 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public boolean frogControllable = true;
public float frogRidableJumpHeight = 0.65F;
public int frogBreedingTicks = 6000;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public double frogMaxHealth = 10.0D;
+ public boolean frogTakeDamageFromWater = false;
+ public boolean frogAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void frogSettings() {
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
frogRidableJumpHeight = (float) getDouble("mobs.frog.ridable-jump-height", frogRidableJumpHeight);
frogBreedingTicks = getInt("mobs.frog.breeding-delay-ticks", frogBreedingTicks);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean ghastRidable = false;
@@ -358,10 +358,10 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public double snifferMaxHealth = 14.0D;
public double snifferScale = 1.0D;
public int snifferBreedingTicks = 6000;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public boolean snifferTakeDamageFromWater = false;
+ public boolean snifferAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void snifferSettings() {
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
@@ -369,10 +369,10 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth);
snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D);
snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean squidRidable = false;
@@ -380,20 +380,20 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public double tadpoleMaxHealth = 6.0D; // Leaf - Tadpole health should be 6
+ public boolean tadpoleTakeDamageFromWater = false;
+ public boolean tadpoleAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void tadpoleSettings() {
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean traderLlamaRidable = false;
@@ -401,20 +401,20 @@ index fd5a5b9cb9958e96ecfeb4846e290c756265b300..e45406d6ec6f075c9c2008bd6cb61dba
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ public double wardenMaxHealth = 500.0D;
+ public boolean wardenTakeDamageFromWater = false;
+ public boolean wardenAlwaysDropExp = false;
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
private void wardenSettings() {
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);
+ // Leaf start - Plazma - Add missing purpur config options
+ // Leaf start - Plazma - Add missing purpur configuration options
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
+ // Leaf end - Plazma - Add missing purpur config options
+ // Leaf end - Plazma - Add missing purpur configuration options
}
public boolean witchRidable = false;

View File

@@ -7,18 +7,18 @@ Subject: [PATCH] SparklyPaper: Allow throttling hopper checks if the target
Original project: https://github.com/SparklyPower/SparklyPaper
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 276cb0dffaa253a6c13b4c68d8c703732118d0d1..23848df90e7127b1ec11d2aaac68fad17bda238a 100644
index 276cb0dffaa253a6c13b4c68d8c703732118d0d1..962c870bc2ccff52c70be991850fec4663fa7f32 100644
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -419,6 +419,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
} else {
Direction opposite = blockEntity.facing.getOpposite();
if (isFullContainer(attachedContainer, opposite)) {
+ // Leaf start - Throttle hopper when full
+ // Leaf start - SparklyPaper - Throttle hopper when full
+ if (org.dreeam.leaf.config.modules.opt.ThrottleHopperWhenFull.enabled && org.dreeam.leaf.config.modules.opt.ThrottleHopperWhenFull.skipTicks > 0) {
+ blockEntity.setCooldown(org.dreeam.leaf.config.modules.opt.ThrottleHopperWhenFull.skipTicks);
+ }
+ // Leaf end - Throttle hopper when full
+ // Leaf end - SparklyPaper - Throttle hopper when full
return false;
} else {
// Paper start - Perf: Optimize Hoppers

View File

@@ -1,11 +1,13 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 19 Feb 2024 13:10:16 -0500
Subject: [PATCH] Redirect vanilla getProfiler in PathNavigationRegion
Subject: [PATCH] Redirect vanilla getProfiler to inactive in
PathNavigationRegion
To fix compatibility with some plugins, e.g. Citizens, ModelEngine, etc.
diff --git a/net/minecraft/world/level/PathNavigationRegion.java b/net/minecraft/world/level/PathNavigationRegion.java
index 97a1cb8f30eb1668b1054912789bd100b96bee18..6de84cc2985de45a6375d255f49ddee4bf9776d5 100644
index 97a1cb8f30eb1668b1054912789bd100b96bee18..89b293acd22c3f9b324b30d9b1919a8765b11fe7 100644
--- a/net/minecraft/world/level/PathNavigationRegion.java
+++ b/net/minecraft/world/level/PathNavigationRegion.java
@@ -150,4 +150,10 @@ public class PathNavigationRegion implements CollisionGetter {
@@ -13,9 +15,9 @@ index 97a1cb8f30eb1668b1054912789bd100b96bee18..6de84cc2985de45a6375d255f49ddee4
return this.level.getHeight();
}
+
+ // Leaf start - Redirect to fix plugin incompatibility
+ // Leaf start - Redirect vanilla getProfiler to inactive in PathNavigationRegion
+ public net.minecraft.util.profiling.ProfilerFiller getProfiler() {
+ return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Gale - Purpur - remove vanilla profiler
+ }
+ // Leaf end - Redirect to fix plugin incompatibility
+ // Leaf end - Redirect vanilla getProfiler to inactive in PathNavigationRegion
}

View File

@@ -19,7 +19,7 @@ index 967c01f9e40c2c73f266de281425c918472cf66e..d8464f77c54f547161356b78e7642992
org.purpurmc.purpur.command.DemoCommand.register(this.dispatcher); // Purpur - Add demo command
org.purpurmc.purpur.command.PingCommand.register(this.dispatcher); // Purpur - Add ping command
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 2da6609ab8398c5c537e9065b3a82693f43200e2..9db63f122539134003a5955aabae970645131c1c 100644
index 2da6609ab8398c5c537e9065b3a82693f43200e2..c051884e5af270fc36ca2be44af8f841c92ca14c 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -2460,6 +2460,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -33,38 +33,34 @@ index 2da6609ab8398c5c537e9065b3a82693f43200e2..9db63f122539134003a5955aabae9706
@Override
public void setAfk(boolean afk) {
@@ -2497,6 +2501,22 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -2497,6 +2501,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
String prefix = (split.length > 0 ? split[0] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix, "");
String suffix = (split.length > 1 ? split[1] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, "");
if (afk) {
+ // Leaf start - Improve Purpur AFK system
+ String[] rawTitle = org.purpurmc.purpur.PurpurConfig.afkTitleAway.split(":");
+ if (rawTitle.length == 5) {
+ String title = rawTitle[0];
+ String subTitle = rawTitle[1];
+ long fadeInTicks = Long.parseLong(rawTitle[2]);
+ long stayTicks = Long.parseLong(rawTitle[3]);
+ long fadeOutTicks = Long.parseLong(rawTitle[4]);
+ net.kyori.adventure.title.Title tile = net.kyori.adventure.title.Title.title(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(title), net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(subTitle), net.kyori.adventure.title.Title.Times.times(net.kyori.adventure.util.Ticks.duration(fadeInTicks), net.kyori.adventure.util.Ticks.duration(stayTicks), net.kyori.adventure.util.Ticks.duration(fadeOutTicks)));
+ getBukkitEntity().showTitle(tile);
+ } else {
+ LOGGER.error("You put wrong format of afk-title-away in PurpurConfig, it should look like <gold><bold>AFK:<red>You are now AFK...:10:70:20");
+ LOGGER.error("'Title:Sub Title:Title Fade In Ticks:Title Stay Ticks:Title Fade Out Ticks', split with :");
+ }
+ String title = rawTitle[0];
+ String subTitle = rawTitle[1];
+ long fadeInTicks = Long.parseLong(rawTitle[2]);
+ long stayTicks = Long.parseLong(rawTitle[3]);
+ long fadeOutTicks = Long.parseLong(rawTitle[4]);
+
+ net.kyori.adventure.title.Title tile = net.kyori.adventure.title.Title.title(net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(title), net.kyori.adventure.text.minimessage.MiniMessage.miniMessage().deserialize(subTitle), net.kyori.adventure.title.Title.Times.times(net.kyori.adventure.util.Ticks.duration(fadeInTicks), net.kyori.adventure.util.Ticks.duration(stayTicks), net.kyori.adventure.util.Ticks.duration(fadeOutTicks)));
+ getBukkitEntity().showTitle(tile);
+ // Leaf end - Improve Purpur AFK system
+
getBukkitEntity().setPlayerListName(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix + prefix + scoreboardName + suffix + org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, true);
} else {
getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true);
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 356feb908e533d7f1cddf6eb8238823c9bf8250a..3085fa1c463b3652edb03d2b86fd43a564e4d1b4 100644
index 356feb908e533d7f1cddf6eb8238823c9bf8250a..fd7f2049a836474e00a59e4f78b23fafac3e09fd 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2254,6 +2254,8 @@ public class ServerGamePacketListenerImpl
}
}
+ public static final Map<java.util.UUID, Long> afkCooldown = new java.util.concurrent.ConcurrentHashMap<>(); // Leaf - Improve Purpur AFK system
+ public static final Map<java.util.UUID, Long> afkCooldown = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); // Leaf - Improve Purpur AFK system
+
@Override
public void handleChatCommand(ServerboundChatCommandPacket packet) {
@@ -154,36 +150,34 @@ index 65f943dbbe6e30f0a299fdbd73b94ca60d4f406c..7d7343d4e2c206daf77a61050f2f4c22
player.awardStat(Stats.LEAVE_GAME);
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java
index b084fcbe57a1f57e97919aaa0b0c7d4ab5436bdf..7da226524f726fefee1dcd4e048661948074b49b 100644
index c168e9d2c395044a662efd2d9ccde8b20c070b22..ee254498e71d50d461b7d6716704df8c2733037e 100644
--- a/org/purpurmc/purpur/PurpurConfig.java
+++ b/org/purpurmc/purpur/PurpurConfig.java
@@ -175,9 +175,14 @@ public class PurpurConfig {
@@ -175,6 +175,11 @@ public class PurpurConfig {
public static String cannotRideMob = "<red>You cannot mount that mob";
public static String afkBroadcastAway = "<yellow><italic>%s is now AFK";
public static String afkBroadcastBack = "<yellow><italic>%s is no longer AFK";
+ public static String afkTitleAway = "<gold><bold>AFK:<red>You are now AFK...:10:70:20"; // Leaf - Improve Purpur AFK system
public static boolean afkBroadcastUseDisplayName = false;
public static String afkTabListPrefix = "[AFK] ";
public static String afkTabListSuffix = "";
+ // Leaf start - Improve Purpur AFK system
+ public static String afkTitleAway = "<gold><bold>AFK:<red>You are now AFK...:10:70:20";
+ public static int afkCommandCooldown = 0;
+ public static String afkCooldown = "<gray>You need to wait %time%s to use /afk.";
+ // Leaf end - Improve Purpur AFK system
public static String creditsCommandOutput = "<green>%s has been shown the end credits";
public static String demoCommandOutput = "<green>%s has been shown the demo screen";
public static String pingCommandOutput = "<green>%s's ping is %sms";
@@ -194,9 +199,14 @@ public class PurpurConfig {
public static boolean afkBroadcastUseDisplayName = false;
public static String afkTabListPrefix = "[AFK] ";
public static String afkTabListSuffix = "";
@@ -194,6 +199,15 @@ public class PurpurConfig {
cannotRideMob = getString("settings.messages.cannot-ride-mob", cannotRideMob);
afkBroadcastAway = getString("settings.messages.afk-broadcast-away", afkBroadcastAway);
afkBroadcastBack = getString("settings.messages.afk-broadcast-back", afkBroadcastBack);
+ afkTitleAway = getString("settings.messages.afk-title-away", afkTitleAway); // Leaf - Improve Purpur AFK system
afkBroadcastUseDisplayName = getBoolean("settings.messages.afk-broadcast-use-display-name", afkBroadcastUseDisplayName);
afkTabListPrefix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-prefix", afkTabListPrefix)));
afkTabListSuffix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-suffix", afkTabListSuffix)));
+ // Leaf start - Improve Purpur AFK system
+ afkTitleAway = getString("settings.messages.afk-title-away", afkTitleAway);
+ if (afkTitleAway.split(":").length != 5) {
+ Bukkit.getLogger().log(Level.SEVERE, "You put wrong format of afk-title-away in PurpurConfig, it should look like <gold><bold>AFK:<red>You are now AFK...:10:70:20");
+ Bukkit.getLogger().log(Level.SEVERE, "'Title:Sub Title:Title Fade In Ticks:Title Stay Ticks:Title Fade Out Ticks', split with :");
+ }
+ afkCommandCooldown = getInt("settings.messages.afk-command-cooldown", afkCommandCooldown);
+ afkCooldown = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-command-cooldown-msg", afkCooldown)));
+ // Leaf end - Improve Purpur AFK system
creditsCommandOutput = getString("settings.messages.credits-command-output", creditsCommandOutput);
demoCommandOutput = getString("settings.messages.demo-command-output", demoCommandOutput);
pingCommandOutput = getString("settings.messages.ping-command-output", pingCommandOutput);
afkBroadcastUseDisplayName = getBoolean("settings.messages.afk-broadcast-use-display-name", afkBroadcastUseDisplayName);
afkTabListPrefix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-prefix", afkTabListPrefix)));
afkTabListSuffix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-suffix", afkTabListSuffix)));

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Virtual thread for chat executor
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 2ff6059d6bd3fe7c6814603c2ba0e6ccffe1873a..99fb4faa6e8f099ee216eb44793a1df0e6b8c137 100644
index d9d0a7dc0ccfa321c41dbdc51d0c3a7383a0f9fd..2b28fdd68db5b5cf67023410730871843f49248b 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -2680,7 +2680,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -13,7 +13,7 @@ index 2ff6059d6bd3fe7c6814603c2ba0e6ccffe1873a..99fb4faa6e8f099ee216eb44793a1df0
public final java.util.concurrent.ExecutorService chatExecutor = java.util.concurrent.Executors.newCachedThreadPool(
- new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper
+ new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setThreadFactory(org.dreeam.leaf.config.modules.opt.VT4ChatExecutor.enabled ? Thread.ofVirtual().factory() : java.util.concurrent.Executors.defaultThreadFactory()).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper // Leaf - Virtual thread for chatExecutor
+ new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setThreadFactory(org.dreeam.leaf.config.modules.opt.VT4ChatExecutor.enabled ? Thread.ofVirtual().factory() : java.util.concurrent.Executors.defaultThreadFactory()).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper // Leaf - Virtual thread for chat executor
public final ChatDecorator improvedChatDecorator = new io.papermc.paper.adventure.ImprovedChatDecorator(this); // Paper - adventure
public ChatDecorator getChatDecorator() {

View File

@@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
Date: Tue, 31 Dec 2024 00:00:00 -0800
Subject: [PATCH] Virtual thread for User Authenticator
Subject: [PATCH] Virtual thread for user authenticator
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 780d85f4afe221f8861b248457bfe6462f0b8a2a..b6f44bff24f48419a3a0157bb0ade9aa7c21e35e 100644
index fec84afa274f8b7cc3e0e9bf500e672c16be53d4..9081780cff9d97b0f4a93afade62f5ef0d448209 100644
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -55,7 +55,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@@ -13,7 +13,7 @@ index 780d85f4afe221f8861b248457bfe6462f0b8a2a..b6f44bff24f48419a3a0157bb0ade9aa
private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
static final Logger LOGGER = LogUtils.getLogger();
- private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setThreadFactory(org.dreeam.leaf.config.modules.opt.VT4UserAuthenticator.enabled ? Thread.ofVirtual().factory() : java.util.concurrent.Executors.defaultThreadFactory()).setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads // Leaf - Virtual thread for User Authenticator
+ private static final java.util.concurrent.ExecutorService authenticatorPool = java.util.concurrent.Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("User Authenticator #%d").setThreadFactory(org.dreeam.leaf.config.modules.opt.VT4UserAuthenticator.enabled ? Thread.ofVirtual().factory() : java.util.concurrent.Executors.defaultThreadFactory()).setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LOGGER)).build()); // Paper - Cache authenticator threads // Leaf - Virtual thread for user authenticator
private static final int MAX_TICKS_BEFORE_LOGIN = 600;
private final byte[] challenge;
final MinecraftServer server;

View File

@@ -11,19 +11,20 @@ Original license: GPLv3
Original project: https://github.com/etil2jz/Mirai
diff --git a/net/minecraft/network/FriendlyByteBuf.java b/net/minecraft/network/FriendlyByteBuf.java
index e5e5d9bc095ccd9fbf1c8aaa09e5c4ebb1d1c920..6a9373ceb14733504c433b5ab10f1f9da7cbbb37 100644
index e5e5d9bc095ccd9fbf1c8aaa09e5c4ebb1d1c920..7c2df09decf90f691d35516a2eb74e97370f6a37 100644
--- a/net/minecraft/network/FriendlyByteBuf.java
+++ b/net/minecraft/network/FriendlyByteBuf.java
@@ -114,6 +114,16 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -114,6 +114,17 @@ public class FriendlyByteBuf extends ByteBuf {
public <T> void writeJsonWithCodec(Codec<T> codec, T value, int maxLength) {
// Paper end - Adventure; add max length parameter
DataResult<JsonElement> dataResult = codec.encodeStart(JsonOps.INSTANCE, value);
+ // Leaf start - Configurable chat message signatures
+ if (!org.dreeam.leaf.config.modules.network.ChatMessageSignature.enabled && codec == net.minecraft.network.protocol.status.ServerStatus.CODEC) {
+ JsonElement element = dataResult.getOrThrow(string -> new EncoderException("Failed to encode: " + string + " " + value));
+ element.getAsJsonObject().addProperty("preventsChatReports", true);
+
+ element.getAsJsonObject().addProperty("preventsChatReports", true);
+ this.writeUtf(GSON.toJson(element));
+
+ return;
+ }
+ // Leaf end - Configurable chat message signatures
@@ -102,10 +103,10 @@ index 22b0f33dc3ef9f51ba2ca3cb665b07a16bd1c9d9..7b1e5addd6a1b815498233ba9032f224
// Paper start - Add setting for proxy online mode status
return properties.enforceSecureProfile
diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index ee8cdd532b73180cb484fcc37c36f09c40faacda..eb388c1c94bc6feda6c8757b1800d158fbf48a12 100644
index ee8cdd532b73180cb484fcc37c36f09c40faacda..becadda1642c1b9342f2fdff1fc062a27d8a04f5 100644
--- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -318,10 +318,29 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -318,10 +318,30 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
public void send(Packet<?> packet) {
@@ -113,8 +114,9 @@ index ee8cdd532b73180cb484fcc37c36f09c40faacda..eb388c1c94bc6feda6c8757b1800d158
+ if (!org.dreeam.leaf.config.modules.network.ChatMessageSignature.enabled) {
+ if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat) {
+ packet = new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(
+ chat.chatType().decorate(chat.unsignedContent() != null ? chat.unsignedContent() : Component.literal(chat.body().content())), false);
+
+ chat.chatType().decorate(chat.unsignedContent() != null ? chat.unsignedContent() : Component.literal(chat.body().content())),
+ false
+ );
+ this.send(packet);
+ return;
+ }

View File

@@ -5,18 +5,9 @@ Subject: [PATCH] Remove stream in BlockBehaviour cache blockstate
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
index b631e35e965b1914cdeeddab8bd6bdbfd2465079..c13c8c82bf7bd0a9a33fd4027884ad852a7c64b6 100644
index bf77d02d8fc58b5a16c67a305fe0991ad08a795c..7afaa15102eb625245c2ccb31deeb6d1df658284 100644
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -1051,7 +1051,7 @@ public abstract class BlockBehaviour implements FeatureElement {
private static final Direction[] DIRECTIONS = Direction.values();
private static final int SUPPORT_TYPE_COUNT = SupportType.values().length;
protected final VoxelShape collisionShape;
- protected final boolean largeCollisionShape;
+ protected boolean largeCollisionShape; // Leaf - not final
private final boolean[] faceSturdy;
protected final boolean isCollisionShapeFullBlock;
@@ -1067,8 +1067,14 @@ public abstract class BlockBehaviour implements FeatureElement {
)
);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Cache blockstate cache
diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java
index c13c8c82bf7bd0a9a33fd4027884ad852a7c64b6..36ac6114cc3449a3b344baac5f3034288cf77a63 100644
index 7afaa15102eb625245c2ccb31deeb6d1df658284..35d95d5c2a61533d3588c45db8acdcb11f6e53e3 100644
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -1050,6 +1050,10 @@ public abstract class BlockBehaviour implements FeatureElement {
@@ -17,7 +17,7 @@ index c13c8c82bf7bd0a9a33fd4027884ad852a7c64b6..36ac6114cc3449a3b344baac5f303428
+ private static final Direction.Axis[] DIRECTION_AXIS_VALUES = Direction.Axis.values();
+ // Leaf end - Cache blockstate cache array
protected final VoxelShape collisionShape;
protected boolean largeCollisionShape; // Leaf - not final
protected boolean largeCollisionShape;
private final boolean[] faceSturdy;
@@ -1068,7 +1072,7 @@ public abstract class BlockBehaviour implements FeatureElement {
);