@@ 220-229 (lines=10) @@ | ||
217 | this.lobbyTemplate = initTemplate(lobbyId, lobbyResource, proceduralArenaType.lobbyOffset); |
|
218 | } |
|
219 | ||
220 | private void initShellTemplate(ProceduralArenaType proceduralArenaType) { |
|
221 | ||
222 | var shellId = new Identifier(LasertagMod.ID, ArenaType.PROCEDURAL.nbtFileId.getPath() + "/" + proceduralArenaType.mapFolderName + "/shell.litematic"); |
|
223 | var shellResource = ResourceManagers.STRUCTURE_RESOURCE_MANAGER.get(shellId); |
|
224 | ||
225 | if (shellResource == null) { |
|
226 | throw new RuntimeException("Could not find shell resource '" + shellId.getPath() + "' for arena '" + proceduralArenaType.translatableName + "'"); |
|
227 | } |
|
228 | ||
229 | this.shellTemplate = initTemplate(shellId, shellResource, BlockPos.ORIGIN.subtract(arenaStartPos.add(-1, -1, -1))); |
|
230 | } |
|
231 | ||
232 | private StructureTemplate initTemplate(Identifier resourceId, Resource resource, Vec3i offset) { |
|
@@ 208-217 (lines=10) @@ | ||
205 | .toList(); |
|
206 | } |
|
207 | ||
208 | private void initLobbyTemplate(ProceduralArenaType proceduralArenaType) { |
|
209 | ||
210 | var lobbyId = new Identifier(LasertagMod.ID, ArenaType.PROCEDURAL.nbtFileId.getPath() + "/" + proceduralArenaType.mapFolderName + "/lobby.litematic"); |
|
211 | var lobbyResource = ResourceManagers.STRUCTURE_RESOURCE_MANAGER.get(lobbyId); |
|
212 | ||
213 | if (lobbyResource == null) { |
|
214 | throw new RuntimeException("Could not find lobby resource '" + lobbyId.getPath() + "' for arena '" + proceduralArenaType.translatableName + "'"); |
|
215 | } |
|
216 | ||
217 | this.lobbyTemplate = initTemplate(lobbyId, lobbyResource, proceduralArenaType.lobbyOffset); |
|
218 | } |
|
219 | ||
220 | private void initShellTemplate(ProceduralArenaType proceduralArenaType) { |