summaryrefslogtreecommitdiffstats
path: root/nms-patches/WorldGenVillagePieces.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/WorldGenVillagePieces.patch')
-rw-r--r--nms-patches/WorldGenVillagePieces.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/nms-patches/WorldGenVillagePieces.patch b/nms-patches/WorldGenVillagePieces.patch
index 021d1768..6f5ae761 100644
--- a/nms-patches/WorldGenVillagePieces.patch
+++ b/nms-patches/WorldGenVillagePieces.patch
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/WorldGenVillagePieces.java
+++ b/net/minecraft/server/WorldGenVillagePieces.java
-@@ -269,10 +269,10 @@
+@@ -238,10 +238,10 @@
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
@@ -14,8 +14,8 @@
+ nbttagcompound.setInt("CD", Block.REGISTRY.a(this.d));
}
- protected void b(NBTTagCompound nbttagcompound) {
-@@ -402,8 +402,8 @@
+ protected void a(NBTTagCompound nbttagcompound, DefinedStructureManager definedstructuremanager) {
+@@ -371,8 +371,8 @@
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
@@ -25,19 +25,19 @@
+ nbttagcompound.setInt("CB", Block.REGISTRY.a(this.b));
}
- protected void b(NBTTagCompound nbttagcompound) {
-@@ -1701,14 +1701,14 @@
- entityzombie.prepare(world.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
- entityzombie.setVillagerType(EnumZombieType.b(this.c(i1, 0)));
- entityzombie.cQ();
-- world.addEntity(entityzombie);
-+ world.addEntity(entityzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
+ protected void a(NBTTagCompound nbttagcompound, DefinedStructureManager definedstructuremanager) {
+@@ -1672,14 +1672,14 @@
+ entityzombievillager.prepare(world.D(new BlockPosition(entityzombievillager)), (GroupDataEntity) null);
+ entityzombievillager.setProfession(this.c(i1, 0));
+ entityzombievillager.cS();
+- world.addEntity(entityzombievillager);
++ world.addEntity(entityzombievillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
} else {
EntityVillager entityvillager = new EntityVillager(world);
entityvillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
- entityvillager.prepare(world.D(new BlockPosition(entityvillager)), (GroupDataEntity) null);
- entityvillager.setProfession(this.c(i1, entityvillager.getProfession()));
+ entityvillager.setProfession(this.c(i1, world.random.nextInt(6)));
+ entityvillager.a(world.D(new BlockPosition(entityvillager)), (GroupDataEntity) null, false);
- world.addEntity(entityvillager);
+ world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
}