@@ -17,13 +17,13 @@
|
||||
@@ -34,7 +41,8 @@
|
||||
}
|
||||
|
||||
if (world.getType(blockposition).a((IBlockAccess) world, blockposition, EntityTypes.ZOMBIE_PIGMAN)) {
|
||||
- Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(world, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false);
|
||||
if (worldserver.getType(blockposition).a((IBlockAccess) worldserver, blockposition, EntityTypes.ZOMBIE_PIGMAN)) {
|
||||
- Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false);
|
||||
+ // CraftBukkit - set spawn reason to NETHER_PORTAL
|
||||
+ Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(world, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
|
||||
+ Entity entity = EntityTypes.ZOMBIE_PIGMAN.spawnCreature(worldserver, (NBTTagCompound) null, (IChatBaseComponent) null, (EntityHuman) null, blockposition.up(), EnumMobSpawn.STRUCTURE, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
|
||||
|
||||
if (entity != null) {
|
||||
entity.portalCooldown = entity.aX();
|
||||
entity.portalCooldown = entity.ba();
|
||||
@@ -48,8 +56,10 @@
|
||||
BlockPortal.Shape blockportal_shape = this.b(generatoraccess, blockposition);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -85,6 +95,10 @@
|
||||
@@ -80,6 +90,10 @@
|
||||
@Override
|
||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) {
|
||||
@@ -48,7 +48,7 @@
|
||||
entity.c(blockposition);
|
||||
}
|
||||
|
||||
@@ -177,6 +191,7 @@
|
||||
@@ -172,6 +186,7 @@
|
||||
private BlockPosition position;
|
||||
private int height;
|
||||
private int width;
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
public Shape(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
|
||||
this.a = generatoraccess;
|
||||
@@ -235,6 +250,9 @@
|
||||
@@ -230,6 +245,9 @@
|
||||
}
|
||||
|
||||
protected int c() {
|
||||
@@ -66,7 +66,7 @@
|
||||
int i;
|
||||
|
||||
label56:
|
||||
@@ -257,11 +275,21 @@
|
||||
@@ -252,11 +270,21 @@
|
||||
block = this.a.getType(blockposition.shift(this.d)).getBlock();
|
||||
if (block != Blocks.OBSIDIAN) {
|
||||
break label56;
|
||||
@@ -88,7 +88,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,6 +299,11 @@
|
||||
@@ -266,6 +294,11 @@
|
||||
if (this.a.getType(this.position.shift(this.c, i).up(this.height)).getBlock() != Blocks.OBSIDIAN) {
|
||||
this.height = 0;
|
||||
break;
|
||||
@@ -100,7 +100,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,7 +327,29 @@
|
||||
@@ -289,7 +322,29 @@
|
||||
return this.position != null && this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
for (int i = 0; i < this.width; ++i) {
|
||||
BlockPosition blockposition = this.position.shift(this.c, i);
|
||||
|
||||
@@ -303,6 +358,7 @@
|
||||
@@ -298,6 +353,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user