[add] Crystallized Titan Blood Ore
[add] Crystallized Titan Blood [add] Ore Placement
This commit is contained in:
@@ -1 +1,4 @@
|
|||||||
// 1.21.1 2026-10-16T12:47:44.582744189 Registries
|
// 1.21.1 2026-10-16T17:32:07.979256216 Registries
|
||||||
|
700b25a72289a4bcd855011fdf11ca063d5e8f5c data/ichori/neoforge/biome_modifier/add_crystallized_titan_blood_ore.json
|
||||||
|
ce067366bedbf6197b732a591f2d718d11f54526 data/ichori/worldgen/configured_feature/crystallized_titan_blood_ore.json
|
||||||
|
3a6627a2e1be97d203e3566e0003da62e79815e2 data/ichori/worldgen/placed_feature/crystallized_titan_blood_ore_placed.json
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
// 1.21.1 2026-10-16T12:47:44.582965674 Tags for minecraft:block mod id ichori
|
// 1.21.1 2026-10-16T17:37:22.059655057 Tags for minecraft:block mod id ichori
|
||||||
35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/minecraft/tags/block/mineable/pickaxe.json
|
d708ebc10f30234260a2976f762f93856c5243b1 data/c/tags/block/ores.json
|
||||||
|
d708ebc10f30234260a2976f762f93856c5243b1 data/minecraft/tags/block/mineable/pickaxe.json
|
||||||
|
d708ebc10f30234260a2976f762f93856c5243b1 data/minecraft/tags/block/needs_iron_tool.json
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
// 1.21.1 2026-10-16T12:47:44.582288393 Languages: en_us for mod: ichori
|
// 1.21.1 2026-10-16T17:24:15.602414658 Languages: en_us for mod: ichori
|
||||||
5fbe0d5f50f86e79824a0a050bd84d984933d48e assets/ichori/lang/en_us.json
|
8ef90bc1d96569bc9f92d2c7f353bec776dc940e assets/ichori/lang/en_us.json
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
// 1.21.1 2026-10-16T12:47:44.582476236 Loot Tables
|
// 1.21.1 2026-10-16T17:16:18.405679243 Loot Tables
|
||||||
|
1f490228eed4f1cff55ed6c7efe519127e1122c3 data/ichori/loot_table/blocks/crystallized_titan_blood_ore.json
|
||||||
|
eb924473a46fcd5d5ea51cb29442d20385b5137f data/ichori/loot_table/blocks/magic_tourch.json
|
||||||
|
|||||||
@@ -1 +1,4 @@
|
|||||||
// 1.21.1 2026-10-16T12:47:44.583089988 Block States: ichori
|
// 1.21.1 2026-10-16T17:16:18.407224089 Block States: ichori
|
||||||
|
caf011e7ed138275ef84daabc43e99da203e1007 assets/ichori/blockstates/crystallized_titan_blood_ore.json
|
||||||
|
d7682b2247f899ca2a3ed52e644ac65ea2190aa9 assets/ichori/models/block/crystallized_titan_blood_ore.json
|
||||||
|
5cdc6847ed525dc5bae1cf984da11828d6eab0f5 assets/ichori/models/item/crystallized_titan_blood_ore.json
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
// 1.21.1 2026-10-16T15:55:28.827063419 Item Models: ichori
|
// 1.21.1 2026-10-16T17:16:18.406820354 Item Models: ichori
|
||||||
|
ce7dbebc585f4127dbb6cf62fd98de5b7a115756 assets/ichori/models/item/crystallized_titan_blood.json
|
||||||
be44db6dcd5cd06217ef4e7a8025a21185ac48ac assets/ichori/models/item/test_spawn_light.json
|
be44db6dcd5cd06217ef4e7a8025a21185ac48ac assets/ichori/models/item/test_spawn_light.json
|
||||||
be44db6dcd5cd06217ef4e7a8025a21185ac48ac assets/ichori/models/item/test_spawn_magic_tourch.json
|
be44db6dcd5cd06217ef4e7a8025a21185ac48ac assets/ichori/models/item/test_spawn_magic_tourch.json
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "ichori:block/crystallized_titan_blood_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"creativetab.icgori.ichori": "Ichori"
|
"block.ichori.crystallized_titan_blood_ore": "Crystallized Titan Blood Ore",
|
||||||
|
"creativetab.icgori.ichori": "Ichori",
|
||||||
|
"item.ichori.crystallized_titan_blood": "Crystallized Titan Blood"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "ichori:block/crystallized_titan_blood_ore"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "ichori:item/crystallized_titan_blood"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "ichori:block/crystallized_titan_blood_ore"
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"ichori:crystallized_titan_blood_ore"
|
||||||
|
]
|
||||||
|
}
|
||||||
+61
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:alternatives",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:match_tool",
|
||||||
|
"predicate": {
|
||||||
|
"predicates": {
|
||||||
|
"minecraft:enchantments": [
|
||||||
|
{
|
||||||
|
"enchantments": "minecraft:silk_touch",
|
||||||
|
"levels": {
|
||||||
|
"min": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "ichori:crystallized_titan_blood_ore"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"add": false,
|
||||||
|
"count": {
|
||||||
|
"type": "minecraft:uniform",
|
||||||
|
"max": 5.0,
|
||||||
|
"min": 2.0
|
||||||
|
},
|
||||||
|
"function": "minecraft:set_count"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enchantment": "minecraft:fortune",
|
||||||
|
"formula": "minecraft:ore_drops",
|
||||||
|
"function": "minecraft:apply_bonus"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:explosion_decay"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "ichori:crystallized_titan_blood"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"random_sequence": "ichori:blocks/crystallized_titan_blood_ore"
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:block",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"bonus_rolls": 0.0,
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:survives_explosion"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "ichori:magic_tourch"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rolls": 1.0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"random_sequence": "ichori:blocks/magic_tourch"
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"type": "neoforge:add_features",
|
||||||
|
"biomes": "#minecraft:is_overworld",
|
||||||
|
"features": "ichori:crystallized_titan_blood_ore_placed",
|
||||||
|
"step": "underground_ores"
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:ore",
|
||||||
|
"config": {
|
||||||
|
"discard_chance_on_air_exposure": 0.0,
|
||||||
|
"size": 9,
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"state": {
|
||||||
|
"Name": "ichori:crystallized_titan_blood_ore"
|
||||||
|
},
|
||||||
|
"target": {
|
||||||
|
"predicate_type": "minecraft:tag_match",
|
||||||
|
"tag": "minecraft:deepslate_ore_replaceables"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"feature": "ichori:crystallized_titan_blood_ore",
|
||||||
|
"placement": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:rarity_filter",
|
||||||
|
"chance": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:in_square"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:height_range",
|
||||||
|
"height": {
|
||||||
|
"type": "minecraft:trapezoid",
|
||||||
|
"max_inclusive": {
|
||||||
|
"absolute": -30
|
||||||
|
},
|
||||||
|
"min_inclusive": {
|
||||||
|
"absolute": -64
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:biome"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
{
|
{
|
||||||
"values": []
|
"values": [
|
||||||
|
"ichori:crystallized_titan_blood_ore"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"ichori:crystallized_titan_blood_ore"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
package ovh.glitchlabs.ichori.Block;
|
package ovh.glitchlabs.ichori.Block;
|
||||||
|
|
||||||
|
import net.minecraft.util.valueproviders.UniformInt;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.DropExperienceBlock;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.material.PushReaction;
|
import net.minecraft.world.level.material.PushReaction;
|
||||||
@@ -19,7 +21,11 @@ public class ModBlocks {
|
|||||||
public static final DeferredRegister.Blocks BLOCKS =
|
public static final DeferredRegister.Blocks BLOCKS =
|
||||||
DeferredRegister.createBlocks(Ichori.MODID);
|
DeferredRegister.createBlocks(Ichori.MODID);
|
||||||
|
|
||||||
|
public static final DeferredBlock<Block> CRYSTALLIZED_TITAN_BLOOD_ORE = registerBlock("crystallized_titan_blood_ore",
|
||||||
|
() -> new DropExperienceBlock(UniformInt.of(2, 4),
|
||||||
|
BlockBehaviour.Properties.of()
|
||||||
|
.strength(4f)
|
||||||
|
.requiresCorrectToolForDrops()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ public class ModCreativeModeTabs {
|
|||||||
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModItems.TEST_Spawn_LIGHT.get()))
|
() -> CreativeModeTab.builder().icon(() -> new ItemStack(ModItems.TEST_Spawn_LIGHT.get()))
|
||||||
.title(Component.translatable("creativetab.ichori.ichori"))
|
.title(Component.translatable("creativetab.ichori.ichori"))
|
||||||
.displayItems(((itemDisplayParameters, output) -> {
|
.displayItems(((itemDisplayParameters, output) -> {
|
||||||
|
output.accept(ModItems.CRYSTALLIZED_TITAN_BLOOD);
|
||||||
|
output.accept(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE);
|
||||||
|
|
||||||
|
|
||||||
|
//TEST
|
||||||
output.accept(ModItems.TEST_Spawn_LIGHT);
|
output.accept(ModItems.TEST_Spawn_LIGHT);
|
||||||
output.accept(ModItems.TEST_Spawn_MAGIC_TOURCH);
|
output.accept(ModItems.TEST_Spawn_MAGIC_TOURCH);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ import ovh.glitchlabs.ichori.Item.custom.test_spawn_magic_tourch;
|
|||||||
public class ModItems {
|
public class ModItems {
|
||||||
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Ichori.MODID);
|
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Ichori.MODID);
|
||||||
|
|
||||||
|
public static final DeferredItem<Item> CRYSTALLIZED_TITAN_BLOOD = ITEMS.register("crystallized_titan_blood",
|
||||||
|
() -> new Item(new Item.Properties()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//test
|
||||||
|
|
||||||
public static final DeferredItem<Item> TEST_Spawn_LIGHT = ITEMS.register("test_spawn_light",
|
public static final DeferredItem<Item> TEST_Spawn_LIGHT = ITEMS.register("test_spawn_light",
|
||||||
() -> new test_spawn_light(new Item.Properties()));
|
() -> new test_spawn_light(new Item.Properties()));
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import net.minecraft.world.level.storage.loot.functions.ApplyBonusCount;
|
|||||||
import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
||||||
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator;
|
||||||
import ovh.glitchlabs.ichori.Block.ModBlocks;
|
import ovh.glitchlabs.ichori.Block.ModBlocks;
|
||||||
|
import ovh.glitchlabs.ichori.Item.ModItems;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -25,17 +26,13 @@ public class ModBlockLootTableProvider extends BlockLootSubProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void generate() {
|
protected void generate() {
|
||||||
/*
|
|
||||||
dropSelf(ModBlocks.BISMUTH_BLOCK.get());
|
|
||||||
// dropSelf(ModBlocks.MAGIC_BLOCK.get());
|
|
||||||
|
|
||||||
add(ModBlocks.BISMUTH_ORE.get(),
|
|
||||||
block -> createOreDrop(ModBlocks.BISMUTH_ORE.get(), ModItems.RAW_BISMUTH.get()));
|
|
||||||
add(ModBlocks.BISMUTH_DEEPSLATE_ORE.get(),
|
|
||||||
block -> createMultipleOreDrops(ModBlocks.BISMUTH_DEEPSLATE_ORE.get(), ModItems.RAW_BISMUTH.get(), 2, 5));
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
add(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get(),
|
||||||
|
block -> createMultipleOreDrops(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get(), ModItems.CRYSTALLIZED_TITAN_BLOOD.get(), 2, 5));
|
||||||
|
|
||||||
|
//TEST
|
||||||
|
dropSelf(ModBlocks.MAGIC_TOURCH.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class ModBlockStateProvider extends BlockStateProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerStatesAndModels() {
|
protected void registerStatesAndModels() {
|
||||||
// blockWithItem(ModBlocks.BISMUTH_BLOCK);
|
blockWithItem(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,11 @@ package ovh.glitchlabs.ichori.datagen;
|
|||||||
import net.minecraft.core.HolderLookup;
|
import net.minecraft.core.HolderLookup;
|
||||||
import net.minecraft.data.PackOutput;
|
import net.minecraft.data.PackOutput;
|
||||||
import net.minecraft.tags.BlockTags;
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.neoforged.neoforge.common.Tags;
|
||||||
import net.neoforged.neoforge.common.data.BlockTagsProvider;
|
import net.neoforged.neoforge.common.data.BlockTagsProvider;
|
||||||
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
import net.neoforged.neoforge.common.data.ExistingFileHelper;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import ovh.glitchlabs.ichori.Block.ModBlocks;
|
||||||
import ovh.glitchlabs.ichori.Ichori;
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@@ -18,7 +20,15 @@ public class ModBlockTagProvider extends BlockTagsProvider {
|
|||||||
@Override
|
@Override
|
||||||
protected void addTags(HolderLookup.Provider provider) {
|
protected void addTags(HolderLookup.Provider provider) {
|
||||||
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||||
|
.add(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get())
|
||||||
|
;
|
||||||
|
|
||||||
|
tag(BlockTags.NEEDS_IRON_TOOL)
|
||||||
|
.add(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get())
|
||||||
|
;
|
||||||
|
|
||||||
|
tag(Tags.Blocks.ORES)
|
||||||
|
.add(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get())
|
||||||
;
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import net.minecraft.data.PackOutput;
|
|||||||
import net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider;
|
import net.neoforged.neoforge.common.data.DatapackBuiltinEntriesProvider;
|
||||||
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
||||||
import ovh.glitchlabs.ichori.Ichori;
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
import ovh.glitchlabs.ichori.worldgen.ModBiomeModifiers;
|
||||||
|
import ovh.glitchlabs.ichori.worldgen.ModConfiguredFeatures;
|
||||||
|
import ovh.glitchlabs.ichori.worldgen.ModPlacedFeatures;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -17,9 +20,9 @@ public class ModDatapackProvider extends DatapackBuiltinEntriesProvider {
|
|||||||
//.add(Registries.TRIM_MATERIAL, ModTrimMaterials::bootstrap)
|
//.add(Registries.TRIM_MATERIAL, ModTrimMaterials::bootstrap)
|
||||||
//.add(Registries.TRIM_PATTERN, ModTrimPatterns::bootstrap)
|
//.add(Registries.TRIM_PATTERN, ModTrimPatterns::bootstrap)
|
||||||
//.add(Registries.ENCHANTMENT, ModEnchantments::bootstrap)
|
//.add(Registries.ENCHANTMENT, ModEnchantments::bootstrap)
|
||||||
//.add(Registries.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap)
|
.add(Registries.CONFIGURED_FEATURE, ModConfiguredFeatures::bootstrap)
|
||||||
//.add(Registries.PLACED_FEATURE, ModPlacedFeatures::bootstrap)
|
.add(Registries.PLACED_FEATURE, ModPlacedFeatures::bootstrap)
|
||||||
//.add(NeoForgeRegistries.Keys.BIOME_MODIFIERS, ModBiomeModifiers::bootstrap)
|
.add(NeoForgeRegistries.Keys.BIOME_MODIFIERS, ModBiomeModifiers::bootstrap)
|
||||||
;
|
;
|
||||||
|
|
||||||
public ModDatapackProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) {
|
public ModDatapackProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> registries) {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class ModItemModelProvider extends ItemModelProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerModels() {
|
protected void registerModels() {
|
||||||
|
basicItem(ModItems.CRYSTALLIZED_TITAN_BLOOD.get());
|
||||||
|
|
||||||
withExistingParent(ModItems.TEST_Spawn_LIGHT.getId().getPath(), mcLoc("item/stick"));
|
withExistingParent(ModItems.TEST_Spawn_LIGHT.getId().getPath(), mcLoc("item/stick"));
|
||||||
withExistingParent(ModItems.TEST_Spawn_MAGIC_TOURCH.getId().getPath(), mcLoc("item/stick"));
|
withExistingParent(ModItems.TEST_Spawn_MAGIC_TOURCH.getId().getPath(), mcLoc("item/stick"));
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package ovh.glitchlabs.ichori.datagen;
|
|||||||
|
|
||||||
import net.minecraft.data.PackOutput;
|
import net.minecraft.data.PackOutput;
|
||||||
import net.neoforged.neoforge.common.data.LanguageProvider;
|
import net.neoforged.neoforge.common.data.LanguageProvider;
|
||||||
|
import ovh.glitchlabs.ichori.Block.ModBlocks;
|
||||||
import ovh.glitchlabs.ichori.Ichori;
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
import ovh.glitchlabs.ichori.Item.ModItems;
|
||||||
|
|
||||||
public class ModLanguageProvider extends LanguageProvider {
|
public class ModLanguageProvider extends LanguageProvider {
|
||||||
|
|
||||||
@@ -12,6 +14,9 @@ public class ModLanguageProvider extends LanguageProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addTranslations() {
|
protected void addTranslations() {
|
||||||
|
add(ModItems.CRYSTALLIZED_TITAN_BLOOD.get(), "Crystallized Titan Blood");
|
||||||
|
add(ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get(), "Crystallized Titan Blood Ore");
|
||||||
|
|
||||||
add("creativetab.icgori.ichori", "Ichori");
|
add("creativetab.icgori.ichori", "Ichori");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package ovh.glitchlabs.ichori.worldgen;
|
||||||
|
|
||||||
|
import net.minecraft.core.HolderSet;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.data.worldgen.BootstrapContext;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
|
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||||
|
import net.neoforged.neoforge.common.world.BiomeModifier;
|
||||||
|
import net.neoforged.neoforge.common.world.BiomeModifiers;
|
||||||
|
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
||||||
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
|
||||||
|
public class ModBiomeModifiers {
|
||||||
|
public static final ResourceKey<BiomeModifier> ADD_CRYSTALLIZED_TITAN_BLOOD_ORE = registerKey("add_crystallized_titan_blood_ore");
|
||||||
|
|
||||||
|
public static void bootstrap(BootstrapContext<BiomeModifier> context) {
|
||||||
|
var placedFeatures = context.lookup(Registries.PLACED_FEATURE);
|
||||||
|
var biomes = context.lookup(Registries.BIOME);
|
||||||
|
|
||||||
|
context.register(ADD_CRYSTALLIZED_TITAN_BLOOD_ORE, new BiomeModifiers.AddFeaturesBiomeModifier(
|
||||||
|
biomes.getOrThrow(BiomeTags.IS_OVERWORLD),
|
||||||
|
HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.CRYSTALLIZED_TITAN_BLOOD_ORE_PLACED_KEY)),
|
||||||
|
GenerationStep.Decoration.UNDERGROUND_ORES));
|
||||||
|
|
||||||
|
// Example for individual Biomes!
|
||||||
|
// context.register(ADD_CRYSTALLIZED_TITAN_BLOOD_ORE, new BiomeModifiers.AddFeaturesBiomeModifier(
|
||||||
|
// HolderSet.direct(biomes.getOrThrow(Biomes.PLAINS), biomes.getOrThrow(Biomes.SAVANNA)),
|
||||||
|
// HolderSet.direct(placedFeatures.getOrThrow(ModPlacedFeatures.CRYSTALLIZED_TITAN_BLOOD_ORE_PLACED_KEY)),
|
||||||
|
// GenerationStep.Decoration.UNDERGROUND_ORES));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ResourceKey<BiomeModifier> registerKey(String name) {
|
||||||
|
return ResourceKey.create(NeoForgeRegistries.Keys.BIOME_MODIFIERS, ResourceLocation.fromNamespaceAndPath(Ichori.MODID, name));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package ovh.glitchlabs.ichori.worldgen;
|
||||||
|
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.data.worldgen.BootstrapContext;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.BlockMatchTest;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest;
|
||||||
|
import net.minecraft.world.level.levelgen.structure.templatesystem.TagMatchTest;
|
||||||
|
import ovh.glitchlabs.ichori.Block.ModBlocks;
|
||||||
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ModConfiguredFeatures {
|
||||||
|
public static final ResourceKey<ConfiguredFeature<?, ?>> OVERWORLD_CRYSTALLIZED_TITAN_BLOOD_ORE_KEY = registerKey("crystallized_titan_blood_ore");
|
||||||
|
|
||||||
|
|
||||||
|
public static void bootstrap(BootstrapContext<ConfiguredFeature<?, ?>> context) {
|
||||||
|
RuleTest stoneReplaceables = new TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES);
|
||||||
|
RuleTest deepslateReplaceables = new TagMatchTest(BlockTags.DEEPSLATE_ORE_REPLACEABLES);
|
||||||
|
RuleTest netherrackReplaceables = new BlockMatchTest(Blocks.NETHERRACK);
|
||||||
|
RuleTest endReplaceables = new BlockMatchTest(Blocks.END_STONE);
|
||||||
|
|
||||||
|
List<OreConfiguration.TargetBlockState> overworldBismuthOres = List.of(
|
||||||
|
OreConfiguration.target(deepslateReplaceables, ModBlocks.CRYSTALLIZED_TITAN_BLOOD_ORE.get().defaultBlockState()));
|
||||||
|
|
||||||
|
register(context, OVERWORLD_CRYSTALLIZED_TITAN_BLOOD_ORE_KEY, Feature.ORE, new OreConfiguration(overworldBismuthOres, 9));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ResourceKey<ConfiguredFeature<?, ?>> registerKey(String name) {
|
||||||
|
return ResourceKey.create(Registries.CONFIGURED_FEATURE, ResourceLocation.fromNamespaceAndPath(Ichori.MODID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static <FC extends FeatureConfiguration, F extends Feature<FC>> void register(BootstrapContext<ConfiguredFeature<?, ?>> context,
|
||||||
|
ResourceKey<ConfiguredFeature<?, ?>> key, F feature, FC configuration) {
|
||||||
|
context.register(key, new ConfiguredFeature<>(feature, configuration));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package ovh.glitchlabs.ichori.worldgen;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.levelgen.placement.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ModOrePlacement {
|
||||||
|
public static List<PlacementModifier> orePlacement(PlacementModifier pCountPlacement, PlacementModifier pHeightRange) {
|
||||||
|
return List.of(pCountPlacement, InSquarePlacement.spread(), pHeightRange, BiomeFilter.biome());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<PlacementModifier> commonOrePlacement(int pCount, PlacementModifier pHeightRange) {
|
||||||
|
return orePlacement(CountPlacement.of(pCount), pHeightRange);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<PlacementModifier> rareOrePlacement(int pChance, PlacementModifier pHeightRange) {
|
||||||
|
return orePlacement(RarityFilter.onAverageOnceEvery(pChance), pHeightRange);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package ovh.glitchlabs.ichori.worldgen;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.data.worldgen.BootstrapContext;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.level.levelgen.VerticalAnchor;
|
||||||
|
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.level.levelgen.placement.HeightRangePlacement;
|
||||||
|
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||||
|
import net.minecraft.world.level.levelgen.placement.PlacementModifier;
|
||||||
|
import ovh.glitchlabs.ichori.Ichori;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ModPlacedFeatures {
|
||||||
|
public static final ResourceKey<PlacedFeature> CRYSTALLIZED_TITAN_BLOOD_ORE_PLACED_KEY = registerKey("crystallized_titan_blood_ore_placed");
|
||||||
|
|
||||||
|
|
||||||
|
public static void bootstrap(BootstrapContext<PlacedFeature> context) {
|
||||||
|
var configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE);
|
||||||
|
|
||||||
|
register(context, CRYSTALLIZED_TITAN_BLOOD_ORE_PLACED_KEY, configuredFeatures.getOrThrow(ModConfiguredFeatures.OVERWORLD_CRYSTALLIZED_TITAN_BLOOD_ORE_KEY),
|
||||||
|
ModOrePlacement.rareOrePlacement(2, HeightRangePlacement.triangle(VerticalAnchor.absolute(-64), VerticalAnchor.absolute(-30))));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ResourceKey<PlacedFeature> registerKey(String name) {
|
||||||
|
return ResourceKey.create(Registries.PLACED_FEATURE, ResourceLocation.fromNamespaceAndPath(Ichori.MODID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void register(BootstrapContext<PlacedFeature> context, ResourceKey<PlacedFeature> key, Holder<ConfiguredFeature<?, ?>> configuration,
|
||||||
|
List<PlacementModifier> modifiers) {
|
||||||
|
context.register(key, new PlacedFeature(configuration, List.copyOf(modifiers)));
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 617 B |
Binary file not shown.
|
After Width: | Height: | Size: 371 B |
Reference in New Issue
Block a user