From 533dd7c92c14b1911aa5739e28ae628c5c96b5e7 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Sat, 31 Jul 2021 15:44:41 +0300 Subject: [PATCH] Small pot fix, potted inflexia --- .../ru/betterend/blocks/FlowerPotBlock.java | 21 ++++++++++-------- .../assets/betterend/lang/en_us.json | 7 +++++- .../assets/betterend/lang/ru_ru.json | 7 +++++- .../models/block/inflexia_potted.json | 6 +++++ .../textures/block/inflexia_potted.png | Bin 0 -> 173 bytes 5 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 src/main/resources/assets/betterend/models/block/inflexia_potted.json create mode 100644 src/main/resources/assets/betterend/textures/block/inflexia_potted.png diff --git a/src/main/java/ru/betterend/blocks/FlowerPotBlock.java b/src/main/java/ru/betterend/blocks/FlowerPotBlock.java index a8a51abf..b71c9893 100644 --- a/src/main/java/ru/betterend/blocks/FlowerPotBlock.java +++ b/src/main/java/ru/betterend/blocks/FlowerPotBlock.java @@ -381,15 +381,18 @@ public class FlowerPotBlock extends BaseBlockNotFull implements RenderLayerProvi .add(); } else { - for (ResourceLocation location : modelCache.keySet()) { - if (location.getPath().equals(modelPath.getPath())) { - model.part(location) - .setTransformation(offset) - .setCondition(state -> state.getValue(PLANT_ID) == compareID) - .add(); - break; - } - } + ResourceLocation loc = Registry.BLOCK.getKey(plants[i]); + modelPath = new ResourceLocation(loc.getNamespace(), "block/" + loc.getPath() + "_potted"); + Map textures = Maps.newHashMap(); + textures.put("%modid%", loc.getNamespace()); + textures.put("%texture%", loc.getPath()); + Optional pattern = Patterns.createJson(BasePatterns.BLOCK_CROSS, textures); + UnbakedModel unbakedModel = ModelsHelper.fromPattern(pattern); + modelCache.put(modelPath, unbakedModel); + model.part(modelPath) + .setTransformation(offset) + .setCondition(state -> state.getValue(PLANT_ID) == compareID) + .add(); } } diff --git a/src/main/resources/assets/betterend/lang/en_us.json b/src/main/resources/assets/betterend/lang/en_us.json index 657b4fb5..9fc67fff 100644 --- a/src/main/resources/assets/betterend/lang/en_us.json +++ b/src/main/resources/assets/betterend/lang/en_us.json @@ -903,5 +903,10 @@ "block.betterend.umbralith_tiles": "Umbralith Tiles", "block.betterend.umbralith_wall": "Umbralith Wall", - "biome.betterend.umbra_valley": "Umbra Valley" + "biome.betterend.umbra_valley": "Umbra Valley", + "block.betterend.inflexia": "Inflexia", + "block.betterend.pallidium_full": "Pallidium (Full Cover)", + "block.betterend.pallidium_heavy": "Pallidium (Heavy Cover)", + "block.betterend.pallidium_thin": "Pallidium (Thin Cover)", + "block.betterend.pallidium_tiny": "Pallidium (Tiny Cover)" } diff --git a/src/main/resources/assets/betterend/lang/ru_ru.json b/src/main/resources/assets/betterend/lang/ru_ru.json index 9389582e..794514f9 100644 --- a/src/main/resources/assets/betterend/lang/ru_ru.json +++ b/src/main/resources/assets/betterend/lang/ru_ru.json @@ -918,5 +918,10 @@ "block.betterend.umbralith_tiles": "Умбралитовая плитка", "block.betterend.umbralith_wall": "Умбралитовая стена", - "biome.betterend.umbra_valley": "Долина Умбра" + "biome.betterend.umbra_valley": "Долина Умбра", + "block.betterend.inflexia": "Инфлексия", + "block.betterend.pallidium_full": "Паллидиум (полное покрытие)", + "block.betterend.pallidium_heavy": "Паллидиум (густое покрытие)", + "block.betterend.pallidium_thin": "Паллидиум (тонкое покрытие)", + "block.betterend.pallidium_tiny": "Паллидиум (маленькое покрытие)" } \ No newline at end of file diff --git a/src/main/resources/assets/betterend/models/block/inflexia_potted.json b/src/main/resources/assets/betterend/models/block/inflexia_potted.json new file mode 100644 index 00000000..aa15c800 --- /dev/null +++ b/src/main/resources/assets/betterend/models/block/inflexia_potted.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cross", + "textures": { + "cross": "betterend:block/inflexia_potted" + } +} diff --git a/src/main/resources/assets/betterend/textures/block/inflexia_potted.png b/src/main/resources/assets/betterend/textures/block/inflexia_potted.png new file mode 100644 index 0000000000000000000000000000000000000000..ab3e64e5bf54ef31d0256b7e2ce6f0125d8894d2 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~{s5m4S0G*3 zJ$1^;b!+zSJAU8i8$S;`TKM=@VPy?A{?djqeA~E%7-$70W0}kfoNq^Jx zv^}