Further Seed Customisation

Allow server admins that really want to to customise the seeds used in world generation even further.

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2014-07-04 13:28:45 +10:00
parent 4a1b3a723a
commit c4d2bdfd85
7 changed files with 183 additions and 6 deletions

View File

@@ -68,12 +68,12 @@
+ slimes.add(converted);
+ }
+ // CraftBukkit end
}
+ }
+ // CraftBukkit start
+ if (CraftEventFactory.callEntityTransformEvent(this, slimes, EntityTransformEvent.TransformReason.SPLIT).isCancelled()) {
+ super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
+ return;
+ }
}
+ for (LivingEntity living : slimes) {
+ this.level().addFreshEntity(living, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SLIME_SPLIT); // CraftBukkit - SpawnReason
+ }
@@ -85,3 +85,12 @@
}
@Override
@@ -300,7 +342,7 @@
}
ChunkPos chunkcoordintpair = new ChunkPos(pos);
- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), 987234911L).nextInt(10) == 0;
+ boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);