mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Update to 1.14.1
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a506f042b4448e27fce1e3ceae3b77bbdc9c654f Mon Sep 17 00:00:00 2001
|
||||
From 832abc735f332df25b27e9c94013125a9e0b8b82 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 11 May 2019 01:31:50 -0500
|
||||
Subject: [PATCH] Villager shops
|
||||
@@ -13,7 +13,7 @@ Subject: [PATCH] Villager shops
|
||||
create mode 100644 src/main/java/net/minecraft/server/EntityVillagerShop.java
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 181e92980..24bcbce01 100644
|
||||
index 73116e48f..8c67110c8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -118,6 +118,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -40,20 +40,20 @@ index 181e92980..24bcbce01 100644
|
||||
return IRegistry.ENTITY_TYPE.getKey(entitytypes);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
index 7cc31be17..4fd1b0eca 100644
|
||||
index d78528696..8c75daee2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerAbstract.java
|
||||
@@ -54,6 +54,7 @@ public abstract class EntityVillagerAbstract extends EntityAgeable implements NP
|
||||
@@ -68,6 +68,7 @@ public abstract class EntityVillagerAbstract extends EntityAgeable implements NP
|
||||
return this.tradingPlayer;
|
||||
}
|
||||
|
||||
+ public boolean hasTrader() { return dX(); } // Purpur - OBFHELPER
|
||||
public boolean dX() {
|
||||
+ public boolean hasTrader() { return dY(); } // Purpur - OBFHELPER
|
||||
public boolean dY() {
|
||||
return this.tradingPlayer != null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVillagerShop.java b/src/main/java/net/minecraft/server/EntityVillagerShop.java
|
||||
new file mode 100644
|
||||
index 000000000..d45165fd7
|
||||
index 000000000..eb7213217
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVillagerShop.java
|
||||
@@ -0,0 +1,227 @@
|
||||
@@ -70,7 +70,7 @@ index 000000000..d45165fd7
|
||||
+ private BlockPosition home;
|
||||
+
|
||||
+ public EntityVillagerShop(EntityTypes<? extends EntityVillager> entitytypes, World world) {
|
||||
+ this(EntityTypes.VILLAGER, world, VillagerType.c);
|
||||
+ this(EntityTypes.VILLAGER, world, VillagerType.PLAINS);
|
||||
+ }
|
||||
+
|
||||
+ public EntityVillagerShop(EntityTypes<? extends EntityVillager> entitytypes, World world, VillagerType villagertype) {
|
||||
@@ -95,7 +95,7 @@ index 000000000..d45165fd7
|
||||
+ @Override
|
||||
+ protected void initDatawatcher() {
|
||||
+ super.initDatawatcher();
|
||||
+ this.datawatcher.register(VILLAGER_DATA, new VillagerData(VillagerType.c, VillagerProfession.NONE, 1));
|
||||
+ this.datawatcher.register(VILLAGER_DATA, new VillagerData(VillagerType.PLAINS, VillagerProfession.NONE, 1));
|
||||
+ }
|
||||
+
|
||||
+ public void setVillagerData(VillagerData villagerdata) {
|
||||
@@ -144,7 +144,7 @@ index 000000000..d45165fd7
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean dZ() { // showProfessionProgressBar
|
||||
+ public boolean ea() { // showProfessionProgressBar
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
@@ -155,7 +155,7 @@ index 000000000..d45165fd7
|
||||
+ itemstack.a(entityhuman, this, enumhand);
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (itemstack.getItem() != Items.VILLAGER_SPAWN_EGG && this.isAlive() && !this.dX() && !this.isSleeping()) {
|
||||
+ if (itemstack.getItem() != Items.VILLAGER_SPAWN_EGG && this.isAlive() && !this.dY() && !this.isSleeping()) {
|
||||
+ if (enumhand == EnumHand.MAIN_HAND) {
|
||||
+ entityhuman.a(StatisticList.TALKED_TO_VILLAGER);
|
||||
+ }
|
||||
@@ -285,10 +285,10 @@ index 000000000..d45165fd7
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 583f2c5ad..87cb34519 100644
|
||||
index 1bf7ead71..46a6511f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -126,6 +126,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -125,6 +125,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ index 583f2c5ad..87cb34519 100644
|
||||
public boolean a(double d0, double d1, double d2, double d3) {
|
||||
return this.a(this.a(d0, d1, d2), d3);
|
||||
}
|
||||
@@ -280,6 +281,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -258,6 +259,7 @@ public abstract class NavigationAbstract {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user