From 9d604b2d25b065d80dcddea1e8cff60f2a289b7e Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Wed, 7 Jul 2021 23:27:32 +0300 Subject: [PATCH] Raw thallasium, more ore tweaks --- .../blocks/complex/MetalMaterial.java | 20 ++++++++++++++---- .../ru/betterend/registry/EndFeatures.java | 4 ++-- .../assets/betterend/lang/en_us.json | 1 + .../assets/betterend/lang/ru_ru.json | 1 + .../textures/item/thallasium_raw.png | Bin 0 -> 254 bytes 5 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/assets/betterend/textures/item/thallasium_raw.png diff --git a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java index 1fdb2f5f..d9526eb9 100644 --- a/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java +++ b/src/main/java/ru/betterend/blocks/complex/MetalMaterial.java @@ -3,6 +3,7 @@ package ru.betterend.blocks.complex; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.ArmorMaterial; import net.minecraft.world.item.Item; @@ -19,6 +20,7 @@ import ru.bclib.blocks.BaseBlock; import ru.bclib.blocks.BaseChainBlock; import ru.bclib.blocks.BaseDoorBlock; import ru.bclib.blocks.BaseMetalBarsBlock; +import ru.bclib.blocks.BaseOreBlock; import ru.bclib.blocks.BaseSlabBlock; import ru.bclib.blocks.BaseStairsBlock; import ru.bclib.blocks.BaseTrapdoorBlock; @@ -68,6 +70,7 @@ public class MetalMaterial { public final Block anvilBlock; public final Item anvilItem; + public final Item rawOre; public final Item nugget; public final Item ingot; @@ -90,6 +93,8 @@ public class MetalMaterial { public final Item chestplate; public final Item leggings; public final Item boots; + + public final Tag.Named alloyingOre; public static MetalMaterial makeNormal(String name, MaterialColor color, Tier material, ArmorMaterial armor) { return new MetalMaterial(name, true, FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).materialColor(color), EndItems.makeEndItemSettings(), material, armor); @@ -110,8 +115,14 @@ public class MetalMaterial { private MetalMaterial(String name, boolean hasOre, FabricBlockSettings settings, Properties itemSettings, Tier material, ArmorMaterial armor) { BlockBehaviour.Properties lanternProperties = FabricBlockSettings.copyOf(settings).hardness(1).resistance(1).luminance(15).sound(SoundType.LANTERN); final int level = material.getLevel(); - - ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseBlock(FabricBlockSettings.copyOf(Blocks.END_STONE))) : null; + + rawOre = hasOre ? EndItems.registerEndItem(name + "_raw", new ModelProviderItem(itemSettings)) : null; + ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseOreBlock(rawOre, 1, 3, 1)) : null; + alloyingOre = hasOre ? TagAPI.makeItemTag(BetterEnd.MOD_ID, name + "_alloying") : null; + if (hasOre) { + TagHelper.addTag(alloyingOre, ore, rawOre); + } + block = EndBlocks.registerBlock(name + "_block", new BaseBlock(settings)); tile = EndBlocks.registerBlock(name + "_tile", new BaseBlock(settings)); stairs = EndBlocks.registerBlock(name + "_stairs", new BaseStairsBlock(tile)); @@ -153,8 +164,9 @@ public class MetalMaterial { anvilItem = EndItems.registerEndItem(name + "_anvil_item", new EndAnvilItem(anvilBlock)); if (hasOre) { - FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace", ore, ingot).checkConfig(Configs.RECIPE_CONFIG).setGroup("end_ingot").buildWithBlasting(); - AlloyingRecipe.Builder.create(name + "_ingot_alloy").setInput(ore, ore).setOutput(ingot, 3).setExpiriense(2.1F).build(); + FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_ore", ore, ingot).checkConfig(Configs.RECIPE_CONFIG).setGroup("end_ingot").buildWithBlasting(); + FurnaceRecipe.make(BetterEnd.MOD_ID, name + "_ingot_furnace_raw", rawOre, ingot).checkConfig(Configs.RECIPE_CONFIG).setGroup("end_ingot").buildWithBlasting(); + AlloyingRecipe.Builder.create(name + "_ingot_alloy").setInput(alloyingOre, alloyingOre).setOutput(ingot, 3).setExpiriense(2.1F).build(); } // Basic recipes diff --git a/src/main/java/ru/betterend/registry/EndFeatures.java b/src/main/java/ru/betterend/registry/EndFeatures.java index f81838e9..214efdde 100644 --- a/src/main/java/ru/betterend/registry/EndFeatures.java +++ b/src/main/java/ru/betterend/registry/EndFeatures.java @@ -215,8 +215,8 @@ public class EndFeatures { public static final BCLFeature TUNEL_CAVE = BCLFeature.makeChunkFeature(BetterEnd.makeID("tunel_cave"), new TunelCaveFeature()); // Ores // - public static final BCLFeature THALLASIUM_ORE = registerOre("thallasium_ore", EndBlocks.THALLASIUM.ore, 32, 12, 0, 5, 128); - public static final BCLFeature ENDER_ORE = registerOre("ender_ore", EndBlocks.ENDER_ORE, 16, 4, 0, 5, 128); + public static final BCLFeature THALLASIUM_ORE = registerOre("thallasium_ore", EndBlocks.THALLASIUM.ore, 24, 8, 0, 5, 128); + public static final BCLFeature ENDER_ORE = registerOre("ender_ore", EndBlocks.ENDER_ORE, 12, 4, 0, 5, 128); public static final BCLFeature AMBER_ORE = registerOre("amber_ore", EndBlocks.AMBER_ORE, 24, 6, 0, 5, 128); public static final BCLFeature VIOLECITE_LAYER = registerLayer("violecite_layer", EndBlocks.VIOLECITE, 15, 16, 128, 8); public static final BCLFeature FLAVOLITE_LAYER = registerLayer("flavolite_layer", EndBlocks.FLAVOLITE, 12, 16, 128, 6); diff --git a/src/main/resources/assets/betterend/lang/en_us.json b/src/main/resources/assets/betterend/lang/en_us.json index 32e011b0..df012d66 100644 --- a/src/main/resources/assets/betterend/lang/en_us.json +++ b/src/main/resources/assets/betterend/lang/en_us.json @@ -598,6 +598,7 @@ "item.betterend.silk_fiber": "Silk Fiber", "item.betterend.spawn_egg_silk_moth": "Silk Moth Spawn Egg", + "item.betterend.thallasium_raw": "Raw Thallasium", "block.betterend.thallasium_ore": "Thallasium Ore", "item.betterend.thallasium_axe": "Thallasium Axe", "item.betterend.thallasium_hoe": "Thallasium Hoe", diff --git a/src/main/resources/assets/betterend/lang/ru_ru.json b/src/main/resources/assets/betterend/lang/ru_ru.json index 1db5508b..de2fb5b4 100644 --- a/src/main/resources/assets/betterend/lang/ru_ru.json +++ b/src/main/resources/assets/betterend/lang/ru_ru.json @@ -618,6 +618,7 @@ "item.betterend.silk_fiber": "Шёлковое волокно", "item.betterend.spawn_egg_silk_moth": "Яйцо призыва шелковичной моли", + "item.betterend.thallasium_raw": "Необработанный талласий", "block.betterend.thallasium_ore": "Талласиевая руда", "item.betterend.thallasium_axe": "Талласиевый топор", "item.betterend.thallasium_hoe": "Талласиевая мотыга", diff --git a/src/main/resources/assets/betterend/textures/item/thallasium_raw.png b/src/main/resources/assets/betterend/textures/item/thallasium_raw.png new file mode 100644 index 0000000000000000000000000000000000000000..5e88bfa3110110a8877c150e44756a35b8a407e2 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~l>na*S0JsE z)nMK*(`DBBkPZ7Q&tED(f2ryE<<7fTm%O;O@6)~WKOYr8h_(f)<0%R93ugF_0Gvkx z)PUjzo-U3d5>s>iqxlXS@N^aaQP}&x*8R4x@6wO#$0Yhc^1rJnE}NaZr&8zJ;)ZP5 zJ0e?n)^Hs@zp!xn6l-bCTWbW~i0u+NJ?GtL5uGP#PhB>jm;Jn|XGYPa@Q%v1T}rF> qFXz1=>ijJD+?Aw+{~7