mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 22:10:18 +00:00
Poplar
This commit is contained in:
1 parent
2fa0853e42
commit
8e3ef1b651
45 files changed
+1036
-36
No files matched your search
@@ -323,6 +323,9 @@ final class DecoratorCore {
|
||||
int xf, int zf, int realX, int realZ,
|
||||
int height, int max, Hunk<NativeBlockState> data,
|
||||
RNG rng, IrisData irisData, EngineMantle mantle) {
|
||||
if (!hasFloatingSurface(data, xf, height, zf)) {
|
||||
return;
|
||||
}
|
||||
NativeBlockState bd = decorator.pickBlockData(rng, irisData, realX, realZ);
|
||||
if (bd == null) {
|
||||
return;
|
||||
@@ -367,6 +370,9 @@ final class DecoratorCore {
|
||||
int xf, int zf, int realX, int realZ,
|
||||
int height, int max, Hunk<NativeBlockState> data,
|
||||
RNG rng, IrisData irisData, EngineMantle mantle) {
|
||||
if (!hasFloatingSurface(data, xf, height, zf)) {
|
||||
return 0;
|
||||
}
|
||||
int stack = decorator.getHeight(rng, realX, realZ, irisData);
|
||||
if (decorator.isScaleStack()) {
|
||||
stack = Math.min((int) Math.ceil((double) max * ((double) stack / 100)), decorator.getAbsoluteMaxStack());
|
||||
@@ -413,6 +419,14 @@ final class DecoratorCore {
|
||||
return placed;
|
||||
}
|
||||
|
||||
private static boolean hasFloatingSurface(Hunk<NativeBlockState> data, int x, int height, int z) {
|
||||
if (height < 0 || height >= data.getHeight()) {
|
||||
return false;
|
||||
}
|
||||
NativeBlockState surface = data.get(x, height, z);
|
||||
return B.isSolid(surface);
|
||||
}
|
||||
|
||||
static NativeBlockState fixFacesForHunk(NativeBlockState b, Hunk<NativeBlockState> hunk, int rX, int rZ,
|
||||
int x, int y, int z, EngineMantle mantle) {
|
||||
if (!B.isVineBlock(b)) {
|
||||
|
||||
@@ -26,6 +26,8 @@ public enum IrisTreeProfile {
|
||||
OAK,
|
||||
@Description("Slim upright broadleaf crown.")
|
||||
BIRCH,
|
||||
@Description("Upright broadleaf crown with a rounded upper canopy and a tapered top.")
|
||||
POPLAR,
|
||||
@Description("Narrow conifer cone.")
|
||||
SPRUCE,
|
||||
@Description("Tall thin crown concentrated near the very top.")
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ public final class TreeDecoratorApplier {
|
||||
|
||||
private static void trunkSurface(TreeBlockCanvas canvas, IrisTreeDecorator dec, int idx, RNG rng) {
|
||||
int[][] sides = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
|
||||
String[] facings = {"west", "east", "north", "south"};
|
||||
String[] facings = {"east", "west", "south", "north"};
|
||||
for (TreeBlockCanvas.Vec v : new KList<>(canvas.getTrunk())) {
|
||||
for (int i = 0; i < sides.length; i++) {
|
||||
int nx = v.x() + sides[i][0];
|
||||
@@ -104,7 +104,7 @@ public final class TreeDecoratorApplier {
|
||||
|
||||
private static void leafSurface(TreeBlockCanvas canvas, IrisTreeDecorator dec, int idx, RNG rng) {
|
||||
int[][] sides = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
|
||||
String[] facings = {"west", "east", "north", "south"};
|
||||
String[] facings = {"east", "west", "south", "north"};
|
||||
for (TreeBlockCanvas.Vec v : new KList<>(canvas.getLeaf())) {
|
||||
for (int i = 0; i < sides.length; i++) {
|
||||
int nx = v.x() + sides[i][0];
|
||||
|
||||
@@ -27,6 +27,7 @@ public final class TreeProfiles {
|
||||
return switch (profile) {
|
||||
case OAK, DARK_OAK, CHERRY -> 1.0;
|
||||
case BIRCH -> 0.7;
|
||||
case POPLAR -> 0.8;
|
||||
case SPRUCE -> 0.55;
|
||||
case JUNGLE -> 0.45;
|
||||
case ACACIA -> 0.6;
|
||||
@@ -44,6 +45,7 @@ public final class TreeProfiles {
|
||||
return switch (profile) {
|
||||
case OAK -> new double[][]{{0.55, 0.6}, {0.65, 0.9}, {0.75, 1.0}, {0.85, 0.9}, {0.92, 0.65}, {0.98, 0.35}};
|
||||
case BIRCH -> new double[][]{{0.6, 0.45}, {0.7, 0.75}, {0.8, 0.85}, {0.88, 0.75}, {0.94, 0.45}, {0.99, 0.2}};
|
||||
case POPLAR -> new double[][]{{0.5, 0.35}, {0.62, 0.7}, {0.74, 1.0}, {0.84, 0.95}, {0.93, 0.65}, {1.0, 0.3}};
|
||||
case SPRUCE, MEGA_SPRUCE -> new double[][]{{0.3, 1.0}, {0.42, 0.85}, {0.54, 0.7}, {0.65, 0.55}, {0.75, 0.4}, {0.84, 0.25}, {0.91, 0.15}, {0.97, 0.05}};
|
||||
case JUNGLE -> new double[][]{{0.82, 0.4}, {0.88, 0.8}, {0.93, 1.0}, {0.97, 0.7}, {1.0, 0.3}};
|
||||
case ACACIA -> new double[][]{{0.9, 0.5}, {0.95, 0.8}, {0.99, 0.4}};
|
||||
|
||||
@@ -224,7 +224,7 @@ public class IrisPostModifier extends EngineAssignedModifier<NativeBlockState> {
|
||||
}
|
||||
|
||||
// Slab
|
||||
if (slabs && !river) {
|
||||
if (slabs && !river && isSolid(x, h, z, originX, originZ, currentData)) {
|
||||
//@builder
|
||||
if ((ha == h + 1 && isSolidNonSlab(x + 1, ha, z, originX, originZ, currentData))
|
||||
|| (hb == h + 1 && isSolidNonSlab(x, hb, z + 1, originX, originZ, currentData))
|
||||
|
||||
@@ -92,6 +92,7 @@ public final class RuntimeUiMessages {
|
||||
public static final TextKey DUST_COPY_BUTTON = TextKey.of("iris.runtime.dust.copy_button", "[Click to copy these stats]");
|
||||
public static final TextKey DUST_COPY_HOVER = TextKey.of("iris.runtime.dust.copy_hover", "Copy block stats to clipboard");
|
||||
public static final TextKey DUST_REVEAL_FAILED = TextKey.of("iris.runtime.dust.reveal_failed", "Object reveal failed; see the console for details.");
|
||||
public static final TextKey DUST_BIOME_LOADING = TextKey.of("iris.runtime.dust.biome_loading", "Saved biome information is loading. Try revealing this block again shortly.");
|
||||
public static final TextKey WHAT_MATERIAL = TextKey.of("iris.runtime.what.material", "Material: {material}");
|
||||
public static final TextKey WHAT_FULL_STATE = TextKey.of("iris.runtime.what.full_state", "Full: {state}");
|
||||
public static final TextKey WHAT_ITEM_COUNT = TextKey.of("iris.runtime.what.item_count", "Count: {count}");
|
||||
@@ -222,6 +223,7 @@ public final class RuntimeUiMessages {
|
||||
DUST_COPY_BUTTON,
|
||||
DUST_COPY_HOVER,
|
||||
DUST_REVEAL_FAILED,
|
||||
DUST_BIOME_LOADING,
|
||||
WHAT_MATERIAL,
|
||||
WHAT_FULL_STATE,
|
||||
WHAT_ITEM_COUNT,
|
||||
|
||||
@@ -36,6 +36,7 @@ import art.arcane.volmlib.util.math.RNG;
|
||||
import art.arcane.volmlib.util.localization.MessageArgument;
|
||||
import art.arcane.iris.platform.bukkit.plugin.VolmitSender;
|
||||
import art.arcane.iris.world.task.J;
|
||||
import art.arcane.iris.world.history.SavedBiomeUnavailableException;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
@@ -135,7 +136,16 @@ public class DustRevealer {
|
||||
Engine access = generator.getEngine();
|
||||
|
||||
if (access != null) {
|
||||
describe(access, world, block, sender);
|
||||
try {
|
||||
describe(access, world, block, sender);
|
||||
} catch (SavedBiomeUnavailableException unavailable) {
|
||||
if (!unavailable.isLoading()) {
|
||||
IrisLogging.reportError(unavailable);
|
||||
}
|
||||
sender.sendMessage(IrisLanguage.text(unavailable.isLoading()
|
||||
? RuntimeUiMessages.DUST_BIOME_LOADING : RuntimeUiMessages.DUST_REVEAL_FAILED));
|
||||
return;
|
||||
}
|
||||
|
||||
String a = access.getObjectPlacementKey(block.getX(), block.getY() - block.getWorld().getMinHeight(), block.getZ());
|
||||
if (a != null) {
|
||||
@@ -339,6 +349,8 @@ public class DustRevealer {
|
||||
private static <T> T safe(Supplier<T> supplier) {
|
||||
try {
|
||||
return supplier.get();
|
||||
} catch (SavedBiomeUnavailableException unavailable) {
|
||||
throw unavailable;
|
||||
} catch (Throwable e) {
|
||||
IrisLogging.reportError(e);
|
||||
return null;
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Gesamt: +{wood} Holz ({branches} Äste), {converted} Blätter->Holz, ~
|
||||
position_set = "Position {position} auf {x}, {y}, {z} gesetzt"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Die gespeicherten Biominformationen werden geladen. Versuche in Kürze erneut, diesen Block zu untersuchen."
|
||||
iris_world_required = "Diese Dimension wurde nicht von Iris generiert."
|
||||
found_object = "Objekt {object} gefunden"
|
||||
revealed = "{count} Block/Blöcke von {object} aufgedeckt"
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Totales: +{wood} de madera ({branches} ramas), {converted} hojas->made
|
||||
position_set = "Posición {position} fijada en {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Se está cargando la información guardada del bioma. Vuelve a intentar revelar este bloque dentro de unos instantes."
|
||||
iris_world_required = "Esta dimensión no fue generada por Iris."
|
||||
found_object = "Objeto encontrado: {object}"
|
||||
revealed = "Se revelaron {count} bloque(s) de {object}"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "Yhteensä: +{wood} puu ({branches} konttorit), {converted} Lehti->puu{
|
||||
position_set = "Sijainti {position} asetettu {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Tallennettuja biomitietoja ladataan. Yritä paljastaa tämän lohkon tiedot uudelleen hetken kuluttua."
|
||||
iris_world_required = "Iris ei ole luonut tätä ulottuvuutta."
|
||||
found_object = "Löytyi {object}"
|
||||
revealed = "{object}:n paljastamat {count}-katkokset"
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Totaux : +{wood} bois ({branches} branches), {converted} feuilles->boi
|
||||
position_set = "Position {position} définie sur {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Les informations enregistrées du biome sont en cours de chargement. Réessaie de révéler ce bloc dans quelques instants."
|
||||
iris_world_required = "Cette dimension n'a pas été générée par Iris."
|
||||
found_object = "Objet trouvé : {object}"
|
||||
revealed = "{count} bloc(s) de {object} révélés"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "סיכומים:+{wood} עץ ({branches} סניפים) {converted} הע
|
||||
position_set = "מיקום {position} להגדיר {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "נתוני הביומה השמורים נטענים. נסו לחשוף את הבלוק הזה שוב בעוד רגע."
|
||||
iris_world_required = "ממד זה לא נוצר על ידי Iris."
|
||||
found_object = "אובייקט {object}"
|
||||
revealed = "נחשף {count} בלוקים (s) {object}"
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Totale: +{wood} legno ({branches} rami), {converted} foglie->legno, ~{
|
||||
position_set = "Posizione {position} impostata a {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Caricamento delle informazioni salvate sul bioma in corso. Riprova a rivelare questo blocco tra qualche istante."
|
||||
iris_world_required = "Questa dimensione non è stata generata da Iris."
|
||||
found_object = "Oggetto trovato {object}"
|
||||
revealed = "Rivelato {count} blocco(i) di {object}"
|
||||
|
||||
@@ -1381,6 +1381,7 @@ totals = "合計: 木材 +{wood}(枝 {branches})、葉 -> 木材 {converted}
|
||||
position_set = "選択位置 {position} を {x}, {y}, {z} に設定しました"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "保存されたバイオーム情報を読み込んでいます。少し待ってから、このブロックの情報を再度確認してください。"
|
||||
iris_world_required = "このディメンションは Iris によって生成されていません。"
|
||||
found_object = "オブジェクト {object} が見つかりました"
|
||||
revealed = "{object} のブロックを {count} 個表示しました"
|
||||
|
||||
@@ -1381,6 +1381,7 @@ totals = "합계: 나무 +{wood}개(가지 {branches}개), 잎->나무 {converte
|
||||
position_set = "선택 위치 {position}을(를) {x}, {y}, {z}(으)로 설정했습니다"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "저장된 바이옴 정보를 불러오는 중입니다. 잠시 후 이 블록의 정보를 다시 확인해 주세요."
|
||||
iris_world_required = "이 차원은 Iris가 생성하지 않았습니다."
|
||||
found_object = "오브젝트 {object} 발견"
|
||||
revealed = "{object}의 블록 {count}개를 드러냈습니다"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "Iš viso: +{wood} medienos ({branches} filialai), {converted} Lapai->m
|
||||
position_set = "Padėtis {position} nustatyti {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Įkeliama išsaugota biomo informacija. Netrukus pabandyk dar kartą atskleisti šio bloko informaciją."
|
||||
iris_world_required = "Šio matmens nesugeneravo Iris."
|
||||
found_object = "Rastas objektas {object}"
|
||||
revealed = "Atšaldytas {count} blokas (-iai) {object}"
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Totaal: +{wood} hout ({branches} takken), {converted} Bladeren->hout,
|
||||
position_set = "Positie {position} ingesteld op {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "De opgeslagen bioominformatie wordt geladen. Probeer dit blok over enkele ogenblikken opnieuw te onthullen."
|
||||
iris_world_required = "Deze dimensie is niet door Iris gegenereerd."
|
||||
found_object = "Object gevonden {object}"
|
||||
revealed = "Onthuld {count} blok(s) van {object}"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "Suma: +{wood} drewno ({branches} ), {converted} liści->drewno, ~{dist
|
||||
position_set = "Pozycja {position} ustawiony na {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Trwa wczytywanie zapisanych informacji o biomie. Za chwilę spróbuj ponownie ujawnić informacje o tym bloku."
|
||||
iris_world_required = "Ten wymiar nie został wygenerowany przez Iris."
|
||||
found_object = "Znaleziono obiekt {object}"
|
||||
revealed = "Ujawnione {count} blok (-y) {object}"
|
||||
|
||||
@@ -1378,6 +1378,7 @@ totals = "Total: +{wood} Madeira ({branches} ramos), {converted} folhas->madeira
|
||||
position_set = "Posição {position} definir para {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "As informações guardadas do bioma estão a ser carregadas. Tenta revelar este bloco novamente dentro de instantes."
|
||||
iris_world_required = "Esta dimensão não foi gerada pelo Iris."
|
||||
found_object = "Objeto encontrado {object}"
|
||||
revealed = "Revogado {count} bloco( s) de {object}"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "Итоги: +{wood}древесина{branches}ветви,{converted}
|
||||
position_set = "Позиция {position} устанавливать {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Сохранённые сведения о биоме загружаются. Попробуйте снова раскрыть информацию об этом блоке через несколько секунд."
|
||||
iris_world_required = "Это измерение не было создано Iris."
|
||||
found_object = "Найден объект {object}"
|
||||
revealed = "раскрытый {count} блок(ы) {object}"
|
||||
|
||||
@@ -1383,6 +1383,7 @@ totals = "Toplamlar: +{wood} wood ({branches} şubeler) {converted} Yapraklar->A
|
||||
position_set = "Pozisyon pozisyonu {position} set toplan {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Kaydedilmiş biyom bilgileri yükleniyor. Bu bloğu açığa çıkarmayı kısa bir süre sonra tekrar deneyin."
|
||||
iris_world_required = "Bu boyut Iris tarafından oluşturulmadı."
|
||||
found_object = "bulundu object bulunamadı {object}"
|
||||
revealed = "Ortaya çıktı {count} blok (s) {object}"
|
||||
|
||||
@@ -1381,6 +1381,7 @@ totals = "Tổng: +{wood} gỗ ({branches} chi nhánh), {converted} để lại-
|
||||
position_set = "Vị trí {position} đặt {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "Đang tải thông tin quần xã sinh vật đã lưu. Hãy thử khám phá lại khối này sau giây lát."
|
||||
iris_world_required = "Chiều không gian này không được Iris tạo ra."
|
||||
found_object = "Đối tượng đã tìm {object}"
|
||||
revealed = "Đã tiết lộ{count}khối{object}"
|
||||
|
||||
@@ -1381,6 +1381,7 @@ totals = "共计:+{wood} 木材({branches} 分部门), {converted} 叶->木头,~
|
||||
position_set = "立场 {position} 设置为 {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "正在加载已保存的生物群系信息。请稍后再次尝试揭示此方块的信息。"
|
||||
iris_world_required = "此维度不是由 Iris 生成的。"
|
||||
found_object = "找到对象 {object}"
|
||||
revealed = "被揭露{count}区块{object}"
|
||||
|
||||
@@ -1381,6 +1381,7 @@ totals = "共計:+{wood} 木材({branches} 分部門), {converted} 葉->木頭,~
|
||||
position_set = "立場 {position} 設定為 {x}, {y}, {z}"
|
||||
|
||||
[iris.runtime.dust]
|
||||
biome_loading = "正在載入已儲存的生態域資訊。請稍後再次嘗試揭示此方塊的資訊。"
|
||||
iris_world_required = "此維度不是由 Iris 生成的。"
|
||||
found_object = "找到物件 {object}"
|
||||
revealed = "被揭露{count}區塊{object}"
|
||||
|
||||
Reference in new issue
Block a user