Skip to content

Commit

Permalink
Vous pouvez maintenant choisir la hauteur de l'ile
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Jan 19, 2024
1 parent 72fe5cb commit 72847bf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .idea/sonarlint/issuestore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/sonarlint/securityhotspotstore/index.pb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fr.euphyllia.skyllia.api.skyblock.model;

public record SchematicWorld(String key, String worldName, String schematicFile) {
public record SchematicWorld(String key, String worldName, double height, String schematicFile) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ private static void schematicIsland() {
String schematicFile = getString(isKey + ".schematic", "./schematics/default.schem");
String worldName = islandStarterEntry.getKey();
String name = getString(isKey + ".name", entry.getKey());
SchematicWorld schematicWorld = new SchematicWorld(name, worldName, schematicFile);
double height = getDouble(isKey + ".height", 64D);
SchematicWorld schematicWorld = new SchematicWorld(name, worldName, height, schematicFile);
schematicWorldMap.put(name.toLowerCase(), schematicWorld);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static Type worldEditVersion() {

public static void pasteSchematicWE(InterneAPI api, Location loc, SchematicWorld schematicWorld) {
try {
loc.setY(schematicWorld.height());
File file = new File(api.getPlugin().getDataFolder() + File.separator + schematicWorld.schematicFile());
ClipboardFormat format = cachedIslandSchematic.getOrDefault(file, ClipboardFormats.findByFile(file));
try (ClipboardReader reader = format.getReader(new FileInputStream(file))) {
Expand Down

0 comments on commit 72847bf

Please sign in to comment.