Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
updated more patches
Dieser Commit ist enthalten in:
Ursprung
0f7ca21add
Commit
3dbf41c443
@ -9,7 +9,7 @@ process to do this in the Bukkit API
|
||||
Adds API for buildable, replaceable, burnable too.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 33fa378176d2a46e60de539246e5e13a34cb4bac..9738a3aac9738a59d152e2ffec7472fda3ccbb0b 100644
|
||||
index f53377f1d860ef89d016ffd9068f261a09a8a556..40fc747fa229d8ae682e8b126de98de6471eef6b 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -428,6 +428,42 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerTradeEvent and PlayerPurchaseEvent
|
||||
Co-authored-by: Alexander <protonull@protonmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index 4a7b657265cbbc91ae85409abb3db29cfc555a2c..c75fa3274dedfafa11b94704695a2313f11c22cc 100644
|
||||
index 742ffe531bb8f3a9ca34dea99b044123d90cfff9..ce0364b98204b64d43751fed260dcc1d9fe60649 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -138,11 +138,24 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
||||
@ -37,7 +37,7 @@ index 4a7b657265cbbc91ae85409abb3db29cfc555a2c..c75fa3274dedfafa11b94704695a2313
|
||||
CriteriaTriggers.TRADE.trigger((ServerPlayer) this.tradingPlayer, this, offer.getResult());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 60a67f75b4f772654e064e2b19f68a907ca4c93b..83d9fe7d92a8cb46478964d0742d0103a937648c 100644
|
||||
index 36834f30ccefd229df4da2dbc7b22edcb83429c3..49ac1e922c0c3b38ed48adda46870e1fc0fb09dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -741,6 +741,14 @@ public abstract class AbstractContainerMenu {
|
||||
@ -118,7 +118,7 @@ index 60a67f75b4f772654e064e2b19f68a907ca4c93b..83d9fe7d92a8cb46478964d0742d0103
|
||||
break;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
|
||||
index dc036f6450b2eccdc848c66dac525ed43f70f4e4..549c13180fbbebce73771a8d82eb040f1b4fc605 100644
|
||||
index 589527215b10aa848a079b964e748c8c2e6137a1..a6e036165ce1a387195cf3db190a42c5d8249b95 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java
|
||||
@@ -134,12 +134,12 @@ public class MerchantMenu extends AbstractContainerMenu {
|
||||
@ -205,10 +205,10 @@ index 74b28315197b81f80334ae6023113904e4fac4c3..9e65c9535e01b3c858050a7881aff3f9
|
||||
this.slots.setItem(0, itemStack);
|
||||
this.slots.setItem(1, itemStack2);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/trading/Merchant.java b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
index 50dca0d86dbc47f66ba2d2f262e8587853cc6f9e..f11eff88ba4b9a4f8601d70c07907cc12611a1d0 100644
|
||||
index d41f44ed2e497ba3373d170c08488b49e88334c4..5eb54fb8e668e3ae053e33358e5b19e87330a02d 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/trading/Merchant.java
|
||||
@@ -21,6 +21,7 @@ public interface Merchant {
|
||||
@@ -20,6 +20,7 @@ public interface Merchant {
|
||||
|
||||
void overrideOffers(MerchantOffers offers);
|
||||
|
||||
@ -217,7 +217,7 @@ index 50dca0d86dbc47f66ba2d2f262e8587853cc6f9e..f11eff88ba4b9a4f8601d70c07907cc1
|
||||
|
||||
void notifyTradeUpdated(ItemStack stack);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
index f40d6a0048ad5b3f6e31d83894ee89f5ca64fb3a..22a64092e3b925e852b304376fe0a7c19acf35d0 100644
|
||||
index 552851cff3678d605428866999951fefd4375d7a..1854d933c90c3ec4b39bdb5c3c177890d9865a1c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
|
||||
@@ -79,10 +79,25 @@ public class CraftMerchantCustom extends CraftMerchant {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement TargetHitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/TargetBlock.java b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||
index 3f29d7dec834fda549db938cd7f3dc3b9ad67de3..18e8dbd7971e83a69953d203b02d8cd8d456e434 100644
|
||||
index f9326e50d27cf1a1753aecfc0079d8fab8350d93..d609c60c1650a5b7f860154e0a4f4c6d84fa63fc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/TargetBlock.java
|
||||
@@ -35,6 +35,10 @@ public class TargetBlock extends Block {
|
@ -9,10 +9,10 @@ process to do this in the Bukkit API
|
||||
Adds API for buildable, replaceable, burnable too.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 6d79409f58715038de1e9e397e73f8739fb9dca2..4d6a5f6db4803aa04d2eb25ef849b7d76de00e6b 100644
|
||||
index f0d5c3a182acc8a2ccb936e98376f2840892be28..4c30b6d0d70a48b39bd99b5e9761f950b8b0c340 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -453,6 +453,25 @@ public class CraftBlock implements Block {
|
||||
@@ -456,6 +456,25 @@ public class CraftBlock implements Block {
|
||||
return this.getNMS().getMaterial().isLiquid();
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ Before this patch, instant effects would be applied before the potion ItemStack
|
||||
This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
index 9014bf545205504bee2d727399d39090ebe3d210..12a29323d99dcc7880fe3c7c9709a755d9cbf43e 100644
|
||||
index 166f7483163a0cf62b000764d635ec2ee36a5036..4b5c9da0e858016c1a3afcb6eaa1ff4cbf47739e 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/PotionItem.java
|
||||
@@ -42,6 +42,7 @@ public class PotionItem extends Item {
|
||||
@@ -41,6 +41,7 @@ public class PotionItem extends Item {
|
||||
CriteriaTriggers.CONSUME_ITEM.trigger((ServerPlayer) entityhuman, stack);
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ index 9014bf545205504bee2d727399d39090ebe3d210..12a29323d99dcc7880fe3c7c9709a755
|
||||
if (!world.isClientSide) {
|
||||
List<MobEffectInstance> list = PotionUtils.getMobEffects(stack);
|
||||
Iterator iterator = list.iterator();
|
||||
@@ -50,7 +51,7 @@ public class PotionItem extends Item {
|
||||
@@ -49,7 +50,7 @@ public class PotionItem extends Item {
|
||||
MobEffectInstance mobeffect = (MobEffectInstance) iterator.next();
|
||||
|
||||
if (mobeffect.getEffect().isInstantenous()) {
|
||||
@ -28,7 +28,7 @@ index 9014bf545205504bee2d727399d39090ebe3d210..12a29323d99dcc7880fe3c7c9709a755
|
||||
} else {
|
||||
user.addEffect(new MobEffectInstance(mobeffect), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit
|
||||
}
|
||||
@@ -64,7 +65,18 @@ public class PotionItem extends Item {
|
||||
@@ -63,7 +64,18 @@ public class PotionItem extends Item {
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ index 47f95fb26793fbf6c5c37187d4958ee5ba93f060..39e7aeb409a39bd8cd8200b18dd3da1e
|
||||
public net.minecraft.world.entity.vehicle.Boat getHandle() {
|
||||
return (net.minecraft.world.entity.vehicle.Boat) entity;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
index 053112d7411caa6f439bd344e74aff8c844d93ac..5b8a83b250987fe5c939ab06b1021621820ad56e 100644
|
||||
index 053112d7411caa6f439bd344e74aff8c844d93ac..067fcc1f44d59dd675a9cc5485234c87366ffe10 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
|
||||
@@ -1,8 +1,10 @@
|
||||
@ -37,37 +37,21 @@ index 053112d7411caa6f439bd344e74aff8c844d93ac..5b8a83b250987fe5c939ab06b1021621
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
@@ -68,6 +70,38 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
@@ -68,6 +70,22 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
this.getHandle().setDerailedVelocityMod(derailed);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public Material getMinecartMaterial() {
|
||||
+ net.minecraft.world.item.Item minecartItem;
|
||||
+ switch (getHandle().getMinecartType()) {
|
||||
+ case CHEST:
|
||||
+ minecartItem = Items.CHEST_MINECART;
|
||||
+ break;
|
||||
+ case FURNACE:
|
||||
+ minecartItem = Items.FURNACE_MINECART;
|
||||
+ break;
|
||||
+ case TNT:
|
||||
+ minecartItem = Items.TNT_MINECART;
|
||||
+ break;
|
||||
+ case HOPPER:
|
||||
+ minecartItem = Items.HOPPER_MINECART;
|
||||
+ break;
|
||||
+ case COMMAND_BLOCK:
|
||||
+ minecartItem = Items.COMMAND_BLOCK_MINECART;
|
||||
+ break;
|
||||
+ case RIDEABLE:
|
||||
+ case SPAWNER:
|
||||
+ minecartItem = Items.MINECART;
|
||||
+ break;
|
||||
+ default:
|
||||
+ throw new IllegalStateException("Unexpected value: " + getHandle().getMinecartType());
|
||||
+ }
|
||||
+ net.minecraft.world.item.Item minecartItem = switch (getHandle().getMinecartType()) {
|
||||
+ case CHEST -> Items.CHEST_MINECART;
|
||||
+ case FURNACE -> Items.FURNACE_MINECART;
|
||||
+ case TNT -> Items.TNT_MINECART;
|
||||
+ case HOPPER -> Items.HOPPER_MINECART;
|
||||
+ case COMMAND_BLOCK -> Items.COMMAND_BLOCK_MINECART;
|
||||
+ case RIDEABLE, SPAWNER -> Items.MINECART;
|
||||
+ };
|
||||
+
|
||||
+ return CraftMagicNumbers.getMaterial(minecartItem);
|
||||
+ }
|
@ -5,7 +5,7 @@ Subject: [PATCH] Cache burn durations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
index 02ded982bc36ce6530c92e18a079dc0bec729273..e898083a3450b496beacffa44f3e2e3b8b67d109 100644
|
||||
index fd1fb954ef1eb2624939a5c5d0d2c258d3398ff2..b05019614a172ef071aaefc5fcc1d18627cc0402 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -127,7 +127,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling mob spawner spawn egg transformation
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 87e3f45057bde15e10b5bb55a9be6e9b6131e254..802f3e00c745300a9811d0ab3f563e9fbf5b1ec2 100644
|
||||
index 458a17d7b0cc1ee9dcdb7ca9e6cd571033ecfacb..d5c305bd0c8ea8cd9198240731b39472674dafeb 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -103,6 +103,11 @@ public class PaperWorldConfig {
|
||||
@@ -101,6 +101,11 @@ public class PaperWorldConfig {
|
||||
fixCuringZombieVillagerDiscountExploit = getBoolean("game-mechanics.fix-curing-zombie-villager-discount-exploit", fixCuringZombieVillagerDiscountExploit);
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index 87e3f45057bde15e10b5bb55a9be6e9b6131e254..802f3e00c745300a9811d0ab3f563e9f
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/item/SpawnEggItem.java b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
|
||||
index 82505b87de6ad73d59dd45306e504d20db3f3311..6cb0be998757d3ec89cc1064480c3a3ddc3cc381 100644
|
||||
index 901df339e40738413ce1cce87e72be82cc893087..3d9daa9e2c35d7fd277bde37cd5d1bfc9362d2ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/SpawnEggItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/SpawnEggItem.java
|
||||
@@ -61,7 +61,7 @@ public class SpawnEggItem extends Item {
|
@ -12,7 +12,7 @@ requesting the world.
|
||||
Track spigot issue to see when fixed: https://hub.spigotmc.org/jira/browse/SPIGOT-6181
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index 15c6f9d1c43fbedac70526a84a010be83b4cae86..2e5155fe541ed7040a6be9fdec98b23e8c45bfb0 100644
|
||||
index a6219dd70ab76959b2aaa155d5d17acc22095753..77fde68dae2e64ef54b1cee7ab8b33f4609b3675 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -14,6 +14,8 @@ import net.minecraft.core.BlockPos;
|
||||
@ -24,7 +24,7 @@ index 15c6f9d1c43fbedac70526a84a010be83b4cae86..2e5155fe541ed7040a6be9fdec98b23e
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.protocol.Packet;
|
||||
@@ -104,7 +106,26 @@ public class MapItemSavedData extends SavedData {
|
||||
@@ -103,7 +105,26 @@ public class MapItemSavedData extends SavedData {
|
||||
}
|
||||
|
||||
public static MapItemSavedData load(CompoundTag nbt) {
|
@ -6,19 +6,19 @@ Subject: [PATCH] Fix interact event not being called in adventure
|
||||
Call PlayerInteractEvent when left-clicking on a block in adventure mode
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7a4766d4fd86b6f0ab725955e364c631d37752b6..2ee8097e2a3e6bf4fb02ded2d2499487eaf7c142 100644
|
||||
index ff36ca2dbdf4a9abb953097f1b6246a177370b02..f9490e629b8aa94158724850812414ede2df7e92 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1734,7 +1734,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1739,7 +1739,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
MutableComponent ichatmutablecomponent = (new TranslatableComponent("build.tooHigh", new Object[]{i - 1})).withStyle(ChatFormatting.RED);
|
||||
|
||||
this.player.sendMessage((Component) ichatmutablecomponent, ChatType.GAME_INFO, Util.NIL_UUID);
|
||||
this.player.sendMessage(ichatmutablecomponent, ChatType.GAME_INFO, Util.NIL_UUID);
|
||||
- } else if (enuminteractionresult.shouldSwing()) {
|
||||
+ } else if (enuminteractionresult.shouldSwing() && !this.player.gameMode.interactResult) {
|
||||
this.player.swing(enumhand, true);
|
||||
}
|
||||
}
|
||||
@@ -2206,7 +2206,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2211,7 +2211,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
|
||||
HitResult movingobjectposition = this.player.level.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren