Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if changing dimensions
- if (! bedIsInThisDim ) {
- // check if in The End dimension and if the dragon is alive
- boolean dragonIsAlive = false;
- if ( originDim == 1 ) { // if in The End ...
- for ( int k = 0; k < world.loadedEntityList.size(); k++ ) {
- Entity it = (Entity) world.loadedEntityList.get(k);
- if ( it instanceof EntityDragon ) {
- dragonIsAlive = true;
- k = world.loadedEntityList.size();
- }
- }
- } // end dragon check
- // if trying to go out of The End
- SpawnCommands.loadMiscConfig();
- if (( originDim == 1 ) && ( bedDim != 1 ) && ( dragonIsAlive ) && (! Do.getConfigArrayValueBoolean(SpawnCommands.miscConfigArray, "AllowToLeaveTheDragon")) )
- { Do.Say(player,"The mighty dragon is in control of this world. You must defeat the dragon or death is your only escape!"); return; }
- // The following is a hack fix that overcomes a problem when directly leaving the end to any other dimension.
- // The problem: when you leave the end to another dimension the world will NOT load.
- // The solution: when you go to another dimension then go to a third one it WILL load, so we go to another one on the way.
- if ( ( originDim == 1 ) && ( bedDim != 1 ) ) {
- if ( bedDim == 0 ) { player.travelToDimension(-1); } else { player.travelToDimension(0); }
- }
- player.travelToDimension(bedDim); // officially change dimension now
- } // end if changing dimensions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement