mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Obfuscation helpers
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 17561f8c3ae230ab95d83035ad1b647823cc0757 Mon Sep 17 00:00:00 2001
|
||||
From e1588564c74131a5b5b60262ea82f7df7607f8d7 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 19:17:21 -0500
|
||||
Subject: [PATCH] Integrate ridables
|
||||
@@ -35,7 +35,7 @@ Subject: [PATCH] Integrate ridables
|
||||
.../minecraft/server/EntityIllagerWizard.java | 3 +
|
||||
.../minecraft/server/EntityInsentient.java | 51 +++++++-
|
||||
.../net/minecraft/server/EntityIronGolem.java | 1 +
|
||||
.../net/minecraft/server/EntityLiving.java | 25 +++-
|
||||
.../net/minecraft/server/EntityLiving.java | 24 +++-
|
||||
.../net/minecraft/server/EntityMagmaCube.java | 3 +-
|
||||
.../minecraft/server/EntityMushroomCow.java | 1 +
|
||||
.../net/minecraft/server/EntityOcelot.java | 3 +
|
||||
@@ -136,7 +136,7 @@ Subject: [PATCH] Integrate ridables
|
||||
.../controller/ControllerMoveWASDWater.java | 42 +++++++
|
||||
.../craftbukkit/entity/CraftLivingEntity.java | 10 ++
|
||||
.../bukkit/craftbukkit/entity/CraftMob.java | 12 ++
|
||||
132 files changed, 1249 insertions(+), 106 deletions(-)
|
||||
132 files changed, 1248 insertions(+), 106 deletions(-)
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java
|
||||
create mode 100644 src/main/java/net/pl3x/purpur/controller/ControllerMoveWASDFlying.java
|
||||
@@ -165,7 +165,7 @@ index 454627f65..df3d6cf28 100644
|
||||
this.d = false;
|
||||
this.a.aM = this.a(this.a.aM, this.h() + 20.0F, this.b);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index c10b41dff..e8b5729ef 100644
|
||||
index adfd6e855..cf5d829f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -78,6 +78,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -223,7 +223,7 @@ index c10b41dff..e8b5729ef 100644
|
||||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
}
|
||||
@@ -3275,4 +3290,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -3276,4 +3291,20 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public void setMot(double d0, double d1, double d2) {
|
||||
this.setMot(new Vec3D(d0, d1, d2));
|
||||
}
|
||||
@@ -524,10 +524,10 @@ index 1e3782122..c0b066d18 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
index f053ff0e5..16a35418f 100644
|
||||
index c3aef0b2a..087ce8739 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
@@ -14,6 +14,7 @@ public class EntityCow extends EntityAnimal {
|
||||
@@ -9,6 +9,7 @@ public class EntityCow extends EntityAnimal {
|
||||
|
||||
public EntityCow(EntityTypes<? extends EntityCow> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -1701,7 +1701,7 @@ index 8e463111b..fd6a926ca 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index c2d83bf3e..694200deb 100644
|
||||
index 60ddadbfe..7e59a7b30 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -87,10 +87,10 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1769,14 +1769,6 @@ index c2d83bf3e..694200deb 100644
|
||||
public void o(float f) {
|
||||
this.bD = f;
|
||||
}
|
||||
@@ -2743,6 +2755,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aM = f;
|
||||
}
|
||||
|
||||
+ public void setRenderYawOffset(float renderYawOffset) { l(renderYawOffset); } // Purpur - OBFHELPER
|
||||
@Override
|
||||
public void l(float f) {
|
||||
this.aK = f;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java
|
||||
index a17316c77..b34a258c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMagmaCube.java
|
||||
@@ -1799,7 +1791,7 @@ index a17316c77..b34a258c2 100644
|
||||
|
||||
this.setMot(vec3d.x, (double) (0.42F + (float) this.getSize() * 0.1F), vec3d.z);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
index 6bfffb407..b6d5fe362 100644
|
||||
index f4f60c38d..f868ea114 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
@@ -18,6 +18,7 @@ public class EntityMushroomCow extends EntityCow {
|
||||
@@ -2063,10 +2055,10 @@ index 94e973ffb..d743ddb9c 100644
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPhantom.java b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
index ea11de3cb..8517fcf29 100644
|
||||
index 4e07287e9..7f414aee9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPhantom.java
|
||||
@@ -16,12 +16,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -15,12 +15,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
public EntityPhantom(EntityTypes<? extends EntityPhantom> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -2081,7 +2073,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -106,7 +108,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -105,7 +107,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public void movementTick() {
|
||||
@@ -2090,15 +2082,15 @@ index ea11de3cb..8517fcf29 100644
|
||||
this.setOnFire(8);
|
||||
}
|
||||
|
||||
@@ -239,6 +241,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -238,6 +240,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() { // shouldExecute
|
||||
+ if (this.phantom.getRider() != null) return false;
|
||||
double range = maxTargetRange();
|
||||
List<EntityEnderCrystal> crystals = world.a(EntityEnderCrystal.class, phantom.getBoundingBox().grow(range, range, range));
|
||||
List<EntityEnderCrystal> crystals = world.getEntities(EntityEnderCrystal.class, phantom.getBoundingBox().grow(range, range, range));
|
||||
if (crystals.isEmpty()) {
|
||||
@@ -255,6 +258,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -254,6 +257,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean b() { // shouldContinueExecuting
|
||||
@@ -2106,7 +2098,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
if (crystal == null || !crystal.isAlive()) {
|
||||
return false;
|
||||
}
|
||||
@@ -306,6 +310,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -305,6 +309,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() { // shouldExecute
|
||||
@@ -2114,7 +2106,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
return phantom.isCirclingCrystal();
|
||||
}
|
||||
|
||||
@@ -368,6 +373,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -367,6 +372,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
@@ -2122,7 +2114,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
if (this.c > 0) {
|
||||
--this.c;
|
||||
return false;
|
||||
@@ -397,6 +403,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -396,6 +402,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean b() {
|
||||
@@ -2130,7 +2122,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||
|
||||
return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false;
|
||||
@@ -411,6 +418,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -410,6 +417,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
@@ -2138,12 +2130,12 @@ index ea11de3cb..8517fcf29 100644
|
||||
EntityLiving entityliving = EntityPhantom.this.getGoalTarget();
|
||||
|
||||
return !isCirclingCrystal() && entityliving != null && EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a); // Purpur
|
||||
@@ -459,12 +467,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -458,12 +466,14 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
+ if (EntityPhantom.this.getRider() != null) return false; // Purpur
|
||||
return !isCirclingCrystal() && EntityPhantom.this.getGoalTarget() != null && EntityPhantom.this.bz == EntityPhantom.AttackPhase.SWOOP; // Purpur
|
||||
return !isCirclingCrystal() && EntityPhantom.this.getGoalTarget() != null && EntityPhantom.this.getAttackPhase() == EntityPhantom.AttackPhase.SWOOP; // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2153,15 +2145,15 @@ index ea11de3cb..8517fcf29 100644
|
||||
if (isCirclingCrystal()) {
|
||||
return false;
|
||||
}
|
||||
@@ -538,6 +548,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -537,6 +547,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
+ if (EntityPhantom.this.getRider() != null) return false; // Purpur
|
||||
return !isCirclingCrystal() && EntityPhantom.this.getGoalTarget() == null || EntityPhantom.this.bz == EntityPhantom.AttackPhase.CIRCLE; // Purpur
|
||||
return !isCirclingCrystal() && EntityPhantom.this.getGoalTarget() == null || EntityPhantom.this.getAttackPhase() == EntityPhantom.AttackPhase.CIRCLE; // Purpur
|
||||
}
|
||||
|
||||
@@ -605,14 +616,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -604,14 +615,23 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2187,7 +2179,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
}
|
||||
|
||||
class d extends EntityAIBodyControl {
|
||||
@@ -628,7 +648,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -627,7 +647,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2196,7 +2188,7 @@ index ea11de3cb..8517fcf29 100644
|
||||
|
||||
private float j = 0.1F;
|
||||
|
||||
@@ -636,8 +656,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
@@ -635,8 +655,19 @@ public class EntityPhantom extends EntityFlying implements IMonster {
|
||||
super(entityinsentient);
|
||||
}
|
||||
|
||||
@@ -2684,10 +2676,10 @@ index a59b66e66..2feb9d67b 100644
|
||||
|
||||
this.setMot(vec3d.x, 0.41999998688697815D, vec3d.z);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index e106b1dce..cee9bd683 100644
|
||||
index 1fed1d6e7..389372ba4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -14,6 +14,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
@@ -13,6 +13,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
|
||||
public EntitySnowman(EntityTypes<? extends EntitySnowman> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -2695,7 +2687,7 @@ index e106b1dce..cee9bd683 100644
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,6 +76,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
@@ -74,6 +75,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2957,10 +2949,10 @@ index 0037d1380..02a21641c 100644
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index ec63f1dbe..4aac81d3a 100644
|
||||
index c32f40a60..ad58a3c9a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -262,6 +262,10 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -263,6 +263,10 @@ public class EntityTypes<T extends Entity> {
|
||||
}
|
||||
|
||||
// Purpur start
|
||||
|
||||
Reference in New Issue
Block a user