mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
fix npe issue
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] One Punch Man!
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..c8f23b21cbe8625f7344c118eb62bab7e55e42e2 100644
|
||||
index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..90d41b9e286064f11ce55badfb76574778d933a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1921,6 +1921,23 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -13,7 +13,7 @@ index 50fa5f8395fea3ba6fa202a5a38519cd55ae00e0..c8f23b21cbe8625f7344c118eb62bab7
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ if (damagesource.getEntity().world.purpurConfig.creativeOnePunch && damagesource.getEntity() instanceof EntityHuman) {
|
||||
+ if (damagesource.getEntity() instanceof EntityHuman && damagesource.getEntity().world.purpurConfig.creativeOnePunch) {
|
||||
+ EntityHuman entityHuman = (EntityHuman) damagesource.getEntity();
|
||||
+ if (entityHuman.isCreative()) {
|
||||
+ double attackDamage = 0;
|
||||
|
||||
Reference in New Issue
Block a user