mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
@@ -177,7 +177,7 @@ index 95d78dcdb6777df73898694367ee17b1cb76d7a2..d0313fd5368baa53ec511c8c07fc78a1
|
||||
protected ParticleOptions getInkParticle() {
|
||||
return ParticleTypes.GLOW_SQUID_INK;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 421dcf215e00d6113e55c98d3f48f1138b17f461..d7d147c5afa566db3fe9f843ee3f0e69b8a8cd12 100644
|
||||
index 7de38a23e6c9e702e25d2e970fc741d1c4e934b0..35c0f89b0a2c7c920277e7b85230f787b781564b 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -250,9 +250,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -210,7 +210,7 @@ index 421dcf215e00d6113e55c98d3f48f1138b17f461..d7d147c5afa566db3fe9f843ee3f0e69
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) {
|
||||
@@ -3497,8 +3498,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3515,8 +3516,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.pushEntities();
|
||||
profilerFiller.pop();
|
||||
// Paper start - Add EntityMoveEvent
|
||||
@@ -223,7 +223,7 @@ index 421dcf215e00d6113e55c98d3f48f1138b17f461..d7d147c5afa566db3fe9f843ee3f0e69
|
||||
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
|
||||
Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
|
||||
@@ -3508,6 +3511,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3526,6 +3529,21 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.absMoveTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index d076e9f26af543fadd062e4dca5ccaafabe71cb2..0bcb0530dd8df28a9f4004a9d5dee9324a825095 100644
|
||||
index 4da15a9c9da346c9378575cbb7c804d8c23a92ca..4bc1658a34c72895c11b11c54dd96c4443e2ffe1 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3555,7 +3555,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3573,7 +3573,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (i1 % 2 == 0) {
|
||||
List<EquipmentSlot> list = EquipmentSlot.VALUES.stream().filter(slot -> canGlideUsing(this.getItemBySlot(slot), slot)).toList();
|
||||
EquipmentSlot equipmentSlot = Util.getRandom(list, this.random);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add mobGriefing bypass to everything affected
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 0bcb0530dd8df28a9f4004a9d5dee9324a825095..8243301096f640df1f4dd0540e5d00064dbeb18f 100644
|
||||
index 4bc1658a34c72895c11b11c54dd96c4443e2ffe1..81ddf5754134f58fcfeb285fb4061e9b1e3c1f80 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1779,7 +1779,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1797,7 +1797,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.level() instanceof ServerLevel serverLevel) {
|
||||
boolean var6 = false;
|
||||
if (this.dead && entitySource instanceof WitherBoss) { // Paper
|
||||
@@ -131,7 +131,7 @@ index 4f0d2ede28adbe412d208609a96eacc1309b8115..fdcc1534e59cf13ad354d56b1295cd60
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
index 0099257b813745dd96a77933550369ec91b34b0f..ed8b68057b1ac2d1cfa7c0eed0d1f5f16918af6b 100644
|
||||
index ca900bb646e16c7b4342f23c3ffae786eab28145..724d259d4b793f2043e63dda9022bdfddc4dca38 100644
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -547,7 +547,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -144,7 +144,7 @@ index 0099257b813745dd96a77933550369ec91b34b0f..ed8b68057b1ac2d1cfa7c0eed0d1f5f1
|
||||
//flag1 = level.removeBlock(blockPos, false) || flag1;
|
||||
flag1 = true;
|
||||
diff --git a/net/minecraft/world/entity/boss/wither/WitherBoss.java b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index e3a5aa5d6fd3cf4c6af06c592674e7f556f5bf8d..96e0172c405970253827a6b6a83ebd441f496268 100644
|
||||
index f6221829d213f103ffed9acbf9c6bc954ab6d539..a9303429be73841480f81a8a6687787e5c169ddc 100644
|
||||
--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -478,7 +478,7 @@ public class WitherBoss extends Monster implements RangedAttackMob {
|
||||
@@ -320,7 +320,7 @@ index bc0969f40814094e42a860a72314fccd1a66fabe..b4230c95f07020c5f848962d93fdf6bf
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/FarmBlock.java b/net/minecraft/world/level/block/FarmBlock.java
|
||||
index 6fd53eb4c5bfa412ebec819c41eb2a8c4047a77e..35abe25db4b7474e71ace3db0a06361e33ae2ddf 100644
|
||||
index eda8c35b7477a8a3107d865334e68653e061e6b3..7f5358e6c1fd574fb9a96a507e411da7916d0a40 100644
|
||||
--- a/net/minecraft/world/level/block/FarmBlock.java
|
||||
+++ b/net/minecraft/world/level/block/FarmBlock.java
|
||||
@@ -114,7 +114,7 @@ public class FarmBlock extends Block {
|
||||
|
||||
@@ -13,6 +13,31 @@
|
||||
this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock)));
|
||||
}
|
||||
}
|
||||
@@ -1372,6 +_,24 @@
|
||||
this.stopSleeping();
|
||||
}
|
||||
|
||||
+ // Purpur start - One Punch Man!
|
||||
+ if (damageSource.getEntity() instanceof net.minecraft.world.entity.player.Player player && damageSource.getEntity().level().purpurConfig.creativeOnePunch && !damageSource.is(DamageTypeTags.IS_PROJECTILE)) {
|
||||
+ if (player.isCreative()) {
|
||||
+ org.apache.commons.lang3.mutable.MutableDouble attackDamage = new org.apache.commons.lang3.mutable.MutableDouble();
|
||||
+ player.getMainHandItem().forEachModifier(EquipmentSlot.MAINHAND, (attributeHolder, attributeModifier) -> {
|
||||
+ if (attributeModifier.operation() == AttributeModifier.Operation.ADD_VALUE) {
|
||||
+ attackDamage.addAndGet(attributeModifier.amount());
|
||||
+ }
|
||||
+ });
|
||||
+
|
||||
+ if (attackDamage.doubleValue() == 0.0D) {
|
||||
+ // One punch!
|
||||
+ amount = 9999F;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Purpur end - One Punch Man!
|
||||
+
|
||||
this.noActionTime = 0;
|
||||
if (amount < 0.0F) {
|
||||
amount = 0.0F;
|
||||
@@ -1594,6 +_,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user