all api patches done*

*still waiting for leaf to port datafixer to 1.18 so i can do entity serialization
This commit is contained in:
Josh Roy 2021-11-24 20:24:51 -05:00 committed by MiniDigger | Martin
parent 4df6820f86
commit c1d14dc076
34 changed files with 49 additions and 62 deletions

View file

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Madeline Miller <mnmiller1@me.com>
Date: Sun, 29 Aug 2021 17:00:56 +1000
Subject: [PATCH] Add helpers for left/right hand to Action
Subject: [PATCH] Add helpers for left/right click to Action
diff --git a/src/main/java/org/bukkit/event/block/Action.java b/src/main/java/org/bukkit/event/block/Action.java

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 77577de113b1413ed1474850b4ef8e7fd0c07dd6..4f673e9123145dc78564dc3eef0edf75795dafc2 100644
index 5810bcf92ddff080511dd07326769c8fef53d7b9..1f8a51897d9de00f0004ab1de479198390483f7d 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -757,6 +757,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient

View file

@ -45,7 +45,7 @@ index 0b15fe8b5da29bf691c394098f0203a49504242e..c8c2e5bc2ec1d8d7ea445a1203c9d5a9
// Paper end
}
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 0006a5a53dfa9fc81c608423e8740a9c820659a3..70caaf05be813ba390412714ba0a39981edc2475 100644
index e959f844581eaa88f581a4fabcb39148624bbe9b..0dd0beee6800fb34520dfa2d05e5bdda76624d64 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -471,6 +471,13 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockBreakBlockEvent
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 1a5605b11170dfe1bd37165de886bad0f2e38ecd..8c30e28b97ac7e8b54322c903e0b75ee8135620b 100644
index 76b3d78f4c866a11bd7798af6b330340d898d7d9..ab5b9f00123e2ede2931ffc520684e482aac49b4 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -331,6 +331,23 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -329,6 +329,23 @@ public class Block extends BlockBehaviour implements ItemLike {
}
}
@ -33,20 +33,20 @@ index 1a5605b11170dfe1bd37165de886bad0f2e38ecd..8c30e28b97ac7e8b54322c903e0b75ee
public static void dropResources(BlockState state, Level world, BlockPos pos, @Nullable BlockEntity blockEntity, Entity entity, ItemStack stack) {
if (world instanceof ServerLevel) {
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
index 3678f75822b55c3c4c77565893269af4b7f9d8c9..d770649a9e9e9bb28b52d00cd082b87de5814593 100644
index c7d23fcaa5702f0e8bbf616c86b16ab1b3400dbb..28256f1f0aeb7718a5866add4ec40ce0198c36b9 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
@@ -410,7 +410,7 @@ public class PistonBaseBlock extends DirectionalBlock {
@@ -409,7 +409,7 @@ public class PistonBaseBlock extends DirectionalBlock {
iblockdata1 = world.getBlockState(blockposition3);
BlockEntity tileentity = iblockdata1.hasBlockEntity() ? world.getBlockEntity(blockposition3) : null;
- dropResources(iblockdata1, (LevelAccessor) world, blockposition3, tileentity);
+ dropResources(iblockdata1, (LevelAccessor) world, blockposition3, tileentity, pos); // Paper
- dropResources(iblockdata1, world, blockposition3, tileentity);
+ dropResources(iblockdata1, world, blockposition3, tileentity, pos); // Paper
world.setBlock(blockposition3, Blocks.AIR.defaultBlockState(), 18);
if (!iblockdata1.is((Tag) BlockTags.FIRE)) {
world.addDestroyBlockEffect(blockposition3, iblockdata1);
diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
index 6e3e873efa1f50f53cb6503bde8a981f9cefd006..7fda7da544b2d0bbd3803d88ee34c92350a8b8ef 100644
index 18e24f400289fdfca0bf33ea0f93badeef3e46eb..1aab936f9f57bd2dda4444d6bd36e064809e5915 100644
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
@@ -295,7 +295,7 @@ public abstract class FlowingFluid extends Fluid {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent NBT copy in smithing recipes
diff --git a/src/main/java/net/minecraft/world/item/crafting/UpgradeRecipe.java b/src/main/java/net/minecraft/world/item/crafting/UpgradeRecipe.java
index 21e9ce106cb7c1cdeabbad38a83d2439570e452b..88d99451748bfbd2cd24b1f29971a275dc6df597 100644
index d80fc47820edbb3bea439aedf2e02e82c1931e35..076e10e5d7908c590402cfbb739bf73bc00276ce 100644
--- a/src/main/java/net/minecraft/world/item/crafting/UpgradeRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/UpgradeRecipe.java
@@ -26,8 +26,15 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
@@ -25,8 +25,15 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
final Ingredient addition;
final ItemStack result;
private final ResourceLocation id;
@ -24,7 +24,7 @@ index 21e9ce106cb7c1cdeabbad38a83d2439570e452b..88d99451748bfbd2cd24b1f29971a275
this.id = id;
this.base = base;
this.addition = addition;
@@ -42,11 +49,13 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
@@ -41,11 +48,13 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
@Override
public ItemStack assemble(Container inventory) {
ItemStack itemstack = this.result.copy();
@ -38,7 +38,7 @@ index 21e9ce106cb7c1cdeabbad38a83d2439570e452b..88d99451748bfbd2cd24b1f29971a275
return itemstack;
}
@@ -97,7 +106,7 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
@@ -96,7 +105,7 @@ public class UpgradeRecipe implements net.minecraft.world.item.crafting.Recipe<C
public Recipe toBukkitRecipe() {
CraftItemStack result = CraftItemStack.asCraftMirror(this.result);

View file

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 23 Sep 2021 10:40:09 -0700
Subject: [PATCH] More CommmandBlock API
Subject: [PATCH] More CommandBlock API
diff --git a/src/main/java/io/papermc/paper/commands/PaperCommandBlockHolder.java b/src/main/java/io/papermc/paper/commands/PaperCommandBlockHolder.java

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4f164f238177b5e2b18c76b7cc14596ec93409d1..e17bda0d13bae337cfad5ae31b118aa7a85499fc 100644
index aeae0eb6260fa88c55eb8add7e5df3198fe3d465..dcfc726ab96dccc05848219e824ad7612dbfbdab 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3181,6 +3181,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2970,6 +2970,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} else {
// CraftBukkit start
worldserver = shapedetectorshape.world;
@ -34,7 +34,7 @@ index 4f164f238177b5e2b18c76b7cc14596ec93409d1..e17bda0d13bae337cfad5ae31b118aa7
this.unRide();
// CraftBukkit end
@@ -3194,8 +3213,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -2983,8 +3002,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
if (entity != null) {
entity.restoreFrom(this);
@ -43,5 +43,5 @@ index 4f164f238177b5e2b18c76b7cc14596ec93409d1..e17bda0d13bae337cfad5ae31b118aa7
+ entity.moveTo(position.x, position.y, position.z, yaw, pitch); // Paper - use EntityPortalExitEvent values
+ entity.setDeltaMovement(velocity); // Paper - use EntityPortalExitEvent values
worldserver.addDuringTeleport(entity);
if (worldserver.getTypeKey() == DimensionType.END_LOCATION) { // CraftBukkit
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 08c6ea9f19fa9218af089ed3bd2dcda1e83591ed..710a1064cec9c7ec93e1258b0786e74ab9af0c12 100644
index 27f03389f905e8e051eb4148016de7868c385819..b8e7f70f4ee1b28635537e04f7bd0d0cd6afb4b3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -956,6 +956,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -748,6 +748,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
protected BlockPos findLightningTargetAround(BlockPos pos) {
@ -20,7 +20,7 @@ index 08c6ea9f19fa9218af089ed3bd2dcda1e83591ed..710a1064cec9c7ec93e1258b0786e74a
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
@@ -970,6 +975,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -762,6 +767,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!list.isEmpty()) {
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
} else {
@ -29,10 +29,10 @@ index 08c6ea9f19fa9218af089ed3bd2dcda1e83591ed..710a1064cec9c7ec93e1258b0786e74a
blockposition1 = blockposition1.above(2);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e5e23c907d49ee64218f3302e2a2323d6937a8a1..858e29ad77aee8a1b7797c2d82902abbfd662da2 100644
index 7ebd935c7c43fb9ed50d5c8e9e5bb8e28080338b..69a4572c0eb4019491e099cf75049728a9aa4f99 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -701,6 +701,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -690,6 +690,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (LightningStrike) lightning.getBukkitEntity();
}

View file

@ -90,7 +90,7 @@ index 0000000000000000000000000000000000000000..4ecba0b02c2813a890aecc5586987879
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index ff1f178b69efc4f167cb34095b7fd3acd4d00680..26273a6b9d49f0e12fe1ff3206c7f017a2f36e44 100644
index e748601705a01e3b79a6f2b336307b21060abf7d..33c5533d6bb61f71ae2682ee0f1697adf01b0045 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -516,6 +516,18 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Left handed API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 2386edf499cb292241f6ba60c1cdb46f2fe704ff..5a43e420f14fa52d71d41ff3694a179e7a1a5be3 100644
index 0613ab9979a32a005fa2cbf24125022713daca3a..cf0be5ef01bddaabbfd11f54b2dacd68c68ad16a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -134,5 +134,15 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {

View file

@ -74,10 +74,10 @@ index 0000000000000000000000000000000000000000..0567e500c40d3d424ddc19062c4f6da9
+ }
+}
diff --git a/src/main/java/net/minecraft/advancements/DisplayInfo.java b/src/main/java/net/minecraft/advancements/DisplayInfo.java
index dea17bc7a6e4db470afaaad3c98940297a50e4e4..0b78ccceb55a1c0fa1f27f9ff1e303396c8f447d 100644
index db939a754e9308ad68f1b09a970f7a1b00a673bf..538f19f15b553d14ad95f09b1c81359f4c68b17f 100644
--- a/src/main/java/net/minecraft/advancements/DisplayInfo.java
+++ b/src/main/java/net/minecraft/advancements/DisplayInfo.java
@@ -27,6 +27,7 @@ public class DisplayInfo {
@@ -28,6 +28,7 @@ public class DisplayInfo {
private final boolean hidden;
private float x;
private float y;

View file

@ -29,10 +29,10 @@ index 80d19af2ad423bd3de0e039c5bb8f97af536aaa9..a828cad27fcd39f8bfbaefa97052a2a3
public static DamageSource sting(LivingEntity attacker) {
return new EntityDamageSource("sting", attacker);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1018f4640bab5876c5e0afb5b88f71437fb79662..cbdff14b26f67b5040c13659f9d64d9ec4c7eaed 100644
index 3f9e3415db6cfee317da695793d295660ef29b18..beebd31d7a82a4edae0e2e7c5890cd13fbb6c4df 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2571,15 +2571,27 @@ public abstract class LivingEntity extends Entity {
@@ -2570,15 +2570,27 @@ public abstract class LivingEntity extends Entity {
return this.hasEffect(MobEffects.JUMP) ? (double) (0.1F * (float) (this.getEffect(MobEffects.JUMP).getAmplifier() + 1)) : 0.0D;
}
@ -62,10 +62,10 @@ index 1018f4640bab5876c5e0afb5b88f71437fb79662..cbdff14b26f67b5040c13659f9d64d9e
this.hasImpulse = true;
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index ce713e1857121ca52467ad561c4fbb30ae054d87..94e76e295dbd0f3bac4b30a3e7338cd56a971207 100644
index 44c2820a33ed40b4ef2ebd20708347d3cc2437ae..b6f8e94df86c174569ccbc69cfd031cc08271dd3 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1218,7 +1218,7 @@ public abstract class Player extends LivingEntity {
@@ -1215,7 +1215,7 @@ public abstract class Player extends LivingEntity {
flag1 = true;
}
@ -74,7 +74,7 @@ index ce713e1857121ca52467ad561c4fbb30ae054d87..94e76e295dbd0f3bac4b30a3e7338cd5
flag2 = flag2 && !level.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting();
@@ -1258,7 +1258,7 @@ public abstract class Player extends LivingEntity {
@@ -1255,7 +1255,7 @@ public abstract class Player extends LivingEntity {
}
Vec3 vec3d = target.getDeltaMovement();
@ -83,9 +83,9 @@ index ce713e1857121ca52467ad561c4fbb30ae054d87..94e76e295dbd0f3bac4b30a3e7338cd5
if (flag5) {
if (i > 0) {
@@ -1286,7 +1286,7 @@ public abstract class Player extends LivingEntity {
@@ -1283,7 +1283,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo(entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
- if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
+ if (entityliving.hurt(DamageSource.playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API
@ -93,7 +93,7 @@ index ce713e1857121ca52467ad561c4fbb30ae054d87..94e76e295dbd0f3bac4b30a3e7338cd5
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 6636845ea044c3810e1880aad8b679134cd33668..52e4948fd1657fa1776ac6b0142e8c21e7567976 100644
index b436103957113bff5e553dacb869c775a3f8b059..3d3dcb47720055f550d17d1f106a2c0e59de2919 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -381,6 +381,7 @@ public abstract class AbstractArrow extends Projectile {
@ -105,7 +105,7 @@ index 6636845ea044c3810e1880aad8b679134cd33668..52e4948fd1657fa1776ac6b0142e8c21
int k = entity.getRemainingFireTicks();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 2b2654ec04e8abca9db09d6257edf11099bb0d9b..c0b46ff81994e037e734b75afadcce372c2ddd7f 100644
index 5013a93f9bdc6d2c52239ca0434c7aa40f0572e1..aaf47d3f58819ead3553973c159c5c6eec4abe43 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -964,7 +964,7 @@ public class CraftEventFactory {

View file

@ -27,7 +27,7 @@ index 116709ba2b298268ac806e6e45f2e910ca600706..1eeaf0cc9b00afd54f38f9cb50404ec9
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
index cbf181b30bae134150933c721f22161e3e9ffca3..12a1cb536d5cb109cac75636369ed1b2bfa3a0a4 100644
index 38f56cb4adeac0d7dcad63d0fbd98f17ab6e3b46..5e0e6ab7eaa9825b2f8c90353c30673dd43dd8b8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
@@ -105,6 +105,11 @@ public abstract class AbstractPiglin extends Monster {
@ -42,16 +42,3 @@ index cbf181b30bae134150933c721f22161e3e9ffca3..12a1cb536d5cb109cac75636369ed1b2
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
index 61e2841fea6603e3e5fbd004de7ffdfb79fc9981..4a873a278a4dc76d868d789574a7890bf53832d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
@@ -28,7 +28,7 @@ public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton {
this.getHandle().conversionTime = -1;
this.getHandle().getEntityData().set(net.minecraft.world.entity.monster.Skeleton.DATA_STRAY_CONVERSION_ID, false);
} else {
- this.getHandle().getSwimAmount(time); // PAIL rename startStrayConversion
+ this.getHandle().startFreezeConversion(time); // PAIL rename startStrayConversion // Paper - nope, that's not the right method
}
}

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index e3944d0f4fd18ef6c545dc4a131c0b120dff753a..5154cfffc414e1f6039e55f1a256bbaacb56bc55 100644
index ee24edb7f3821ae3a1881824257d21226f909adb..808bdd0e8d6b679c2eee87c3078a4c3dbcd08b8b 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -470,6 +470,11 @@ public class CraftBlock implements Block {
@@ -473,6 +473,11 @@ public class CraftBlock implements Block {
public boolean isSolid() {
return getNMS().getMaterial().blocksMotion();
}
@ -37,7 +37,7 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 26273a6b9d49f0e12fe1ff3206c7f017a2f36e44..eb11abe4bc8f06d457da674848b39fc3b3873d1a 100644
index 33c5533d6bb61f71ae2682ee0f1697adf01b0045..691b110e8a64081b68868456089908fe38fbc1cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -528,6 +528,12 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -5,15 +5,15 @@ Subject: [PATCH] Goat ram API
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
index 32d0387b6c66462ca965add78a562dec3c4b95a9..c7e24da48aaff9fbd1a8272483231744326e3a8e 100644
index d3c4f93ee2aa1902eeca197c72eb17199fc41fb2..cc5687f43f8ac99995667fdc53c5c0586f70f367 100644
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
@@ -279,6 +279,17 @@ public class Goat extends Animal {
return new Goat.GoatPathNavigation(this, world);
@@ -285,6 +285,17 @@ public class Goat extends Animal {
return world.getBlockState(pos.below()).is((Tag) BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos);
}
+ // Paper start - Goat ram API
+ public void ram(LivingEntity entity) {
+ public void ram(net.minecraft.world.entity.LivingEntity entity) {
+ Brain<Goat> brain = this.getBrain();
+ brain.setMemory(MemoryModuleType.RAM_TARGET, entity.position());
+ brain.eraseMemory(MemoryModuleType.RAM_COOLDOWN_TICKS);

View file

@ -24,7 +24,7 @@ index c8c2e5bc2ec1d8d7ea445a1203c9d5a904dfc666..014c9984018ad5e51a26228a137e1ba4
* Return the translation key for the Material, so the client can translate it into the active
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
index d515de1c316f14165ee327bc81f0be98b60db3bf..350384ba10435b1115e4386a78d8145f748b6b29 100644
index 18795003815d5bb6e04a15256430f69a31b2ace5..bafad5764cc3933fcd9602d37bd2e68424cbd575 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -767,5 +767,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 996f09eaf7d1d6c5e27e2bb2630a6bcb18854172..6d2cc9d1813c862dfd23cb6897d4f4f4845af529 100644
index dcfc726ab96dccc05848219e824ad7612dbfbdab..7713f26d4a97df94c27694d28881d298e4c54147 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2008,6 +2008,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
@@ -1788,6 +1788,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
}
}
@ -45,7 +45,7 @@ index ee50ea695585639d0ff184b675f3fb3b205b9f86..0bd800e1aeda87689a6c56ee6fadda38
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index eb11abe4bc8f06d457da674848b39fc3b3873d1a..424f3a9a645d57ad43c52932f5b388b5f146b9f0 100644
index 691b110e8a64081b68868456089908fe38fbc1cf..673b5192c32ee1b3c0d15462d3fadb0f31cd6a03 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -421,6 +421,29 @@ public final class CraftMagicNumbers implements UnsafeValues {