mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
Reduce ridables patch by using object inheritance more
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
From e0c7eb5d24016ff2501d6375be196188724376dd Mon Sep 17 00:00:00 2001
|
||||
From 43efafd95754423de1ddcfbc5c5e2bba5bb230b6 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 12 May 2019 00:43:12 -0500
|
||||
Subject: [PATCH] Make giants naturally spawn and have AI
|
||||
|
||||
---
|
||||
.../java/net/minecraft/server/BiomeBase.java | 1 +
|
||||
.../java/net/minecraft/server/Biomes.java | 23 ++++++++++++++++++
|
||||
.../minecraft/server/EntityGiantZombie.java | 24 ++++++++++++++++++-
|
||||
3 files changed, 47 insertions(+), 1 deletion(-)
|
||||
.../java/net/minecraft/server/Biomes.java | 23 ++++++++++++++++
|
||||
.../minecraft/server/EntityGiantZombie.java | 26 ++++++++++++++++++-
|
||||
3 files changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index 72eb669c5..f1500f7a0 100644
|
||||
@@ -55,13 +55,14 @@ index 317db4b12..69ba98b66 100644
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityGiantZombie.java b/src/main/java/net/minecraft/server/EntityGiantZombie.java
|
||||
index e9962c2a7..5c44c794c 100644
|
||||
index 19b8312f2..1731e0fe3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityGiantZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityGiantZombie.java
|
||||
@@ -27,6 +27,28 @@ public class EntityGiantZombie extends EntityMonster {
|
||||
@@ -23,8 +23,32 @@ public class EntityGiantZombie extends EntityMonster {
|
||||
this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(50.0D);
|
||||
}
|
||||
|
||||
// Purpur start
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ protected void initPathfinder() {
|
||||
+ this.goalSelector.a(0, new PathfinderGoalFloat(this));
|
||||
@@ -83,12 +84,8 @@ index e9962c2a7..5c44c794c 100644
|
||||
+ // 1.0 makes bottom of feet about as high as their waist when they jump
|
||||
+ return 1.0F;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
public boolean a(EntityHuman entityhuman, EnumHand enumhand) { // processInteract
|
||||
return super.a(entityhuman, enumhand) || tryRide(entityhuman, enumhand);
|
||||
@@ -35,6 +57,6 @@ public class EntityGiantZombie extends EntityMonster {
|
||||
|
||||
@Override
|
||||
public float a(BlockPosition blockposition, IWorldReader iworldreader) {
|
||||
- return iworldreader.w(blockposition) - 0.5F;
|
||||
|
||||
Reference in New Issue
Block a user