()
| 115 | } |
| 116 | |
| 117 | public World init() |
| 118 | { |
| 119 | this.mapStorage = new MapStorage(this.saveHandler); |
| 120 | String s = VillageCollection.fileNameForProvider(this.provider); |
| 121 | VillageCollection villagecollection = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, s); |
| 122 | |
| 123 | if (villagecollection == null) |
| 124 | { |
| 125 | this.villageCollectionObj = new VillageCollection(this); |
| 126 | this.mapStorage.setData(s, this.villageCollectionObj); |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | this.villageCollectionObj = villagecollection; |
| 131 | this.villageCollectionObj.setWorldsForAll(this); |
| 132 | } |
| 133 | |
| 134 | this.worldScoreboard = new ServerScoreboard(this.mcServer); |
| 135 | ScoreboardSaveData scoreboardsavedata = (ScoreboardSaveData)this.mapStorage.loadData(ScoreboardSaveData.class, "scoreboard"); |
| 136 | |
| 137 | if (scoreboardsavedata == null) |
| 138 | { |
| 139 | scoreboardsavedata = new ScoreboardSaveData(); |
| 140 | this.mapStorage.setData("scoreboard", scoreboardsavedata); |
| 141 | } |
| 142 | |
| 143 | scoreboardsavedata.setScoreboard(this.worldScoreboard); |
| 144 | ((ServerScoreboard)this.worldScoreboard).func_96547_a(scoreboardsavedata); |
| 145 | this.getWorldBorder().setCenter(this.worldInfo.getBorderCenterX(), this.worldInfo.getBorderCenterZ()); |
| 146 | this.getWorldBorder().setDamageAmount(this.worldInfo.getBorderDamagePerBlock()); |
| 147 | this.getWorldBorder().setDamageBuffer(this.worldInfo.getBorderSafeZone()); |
| 148 | this.getWorldBorder().setWarningDistance(this.worldInfo.getBorderWarningDistance()); |
| 149 | this.getWorldBorder().setWarningTime(this.worldInfo.getBorderWarningTime()); |
| 150 | |
| 151 | if (this.worldInfo.getBorderLerpTime() > 0L) |
| 152 | { |
| 153 | this.getWorldBorder().setTransition(this.worldInfo.getBorderSize(), this.worldInfo.getBorderLerpTarget(), this.worldInfo.getBorderLerpTime()); |
| 154 | } |
| 155 | else |
| 156 | { |
| 157 | this.getWorldBorder().setTransition(this.worldInfo.getBorderSize()); |
| 158 | } |
| 159 | |
| 160 | return this; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Runs a single tick for the world |
nothing calls this directly
no test coverage detected