Add toggle for always placing the dragon egg

This commit is contained in:
William Blake Galbreath 2020-11-26 11:47:24 +00:00
parent 92507ca231
commit d4892b5c73

View File

@ -35,6 +35,15 @@
this.dragonUUID = null;
}
}
@@ -404,7 +410,7 @@
this.dragonEvent.setVisible(false);
this.spawnExitPortal(true);
this.spawnNewGateway();
- if (!this.previouslyKilled) {
+ if (this.level.paperConfig().entities.behavior.enderDragonsDeathAlwaysPlacesDragonEgg || !this.previouslyKilled) { // Paper - Add toggle for always placing the dragon egg
this.level.setBlockAndUpdate(this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.origin)), Blocks.DRAGON_EGG.defaultBlockState());
}
@@ -469,6 +475,7 @@
entityenderdragon.moveTo((double) this.origin.getX(), (double) (128 + this.origin.getY()), (double) this.origin.getZ(), this.level.random.nextFloat() * 360.0F, 0.0F);
this.level.addFreshEntity(entityenderdragon);