mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
more ridables
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Ridables
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ControllerMove.java b/src/main/java/net/minecraft/server/ControllerMove.java
|
||||
index ac6f9d9e52..d874b177b4 100644
|
||||
index ac6f9d9e5..d874b177b 100644
|
||||
--- a/src/main/java/net/minecraft/server/ControllerMove.java
|
||||
+++ b/src/main/java/net/minecraft/server/ControllerMove.java
|
||||
@@ -6,9 +6,9 @@ public class ControllerMove {
|
||||
@@ -22,7 +22,7 @@ index ac6f9d9e52..d874b177b4 100644
|
||||
|
||||
public ControllerMove(EntityInsentient entityinsentient) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2d49816311..d14e4b1eef 100644
|
||||
index 2d4981631..d14e4b1ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -80,7 +80,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -147,7 +147,7 @@ index 2d49816311..d14e4b1eef 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCat.java b/src/main/java/net/minecraft/server/EntityCat.java
|
||||
index 20497c3962..3ac0d7afbf 100644
|
||||
index 20497c396..3ac0d7afb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCat.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCat.java
|
||||
@@ -15,7 +15,7 @@ public class EntityCat extends EntityTameableAnimal {
|
||||
@@ -236,7 +236,7 @@ index 20497c3962..3ac0d7afbf 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCaveSpider.java b/src/main/java/net/minecraft/server/EntityCaveSpider.java
|
||||
index 346b77083c..eca1cbd7f7 100644
|
||||
index 346b77083..eca1cbd7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCaveSpider.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCaveSpider.java
|
||||
@@ -8,6 +8,18 @@ public class EntityCaveSpider extends EntitySpider {
|
||||
@@ -259,7 +259,7 @@ index 346b77083c..eca1cbd7f7 100644
|
||||
return EntitySpider.eL().a(GenericAttributes.MAX_HEALTH, 12.0D);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
|
||||
index fa97552bb4..3a1d0a2f23 100644
|
||||
index fa97552bb..3a1d0a2f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityChicken.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
|
||||
@@ -17,9 +17,22 @@ public class EntityChicken extends EntityAnimal {
|
||||
@@ -294,7 +294,7 @@ index fa97552bb4..3a1d0a2f23 100644
|
||||
} else {
|
||||
this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.4D));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityComplexPart.java b/src/main/java/net/minecraft/server/EntityComplexPart.java
|
||||
index 920f4c7671..7fec83387a 100644
|
||||
index 920f4c767..7fec83387 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityComplexPart.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityComplexPart.java
|
||||
@@ -47,4 +47,11 @@ public class EntityComplexPart extends Entity {
|
||||
@@ -310,7 +310,7 @@ index 920f4c7671..7fec83387a 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
index d6baddb9d3..db15c65ce6 100644
|
||||
index d6baddb9d..db15c65ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCow.java
|
||||
@@ -11,9 +11,22 @@ public class EntityCow extends EntityAnimal {
|
||||
@@ -393,8 +393,118 @@ index d6baddb9d3..db15c65ce6 100644
|
||||
}
|
||||
this.world.addEntity(mooshroom);
|
||||
this.die();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
index 848944230..cd37a3276 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
|
||||
@@ -18,21 +18,89 @@ public class EntityCreeper extends EntityMonster {
|
||||
public int maxFuseTicks = 30;
|
||||
public int explosionRadius = 3;
|
||||
private int bz;
|
||||
+ // Purpur start
|
||||
+ private int spacebarCharge = 0;
|
||||
+ private int prevSpacebarCharge = 0;
|
||||
+ private int powerToggleDelay = 0;
|
||||
+ // Purpur end
|
||||
|
||||
public EntityCreeper(EntityTypes<? extends EntityCreeper> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isRidable() {
|
||||
+ return world.purpurConfig.creeperRidable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.creeperRidableInWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void mobTick() {
|
||||
+ if (powerToggleDelay > 0) {
|
||||
+ powerToggleDelay--;
|
||||
+ }
|
||||
+ if (hasRider()) {
|
||||
+ if (getRider().getForward() != 0 || getRider().getStrafe() != 0) {
|
||||
+ spacebarCharge = 0;
|
||||
+ setIgnited(false);
|
||||
+ }
|
||||
+ if (spacebarCharge == prevSpacebarCharge) {
|
||||
+ spacebarCharge = 0;
|
||||
+ }
|
||||
+ prevSpacebarCharge = spacebarCharge;
|
||||
+ }
|
||||
+ super.mobTick();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void onMount(EntityHuman entityhuman) {
|
||||
+ super.onMount(entityhuman);
|
||||
+ setIgnited(false);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean onSpacebar() {
|
||||
+ if (powerToggleDelay > 0) {
|
||||
+ return true; // just toggled power, do not jump or ignite
|
||||
+ }
|
||||
+ spacebarCharge++;
|
||||
+ if (spacebarCharge > maxFuseTicks - 2) {
|
||||
+ spacebarCharge = 0;
|
||||
+ if (getRider().getBukkitEntity().hasPermission("allow.powered.creeper")) {
|
||||
+ powerToggleDelay = 20;
|
||||
+ setPowered(!isPowered());
|
||||
+ setIgnited(false);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!isIgnited()) {
|
||||
+ if (hasRider() && getRider().getForward() == 0 && getRider().getStrafe() == 0 &&
|
||||
+ getRider().getBukkitEntity().hasPermission("allow.special.creeper")) {
|
||||
+ setIgnited(true);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return getForward() == 0 && getStrafe() == 0; // do not jump if standing still
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
this.goalSelector.a(1, new PathfinderGoalFloat(this));
|
||||
this.goalSelector.a(2, new PathfinderGoalSwell(this));
|
||||
+ this.goalSelector.a(3, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityOcelot.class, 6.0F, 1.0D, 1.2D));
|
||||
this.goalSelector.a(3, new PathfinderGoalAvoidTarget<>(this, EntityCat.class, 6.0F, 1.0D, 1.2D));
|
||||
this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1.0D, false));
|
||||
this.goalSelector.a(5, new PathfinderGoalRandomStrollLand(this, 0.8D));
|
||||
this.goalSelector.a(6, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
|
||||
this.goalSelector.a(6, new PathfinderGoalRandomLookaround(this));
|
||||
+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, new Class[0]));
|
||||
}
|
||||
@@ -163,6 +231,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
return (Integer) this.datawatcher.get(EntityCreeper.b);
|
||||
}
|
||||
|
||||
+ public void setSwellDirection(int i) { a(i); } // Purpur - OBFHELPER
|
||||
public void a(int i) {
|
||||
this.datawatcher.set(EntityCreeper.b, i);
|
||||
}
|
||||
@@ -263,6 +332,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
com.destroystokyo.paper.event.entity.CreeperIgniteEvent event = new com.destroystokyo.paper.event.entity.CreeperIgniteEvent((org.bukkit.entity.Creeper) getBukkitEntity(), ignited);
|
||||
if (event.callEvent()) {
|
||||
this.datawatcher.set(EntityCreeper.d, event.isIgnited());
|
||||
+ if (!event.isIgnited()) setSwellDirection(-1); // Purpur
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
index 455b1d9225..46b08e9813 100644
|
||||
index 455b1d922..46b08e981 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
@@ -19,6 +19,18 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity {
|
||||
@@ -452,7 +562,7 @@ index 455b1d9225..46b08e9813 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 245fc38def..a629a6caec 100644
|
||||
index 245fc38de..a629a6cae 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -30,9 +30,22 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable {
|
||||
@@ -518,9 +628,103 @@ index 245fc38def..a629a6caec 100644
|
||||
+ this.a(EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEndermite.java b/src/main/java/net/minecraft/server/EntityEndermite.java
|
||||
index a85489d56..24d68bbb5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEndermite.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEndermite.java
|
||||
@@ -12,14 +12,28 @@ public class EntityEndermite extends EntityMonster {
|
||||
this.f = 3;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isRidable() {
|
||||
+ return world.purpurConfig.endermiteRidable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.endermiteRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
this.goalSelector.a(1, new PathfinderGoalFloat(this));
|
||||
+ this.goalSelector.a(1, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, 1.0D, false));
|
||||
this.goalSelector.a(3, new PathfinderGoalRandomStrollLand(this, 1.0D));
|
||||
this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
||||
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a());
|
||||
+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // Purpur - decompile error
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEvoker.java b/src/main/java/net/minecraft/server/EntityEvoker.java
|
||||
index c37c2930e..d332d7ece 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEvoker.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEvoker.java
|
||||
@@ -12,10 +12,23 @@ public class EntityEvoker extends EntityIllagerWizard {
|
||||
this.f = 10;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isRidable() {
|
||||
+ return world.purpurConfig.evokerRidable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.evokerRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected void initPathfinder() {
|
||||
super.initPathfinder();
|
||||
this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||
+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.goalSelector.a(1, new EntityEvoker.b());
|
||||
this.goalSelector.a(2, new PathfinderGoalAvoidTarget<>(this, EntityHuman.class, 8.0F, 0.6D, 1.0D));
|
||||
this.goalSelector.a(4, new EntityEvoker.c());
|
||||
@@ -24,6 +37,7 @@ public class EntityEvoker extends EntityIllagerWizard {
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomStroll(this, 0.6D));
|
||||
this.goalSelector.a(9, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 3.0F, 1.0F));
|
||||
this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
|
||||
+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this)); // Purpur
|
||||
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // Purpur - decompile error
|
||||
this.targetSelector.a(2, (new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)).a(300));
|
||||
this.targetSelector.a(3, (new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)).a(300));
|
||||
@@ -105,6 +119,7 @@ public class EntityEvoker extends EntityIllagerWizard {
|
||||
|
||||
public d() {
|
||||
super();
|
||||
+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - wolololo spell
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,6 +198,7 @@ public class EntityEvoker extends EntityIllagerWizard {
|
||||
private c() {
|
||||
super();
|
||||
this.e = (new PathfinderTargetCondition()).a(16.0D).c().e().a().b();
|
||||
+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - summon spell
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -237,6 +253,7 @@ public class EntityEvoker extends EntityIllagerWizard {
|
||||
|
||||
private a() {
|
||||
super();
|
||||
+ this.a(java.util.EnumSet.of(PathfinderGoal.Type.TARGET)); // Purpur - attack with spell
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
index 90b01adbec..26de8c3ad6 100644
|
||||
index 90b01adbe..26de8c3ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
@@ -55,6 +55,39 @@ public class EntityFox extends EntityAnimal {
|
||||
@@ -643,8 +847,39 @@ index 90b01adbec..26de8c3ad6 100644
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHoglin.java b/src/main/java/net/minecraft/server/EntityHoglin.java
|
||||
index be8b07a7d..4f98c1d2a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHoglin.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHoglin.java
|
||||
@@ -21,6 +21,18 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
|
||||
this.f = 5;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isRidable() {
|
||||
+ return world.purpurConfig.hoglinRidable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.hoglinRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return !this.isLeashed();
|
||||
@@ -84,6 +96,7 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin {
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
this.world.getMethodProfiler().enter("hoglinBrain");
|
||||
+ if (getRider() == null) // Purpur - only use brain if no rider
|
||||
this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
|
||||
this.world.getMethodProfiler().exit();
|
||||
HoglinAI.a(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
|
||||
index adf414b479..a6c2119be9 100644
|
||||
index adf414b47..a6c2119be 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorse.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
|
||||
@@ -12,6 +12,13 @@ public class EntityHorse extends EntityHorseAbstract {
|
||||
@@ -662,7 +897,7 @@ index adf414b479..a6c2119be9 100644
|
||||
protected void eL() {
|
||||
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue((double) this.fq());
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseAbstract.java b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
index c9ab80ccd1..94fd1b14f3 100644
|
||||
index c9ab80ccd..94fd1b14f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseAbstract.java
|
||||
@@ -39,12 +39,27 @@ public abstract class EntityHorseAbstract extends EntityAnimal implements IInven
|
||||
@@ -694,7 +929,7 @@ index c9ab80ccd1..94fd1b14f3 100644
|
||||
this.goalSelector.a(1, new PathfinderGoalTame(this, 1.2D));
|
||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D, EntityHorseAbstract.class));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseDonkey.java b/src/main/java/net/minecraft/server/EntityHorseDonkey.java
|
||||
index d349e8a34b..01672ed635 100644
|
||||
index d349e8a34..01672ed63 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseDonkey.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseDonkey.java
|
||||
@@ -8,6 +8,13 @@ public class EntityHorseDonkey extends EntityHorseChestedAbstract {
|
||||
@@ -712,7 +947,7 @@ index d349e8a34b..01672ed635 100644
|
||||
protected SoundEffect getSoundAmbient() {
|
||||
super.getSoundAmbient();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseMule.java b/src/main/java/net/minecraft/server/EntityHorseMule.java
|
||||
index 5105418c42..4d45976d7c 100644
|
||||
index 5105418c4..4d45976d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseMule.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseMule.java
|
||||
@@ -8,6 +8,13 @@ public class EntityHorseMule extends EntityHorseChestedAbstract {
|
||||
@@ -730,7 +965,7 @@ index 5105418c42..4d45976d7c 100644
|
||||
protected SoundEffect getSoundAmbient() {
|
||||
super.getSoundAmbient();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||
index 43e605f682..ca8f73c752 100644
|
||||
index 43e605f68..ca8f73c75 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||
@@ -12,6 +12,18 @@ public class EntityHorseSkeleton extends EntityHorseAbstract {
|
||||
@@ -771,7 +1006,7 @@ index 43e605f682..ca8f73c752 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseZombie.java b/src/main/java/net/minecraft/server/EntityHorseZombie.java
|
||||
index 0cbdccf4c5..19a21ff98d 100644
|
||||
index 0cbdccf4c..19a21ff98 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseZombie.java
|
||||
@@ -8,6 +8,18 @@ public class EntityHorseZombie extends EntityHorseAbstract {
|
||||
@@ -801,7 +1036,7 @@ index 0cbdccf4c5..19a21ff98d 100644
|
||||
+ protected void eW() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 8def5fbfb4..fe6ff77935 100644
|
||||
index 8def5fbfb..fe6ff7793 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -67,8 +67,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -891,7 +1126,7 @@ index 8def5fbfb4..fe6ff77935 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||
index ab0731c2a0..2da50ef495 100644
|
||||
index ab0731c2a..2da50ef49 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
|
||||
@@ -22,9 +22,22 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable {
|
||||
@@ -942,7 +1177,7 @@ index ab0731c2a0..2da50ef495 100644
|
||||
float f1 = 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index cb9fdfd114..22b13896d0 100644
|
||||
index cb9fdfd11..22b13896d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -458,7 +458,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -964,7 +1199,7 @@ index cb9fdfd114..22b13896d0 100644
|
||||
|
||||
if (this.hasEffect(MobEffects.JUMP)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
index cf31920850..15efaffe24 100644
|
||||
index cf3192085..15efaffe2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||
@@ -18,7 +18,46 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
|
||||
@@ -1040,7 +1275,7 @@ index cf31920850..15efaffe24 100644
|
||||
|
||||
return i == -1 ? null : EnumColor.fromColorIndex(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLlamaTrader.java b/src/main/java/net/minecraft/server/EntityLlamaTrader.java
|
||||
index 11008c4323..de8ce2fd39 100644
|
||||
index 11008c432..de8ce2fd3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLlamaTrader.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLlamaTrader.java
|
||||
@@ -11,6 +11,23 @@ public class EntityLlamaTrader extends EntityLlama {
|
||||
@@ -1068,7 +1303,7 @@ index 11008c4323..de8ce2fd39 100644
|
||||
protected EntityLlama fA() {
|
||||
return (EntityLlama) EntityTypes.TRADER_LLAMA.a(this.world);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
index ecbdc65ec5..a36e7d182f 100644
|
||||
index ecbdc65ec..a36e7d182 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
|
||||
@@ -20,6 +20,18 @@ public class EntityMushroomCow extends EntityCow implements IShearable {
|
||||
@@ -1109,7 +1344,7 @@ index ecbdc65ec5..a36e7d182f 100644
|
||||
|
||||
Pair<MobEffectList, Integer> pair = (Pair) optional.get();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
|
||||
index 9c1f019f91..366acbfd91 100644
|
||||
index 9c1f019f9..366acbfd9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
|
||||
@@ -16,6 +16,18 @@ public class EntityOcelot extends EntityAnimal {
|
||||
@@ -1147,7 +1382,7 @@ index 9c1f019f91..366acbfd91 100644
|
||||
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, false, false, EntityTurtle.bv));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPanda.java b/src/main/java/net/minecraft/server/EntityPanda.java
|
||||
index 42df0d74ee..271e82ce17 100644
|
||||
index 42df0d74e..271e82ce1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPanda.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPanda.java
|
||||
@@ -46,6 +46,27 @@ public class EntityPanda extends EntityAnimal {
|
||||
@@ -1283,7 +1518,7 @@ index 42df0d74ee..271e82ce17 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
index cf2df391a9..9bd4cdf138 100644
|
||||
index cf2df391a..9bd4cdf13 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPig.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPig.java
|
||||
@@ -19,9 +19,22 @@ public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable {
|
||||
@@ -1310,7 +1545,7 @@ index cf2df391a9..9bd4cdf138 100644
|
||||
this.goalSelector.a(3, new PathfinderGoalBreed(this, 1.0D));
|
||||
this.goalSelector.a(4, new PathfinderGoalTempt(this, 1.2D, RecipeItemStack.a(Items.CARROT_ON_A_STICK), false));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java
|
||||
index 39bfb227e9..ea0e6028db 100644
|
||||
index 39bfb227e..ea0e6028d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPigZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java
|
||||
@@ -21,6 +21,18 @@ public class EntityPigZombie extends EntityZombie implements IEntityAngerable {
|
||||
@@ -1333,10 +1568,10 @@ index 39bfb227e9..ea0e6028db 100644
|
||||
public void setAngerTarget(@Nullable UUID uuid) {
|
||||
this.by = uuid;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPiglin.java b/src/main/java/net/minecraft/server/EntityPiglin.java
|
||||
index 63fa1581eb..6b3218e209 100644
|
||||
index 63fa1581e..4809a8dce 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPiglin.java
|
||||
@@ -31,6 +31,24 @@ public class EntityPiglin extends EntityMonster implements ICrossbow {
|
||||
@@ -31,6 +31,18 @@ public class EntityPiglin extends EntityMonster implements ICrossbow {
|
||||
this.a(PathType.DAMAGE_FIRE, -1.0F);
|
||||
}
|
||||
|
||||
@@ -1350,19 +1585,21 @@ index 63fa1581eb..6b3218e209 100644
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.piglinRidableInWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected void initPathfinder() {
|
||||
+ this.goalSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this));
|
||||
+ this.targetSelector.a(0, new net.pl3x.purpur.pathfinder.PathfinderGoalHasRider(this));
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
public void saveData(NBTTagCompound nbttagcompound) {
|
||||
super.saveData(nbttagcompound);
|
||||
@@ -236,6 +248,7 @@ public class EntityPiglin extends EntityMonster implements ICrossbow {
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
this.world.getMethodProfiler().enter("piglinBrain");
|
||||
+ if (getRider() == null) // Purpur - only use brain if no rider
|
||||
this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error
|
||||
this.world.getMethodProfiler().exit();
|
||||
PiglinAI.b(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPolarBear.java b/src/main/java/net/minecraft/server/EntityPolarBear.java
|
||||
index 6506e00557..05e5fb07a7 100644
|
||||
index 6506e0055..05e5fb07a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPolarBear.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPolarBear.java
|
||||
@@ -16,11 +16,35 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable {
|
||||
@@ -1438,7 +1675,7 @@ index 6506e00557..05e5fb07a7 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
index 1be0f943b0..8a8e745846 100644
|
||||
index 1be0f943b..8a8e74584 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
|
||||
@@ -60,7 +60,7 @@ public class EntityRabbit extends EntityAnimal {
|
||||
@@ -1451,7 +1688,7 @@ index 1be0f943b0..8a8e745846 100644
|
||||
double d0 = this.moveController.c();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
|
||||
index a5532e49e7..adfed0997f 100644
|
||||
index a5532e49e..adfed0997 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySheep.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
|
||||
@@ -17,7 +17,7 @@ import org.bukkit.inventory.InventoryView;
|
||||
@@ -1488,7 +1725,7 @@ index a5532e49e7..adfed0997f 100644
|
||||
this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
|
||||
this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.1D, RecipeItemStack.a(Items.WHEAT), false));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
index a4642cc739..ecf2059b00 100644
|
||||
index a4642cc73..ecf2059b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
@@ -324,7 +324,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
@@ -1501,7 +1738,7 @@ index a4642cc739..ecf2059b00 100644
|
||||
|
||||
this.setMot(vec3d.x, (double) this.dI(), vec3d.z);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
index dfe615814d..a9c44967b2 100644
|
||||
index dfe615814..a9c44967b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
|
||||
@@ -13,13 +13,27 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt
|
||||
@@ -1560,7 +1797,7 @@ index dfe615814d..a9c44967b2 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java
|
||||
index f6a6772002..be1189d57c 100644
|
||||
index f6a677200..be1189d57 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySpider.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySpider.java
|
||||
@@ -11,14 +11,28 @@ public class EntitySpider extends EntityMonster {
|
||||
@@ -1593,7 +1830,7 @@ index f6a6772002..be1189d57c 100644
|
||||
this.targetSelector.a(2, new EntitySpider.PathfinderGoalSpiderNearestAttackableTarget<>(this, EntityHuman.class));
|
||||
this.targetSelector.a(3, new EntitySpider.PathfinderGoalSpiderNearestAttackableTarget<>(this, EntityIronGolem.class));
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityStrider.java b/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
index c123e9fe97..4cb4f60fd4 100644
|
||||
index c123e9fe9..4cb4f60fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityStrider.java
|
||||
@@ -28,6 +28,18 @@ public class EntityStrider extends EntityAnimal implements ISteerable, ISaddleab
|
||||
@@ -1633,7 +1870,7 @@ index c123e9fe97..4cb4f60fd4 100644
|
||||
if (flag && !this.isSilent()) {
|
||||
this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_STRIDER_EAT, this.getSoundCategory(), 1.0F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTameableAnimal.java b/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||
index 9b0d937f06..0b0cca4e35 100644
|
||||
index 9b0d937f0..0b0cca4e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTameableAnimal.java
|
||||
@@ -130,6 +130,7 @@ public abstract class EntityTameableAnimal extends EntityAnimal {
|
||||
@@ -1645,7 +1882,7 @@ index 9b0d937f06..0b0cca4e35 100644
|
||||
return entityliving == this.getOwner();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
index 86de40d15b..903940feb6 100644
|
||||
index 86de40d15..903940feb 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
|
||||
@@ -75,8 +75,19 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
|
||||
@@ -1669,7 +1906,7 @@ index 86de40d15b..903940feb6 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
index 9985afb124..2f59c1c91a 100644
|
||||
index 9985afb12..2f59c1c91 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
|
||||
@@ -23,6 +23,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
|
||||
@@ -1698,7 +1935,7 @@ index 9985afb124..2f59c1c91a 100644
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return world.purpurConfig.villagerTraderCanBeLeashed && !this.isLeashed();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
index 5b519fa394..927d308254 100644
|
||||
index 5b519fa39..927d30825 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
|
||||
@@ -33,9 +33,27 @@ public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable
|
||||
@@ -1737,8 +1974,69 @@ index 5b519fa394..927d308254 100644
|
||||
this.targetSelector.a(1, new PathfinderGoalOwnerHurtByTarget(this));
|
||||
this.targetSelector.a(2, new PathfinderGoalOwnerHurtTarget(this));
|
||||
this.targetSelector.a(3, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZoglin.java b/src/main/java/net/minecraft/server/EntityZoglin.java
|
||||
index 28adbbebd..05ba24a3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZoglin.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZoglin.java
|
||||
@@ -21,6 +21,18 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin {
|
||||
this.f = 5;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean isRidable() {
|
||||
+ return world.purpurConfig.zoglinRidable;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isRidableInWater() {
|
||||
+ return world.purpurConfig.zoglinRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected BehaviorController.b<EntityZoglin> cJ() {
|
||||
return BehaviorController.a((Collection) EntityZoglin.c, (Collection) EntityZoglin.b);
|
||||
@@ -52,7 +64,7 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin {
|
||||
}
|
||||
|
||||
private Optional<? extends EntityLiving> eP() {
|
||||
- return ((List) this.getBehaviorController().getMemory(MemoryModuleType.VISIBLE_MOBS).orElse(ImmutableList.of())).stream().filter(EntityZoglin::j).findFirst();
|
||||
+ return (this.getBehaviorController().getMemory(MemoryModuleType.VISIBLE_MOBS).orElse(ImmutableList.of())).stream().filter(EntityZoglin::j).findFirst(); // Purpur - decompile error
|
||||
}
|
||||
|
||||
private static boolean j(EntityLiving entityliving) {
|
||||
@@ -130,14 +142,14 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin {
|
||||
|
||||
@Override
|
||||
public BehaviorController<EntityZoglin> getBehaviorController() {
|
||||
- return super.getBehaviorController();
|
||||
+ return (BehaviorController<EntityZoglin>) super.getBehaviorController(); // Purpur decompile error
|
||||
}
|
||||
|
||||
protected void eM() {
|
||||
- Activity activity = (Activity) this.bn.f().orElse((Object) null);
|
||||
+ Activity activity = this.bn.f().orElse(null); // Purpur - decompile error
|
||||
|
||||
- this.bn.a((List) ImmutableList.of(Activity.FLIGHT, Activity.IDLE));
|
||||
- Activity activity1 = (Activity) this.bn.f().orElse((Object) null);
|
||||
+ this.bn.a(ImmutableList.of(Activity.FLIGHT, Activity.IDLE)); // Purpur - decompile error
|
||||
+ Activity activity1 = this.bn.f().orElse(null); // Purpur - decompile error
|
||||
|
||||
if (activity1 == Activity.FLIGHT && activity != Activity.FLIGHT) {
|
||||
this.eO();
|
||||
@@ -149,7 +161,8 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin {
|
||||
@Override
|
||||
protected void mobTick() {
|
||||
this.world.getMethodProfiler().enter("zoglinBrain");
|
||||
- this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this);
|
||||
+ if (getRider() == null) // Purpur - only use brain if no rider
|
||||
+ this.getBehaviorController().a((WorldServer) this.world, this); // Purpur - decompile error
|
||||
this.world.getMethodProfiler().exit();
|
||||
this.eM();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 307a208602..f32814a0bd 100644
|
||||
index 307a20860..f32814a0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -45,11 +45,25 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -1768,7 +2066,7 @@ index 307a208602..f32814a0bd 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombieHusk.java b/src/main/java/net/minecraft/server/EntityZombieHusk.java
|
||||
index 2daff85620..1130a7712d 100644
|
||||
index 2daff8562..1130a7712 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombieHusk.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombieHusk.java
|
||||
@@ -9,6 +9,16 @@ public class EntityZombieHusk extends EntityZombie {
|
||||
@@ -1789,7 +2087,7 @@ index 2daff85620..1130a7712d 100644
|
||||
public boolean jockeyOnlyBaby() {
|
||||
return world.purpurConfig.huskJockeyOnlyBaby;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
||||
index 68fca8a8d7..abb40c89de 100644
|
||||
index 68fca8a8d..abb40c89d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
|
||||
@@ -27,6 +27,18 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo
|
||||
@@ -1812,7 +2110,7 @@ index 68fca8a8d7..abb40c89de 100644
|
||||
protected void initDatawatcher() {
|
||||
super.initDatawatcher();
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 494d36085e..9cde3693c5 100644
|
||||
index 494d36085..9cde3693c 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -132,10 +132,12 @@ public class PurpurConfig {
|
||||
@@ -1829,10 +2127,10 @@ index 494d36085e..9cde3693c5 100644
|
||||
|
||||
public static String serverModName = "Purpur";
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 2f5bc77e03..69f895ca9e 100644
|
||||
index 2f5bc77e0..54ca92db8 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -266,22 +266,41 @@ public class PurpurWorldConfig {
|
||||
@@ -266,36 +266,68 @@ public class PurpurWorldConfig {
|
||||
turtleEggsBreakFromMinecarts = getBoolean("blocks.turtle_egg.break-from-minecarts", turtleEggsBreakFromMinecarts);
|
||||
}
|
||||
|
||||
@@ -1874,7 +2172,14 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
cowFeedMushrooms = getInt("mobs.cow.feed-mushrooms-for-mooshroom", cowFeedMushrooms);
|
||||
}
|
||||
|
||||
@@ -292,10 +311,19 @@ public class PurpurWorldConfig {
|
||||
+ public boolean creeperRidable = false;
|
||||
+ public boolean creeperRidableInWater = false;
|
||||
public boolean creeperAllowGriefing = true;
|
||||
public double creeperChargedChance = 0.0D;
|
||||
private void creeperSettings() {
|
||||
+ creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable);
|
||||
+ creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater);
|
||||
creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing);
|
||||
creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
|
||||
}
|
||||
|
||||
@@ -1894,7 +2199,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
drownedJockeyOnlyBaby = getBoolean("mobs.drowned.jockey.only-babies", drownedJockeyOnlyBaby);
|
||||
drownedJockeyChance = getDouble("mobs.drowned.jockey.chance", drownedJockeyChance);
|
||||
drownedJockeyTryExistingChickens = getBoolean("mobs.drowned.jockey.try-existing-chickens", drownedJockeyTryExistingChickens);
|
||||
@@ -310,13 +338,21 @@ public class PurpurWorldConfig {
|
||||
@@ -310,13 +342,35 @@ public class PurpurWorldConfig {
|
||||
enderDragonMaxHealth = getDouble("mobs.ender_dragon.max-health", enderDragonMaxHealth);
|
||||
}
|
||||
|
||||
@@ -1907,6 +2212,20 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
endermanAllowGriefing = getBoolean("mobs.enderman.allow-griefing", endermanAllowGriefing);
|
||||
}
|
||||
|
||||
+ public boolean endermiteRidable = false;
|
||||
+ public boolean endermiteRidableInWater = false;
|
||||
+ private void endermiteSettings() {
|
||||
+ endermiteRidable = getBoolean("mobs.endermite.ridable", endermiteRidable);
|
||||
+ endermiteRidableInWater = getBoolean("mobs.endermite.ridable-in-water", endermiteRidableInWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean evokerRidable = false;
|
||||
+ public boolean evokerRidableInWater = false;
|
||||
+ private void evokerSettings() {
|
||||
+ evokerRidable = getBoolean("mobs.evoker.ridable", evokerRidable);
|
||||
+ evokerRidableInWater = getBoolean("mobs.evoker.ridable-in-water", evokerRidableInWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean foxRidable = false;
|
||||
+ public boolean foxRidableInWater = false;
|
||||
public boolean foxTypeChangesWithTulips = false;
|
||||
@@ -1916,10 +2235,17 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
|
||||
}
|
||||
|
||||
@@ -337,10 +373,19 @@ public class PurpurWorldConfig {
|
||||
@@ -337,10 +391,26 @@ public class PurpurWorldConfig {
|
||||
giantHaveHostileAI = getBoolean("mobs.giant.have-hostile-ai", giantHaveHostileAI);
|
||||
}
|
||||
|
||||
+ public boolean hoglinRidable = false;
|
||||
+ public boolean hoglinRidableInWater = false;
|
||||
+ private void hoglinSettings() {
|
||||
+ hoglinRidable = getBoolean("mobs.hoglin.ridable", hoglinRidable);
|
||||
+ hoglinRidableInWater = getBoolean("mobs.hoglin.ridable-in-water", hoglinRidableInWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean horseRidableInWater = false;
|
||||
+ private void horseSettings() {
|
||||
+ horseRidableInWater = getBoolean("mobs.horse.ridable-in-water", horseRidableInWater);
|
||||
@@ -1936,7 +2262,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
huskJockeyOnlyBaby = getBoolean("mobs.husk.jockey.only-babies", huskJockeyOnlyBaby);
|
||||
huskJockeyChance = getDouble("mobs.husk.jockey.chance", huskJockeyChance);
|
||||
huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens);
|
||||
@@ -355,11 +400,55 @@ public class PurpurWorldConfig {
|
||||
@@ -355,11 +425,55 @@ public class PurpurWorldConfig {
|
||||
illusionerFollowRange = getDouble("mobs.illusioner.follow-range", illusionerFollowRange);
|
||||
}
|
||||
|
||||
@@ -1992,7 +2318,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
public double phantomAttackedByCrystalRadius = 0.0D;
|
||||
public float phantomAttackedByCrystalDamage = 1.0F;
|
||||
public double phantomOrbitCrystalRadius = 0.0D;
|
||||
@@ -393,14 +482,29 @@ public class PurpurWorldConfig {
|
||||
@@ -393,14 +507,29 @@ public class PurpurWorldConfig {
|
||||
phantomSpawnMaxPerAttempt = getInt("mobs.phantom.spawn.per-attempt.max", phantomSpawnMaxPerAttempt);
|
||||
}
|
||||
|
||||
@@ -2022,7 +2348,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
polarBearBreedableItemString = getString("mobs.polar_bear.breedable-item", polarBearBreedableItemString);
|
||||
Item item = IRegistry.ITEM.get(new MinecraftKey(polarBearBreedableItemString));
|
||||
if (item != Items.AIR) polarBearBreedableItem = item;
|
||||
@@ -413,13 +517,49 @@ public class PurpurWorldConfig {
|
||||
@@ -413,13 +542,49 @@ public class PurpurWorldConfig {
|
||||
rabbitNaturalKiller = getDouble("mobs.rabbit.spawn-killer-rabbit-chance", rabbitNaturalKiller);
|
||||
}
|
||||
|
||||
@@ -2072,7 +2398,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
public int villagerBrainTicks = 1;
|
||||
public boolean villagerUseBrainTicksOnlyWhenLagging = true;
|
||||
public boolean villagerCanBeLeashed = false;
|
||||
@@ -428,6 +568,8 @@ public class PurpurWorldConfig {
|
||||
@@ -428,6 +593,8 @@ public class PurpurWorldConfig {
|
||||
public int villagerSpawnIronGolemRadius = 0;
|
||||
public int villagerSpawnIronGolemLimit = 0;
|
||||
private void villagerSettings() {
|
||||
@@ -2081,7 +2407,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
villagerBrainTicks = getInt("mobs.villager.brain-ticks", villagerBrainTicks);
|
||||
villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
|
||||
villagerCanBeLeashed = getBoolean("mobs.villager.can-be-leashed", villagerCanBeLeashed);
|
||||
@@ -437,9 +579,13 @@ public class PurpurWorldConfig {
|
||||
@@ -437,9 +604,13 @@ public class PurpurWorldConfig {
|
||||
villagerSpawnIronGolemLimit = getInt("mobs.villager.spawn-iron-golem.limit", villagerSpawnIronGolemLimit);
|
||||
}
|
||||
|
||||
@@ -2095,7 +2421,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
villagerTraderCanBeLeashed = getBoolean("mobs.wandering_trader.can-be-leashed", villagerTraderCanBeLeashed);
|
||||
villagerTraderFollowEmeraldBlock = getBoolean("mobs.wandering_trader.follow-emerald-blocks", villagerTraderFollowEmeraldBlock);
|
||||
}
|
||||
@@ -449,35 +595,58 @@ public class PurpurWorldConfig {
|
||||
@@ -449,35 +620,65 @@ public class PurpurWorldConfig {
|
||||
witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
|
||||
}
|
||||
|
||||
@@ -2106,6 +2432,13 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
+ wolfRidableInWater = getBoolean("mobs.wolf.ridable-in-water", wolfRidableInWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean zoglinRidable = false;
|
||||
+ public boolean zoglinRidableInWater = false;
|
||||
+ private void zoglinSettings() {
|
||||
+ zoglinRidable = getBoolean("mobs.zoglin.ridable", zoglinRidable);
|
||||
+ zoglinRidableInWater = getBoolean("mobs.zoglin.ridable-in-water", zoglinRidableInWater);
|
||||
+ }
|
||||
+
|
||||
+ public boolean zombieRidable = false;
|
||||
+ public boolean zombieRidableInWater = false;
|
||||
public boolean zombieTargetTurtleEggs = true;
|
||||
@@ -2156,7 +2489,7 @@ index 2f5bc77e03..69f895ca9e 100644
|
||||
zombieVillagerJockeyTryExistingChickens = getBoolean("mobs.zombie_villager.jockey.try-existing-chickens", zombieVillagerJockeyTryExistingChickens);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
||||
new file mode 100644
|
||||
index 0000000000..828e1b8730
|
||||
index 000000000..828e1b873
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java
|
||||
@@ -0,0 +1,75 @@
|
||||
@@ -2237,7 +2570,7 @@ index 0000000000..828e1b8730
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java
|
||||
new file mode 100644
|
||||
index 0000000000..6086f63119
|
||||
index 000000000..6086f6311
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java
|
||||
@@ -0,0 +1,86 @@
|
||||
@@ -2329,7 +2662,7 @@ index 0000000000..6086f63119
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java
|
||||
new file mode 100644
|
||||
index 0000000000..6e50344c07
|
||||
index 000000000..6e50344c0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHasRider.java
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -2356,7 +2689,7 @@ index 0000000000..6e50344c07
|
||||
+}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java
|
||||
new file mode 100644
|
||||
index 0000000000..fb18f72a6a
|
||||
index 000000000..fb18f72a6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/pl3x/purpur/pathfinder/PathfinderGoalHorseHasRider.java
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -2382,7 +2715,7 @@ index 0000000000..fb18f72a6a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 309e7f6ee7..2d9320b059 100644
|
||||
index 309e7f6ee..2d9320b05 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1125,4 +1125,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
Reference in New Issue
Block a user