Paper/nms-patches/WorldGenVillagePieces.patch

46 lines
2.6 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/WorldGenVillagePieces.java
+++ b/net/minecraft/server/WorldGenVillagePieces.java
2016-11-17 02:41:03 +01:00
@@ -238,10 +238,10 @@
2016-02-29 22:32:46 +01:00
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
- nbttagcompound.setInt("CA", Block.REGISTRY.a((Object) this.a));
- nbttagcompound.setInt("CB", Block.REGISTRY.a((Object) this.b));
- nbttagcompound.setInt("CC", Block.REGISTRY.a((Object) this.c));
- nbttagcompound.setInt("CD", Block.REGISTRY.a((Object) this.d));
+ nbttagcompound.setInt("CA", Block.REGISTRY.a(this.a));
+ nbttagcompound.setInt("CB", Block.REGISTRY.a(this.b));
+ nbttagcompound.setInt("CC", Block.REGISTRY.a(this.c));
+ nbttagcompound.setInt("CD", Block.REGISTRY.a(this.d));
}
2016-11-17 02:41:03 +01:00
protected void a(NBTTagCompound nbttagcompound, DefinedStructureManager definedstructuremanager) {
@@ -371,8 +371,8 @@
2016-02-29 22:32:46 +01:00
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
- nbttagcompound.setInt("CA", Block.REGISTRY.a((Object) this.a));
- nbttagcompound.setInt("CB", Block.REGISTRY.a((Object) this.b));
+ nbttagcompound.setInt("CA", Block.REGISTRY.a(this.a));
+ nbttagcompound.setInt("CB", Block.REGISTRY.a(this.b));
}
2016-11-17 02:41:03 +01:00
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
2016-06-09 03:43:49 +02:00
} else {
EntityVillager entityvillager = new EntityVillager(world);
entityvillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
2016-11-17 02:41:03 +01:00
entityvillager.setProfession(this.c(i1, world.random.nextInt(6)));
entityvillager.a(world.D(new BlockPosition(entityvillager)), (GroupDataEntity) null, false);
2016-06-09 03:43:49 +02:00
- world.addEntity(entityvillager);
+ world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
}
2015-02-26 23:41:06 +01:00
}