mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
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:
parent
f538a34f38
commit
8868dd196d
@ -1,7 +1,7 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Madeline Miller <mnmiller1@me.com>
|
From: Madeline Miller <mnmiller1@me.com>
|
||||||
Date: Sun, 29 Aug 2021 17:00:56 +1000
|
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
|
diff --git a/src/main/java/org/bukkit/event/block/Action.java b/src/main/java/org/bukkit/event/block/Action.java
|
@ -40,8 +40,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
iblockdata1 = world.getBlockState(blockposition3);
|
iblockdata1 = world.getBlockState(blockposition3);
|
||||||
BlockEntity tileentity = iblockdata1.hasBlockEntity() ? world.getBlockEntity(blockposition3) : null;
|
BlockEntity tileentity = iblockdata1.hasBlockEntity() ? world.getBlockEntity(blockposition3) : null;
|
||||||
|
|
||||||
- dropResources(iblockdata1, (LevelAccessor) world, blockposition3, tileentity);
|
- dropResources(iblockdata1, world, blockposition3, tileentity);
|
||||||
+ dropResources(iblockdata1, (LevelAccessor) world, blockposition3, tileentity, pos); // Paper
|
+ dropResources(iblockdata1, world, blockposition3, tileentity, pos); // Paper
|
||||||
world.setBlock(blockposition3, Blocks.AIR.defaultBlockState(), 18);
|
world.setBlock(blockposition3, Blocks.AIR.defaultBlockState(), 18);
|
||||||
if (!iblockdata1.is((Tag) BlockTags.FIRE)) {
|
if (!iblockdata1.is((Tag) BlockTags.FIRE)) {
|
||||||
world.addDestroyBlockEffect(blockposition3, iblockdata1);
|
world.addDestroyBlockEffect(blockposition3, iblockdata1);
|
@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||||
} else {
|
} else {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
worldserver = shapedetectorshape.world;
|
worldserver = shapedetectorshape.world;
|
||||||
@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.unRide();
|
this.unRide();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
entity.restoreFrom(this);
|
entity.restoreFrom(this);
|
||||||
@ -43,5 +43,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ entity.moveTo(position.x, position.y, position.z, yaw, pitch); // Paper - use EntityPortalExitEvent values
|
+ entity.moveTo(position.x, position.y, position.z, yaw, pitch); // Paper - use EntityPortalExitEvent values
|
||||||
+ entity.setDeltaMovement(velocity); // Paper - use EntityPortalExitEvent values
|
+ entity.setDeltaMovement(velocity); // Paper - use EntityPortalExitEvent values
|
||||||
worldserver.addDuringTeleport(entity);
|
worldserver.addDuringTeleport(entity);
|
||||||
if (worldserver.getTypeKey() == DimensionType.END_LOCATION) { // CraftBukkit
|
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
|
||||||
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
@ -85,7 +85,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@@ -0,0 +0,0 @@ public abstract class Player extends LivingEntity {
|
@@ -0,0 +0,0 @@ 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
|
// CraftBukkit start - Only apply knockback if the damage hits
|
||||||
- if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
|
- if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
|
||||||
+ if (entityliving.hurt(DamageSource.playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API
|
+ if (entityliving.hurt(DamageSource.playerAttack(this).sweep().critical(flag2), f4)) { // Paper - add critical damage API
|
@ -42,16 +42,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
|
|
||||||
@@ -0,0 +0,0 @@ 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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,11 +9,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
@@ -0,0 +0,0 @@ public class Goat extends Animal {
|
@@ -0,0 +0,0 @@ public class Goat extends Animal {
|
||||||
return new Goat.GoatPathNavigation(this, world);
|
return world.getBlockState(pos.below()).is((Tag) BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Goat ram API
|
+ // 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<Goat> brain = this.getBrain();
|
||||||
+ brain.setMemory(MemoryModuleType.RAM_TARGET, entity.position());
|
+ brain.setMemory(MemoryModuleType.RAM_TARGET, entity.position());
|
||||||
+ brain.eraseMemory(MemoryModuleType.RAM_COOLDOWN_TICKS);
|
+ brain.eraseMemory(MemoryModuleType.RAM_COOLDOWN_TICKS);
|
@ -1,7 +1,7 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
Date: Thu, 23 Sep 2021 10:40:09 -0700
|
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
|
diff --git a/src/main/java/io/papermc/paper/commands/PaperCommandBlockHolder.java b/src/main/java/io/papermc/paper/commands/PaperCommandBlockHolder.java
|
@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/jav
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user