apply and rebuild already applied source patches

This commit is contained in:
granny
2025-09-21 17:57:38 -07:00
parent 67bc34f8bf
commit 0958fe267a
72 changed files with 96 additions and 97 deletions

View File

@@ -2,10 +2,10 @@
+++ b/net/minecraft/world/item/BucketItem.java
@@ -147,7 +_,7 @@
// CraftBukkit end
if (!flag) {
if (!flag2) {
return hitResult != null && this.emptyContents(entity, level, hitResult.getBlockPos().relative(hitResult.getDirection()), null, direction, clicked, itemstack, hand); // CraftBukkit
- } else if (level.dimensionType().ultraWarm() && this.content.is(FluidTags.WATER)) {
+ } else if ((level.dimensionType().ultraWarm() || (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd)) && this.content.is(FluidTags.WATER)) { // Purpur - Add allow water in end world option
+ } else if ((level.dimensionType().ultraWarm() || (level.isTheEnd() && !org.purpurmc.purpur.PurpurConfig.allowWaterPlacementInTheEnd)) && this.content == Fluids.WATER) { // Purpur - Add allow water in end world option
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -450,6 +_,7 @@
@@ -451,6 +_,7 @@
// revert back all captured blocks
for (org.bukkit.block.BlockState blockstate : blocks) {
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace();
@@ -8,7 +8,7 @@
}
SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
@@ -473,6 +_,7 @@
@@ -474,6 +_,7 @@
if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically
block.onPlace(serverLevel, newPos, oldBlock, true, context);
}
@@ -16,7 +16,7 @@
serverLevel.notifyAndUpdatePhysics(newPos, null, oldBlock, block, serverLevel.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
}
@@ -593,6 +_,26 @@
@@ -594,6 +_,26 @@
return this.isDamageableItem() && this.getDamageValue() > 0;
}
@@ -43,7 +43,7 @@
public int getDamageValue() {
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
}
@@ -1205,6 +_,12 @@
@@ -1203,6 +_,12 @@
public boolean isEnchanted() {
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/Items.java
+++ b/net/minecraft/world/item/Items.java
@@ -383,7 +_,7 @@
@@ -420,7 +_,7 @@
public static final Item PURPUR_BLOCK = registerBlock(Blocks.PURPUR_BLOCK);
public static final Item PURPUR_PILLAR = registerBlock(Blocks.PURPUR_PILLAR);
public static final Item PURPUR_STAIRS = registerBlock(Blocks.PURPUR_STAIRS);
@@ -9,7 +9,7 @@
public static final Item CREAKING_HEART = registerBlock(Blocks.CREAKING_HEART);
public static final Item CHEST = registerBlock(Blocks.CHEST, properties -> properties.component(DataComponents.CONTAINER, ItemContainerContents.EMPTY));
public static final Item CRAFTING_TABLE = registerBlock(Blocks.CRAFTING_TABLE);
@@ -2092,7 +_,7 @@
@@ -2178,7 +_,7 @@
"sweet_berries", createBlockItemWithCustomItemName(Blocks.SWEET_BERRY_BUSH), new Item.Properties().food(Foods.SWEET_BERRIES)
);
public static final Item GLOW_BERRIES = registerItem(

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/ShovelItem.java
+++ b/net/minecraft/world/item/ShovelItem.java
@@ -46,9 +_,12 @@
@@ -45,9 +_,12 @@
BlockState blockState1 = FLATTENABLES.get(blockState.getBlock());
BlockState blockState2 = null;
Runnable afterAction = null; // Paper