fix sponge absorb resetting block entity data of waterlogged blocks

alternative to 320f25cb04, this commit has the side effect of
not including the waterlogged block into the block list for the later event. Generally this logic is fragile and should be handled by
the BlockStateListPopulator in the future.
This commit is contained in:
Lulu13022002
2025-06-07 23:52:09 +02:00
parent c986ce54d9
commit 48e94e8c89
3 changed files with 3 additions and 6 deletions

View File

@@ -107,7 +107,7 @@ public interface Equippable extends BuildableDataComponent<Equippable, Equippabl
/**
* Checks if the item can be sheared off an entity.
*
* @return true if can be sheared of an entity, false otherwise
* @return true if can be sheared off an entity, false otherwise
*/
@Contract(pure = true)
boolean canBeSheared();

View File

@@ -71,7 +71,7 @@
+ FluidState fluid = level.getFluidState(blockPos);
+
+ if (fluid.is(FluidTags.WATER)) {
+ if (state.getBlock() instanceof BucketPickup bucketPickup && !bucketPickup.pickupBlock(null, blockList, blockPos, state).isEmpty()) {
+ if (state.getBlock() instanceof BucketPickup bucketPickup && !bucketPickup.pickupBlock(null, level, blockPos, state).isEmpty()) {
+ // NOP
+ } else if (state.getBlock() instanceof LiquidBlock) {
+ // NOP

View File

@@ -7,10 +7,7 @@ dependencies {
tasks.processResources {
var apiVersion = rootProject.providers.gradleProperty("mcVersion").get()
// Bukkit api versioning does not support suffixed versions
val possibleSuffix = apiVersion.indexOf('-')
if (possibleSuffix != -1) {
apiVersion = apiVersion.substring(0, possibleSuffix);
}
apiVersion = apiVersion.substringBefore('-')
val props = mapOf(
"version" to project.version,