Compare commits

...

4 Commits

28 changed files with 884 additions and 585 deletions

View File

@ -48,6 +48,11 @@ import ru.dbotthepony.mc.otm.datagen.loot.*
import ru.dbotthepony.mc.otm.datagen.loot.LootModifiers
import ru.dbotthepony.mc.otm.datagen.recipes.*
import ru.dbotthepony.mc.otm.datagen.tags.TagsProvider
import ru.dbotthepony.mc.otm.datagen.tags.addConstructionTags
import ru.dbotthepony.mc.otm.datagen.tags.addDyeTags
import ru.dbotthepony.mc.otm.datagen.tags.addEquipmentTags
import ru.dbotthepony.mc.otm.datagen.tags.addMineableTags
import ru.dbotthepony.mc.otm.datagen.tags.addResourceTags
import ru.dbotthepony.mc.otm.datagen.tags.addSuspiciousTags
import ru.dbotthepony.mc.otm.datagen.tags.addTags
import ru.dbotthepony.mc.otm.datagen.textures.ColorizedSpritesProvider
@ -517,6 +522,11 @@ object DataGen {
addTags(tagsProvider)
addSuspiciousTags(tagsProvider)
addConstructionTags(tagsProvider)
addResourceTags(tagsProvider)
addEquipmentTags(tagsProvider)
addMineableTags(tagsProvider)
addDyeTags(tagsProvider)
event.generator.addProvider(event.includeClient(), colorizedSpritesProvider)
event.generator.addProvider(event.includeClient(), blockModelProvider)
@ -563,6 +573,10 @@ object DataGen {
addItemModels(itemModelProvider)
blockStateProvider.exec { addComplexBlockStates(blockStateProvider) }
addLootTables(lootTableProvider)
addMachineLoot(lootTableProvider)
addDecorativeLoot(lootTableProvider)
addAdvancementLoot(lootTableProvider)
addVaultLoot(lootTableProvider)
addChestLootTables(lootTableProvider)
recipeProvider.exec { _, consumer ->

View File

@ -8,6 +8,7 @@ import net.minecraft.tags.BiomeTags
import net.minecraft.tags.BlockTags
import net.minecraft.util.valueproviders.ClampedNormalFloat
import net.minecraft.util.valueproviders.ClampedNormalInt
import net.minecraft.util.valueproviders.ConstantFloat
import net.minecraft.util.valueproviders.UniformInt
import net.minecraft.world.level.levelgen.GenerationStep
import net.minecraft.world.level.levelgen.VerticalAnchor
@ -32,6 +33,7 @@ import ru.dbotthepony.mc.otm.worldgen.feature.BlackHolePlacerFeature
private object ConfiguredFeatures {
val TRITANIUM_ORE = key("tritanium_ore")
val DILITHIUM = key("dilithium")
val BLACK_HOLE = key("black_hole")
private fun key(name: String): ResourceKey<ConfiguredFeature<*, *>> {
@ -43,12 +45,24 @@ fun registerConfiguredFeatures(context: BootstrapContext<ConfiguredFeature<*, *>
val stone = TagMatchTest(BlockTags.STONE_ORE_REPLACEABLES)
val deepslate = TagMatchTest(BlockTags.DEEPSLATE_ORE_REPLACEABLES)
val target = listOf(
OreConfiguration.target(stone, MBlocks.TRITANIUM_ORE.defaultBlockState()),
OreConfiguration.target(deepslate, MBlocks.DEEPSLATE_TRITANIUM_ORE.defaultBlockState()),
)
run {
val target = listOf(
OreConfiguration.target(stone, MBlocks.TRITANIUM_ORE.defaultBlockState()),
OreConfiguration.target(deepslate, MBlocks.DEEPSLATE_TRITANIUM_ORE.defaultBlockState()),
)
context.register(ConfiguredFeatures.TRITANIUM_ORE, ConfiguredFeature(Feature.ORE, OreConfiguration(target, 9)))
}
run {
val target = listOf(
OreConfiguration.target(stone, MBlocks.DILITHIUM_ORE.defaultBlockState()),
OreConfiguration.target(deepslate, MBlocks.DEEPSLATE_DILITHIUM_ORE.defaultBlockState()),
)
context.register(ConfiguredFeatures.DILITHIUM, ConfiguredFeature(Feature.ORE, OreConfiguration(target, 3)))
}
context.register(ConfiguredFeatures.TRITANIUM_ORE, ConfiguredFeature(Feature.ORE, OreConfiguration(target, 9)))
context.register(ConfiguredFeatures.BLACK_HOLE, ConfiguredFeature(MWorldGenFeatures.BLACK_HOLE_PLACER,
BlackHolePlacerFeature.Config(0.001f, Decimal("0.25"), Decimal(1))))
}
@ -57,6 +71,7 @@ private object PlacedFeatures {
val NORMAL_TRITANIUM = key("normal_tritanium")
val DEEP_TRITANIUM = key("deep_tritanium")
val CLOUD_TITANIUM = key("cloud_tritanium")
val DILITHIUM = key("dilithium")
val BLACK_HOLE = key("black_hole")
private fun key(name: String): ResourceKey<PlacedFeature> {
@ -66,43 +81,70 @@ private object PlacedFeatures {
fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
val configured = context.lookup(Registries.CONFIGURED_FEATURE)
val ore = configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE)
context.register(PlacedFeatures.NORMAL_TRITANIUM, PlacedFeature(
ore,
listOf(
CountPlacement.of(UniformInt.of(2, 6)),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(10), 15.0))
)
))
run {
val ore = configured.getOrThrow(ConfiguredFeatures.TRITANIUM_ORE)
context.register(PlacedFeatures.DEEP_TRITANIUM, PlacedFeature(
ore,
listOf(
CountPlacement.of(UniformInt.of(4, 8)),
InSquarePlacement.spread(),
HeightRangePlacement.of(VeryBiasedToBottomHeight.of(VerticalAnchor.aboveBottom(4), VerticalAnchor.absolute(0), 16))
)
))
context.register(PlacedFeatures.CLOUD_TITANIUM, PlacedFeature(
ore,
listOf(
RarityFilter.onAverageOnceEvery(6),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(10), 15.0)),
EllipsoidPlacement(
x = ClampedNormalInt.of(0f, 12f, Int.MIN_VALUE, Int.MAX_VALUE),
y = ClampedNormalInt.of(0f, 12f, Int.MIN_VALUE, Int.MAX_VALUE),
z = ClampedNormalInt.of(0f, 8f, Int.MIN_VALUE, Int.MAX_VALUE),
count = ClampedNormalInt.of(100f, 100f, 80, 300),
xLength = ClampedNormalFloat.of(11f, 4f, 4f, 16f),
yLength = ClampedNormalFloat.of(11f, 4f, 4f, 16f),
zLength = ClampedNormalFloat.of(11f, 4f, 4f, 16f),
context.register(PlacedFeatures.NORMAL_TRITANIUM, PlacedFeature(
ore,
listOf(
CountPlacement.of(UniformInt.of(2, 6)),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(10), 15.0))
)
)
))
))
context.register(PlacedFeatures.DEEP_TRITANIUM, PlacedFeature(
ore,
listOf(
CountPlacement.of(UniformInt.of(4, 8)),
InSquarePlacement.spread(),
HeightRangePlacement.of(VeryBiasedToBottomHeight.of(VerticalAnchor.aboveBottom(4), VerticalAnchor.absolute(0), 16))
)
))
context.register(PlacedFeatures.CLOUD_TITANIUM, PlacedFeature(
ore,
listOf(
RarityFilter.onAverageOnceEvery(8),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(10), 15.0)),
EllipsoidPlacement(
x = ClampedNormalInt.of(0f, 6f, Int.MIN_VALUE, Int.MAX_VALUE),
y = ClampedNormalInt.of(0f, 12f, Int.MIN_VALUE, Int.MAX_VALUE),
z = ClampedNormalInt.of(0f, 6f, Int.MIN_VALUE, Int.MAX_VALUE),
count = ClampedNormalInt.of(100f, 100f, 80, 300),
xLength = ClampedNormalFloat.of(11f, 4f, 6f, 14f),
yLength = ClampedNormalFloat.of(11f, 4f, 6f, 14f),
zLength = ClampedNormalFloat.of(11f, 4f, 6f, 14f),
)
)
))
}
run {
val ore = configured.getOrThrow(ConfiguredFeatures.DILITHIUM)
context.register(PlacedFeatures.DILITHIUM, PlacedFeature(
ore,
listOf(
RarityFilter.onAverageOnceEvery(12),
InSquarePlacement.spread(),
HeightRangePlacement.of(StandardDeviationHeightProvider(VerticalAnchor.absolute(0), 15.0)),
EllipsoidPlacement(
x = ClampedNormalInt.of(0f, 8f, Int.MIN_VALUE, Int.MAX_VALUE),
y = ClampedNormalInt.of(0f, 20f, Int.MIN_VALUE, Int.MAX_VALUE),
z = ClampedNormalInt.of(0f, 8f, Int.MIN_VALUE, Int.MAX_VALUE),
count = ClampedNormalInt.of(300f, 200f, 200, 800),
xLength = ClampedNormalFloat.of(11f, 4f, 8f, 14f),
// allow crystals to generate as far as standard deviation allows
// to increase chance for player to discover crystal vein
yLength = ConstantFloat.of(60f),
zLength = ClampedNormalFloat.of(11f, 4f, 8f, 14f),
)
)
))
}
val blackHole = configured.getOrThrow(ConfiguredFeatures.BLACK_HOLE)
@ -116,7 +158,7 @@ fun registerPlacedFeatures(context: BootstrapContext<PlacedFeature>) {
}
private object BiomeModifiers {
val TRITANIUM_ORE = key("tritanium_ore")
val ORES = key("ores")
val BLACK_HOLE = key("black_hole")
private fun key(name: String): ResourceKey<BiomeModifier> {
@ -129,13 +171,14 @@ fun registerBiomeModifiers(context: BootstrapContext<BiomeModifier>) {
val biomes = context.lookup(Registries.BIOME)
context.register(
BiomeModifiers.TRITANIUM_ORE,
BiomeModifiers.ORES,
net.neoforged.neoforge.common.world.BiomeModifiers.AddFeaturesBiomeModifier(
biomes.getOrThrow(BiomeTags.IS_OVERWORLD),
HolderSet.direct(
placed.getOrThrow(PlacedFeatures.NORMAL_TRITANIUM),
placed.getOrThrow(PlacedFeatures.DEEP_TRITANIUM),
placed.getOrThrow(PlacedFeatures.CLOUD_TITANIUM),
placed.getOrThrow(PlacedFeatures.DILITHIUM),
),
GenerationStep.Decoration.UNDERGROUND_ORES
)

View File

@ -608,6 +608,10 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Deepslate Tritanium Ore")
add(MBlocks.TRITANIUM_RAW_BLOCK, "Raw Tritanium Block")
add(MBlocks.DILITHIUM_ORE, "Dilithium Ore")
add(MBlocks.DEEPSLATE_DILITHIUM_ORE, "Deepslate Dilithium Ore")
add(MBlocks.DILITHIUM_CRYSTAL_BLOCK, "Dilithium Crystal Block")
add(MBlocks.STORAGE_CABLE, "Storage Cable")
addBlock(MBlocks.STORAGE_POWER_SUPPLIER.values, "Storage Power Supplier")
add(MBlocks.STORAGE_BUS, "Storage Bus")
@ -726,6 +730,7 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.TRITANIUM_DUST, "Tritanium Dust")
add(MItems.TRITANIUM_INGOT, "Tritanium Ingot")
add(MItems.DILITHIUM_CRYSTAL, "Dilithium Crystal")
add(MItems.TRITANIUM_NUGGET, "Tritanium Nugget")
add(MItems.MATTER_IO_PORT, "Matter IO Port")
add(MItems.MATTER_TRANSFORM_MATRIX, "Matter Transformation Matrix")

View File

@ -607,8 +607,11 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.METAL_JUNK, "desc", "Бесполезный хлам, или нет?")
add(MBlocks.TRITANIUM_ORE, "Тритановая руда")
add(MBlocks.DILITHIUM_ORE, "Дилитевая руда")
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Тританоносный глубинный сланец")
add(MBlocks.DEEPSLATE_DILITHIUM_ORE, "Глубинный сланец со вкраплением дилития")
add(MBlocks.TRITANIUM_RAW_BLOCK, "Блок рудного тритана")
add(MBlocks.DILITHIUM_CRYSTAL_BLOCK, "Блок кристалла дилития")
add(MBlocks.STORAGE_CABLE, "Кабель хранилища")
addBlock(MBlocks.STORAGE_POWER_SUPPLIER.values, "Подстанция сети хранилища")
@ -728,6 +731,7 @@ private fun items(provider: MatteryLanguageProvider) {
add(MItems.TRITANIUM_DUST, "Тритановая пыль")
add(MItems.TRITANIUM_INGOT, "Тритановый слиток")
add(MItems.DILITHIUM_CRYSTAL, "Дилитевый кристалл")
add(MItems.TRITANIUM_NUGGET, "Тритановый самородок")
add(MItems.MATTER_IO_PORT, "Порт ввода/вывода материи")
add(MItems.MATTER_TRANSFORM_MATRIX, "Матрица преобразования материи")

View File

@ -0,0 +1,53 @@
package ru.dbotthepony.mc.otm.datagen.loot
import net.minecraft.world.item.Items
import net.minecraft.world.level.storage.loot.entries.LootItem
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets
import ru.dbotthepony.mc.otm.datagen.modLootTable
import ru.dbotthepony.mc.otm.registry.MItems
fun addAdvancementLoot(lootTables: LootTables) {
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("research_all_android")) {
lootPool {
add(LootItem.lootTableItem(MItems.ExopackUpgrades.INVENTORY_UPGRADE_HUGE))
}
}
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block3")) {
lootPool { item(Items.WHITE_DYE) { setCount(8) } }
lootPool { item(Items.ORANGE_DYE) { setCount(8) } }
lootPool { item(Items.MAGENTA_DYE) { setCount(8) } }
lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(8) } }
lootPool { item(Items.YELLOW_DYE) { setCount(8) } }
lootPool { item(Items.LIME_DYE) { setCount(8) } }
lootPool { item(Items.PINK_DYE) { setCount(8) } }
lootPool { item(Items.GRAY_DYE) { setCount(8) } }
lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(8) } }
lootPool { item(Items.CYAN_DYE) { setCount(8) } }
lootPool { item(Items.PURPLE_DYE) { setCount(8) } }
lootPool { item(Items.BLUE_DYE) { setCount(8) } }
lootPool { item(Items.BROWN_DYE) { setCount(8) } }
lootPool { item(Items.GREEN_DYE) { setCount(8) } }
lootPool { item(Items.RED_DYE) { setCount(8) } }
lootPool { item(Items.BLACK_DYE) { setCount(8) } }
}
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block4")) {
lootPool { item(Items.WHITE_DYE) { setCount(64) } }
lootPool { item(Items.ORANGE_DYE) { setCount(64) } }
lootPool { item(Items.MAGENTA_DYE) { setCount(64) } }
lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(64) } }
lootPool { item(Items.YELLOW_DYE) { setCount(64) } }
lootPool { item(Items.LIME_DYE) { setCount(64) } }
lootPool { item(Items.PINK_DYE) { setCount(64) } }
lootPool { item(Items.GRAY_DYE) { setCount(64) } }
lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(64) } }
lootPool { item(Items.CYAN_DYE) { setCount(64) } }
lootPool { item(Items.PURPLE_DYE) { setCount(64) } }
lootPool { item(Items.BLUE_DYE) { setCount(64) } }
lootPool { item(Items.BROWN_DYE) { setCount(64) } }
lootPool { item(Items.GREEN_DYE) { setCount(64) } }
lootPool { item(Items.RED_DYE) { setCount(64) } }
lootPool { item(Items.BLACK_DYE) { setCount(64) } }
}
}

View File

@ -0,0 +1,69 @@
package ru.dbotthepony.mc.otm.datagen.loot
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition
import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MRegistry
fun addDecorativeLoot(lootTables: LootTables) {
lootTables.dropsSelf(MRegistry.DECORATIVE_CRATE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.COMPUTER_TERMINAL.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.STAR_CHAIR.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.CARGO_CRATES.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_BLOCK.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_WALL.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STAIRS.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.TRITANIUM_SLAB.allBlocks.values)
lootTables.dropsSelf(MRegistry.VENT.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.VENT_ALTERNATIVE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.FLOOR_TILES.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.UNREFINED_FLOOR_TILES.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.FLOOR_TILES_STAIRS.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.FLOOR_TILES_SLAB.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.CARBON_FIBRE_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.METAL_MESH) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_RAW_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_BLOCK.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_WALL.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_STAIRS.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MBlocks.TRITANIUM_STRIPED_SLAB.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.LABORATORY_LAMP) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.LABORATORY_LAMP_INVERTED) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.DANGER_STRIPE_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.METAL_BEAM) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_INGOT_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_BARS) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.ENGINE) { condition(ExplosionCondition.survivesExplosion()) }
for (block in MBlocks.TRITANIUM_ANVIL)
lootTables.dropsSelf(block) { condition(ExplosionCondition.survivesExplosion()) }
for (door in MBlocks.TRITANIUM_TRAPDOOR.values)
lootTables.dropsSelf(door) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
for (door in MBlocks.TRITANIUM_DOOR.values) {
lootTables.block(door) {
item(door) {
blockStateCondition(door) {
this[BlockStateProperties.DOUBLE_BLOCK_HALF] = DoubleBlockHalf.LOWER
}
}
condition(ExplosionCondition.survivesExplosion())
}
}
}

View File

@ -15,11 +15,14 @@ import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
import net.minecraft.world.level.storage.loot.entries.AlternativesEntry
import net.minecraft.world.level.storage.loot.entries.LootItem
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.parameters.LootContextParamSets
import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition
import net.minecraft.world.level.storage.loot.predicates.MatchTool
import net.minecraft.world.level.storage.loot.providers.number.UniformGenerator
import ru.dbotthepony.mc.otm.core.lookupOrThrow
import ru.dbotthepony.mc.otm.core.math.Decimal
import ru.dbotthepony.mc.otm.data.loot.Int2NumberProvider
import ru.dbotthepony.mc.otm.data.world.UniformDecimal
import ru.dbotthepony.mc.otm.datagen.modLootTable
import ru.dbotthepony.mc.otm.item.ProceduralBatteryItem
@ -29,7 +32,7 @@ import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MItems
import ru.dbotthepony.mc.otm.registry.MRegistry
private fun ore(lootTables: LootTables, ore: Block, clump: ItemLike) {
private fun ore(lootTables: LootTables, ore: Block, clump: ItemLike, count: Int = 1) {
lootTables.builder(ore) {
add(AlternativesEntry.alternatives(
LootItem.lootTableItem(ore).also {
@ -44,6 +47,9 @@ private fun ore(lootTables: LootTables, ore: Block, clump: ItemLike) {
},
LootItem.lootTableItem(clump).also {
if (count != 1)
it.apply(SetItemCountFunction.setCount(Int2NumberProvider(UniformInt.of(1, count))))
it.apply(ApplyBonusCount.addOreBonusCount(lootTables.registry.get().lookupOrThrow(Enchantments.FORTUNE)))
it.condition(ExplosionCondition.survivesExplosion())
}
@ -52,227 +58,16 @@ private fun ore(lootTables: LootTables, ore: Block, clump: ItemLike) {
}
fun addLootTables(lootTables: LootTables) {
lootTables.dropsSelf(MRegistry.DECORATIVE_CRATE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.COMPUTER_TERMINAL.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.STAR_CHAIR.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.CARGO_CRATES.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_BLOCK.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_WALL.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STAIRS.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.TRITANIUM_SLAB.allBlocks.values)
lootTables.dropsSelf(MRegistry.VENT.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.VENT_ALTERNATIVE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.FLOOR_TILES.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.UNREFINED_FLOOR_TILES.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.FLOOR_TILES_STAIRS.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MRegistry.FLOOR_TILES_SLAB.blocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.CARBON_FIBRE_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.METAL_MESH) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_RAW_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_BLOCK.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_WALL.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_STAIRS.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MBlocks.TRITANIUM_STRIPED_SLAB.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.MATTER_CABLE) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.ENERGY_CABLES.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.GRAVITATION_STABILIZER)
lootTables.dropsOther(MBlocks.GRAVITATION_STABILIZER_LENS, MBlocks.GRAVITATION_STABILIZER)
lootTables.dropsSelf(MBlocks.LABORATORY_LAMP) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.LABORATORY_LAMP_INVERTED) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.DANGER_STRIPE_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.METAL_BEAM) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_INGOT_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_BARS) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.ENERGY_CABLES.values) { condition(ExplosionCondition.survivesExplosion()) }
ore(lootTables, MBlocks.TRITANIUM_ORE, MItems.TRITANIUM_ORE_CLUMP)
ore(lootTables, MBlocks.DEEPSLATE_TRITANIUM_ORE, MItems.TRITANIUM_ORE_CLUMP)
lootTables.dropsSelf(MBlocks.INFINITE_WATER_SOURCE) { condition(ExplosionCondition.survivesExplosion()) }
ore(lootTables, MBlocks.DILITHIUM_ORE, MItems.DILITHIUM_CRYSTAL, 2)
ore(lootTables, MBlocks.DEEPSLATE_DILITHIUM_ORE, MItems.DILITHIUM_CRYSTAL, 2)
lootTables.dropsSelf(MBlocks.ENGINE) { condition(ExplosionCondition.survivesExplosion()) }
for (block in MBlocks.TRITANIUM_ANVIL)
lootTables.dropsSelf(block) { condition(ExplosionCondition.survivesExplosion()) }
for (door in MBlocks.TRITANIUM_TRAPDOOR.values)
lootTables.dropsSelf(door) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.block(MBlocks.PHANTOM_ATTRACTOR) {
item(MBlocks.PHANTOM_ATTRACTOR) {
blockStateCondition(MBlocks.PHANTOM_ATTRACTOR) {
this[BlockStateProperties.DOUBLE_BLOCK_HALF] = DoubleBlockHalf.LOWER
}
}
condition(ExplosionCondition.survivesExplosion())
}
for (door in MBlocks.TRITANIUM_DOOR.values) {
lootTables.block(door) {
item(door) {
blockStateCondition(door) {
this[BlockStateProperties.DOUBLE_BLOCK_HALF] = DoubleBlockHalf.LOWER
}
}
condition(ExplosionCondition.survivesExplosion())
}
}
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("research_all_android")) {
lootPool {
add(LootItem.lootTableItem(MItems.ExopackUpgrades.INVENTORY_UPGRADE_HUGE))
}
}
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block3")) {
lootPool { item(Items.WHITE_DYE) { setCount(8) } }
lootPool { item(Items.ORANGE_DYE) { setCount(8) } }
lootPool { item(Items.MAGENTA_DYE) { setCount(8) } }
lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(8) } }
lootPool { item(Items.YELLOW_DYE) { setCount(8) } }
lootPool { item(Items.LIME_DYE) { setCount(8) } }
lootPool { item(Items.PINK_DYE) { setCount(8) } }
lootPool { item(Items.GRAY_DYE) { setCount(8) } }
lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(8) } }
lootPool { item(Items.CYAN_DYE) { setCount(8) } }
lootPool { item(Items.PURPLE_DYE) { setCount(8) } }
lootPool { item(Items.BLUE_DYE) { setCount(8) } }
lootPool { item(Items.BROWN_DYE) { setCount(8) } }
lootPool { item(Items.GREEN_DYE) { setCount(8) } }
lootPool { item(Items.RED_DYE) { setCount(8) } }
lootPool { item(Items.BLACK_DYE) { setCount(8) } }
}
lootTables.builder(LootContextParamSets.ADVANCEMENT_ENTITY, modLootTable("tritanium_block4")) {
lootPool { item(Items.WHITE_DYE) { setCount(64) } }
lootPool { item(Items.ORANGE_DYE) { setCount(64) } }
lootPool { item(Items.MAGENTA_DYE) { setCount(64) } }
lootPool { item(Items.LIGHT_BLUE_DYE) { setCount(64) } }
lootPool { item(Items.YELLOW_DYE) { setCount(64) } }
lootPool { item(Items.LIME_DYE) { setCount(64) } }
lootPool { item(Items.PINK_DYE) { setCount(64) } }
lootPool { item(Items.GRAY_DYE) { setCount(64) } }
lootPool { item(Items.LIGHT_GRAY_DYE) { setCount(64) } }
lootPool { item(Items.CYAN_DYE) { setCount(64) } }
lootPool { item(Items.PURPLE_DYE) { setCount(64) } }
lootPool { item(Items.BLUE_DYE) { setCount(64) } }
lootPool { item(Items.BROWN_DYE) { setCount(64) } }
lootPool { item(Items.GREEN_DYE) { setCount(64) } }
lootPool { item(Items.RED_DYE) { setCount(64) } }
lootPool { item(Items.BLACK_DYE) { setCount(64) } }
}
lootTables.tile(MBlocks.COBBLESTONE_GENERATOR.values)
lootTables.tile(MBlocks.ESSENCE_STORAGE.values)
lootTables.tile(MBlocks.MATTER_RECONSTRUCTOR.values)
lootTables.tile(MBlocks.FLUID_TANK)
lootTables.tile(MBlocks.PAINTER)
lootTables.tile(MBlocks.MATTER_ENTANGLER)
lootTables.tile(MBlocks.GRILL.values)
lootTables.tile(MBlocks.ENERGY_SERVO.values)
lootTables.tile(MBlocks.ENERGY_COUNTER.values)
lootTables.tile(MBlocks.CHEMICAL_GENERATOR.values)
lootTables.tile(MBlocks.HOLO_SIGN, "isLocked")
lootTables.tile(MBlocks.STORAGE_CABLE)
lootTables.tile(MBlocks.ANDROID_STATION.values)
lootTables.tile(MBlocks.ANDROID_CHARGER.values)
lootTables.tile(MBlocks.BATTERY_BANK.values)
lootTables.tile(MBlocks.DRIVE_VIEWER.values)
lootTables.tile(MBlocks.STORAGE_BUS)
lootTables.tile(MBlocks.STORAGE_IMPORTER)
lootTables.tile(MBlocks.STORAGE_EXPORTER)
lootTables.tile(MBlocks.STORAGE_POWER_SUPPLIER.values)
lootTables.tile(MBlocks.DRIVE_RACK)
lootTables.tile(MBlocks.MATTER_DECOMPOSER.values)
lootTables.tile(MBlocks.MATTER_REPLICATOR.values)
lootTables.tile(MBlocks.MATTER_RECYCLER.values)
lootTables.tile(MBlocks.MATTER_SCANNER.values)
lootTables.tile(MBlocks.PLATE_PRESS.values)
lootTables.tile(MBlocks.TWIN_PLATE_PRESS.values)
lootTables.tile(MBlocks.POWERED_FURNACE.values)
lootTables.tile(MBlocks.POWERED_SMOKER.values)
lootTables.tile(MBlocks.POWERED_BLAST_FURNACE.values)
lootTables.tile(MBlocks.MATTER_PANEL.values)
lootTables.tile(MBlocks.PATTERN_STORAGE)
lootTables.tile(MBlocks.MATTER_CAPACITOR_BANK.values)
lootTables.tile(MBlocks.MATTER_BOTTLER.values)
lootTables.tile(MBlocks.BLACK_HOLE_GENERATOR)
lootTables.tile(MBlocks.ITEM_INPUT_HATCH)
lootTables.tile(MBlocks.ITEM_OUTPUT_HATCH)
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/matter_dust")) {
lootPool { item(MItems.MATTER_DUST) {
chanceCondition(0.2)
setWeight(4)
apply(MatterDustItem.Randomizer(UniformDecimal(Decimal(100), Decimal(2_500))))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/pill")) {
lootPool { item(MItems.PILL_ANDROID) {
chanceCondition(0.1)
setWeight(1)
} }
lootPool { item(MItems.PILL_HEAL) {
chanceCondition(0.5)
setWeight(2)
setCount(2, 5)
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/exosuit")) {
lootPool { item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.2)
setWeight(2)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3)))
} }
lootPool { item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.1)
setWeight(1)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(9, 18), UniformInt.of(0, 3)))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/battery")) {
lootPool { item(MItems.PROCEDURAL_BATTERY) {
chanceCondition(0.05)
setWeight(1)
apply(
ProceduralBatteryItem.Randomizer(
maxBatteryLevel = UniformDecimal(Decimal(10_000_000), Decimal(50_000_000)),
batteryLevel = UniformDecimal(Decimal(0), Decimal(25_000_000)),
maxInput = UniformDecimal(Decimal(1_000), Decimal(5_000)),
))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/zpm_battery")) {
lootPool { item(MItems.ZPM_BATTERY) {
chanceCondition(0.001)
setWeight(1)
} }
}
}

View File

@ -0,0 +1,64 @@
package ru.dbotthepony.mc.otm.datagen.loot
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition
import ru.dbotthepony.mc.otm.registry.MBlocks
fun addMachineLoot(lootTables: LootTables) {
lootTables.block(MBlocks.PHANTOM_ATTRACTOR) {
item(MBlocks.PHANTOM_ATTRACTOR) {
blockStateCondition(MBlocks.PHANTOM_ATTRACTOR) {
this[BlockStateProperties.DOUBLE_BLOCK_HALF] = DoubleBlockHalf.LOWER
}
}
condition(ExplosionCondition.survivesExplosion())
}
lootTables.dropsSelf(MBlocks.INFINITE_WATER_SOURCE) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.tile(MBlocks.COBBLESTONE_GENERATOR.values)
lootTables.tile(MBlocks.ESSENCE_STORAGE.values)
lootTables.tile(MBlocks.MATTER_RECONSTRUCTOR.values)
lootTables.tile(MBlocks.FLUID_TANK)
lootTables.tile(MBlocks.PAINTER)
lootTables.tile(MBlocks.MATTER_ENTANGLER)
lootTables.tile(MBlocks.GRILL.values)
lootTables.tile(MBlocks.ENERGY_SERVO.values)
lootTables.tile(MBlocks.ENERGY_COUNTER.values)
lootTables.tile(MBlocks.CHEMICAL_GENERATOR.values)
lootTables.tile(MBlocks.HOLO_SIGN, "isLocked")
lootTables.tile(MBlocks.STORAGE_CABLE)
lootTables.tile(MBlocks.ANDROID_STATION.values)
lootTables.tile(MBlocks.ANDROID_CHARGER.values)
lootTables.tile(MBlocks.BATTERY_BANK.values)
lootTables.tile(MBlocks.DRIVE_VIEWER.values)
lootTables.tile(MBlocks.STORAGE_BUS)
lootTables.tile(MBlocks.STORAGE_IMPORTER)
lootTables.tile(MBlocks.STORAGE_EXPORTER)
lootTables.tile(MBlocks.STORAGE_POWER_SUPPLIER.values)
lootTables.tile(MBlocks.DRIVE_RACK)
lootTables.tile(MBlocks.MATTER_DECOMPOSER.values)
lootTables.tile(MBlocks.MATTER_REPLICATOR.values)
lootTables.tile(MBlocks.MATTER_RECYCLER.values)
lootTables.tile(MBlocks.MATTER_SCANNER.values)
lootTables.tile(MBlocks.PLATE_PRESS.values)
lootTables.tile(MBlocks.TWIN_PLATE_PRESS.values)
lootTables.tile(MBlocks.POWERED_FURNACE.values)
lootTables.tile(MBlocks.POWERED_SMOKER.values)
lootTables.tile(MBlocks.POWERED_BLAST_FURNACE.values)
lootTables.tile(MBlocks.MATTER_PANEL.values)
lootTables.tile(MBlocks.PATTERN_STORAGE)
lootTables.tile(MBlocks.MATTER_CAPACITOR_BANK.values)
lootTables.tile(MBlocks.MATTER_BOTTLER.values)
lootTables.tile(MBlocks.BLACK_HOLE_GENERATOR)
lootTables.tile(MBlocks.ITEM_INPUT_HATCH)
lootTables.tile(MBlocks.ITEM_OUTPUT_HATCH)
}

View File

@ -0,0 +1,70 @@
package ru.dbotthepony.mc.otm.datagen.loot
import net.minecraft.util.valueproviders.UniformInt
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets
import ru.dbotthepony.mc.otm.core.math.Decimal
import ru.dbotthepony.mc.otm.data.world.UniformDecimal
import ru.dbotthepony.mc.otm.datagen.modLootTable
import ru.dbotthepony.mc.otm.item.ProceduralBatteryItem
import ru.dbotthepony.mc.otm.item.exopack.ProceduralExopackSlotUpgradeItem
import ru.dbotthepony.mc.otm.item.matter.MatterDustItem
import ru.dbotthepony.mc.otm.registry.MItems
fun addVaultLoot(lootTables: LootTables) {
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/matter_dust")) {
lootPool { item(MItems.MATTER_DUST) {
chanceCondition(0.2)
setWeight(4)
apply(MatterDustItem.Randomizer(UniformDecimal(Decimal(100), Decimal(2_500))))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/pill")) {
lootPool { item(MItems.PILL_ANDROID) {
chanceCondition(0.1)
setWeight(1)
} }
lootPool { item(MItems.PILL_HEAL) {
chanceCondition(0.5)
setWeight(2)
setCount(2, 5)
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/exosuit")) {
lootPool { item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.2)
setWeight(2)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(1, 9), UniformInt.of(0, 3)))
} }
lootPool { item(MItems.ExopackUpgrades.INVENTORY_UPGRADE_PROCEDURAL) {
chanceCondition(0.1)
setWeight(1)
apply(ProceduralExopackSlotUpgradeItem.Randomizer(UniformInt.of(9, 18), UniformInt.of(0, 3)))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/battery")) {
lootPool { item(MItems.PROCEDURAL_BATTERY) {
chanceCondition(0.05)
setWeight(1)
apply(
ProceduralBatteryItem.Randomizer(
maxBatteryLevel = UniformDecimal(Decimal(10_000_000), Decimal(50_000_000)),
batteryLevel = UniformDecimal(Decimal(0), Decimal(25_000_000)),
maxInput = UniformDecimal(Decimal(1_000), Decimal(5_000)),
))
} }
}
lootTables.builder(LootContextParamSets.VAULT, modLootTable("trials/zpm_battery")) {
lootPool { item(MItems.ZPM_BATTERY) {
chanceCondition(0.001)
setWeight(1)
} }
}
}

View File

@ -527,4 +527,16 @@ fun addCraftingTableRecipes(consumer: RecipeOutput) {
.rowAB(Items.LEVER, Tags.Items.NUGGETS_IRON)
.rowB(Tags.Items.DUSTS_REDSTONE)
.build(consumer)
ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, ItemStack(MItems.DILITHIUM_CRYSTAL_BLOCK))
.requires(MItems.DILITHIUM_CRYSTAL, 9)
.unlockedBy(MItems.DILITHIUM_CRYSTAL)
.unlockedBy(MItems.DILITHIUM_CRYSTAL_BLOCK)
.save(consumer, modLocation("dilithium_crystal/to_block"))
ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ItemStack(MItems.DILITHIUM_CRYSTAL, 9))
.requires(MItems.DILITHIUM_CRYSTAL_BLOCK)
.unlockedBy(MItems.DILITHIUM_CRYSTAL)
.unlockedBy(MItems.DILITHIUM_CRYSTAL_BLOCK)
.save(consumer, modLocation("dilithium_crystal/from_block"))
}

View File

@ -0,0 +1,105 @@
package ru.dbotthepony.mc.otm.datagen.tags
import net.minecraft.tags.BlockTags
import net.minecraft.tags.ItemTags
import net.minecraft.world.item.Items
import net.minecraft.world.level.block.Blocks
import ru.dbotthepony.mc.otm.registry.MBlockTags
import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MItemTags
import ru.dbotthepony.mc.otm.registry.MItems
import ru.dbotthepony.mc.otm.registry.MRegistry
fun addConstructionTags(tagsProvider: TagsProvider) {
tagsProvider.blocks.Appender(BlockTags.BEACON_BASE_BLOCKS).add(MBlocks.TRITANIUM_INGOT_BLOCK)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_STRUCTURE)
.add(MBlockTags.MULTIBLOCK_HARD_STRUCTURE, MBlockTags.MULTIBLOCK_SOFT_STRUCTURE)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_SOFT_STRUCTURE)
.add(MBlockTags.HARDENED_GLASS)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_HARD_STRUCTURE)
.add(MRegistry.VENT.allBlocks.values)
.add(MRegistry.VENT_ALTERNATIVE.allBlocks.values)
.add(MRegistry.TRITANIUM_BLOCK.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_BLOCK.blocks.values.stream().flatMap { it.values.stream() })
tagsProvider.items.Appender(MItemTags.CRAFTING_TABLES).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.WORKBENCHES).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.WORKBENCH).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.FURNACES).add(Items.FURNACE)
tagsProvider.blocks.Appender(MBlockTags.CRAFTING_TABLES).add(Blocks.CRAFTING_TABLE)
tagsProvider.blocks.Appender(MBlockTags.WORKBENCHES).add(Blocks.CRAFTING_TABLE)
tagsProvider.blocks.Appender(MBlockTags.WORKBENCH).add(Blocks.CRAFTING_TABLE)
tagsProvider.items.forge("hardened_glass").add(MRegistry.INDUSTRIAL_GLASS.allItems.values)
tagsProvider.items.forge("hardened_glass/colorless").add(MRegistry.INDUSTRIAL_GLASS.item)
tagsProvider.items.forge("hardened_glass/tinted").add(MRegistry.INDUSTRIAL_GLASS.items.values)
tagsProvider.items.forge("hardened_glass_panes").add(MRegistry.INDUSTRIAL_GLASS_PANE.allItems.values)
tagsProvider.items.forge("hardened_glass_panes/colorless").add(MRegistry.INDUSTRIAL_GLASS_PANE.item)
tagsProvider.items.forge("hardened_glass_panes/tinted").add(MRegistry.INDUSTRIAL_GLASS_PANE.items.values)
tagsProvider.blocks.forge("hardened_glass").add(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
tagsProvider.blocks.forge("hardened_glass/colorless").add(MRegistry.INDUSTRIAL_GLASS.block)
tagsProvider.blocks.forge("hardened_glass/tinted").add(MRegistry.INDUSTRIAL_GLASS.blocks.values)
tagsProvider.blocks.forge("hardened_glass_panes").add(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values)
tagsProvider.blocks.forge("hardened_glass_panes/colorless").add(MRegistry.INDUSTRIAL_GLASS_PANE.block)
tagsProvider.blocks.forge("hardened_glass_panes/tinted").add(MRegistry.INDUSTRIAL_GLASS_PANE.blocks.values)
MRegistry.INDUSTRIAL_GLASS.forEachItem { s, _, item -> tagsProvider.items.forge("hardened_glass/$s").add(item) }
MRegistry.INDUSTRIAL_GLASS_PANE.forEachItem { s, _, item -> tagsProvider.items.forge("hardened_glass_panes/$s").add(item) }
MRegistry.INDUSTRIAL_GLASS.forEachBlock { s, _, block -> tagsProvider.blocks.forge("hardened_glass/$s").add(block) }
MRegistry.INDUSTRIAL_GLASS_PANE.forEachBlock { s, _, block -> tagsProvider.blocks.forge("hardened_glass_panes/$s").add(block) }
tagsProvider.items.Appender(MItemTags.INDUSTRIAL_GLASS).add(MRegistry.INDUSTRIAL_GLASS.allItems.values)
tagsProvider.blocks.Appender(MBlockTags.INDUSTRIAL_GLASS).add(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
tagsProvider.blocks.Appender(MBlockTags.CARGO_CRATES).add(MRegistry.CARGO_CRATES.allBlocks.values)
tagsProvider.items.Appender(ItemTags.DOORS).add(MItems.TRITANIUM_DOOR.values)
tagsProvider.blocks.Appender(BlockTags.DOORS).add(MBlocks.TRITANIUM_DOOR.values)
tagsProvider.items.Appender(ItemTags.TRAPDOORS).add(MItems.TRITANIUM_TRAPDOOR.values)
tagsProvider.blocks.Appender(BlockTags.TRAPDOORS).add(MBlocks.TRITANIUM_TRAPDOOR.values)
tagsProvider.blocks.Appender(BlockTags.PRESSURE_PLATES).add(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values)
tagsProvider.blocks.Appender(BlockTags.STAIRS)
.add(MRegistry.FLOOR_TILES_STAIRS.blocks.values)
.add(MRegistry.TRITANIUM_STAIRS.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.blocks.Appender(BlockTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks)
.add(MRegistry.FLOOR_TILES_SLAB.blocks.values)
.add(MBlocks.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.blocks.Appender(BlockTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_WALL.values)
tagsProvider.items.Appender(ItemTags.STAIRS)
.add(MRegistry.FLOOR_TILES_STAIRS.items.values)
.add(MRegistry.TRITANIUM_STAIRS.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems)
.add(MItems.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.items.Appender(ItemTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatItems)
.add(MRegistry.FLOOR_TILES_SLAB.items.values)
.add(MItems.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.items.Appender(ItemTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatItems)
.add(MItems.TRITANIUM_STRIPED_WALL.values)
}

View File

@ -0,0 +1,54 @@
package ru.dbotthepony.mc.otm.datagen.tags
import ru.dbotthepony.mc.otm.registry.MItems
import ru.dbotthepony.mc.otm.registry.MRegistry
fun addDyeTags(tagsProvider: TagsProvider) {
tagsProvider.addToDyeTags(MRegistry.CARGO_CRATES.allItems)
tagsProvider.addToDyeTags(MRegistry.INDUSTRIAL_GLASS.allItems)
tagsProvider.addToDyeTags(MRegistry.INDUSTRIAL_GLASS_PANE.allItems)
tagsProvider.addToDyeTags(MRegistry.DECORATIVE_CRATE.items)
tagsProvider.addToDyeTags(MItems.TRITANIUM_DOOR)
tagsProvider.addToDyeTags(MItems.TRITANIUM_TRAPDOOR)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_PRESSURE_PLATE.allItems)
tagsProvider.addToDyeTags(MRegistry.FLOOR_TILES_STAIRS.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_STAIRS.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_SLAB.items)
tagsProvider.addToDyeTags(MRegistry.FLOOR_TILES_SLAB.items)
tagsProvider.addToDyeTags(MRegistry.UNREFINED_FLOOR_TILES.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_WALL.items)
tagsProvider.addToDyeTags(MItems.ANDROID_STATION)
tagsProvider.addToDyeTags(MItems.ENERGY_SERVO)
tagsProvider.addToDyeTags(MItems.MATTER_DECOMPOSER)
tagsProvider.addToDyeTags(MItems.MATTER_CAPACITOR_BANK)
tagsProvider.addToDyeTags(MItems.BATTERY_BANK)
tagsProvider.addToDyeTags(MItems.MATTER_SCANNER)
tagsProvider.addToDyeTags(MItems.MATTER_PANEL)
tagsProvider.addToDyeTags(MItems.MATTER_REPLICATOR)
tagsProvider.addToDyeTags(MItems.MATTER_BOTTLER)
tagsProvider.addToDyeTags(MItems.ENERGY_COUNTER)
tagsProvider.addToDyeTags(MItems.CHEMICAL_GENERATOR)
tagsProvider.addToDyeTags(MItems.PLATE_PRESS)
tagsProvider.addToDyeTags(MItems.TWIN_PLATE_PRESS)
tagsProvider.addToDyeTags(MItems.MATTER_RECYCLER)
tagsProvider.addToDyeTags(MItems.POWERED_FURNACE)
tagsProvider.addToDyeTags(MItems.POWERED_SMOKER)
tagsProvider.addToDyeTags(MItems.POWERED_BLAST_FURNACE)
tagsProvider.addToDyeTags(MItems.DRIVE_VIEWER)
tagsProvider.addToDyeTags(MItems.ITEM_MONITOR)
tagsProvider.addToDyeTags(MItems.STORAGE_POWER_SUPPLIER)
tagsProvider.addToDyeTags(MItems.COBBLESTONE_GENERATOR)
tagsProvider.addToDyeTags(MItems.ESSENCE_STORAGE)
tagsProvider.addToDyeTags(MItems.MATTER_RECONSTRUCTOR)
tagsProvider.addToDyeTags(MItems.ANDROID_CHARGER)
}

View File

@ -0,0 +1,46 @@
package ru.dbotthepony.mc.otm.datagen.tags
import net.minecraft.tags.ItemTags
import net.neoforged.neoforge.common.Tags
import ru.dbotthepony.mc.otm.registry.MItemTags
import ru.dbotthepony.mc.otm.registry.MItems
fun addEquipmentTags(tagsProvider: TagsProvider) {
// TODO: is new tag appropriate for modded armors?
tagsProvider.items.Appender(Tags.Items.ARMORS)
.add(MItems.TRITANIUM_HELMET, MItems.SIMPLE_TRITANIUM_HELMET)
.add(MItems.TRITANIUM_CHESTPLATE, MItems.SIMPLE_TRITANIUM_CHESTPLATE, MItems.PORTABLE_GRAVITATION_STABILIZER)
.add(MItems.TRITANIUM_PANTS, MItems.SIMPLE_TRITANIUM_PANTS)
.add(MItems.TRITANIUM_BOOTS, MItems.SIMPLE_TRITANIUM_BOOTS)
tagsProvider.items.Appender(ItemTags.DYEABLE).add(MItems.TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.TRIMMABLE_ARMOR).add(MItems.SIMPLE_TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.FREEZE_IMMUNE_WEARABLES).add(MItems.TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.SWORDS).add(MItems.TRITANIUM_SWORD).add(MItems.ENERGY_SWORD)
tagsProvider.items.Appender(ItemTags.AXES).add(MItems.TRITANIUM_AXE)
tagsProvider.items.Appender(ItemTags.PICKAXES).add(MItems.TRITANIUM_PICKAXE)
tagsProvider.items.Appender(ItemTags.SHOVELS).add(MItems.TRITANIUM_SHOVEL)
tagsProvider.items.Appender(ItemTags.HOES).add(MItems.TRITANIUM_HOE)
tagsProvider.items.Appender(Tags.Items.TOOLS_SHEAR).add(MItems.TRITANIUM_SHEARS)
tagsProvider.items.Appender(Tags.Items.TOOLS_SHIELD).add(MItems.TRITANIUM_SHIELD)
tagsProvider.items.Appender(MItemTags.TOOLS_HAMMERS).add(MItems.EXPLOSIVE_HAMMER)
tagsProvider.items.forge("tools").add(MItemTags.TOOLS_HAMMERS)
tagsProvider.items.Appender(ItemTags.DURABILITY_ENCHANTABLE)
.add(MItems.EXPLOSIVE_HAMMER)
.add(MItems.TRITANIUM_SHEARS)
.add(MItems.TRITANIUM_SHIELD)
tagsProvider.items.Appender(ItemTags.MINING_ENCHANTABLE)
.add(MItems.TRITANIUM_SHEARS)
tagsProvider.items.Appender(ItemTags.EQUIPPABLE_ENCHANTABLE)
.add(MItems.PORTABLE_GRAVITATION_STABILIZER)
tagsProvider.items.Appender(ItemTags.VANISHING_ENCHANTABLE)
.add(MItems.PORTABLE_GRAVITATION_STABILIZER)
}

View File

@ -0,0 +1,124 @@
package ru.dbotthepony.mc.otm.datagen.tags
import net.minecraft.world.item.Tiers
import net.minecraft.world.level.block.Block
import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MRegistry
fun addMineableTags(tagsProvider: TagsProvider) {
tagsProvider.requiresPickaxe(
MBlocks.MATTER_CABLE,
MBlocks.STORAGE_CABLE
)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_DOOR.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_TRAPDOOR.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.PAINTER, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.ENERGY_CABLES.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.GRILL.values, Tiers.STONE)
tagsProvider.requiresPickaxe(listOf<Block>(
*MBlocks.ANDROID_STATION.values.toTypedArray(),
*MBlocks.BATTERY_BANK.values.toTypedArray(),
*MBlocks.MATTER_DECOMPOSER.values.toTypedArray(),
*MBlocks.MATTER_CAPACITOR_BANK.values.toTypedArray(),
MBlocks.PATTERN_STORAGE,
*MBlocks.MATTER_SCANNER.values.toTypedArray(),
*MBlocks.MATTER_PANEL.values.toTypedArray(),
*MBlocks.MATTER_REPLICATOR.values.toTypedArray(),
*MBlocks.MATTER_BOTTLER.values.toTypedArray(),
*MBlocks.ENERGY_COUNTER.values.toTypedArray(),
*MBlocks.CHEMICAL_GENERATOR.values.toTypedArray(),
*MBlocks.PLATE_PRESS.values.toTypedArray(),
*MBlocks.TWIN_PLATE_PRESS.values.toTypedArray(),
*MBlocks.MATTER_RECYCLER.values.toTypedArray(),
MBlocks.MATTER_ENTANGLER,
*MBlocks.POWERED_FURNACE.values.toTypedArray(),
*MBlocks.POWERED_SMOKER.values.toTypedArray(),
*MBlocks.POWERED_BLAST_FURNACE.values.toTypedArray(),
MBlocks.STORAGE_BUS,
MBlocks.STORAGE_IMPORTER,
MBlocks.STORAGE_EXPORTER,
*MBlocks.DRIVE_VIEWER.values.toTypedArray(),
MBlocks.DRIVE_RACK,
*MBlocks.ITEM_MONITOR.values.toTypedArray(),
*MBlocks.STORAGE_POWER_SUPPLIER.values.toTypedArray(),
MBlocks.PHANTOM_ATTRACTOR,
*MBlocks.ENERGY_SERVO.values.toTypedArray(),
MBlocks.TRITANIUM_INGOT_BLOCK,
MBlocks.METAL_JUNK,
MBlocks.METAL_MESH,
MBlocks.TRITANIUM_BARS,
MBlocks.METAL_RAILING,
MBlocks.ENGINE,
MBlocks.HOLO_SIGN,
*MBlocks.COBBLESTONE_GENERATOR.values.toTypedArray(),
*MBlocks.ESSENCE_STORAGE.values.toTypedArray(),
*MBlocks.MATTER_RECONSTRUCTOR.values.toTypedArray(),
MBlocks.FLUID_TANK,
*MBlocks.ANDROID_CHARGER.values.toTypedArray(),
MBlocks.BLACK_HOLE_GENERATOR,
MBlocks.ITEM_INPUT_HATCH,
MBlocks.ITEM_OUTPUT_HATCH,
), Tiers.IRON)
tagsProvider.requiresPickaxe(listOf(
MBlocks.DILITHIUM_ORE,
MBlocks.DEEPSLATE_DILITHIUM_ORE,
MBlocks.GRAVITATION_STABILIZER,
MBlocks.GRAVITATION_STABILIZER_LENS,
), Tiers.DIAMOND)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ANVIL, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ORE, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.DEEPSLATE_TRITANIUM_ORE, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_RAW_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_STAIRS.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_WALL.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_SLAB.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.CARBON_FIBRE_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.INFINITE_WATER_SOURCE, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.CARGO_CRATES.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT_ALTERNATIVE.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_BLOCK.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.COMPUTER_TERMINAL.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.STAR_CHAIR.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_SLAB.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_WALL.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STAIRS.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES_STAIRS.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES_SLAB.blocks.values)
tagsProvider.requiresShovel(MRegistry.UNREFINED_FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.DECORATIVE_CRATE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.LABORATORY_LAMP, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.LABORATORY_LAMP_INVERTED, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.METAL_BEAM, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.DANGER_STRIPE_BLOCK)
}

View File

@ -0,0 +1,61 @@
package ru.dbotthepony.mc.otm.datagen.tags
import ru.dbotthepony.mc.otm.registry.MBlockTags
import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MItemTags
import ru.dbotthepony.mc.otm.registry.MItems
fun addResourceTags(tagsProvider: TagsProvider) {
tagsProvider.circuits.add("basic", MItems.BASIC_CONTROL_CIRCUIT)
tagsProvider.circuits.add("advanced", MItems.ADVANCED_CONTROL_CIRCUIT)
tagsProvider.stoneOre("tritanium", MBlocks.TRITANIUM_ORE)
tagsProvider.stoneOre("dilithium", MBlocks.DILITHIUM_ORE)
tagsProvider.deepslateOre("tritanium", MBlocks.DEEPSLATE_TRITANIUM_ORE)
tagsProvider.deepslateOre("dilithium", MBlocks.DEEPSLATE_DILITHIUM_ORE)
tagsProvider.plates.add("tritanium", MItems.TRITANIUM_PLATE)
tagsProvider.plates.add("iron", MItems.IRON_PLATE)
tagsProvider.plates.add("gold", MItems.GOLD_PLATE)
tagsProvider.plates.add("carbon", MItems.CARBON_MESH)
tagsProvider.dusts.add("tritanium", MItems.TRITANIUM_DUST)
tagsProvider.ingots.add("tritanium", MItems.TRITANIUM_INGOT)
tagsProvider.wires.add("copper", MItems.COPPER_WIRING)
tagsProvider.wires.add("gold", MItems.GOLD_WIRING)
tagsProvider.items.Appender(MItemTags.TRITANIUM_NUGGETS).add(MItems.TRITANIUM_NUGGET)
tagsProvider.items.Appender(MItemTags.NUGGETS).add(MItems.TRITANIUM_NUGGET)
tagsProvider.items.forge("reinforced_tritanium").add(MItems.REINFORCED_TRITANIUM_PLATE)
tagsProvider.storageBlocksAsItem.add("tritanium", MItems.TRITANIUM_INGOT_BLOCK)
tagsProvider.storageBlocksAsBlock.add("tritanium", MBlocks.TRITANIUM_INGOT_BLOCK)
tagsProvider.singleDropOre(
MBlocks.TRITANIUM_ORE,
MBlocks.DEEPSLATE_TRITANIUM_ORE
)
tagsProvider.denseDropOre(
MBlocks.DILITHIUM_ORE,
MBlocks.DEEPSLATE_DILITHIUM_ORE,
)
tagsProvider.clump("tritanium", MItems.TRITANIUM_ORE_CLUMP, MBlocks.TRITANIUM_RAW_BLOCK)
tagsProvider.gems.add(MItems.DILITHIUM_CRYSTAL)
tagsProvider.items.Appender(MItemTags.DILITHIUM_ORES)
.add(MItems.DILITHIUM_ORE)
.add(MItems.DEEPSLATE_DILITHIUM_ORE)
tagsProvider.blocks.Appender(MBlockTags.DILITHIUM_ORES)
.add(MBlocks.DILITHIUM_ORE)
.add(MBlocks.DEEPSLATE_DILITHIUM_ORE)
tagsProvider.items.forge("gems/dilithium").add(MItems.DILITHIUM_CRYSTAL)
}

View File

@ -18,195 +18,41 @@ import ru.dbotthepony.mc.otm.registry.MRegistry
fun addTags(tagsProvider: TagsProvider) {
tagsProvider.items.forge("pistons").add(Items.PISTON)
tagsProvider.circuits.add("basic", MItems.BASIC_CONTROL_CIRCUIT)
tagsProvider.circuits.add("advanced", MItems.ADVANCED_CONTROL_CIRCUIT)
tagsProvider.dusts.add("tritanium", MItems.TRITANIUM_DUST)
tagsProvider.ingots.add("tritanium", MItems.TRITANIUM_INGOT)
tagsProvider.items.Appender(ItemTags.BEACON_PAYMENT_ITEMS).add(MItems.TRITANIUM_INGOT)
tagsProvider.plates.add("tritanium", MItems.TRITANIUM_PLATE)
tagsProvider.plates.add("iron", MItems.IRON_PLATE)
tagsProvider.plates.add("gold", MItems.GOLD_PLATE)
tagsProvider.plates.add("carbon", MItems.CARBON_MESH)
tagsProvider.items.Appender(ItemTags.BEACON_PAYMENT_ITEMS)
.add(MItems.TRITANIUM_INGOT)
.add(MItems.DILITHIUM_CRYSTAL)
tagsProvider.items.Appender(ItemTags.MEAT).add(MItems.NUTRIENT_PASTE)
tagsProvider.fluids.forge("experience").add(MFluids.LIQUID_XP).add(MFluids.LIQUID_XP_FLOWING)
tagsProvider.fluidTypes.forge("experience").add(MFluids.LIQUID_XP_TYPE)
tagsProvider.items.forge("reinforced_tritanium").add(MItems.REINFORCED_TRITANIUM_PLATE)
tagsProvider.storageBlocksAsItem.add("tritanium", MItems.TRITANIUM_INGOT_BLOCK)
tagsProvider.storageBlocksAsBlock.add("tritanium", MBlocks.TRITANIUM_INGOT_BLOCK)
tagsProvider.blocks.Appender(BlockTags.BEACON_BASE_BLOCKS).add(MBlocks.TRITANIUM_INGOT_BLOCK)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_STRUCTURE)
.add(MBlockTags.MULTIBLOCK_HARD_STRUCTURE, MBlockTags.MULTIBLOCK_SOFT_STRUCTURE)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_SOFT_STRUCTURE)
.add(MBlockTags.HARDENED_GLASS)
tagsProvider.blocks.Appender(MBlockTags.MULTIBLOCK_HARD_STRUCTURE)
.add(MRegistry.VENT.allBlocks.values)
.add(MRegistry.VENT_ALTERNATIVE.allBlocks.values)
.add(MRegistry.TRITANIUM_BLOCK.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_BLOCK.blocks.values.stream().flatMap { it.values.stream() })
tagsProvider.stoneOre("tritanium", MBlocks.TRITANIUM_ORE)
tagsProvider.deepslateOre("tritanium", MBlocks.DEEPSLATE_TRITANIUM_ORE)
tagsProvider.singleDropOre(
MBlocks.TRITANIUM_ORE,
MBlocks.DEEPSLATE_TRITANIUM_ORE
)
tagsProvider.clump("tritanium", MItems.TRITANIUM_ORE_CLUMP, MBlocks.TRITANIUM_RAW_BLOCK)
tagsProvider.wires.add("copper", MItems.COPPER_WIRING)
tagsProvider.wires.add("gold", MItems.GOLD_WIRING)
tagsProvider.requiresPickaxe(
MBlocks.MATTER_CABLE,
MBlocks.STORAGE_CABLE
)
tagsProvider.items.Appender(MItemTags.CRAFTING_TABLES).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.WORKBENCHES).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.WORKBENCH).add(Items.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.FURNACES).add(Items.FURNACE)
tagsProvider.blocks.Appender(MBlockTags.CRAFTING_TABLES).add(Blocks.CRAFTING_TABLE)
tagsProvider.blocks.Appender(MBlockTags.WORKBENCHES).add(Blocks.CRAFTING_TABLE)
tagsProvider.blocks.Appender(MBlockTags.WORKBENCH).add(Blocks.CRAFTING_TABLE)
tagsProvider.items.Appender(MItemTags.CRAFTING_TABLES)
.add(MItemTags.WORKBENCHES)
.add(MItemTags.WORKBENCH)
tagsProvider.blocks.Appender(MBlockTags.CRAFTING_TABLES)
.add(MBlockTags.WORKBENCHES)
.add(MBlockTags.WORKBENCH)
tagsProvider.items.Appender(MItemTags.MINECART_CARGO_CRATES).add(MItems.CARGO_CRATE_MINECARTS.values)
tagsProvider.items.forge("hardened_glass").add(MRegistry.INDUSTRIAL_GLASS.allItems.values)
tagsProvider.items.forge("hardened_glass/colorless").add(MRegistry.INDUSTRIAL_GLASS.item)
tagsProvider.items.forge("hardened_glass/tinted").add(MRegistry.INDUSTRIAL_GLASS.items.values)
tagsProvider.items.forge("hardened_glass_panes").add(MRegistry.INDUSTRIAL_GLASS_PANE.allItems.values)
tagsProvider.items.forge("hardened_glass_panes/colorless").add(MRegistry.INDUSTRIAL_GLASS_PANE.item)
tagsProvider.items.forge("hardened_glass_panes/tinted").add(MRegistry.INDUSTRIAL_GLASS_PANE.items.values)
MRegistry.INDUSTRIAL_GLASS.forEachItem { s, _, item -> tagsProvider.items.forge("hardened_glass/$s").add(item) }
MRegistry.INDUSTRIAL_GLASS_PANE.forEachItem { s, _, item -> tagsProvider.items.forge("hardened_glass_panes/$s").add(item) }
tagsProvider.blocks.forge("hardened_glass").add(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
tagsProvider.blocks.forge("hardened_glass/colorless").add(MRegistry.INDUSTRIAL_GLASS.block)
tagsProvider.blocks.forge("hardened_glass/tinted").add(MRegistry.INDUSTRIAL_GLASS.blocks.values)
tagsProvider.blocks.forge("hardened_glass_panes").add(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values)
tagsProvider.blocks.forge("hardened_glass_panes/colorless").add(MRegistry.INDUSTRIAL_GLASS_PANE.block)
tagsProvider.blocks.forge("hardened_glass_panes/tinted").add(MRegistry.INDUSTRIAL_GLASS_PANE.blocks.values)
MRegistry.INDUSTRIAL_GLASS.forEachBlock { s, _, block -> tagsProvider.blocks.forge("hardened_glass/$s").add(block) }
MRegistry.INDUSTRIAL_GLASS_PANE.forEachBlock { s, _, block -> tagsProvider.blocks.forge("hardened_glass_panes/$s").add(block) }
tagsProvider.items.Appender(MItemTags.INDUSTRIAL_GLASS).add(MRegistry.INDUSTRIAL_GLASS.allItems.values)
tagsProvider.blocks.Appender(MBlockTags.INDUSTRIAL_GLASS).add(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
tagsProvider.blocks.Appender(MBlockTags.CARGO_CRATES).add(MRegistry.CARGO_CRATES.allBlocks.values)
tagsProvider.items.Appender(ItemTags.DOORS).add(MItems.TRITANIUM_DOOR.values)
tagsProvider.blocks.Appender(BlockTags.DOORS).add(MBlocks.TRITANIUM_DOOR.values)
tagsProvider.items.Appender(ItemTags.TRAPDOORS).add(MItems.TRITANIUM_TRAPDOOR.values)
tagsProvider.blocks.Appender(BlockTags.TRAPDOORS).add(MBlocks.TRITANIUM_TRAPDOOR.values)
tagsProvider.blocks.Appender(BlockTags.PRESSURE_PLATES).add(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values)
tagsProvider.items.Appender(MItemTags.MACHINES).add(MItems.MACHINES)
tagsProvider.blocks.Appender(MBlockTags.MACHINES).add(MItems.MACHINES.stream().map { it!!.block })
tagsProvider.blocks.Appender(BlockTags.ANVIL).add(MBlocks.TRITANIUM_ANVIL)
tagsProvider.items.Appender(ItemTags.ANVIL).add(MItems.TRITANIUM_ANVIL)
tagsProvider.items.Appender(MItemTags.TRITANIUM_NUGGETS).add(MItems.TRITANIUM_NUGGET)
tagsProvider.items.Appender(MItemTags.NUGGETS).add(MItems.TRITANIUM_NUGGET)
// TODO: is new tag appropriate for modded armors?
tagsProvider.items.Appender(Tags.Items.ARMORS)
.add(MItems.TRITANIUM_HELMET, MItems.SIMPLE_TRITANIUM_HELMET)
.add(MItems.TRITANIUM_CHESTPLATE, MItems.SIMPLE_TRITANIUM_CHESTPLATE, MItems.PORTABLE_GRAVITATION_STABILIZER)
.add(MItems.TRITANIUM_PANTS, MItems.SIMPLE_TRITANIUM_PANTS)
.add(MItems.TRITANIUM_BOOTS, MItems.SIMPLE_TRITANIUM_BOOTS)
tagsProvider.items.Appender(ItemTags.DYEABLE).add(MItems.TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.TRIMMABLE_ARMOR).add(MItems.SIMPLE_TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.FREEZE_IMMUNE_WEARABLES).add(MItems.TRITANIUM_ARMOR)
tagsProvider.items.Appender(ItemTags.SWORDS).add(MItems.TRITANIUM_SWORD).add(MItems.ENERGY_SWORD)
tagsProvider.items.Appender(ItemTags.AXES).add(MItems.TRITANIUM_AXE)
tagsProvider.items.Appender(ItemTags.PICKAXES).add(MItems.TRITANIUM_PICKAXE)
tagsProvider.items.Appender(ItemTags.SHOVELS).add(MItems.TRITANIUM_SHOVEL)
tagsProvider.items.Appender(ItemTags.HOES).add(MItems.TRITANIUM_HOE)
tagsProvider.items.Appender(Tags.Items.TOOLS_SHEAR).add(MItems.TRITANIUM_SHEARS)
tagsProvider.items.Appender(Tags.Items.TOOLS_SHIELD).add(MItems.TRITANIUM_SHIELD)
tagsProvider.items.Appender(MItemTags.TOOLS_HAMMERS).add(MItems.EXPLOSIVE_HAMMER)
tagsProvider.items.forge("tools").add(MItemTags.TOOLS_HAMMERS)
tagsProvider.items.Appender(ItemTags.DURABILITY_ENCHANTABLE)
.add(MItems.EXPLOSIVE_HAMMER)
.add(MItems.TRITANIUM_SHEARS)
.add(MItems.TRITANIUM_SHIELD)
tagsProvider.items.Appender(ItemTags.MINING_ENCHANTABLE)
.add(MItems.TRITANIUM_SHEARS)
tagsProvider.items.Appender(ItemTags.EQUIPPABLE_ENCHANTABLE)
.add(MItems.PORTABLE_GRAVITATION_STABILIZER)
tagsProvider.items.Appender(ItemTags.VANISHING_ENCHANTABLE)
.add(MItems.PORTABLE_GRAVITATION_STABILIZER)
tagsProvider.items.Appender(MItemTags.UPGRADES)
.add(MItems.MachineUpgrades.Basic.LIST)
.add(MItems.MachineUpgrades.Normal.LIST)
.add(MItems.MachineUpgrades.Advanced.LIST)
.add(MItems.MachineUpgrades.Creative.LIST)
tagsProvider.blocks.Appender(BlockTags.STAIRS)
.add(MRegistry.FLOOR_TILES_STAIRS.blocks.values)
.add(MRegistry.TRITANIUM_STAIRS.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.blocks.Appender(BlockTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks)
.add(MRegistry.FLOOR_TILES_SLAB.blocks.values)
.add(MBlocks.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.blocks.Appender(BlockTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_WALL.values)
tagsProvider.items.Appender(ItemTags.STAIRS)
.add(MRegistry.FLOOR_TILES_STAIRS.items.values)
.add(MRegistry.TRITANIUM_STAIRS.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems)
.add(MItems.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.items.Appender(ItemTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatItems)
.add(MRegistry.FLOOR_TILES_SLAB.items.values)
.add(MItems.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.items.Appender(ItemTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatItems)
.add(MItems.TRITANIUM_STRIPED_WALL.values)
tagsProvider.items.Appender(MItemTags.NO_REPLICATION)
.add(MItemTags.DILITHIUM_GEMS)
.add(MItemTags.DILITHIUM_ORES)
.add(Items.WRITTEN_BOOK)
.add(Tags.Items.ORES)
.add(Tags.Items.RAW_MATERIALS)
@ -223,161 +69,6 @@ fun addTags(tagsProvider: TagsProvider) {
.add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_WITHER)
.add(MItems.ExopackUpgrades.INVENTORY_UPGRADE_ENDER_DRAGON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_DOOR.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_TRAPDOOR.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.PAINTER, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.ENERGY_CABLES.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.GRILL.values, Tiers.STONE)
tagsProvider.requiresPickaxe(listOf<Block>(
*MBlocks.ANDROID_STATION.values.toTypedArray(),
*MBlocks.BATTERY_BANK.values.toTypedArray(),
*MBlocks.MATTER_DECOMPOSER.values.toTypedArray(),
*MBlocks.MATTER_CAPACITOR_BANK.values.toTypedArray(),
MBlocks.PATTERN_STORAGE,
*MBlocks.MATTER_SCANNER.values.toTypedArray(),
*MBlocks.MATTER_PANEL.values.toTypedArray(),
*MBlocks.MATTER_REPLICATOR.values.toTypedArray(),
*MBlocks.MATTER_BOTTLER.values.toTypedArray(),
*MBlocks.ENERGY_COUNTER.values.toTypedArray(),
*MBlocks.CHEMICAL_GENERATOR.values.toTypedArray(),
*MBlocks.PLATE_PRESS.values.toTypedArray(),
*MBlocks.TWIN_PLATE_PRESS.values.toTypedArray(),
*MBlocks.MATTER_RECYCLER.values.toTypedArray(),
MBlocks.MATTER_ENTANGLER,
*MBlocks.POWERED_FURNACE.values.toTypedArray(),
*MBlocks.POWERED_SMOKER.values.toTypedArray(),
*MBlocks.POWERED_BLAST_FURNACE.values.toTypedArray(),
MBlocks.STORAGE_BUS,
MBlocks.STORAGE_IMPORTER,
MBlocks.STORAGE_EXPORTER,
*MBlocks.DRIVE_VIEWER.values.toTypedArray(),
MBlocks.DRIVE_RACK,
*MBlocks.ITEM_MONITOR.values.toTypedArray(),
*MBlocks.STORAGE_POWER_SUPPLIER.values.toTypedArray(),
MBlocks.PHANTOM_ATTRACTOR,
*MBlocks.ENERGY_SERVO.values.toTypedArray(),
MBlocks.TRITANIUM_INGOT_BLOCK,
MBlocks.METAL_JUNK,
MBlocks.METAL_MESH,
MBlocks.TRITANIUM_BARS,
MBlocks.METAL_RAILING,
MBlocks.ENGINE,
MBlocks.HOLO_SIGN,
*MBlocks.COBBLESTONE_GENERATOR.values.toTypedArray(),
*MBlocks.ESSENCE_STORAGE.values.toTypedArray(),
*MBlocks.MATTER_RECONSTRUCTOR.values.toTypedArray(),
MBlocks.FLUID_TANK,
*MBlocks.ANDROID_CHARGER.values.toTypedArray(),
MBlocks.BLACK_HOLE_GENERATOR,
MBlocks.ITEM_INPUT_HATCH,
MBlocks.ITEM_OUTPUT_HATCH,
), Tiers.IRON)
tagsProvider.addToDyeTags(MRegistry.CARGO_CRATES.allItems)
tagsProvider.addToDyeTags(MRegistry.INDUSTRIAL_GLASS.allItems)
tagsProvider.addToDyeTags(MRegistry.INDUSTRIAL_GLASS_PANE.allItems)
tagsProvider.addToDyeTags(MRegistry.DECORATIVE_CRATE.items)
tagsProvider.addToDyeTags(MItems.TRITANIUM_DOOR)
tagsProvider.addToDyeTags(MItems.TRITANIUM_TRAPDOOR)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_PRESSURE_PLATE.allItems)
tagsProvider.addToDyeTags(MRegistry.FLOOR_TILES_STAIRS.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_STAIRS.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_SLAB.items)
tagsProvider.addToDyeTags(MRegistry.FLOOR_TILES_SLAB.items)
tagsProvider.addToDyeTags(MRegistry.UNREFINED_FLOOR_TILES.items)
tagsProvider.addToDyeTags(MRegistry.TRITANIUM_WALL.items)
tagsProvider.addToDyeTags(MItems.ANDROID_STATION)
tagsProvider.addToDyeTags(MItems.ENERGY_SERVO)
tagsProvider.addToDyeTags(MItems.MATTER_DECOMPOSER)
tagsProvider.addToDyeTags(MItems.MATTER_CAPACITOR_BANK)
tagsProvider.addToDyeTags(MItems.BATTERY_BANK)
tagsProvider.addToDyeTags(MItems.MATTER_SCANNER)
tagsProvider.addToDyeTags(MItems.MATTER_PANEL)
tagsProvider.addToDyeTags(MItems.MATTER_REPLICATOR)
tagsProvider.addToDyeTags(MItems.MATTER_BOTTLER)
tagsProvider.addToDyeTags(MItems.ENERGY_COUNTER)
tagsProvider.addToDyeTags(MItems.CHEMICAL_GENERATOR)
tagsProvider.addToDyeTags(MItems.PLATE_PRESS)
tagsProvider.addToDyeTags(MItems.TWIN_PLATE_PRESS)
tagsProvider.addToDyeTags(MItems.MATTER_RECYCLER)
tagsProvider.addToDyeTags(MItems.POWERED_FURNACE)
tagsProvider.addToDyeTags(MItems.POWERED_SMOKER)
tagsProvider.addToDyeTags(MItems.POWERED_BLAST_FURNACE)
tagsProvider.addToDyeTags(MItems.DRIVE_VIEWER)
tagsProvider.addToDyeTags(MItems.ITEM_MONITOR)
tagsProvider.addToDyeTags(MItems.STORAGE_POWER_SUPPLIER)
tagsProvider.addToDyeTags(MItems.COBBLESTONE_GENERATOR)
tagsProvider.addToDyeTags(MItems.ESSENCE_STORAGE)
tagsProvider.addToDyeTags(MItems.MATTER_RECONSTRUCTOR)
tagsProvider.addToDyeTags(MItems.ANDROID_CHARGER)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ANVIL, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_ORE, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.DEEPSLATE_TRITANIUM_ORE, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_RAW_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_STAIRS.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_WALL.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_SLAB.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.CARBON_FIBRE_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.INFINITE_WATER_SOURCE, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.CARGO_CRATES.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT_ALTERNATIVE.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_BLOCK.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.COMPUTER_TERMINAL.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.STAR_CHAIR.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_SLAB.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_WALL.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STAIRS.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES_STAIRS.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES_SLAB.blocks.values)
tagsProvider.requiresShovel(MRegistry.UNREFINED_FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.DECORATIVE_CRATE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.LABORATORY_LAMP, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.LABORATORY_LAMP_INVERTED, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.METAL_BEAM, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.DANGER_STRIPE_BLOCK)
tagsProvider.requiresPickaxe(listOf(
MBlocks.GRAVITATION_STABILIZER,
MBlocks.GRAVITATION_STABILIZER_LENS,
), Tiers.DIAMOND)
tagsProvider.dragonImmune.add(
MBlocks.BLACK_HOLE,
MBlocks.GRAVITATION_STABILIZER,

View File

@ -240,6 +240,15 @@ class TagsProvider(private val event: GatherDataEvent) {
return this
}
fun denseDropOre(vararg blocks: Block): TagsProvider {
for (block in blocks) {
itemOreRatesSingular.add(block.asItem())
blockOreRatesSingular.add(block)
}
return this
}
fun ore(key: String, block: Block): TagsProvider {
val forgeKey = ResourceLocation("c", "ores/$key")
val b = TagKey.create(Registries.BLOCK, forgeKey)
@ -276,6 +285,7 @@ class TagsProvider(private val event: GatherDataEvent) {
val dusts = items.Appender(Tags.Items.DUSTS)
val ingots = items.Appender(Tags.Items.INGOTS)
val itemOres = items.Appender(Tags.Items.ORES)
val gems = items.Appender(Tags.Items.GEMS)
val blockOres = blocks.Appender(Tags.Blocks.ORES)
val plates = items.forge("plates")
val storageBlocksAsItem = items.Appender(Tags.Items.STORAGE_BLOCKS)
@ -292,10 +302,10 @@ class TagsProvider(private val event: GatherDataEvent) {
// val blockOreRatesSparse = blocks.forge("ore_rates/sparse")
val blockOreRatesSingular = blocks.Appender(Tags.Blocks.ORE_RATES_SINGULAR)
// val blockOreRatesDense = blocks.forge("ore_rates/dense")
val blockOreRatesDense = blocks.forge("ore_rates/dense")
// val itemOreRatesSparse = items.forge("ore_rates/sparse")
val itemOreRatesSingular = items.Appender(Tags.Items.ORE_RATES_SINGULAR)
// val itemOreRatesDense = items.forge("ore_rates/dense")
val itemOreRatesDense = items.forge("ore_rates/dense")
val gameEvents = Delegate(Registries.GAME_EVENT)
val vibrations = gameEvents.Appender(GameEventTags.VIBRATIONS)

View File

@ -100,6 +100,7 @@ object OverdriveThatMatters {
CommandArgumentTypes.register(MOD_BUS)
MHeightProviders.register(MOD_BUS)
MPlacementModifiers.register(MOD_BUS)
MLootNumberProviders.register(MOD_BUS)
StorageStack.Companion.register(MOD_BUS)
MatteryChestMenu.Companion.register(MOD_BUS)

View File

@ -0,0 +1,31 @@
package ru.dbotthepony.mc.otm.data.loot
import com.mojang.serialization.MapCodec
import com.mojang.serialization.codecs.RecordCodecBuilder
import net.minecraft.util.valueproviders.IntProvider
import net.minecraft.world.level.storage.loot.LootContext
import net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType
import net.minecraft.world.level.storage.loot.providers.number.NumberProvider
import ru.dbotthepony.mc.otm.registry.MLootNumberProviders
class Int2NumberProvider(val parent: IntProvider) : NumberProvider {
override fun getFloat(context: LootContext): Float {
return getInt(context).toFloat()
}
override fun getInt(context: LootContext): Int {
return parent.sample(context.random)
}
override fun getType(): LootNumberProviderType {
return MLootNumberProviders.INT_2_NUMBER_TYPE
}
companion object {
val CODEC: MapCodec<Int2NumberProvider> by lazy {
RecordCodecBuilder.mapCodec {
it.group(IntProvider.CODEC.fieldOf("value").forGetter(Int2NumberProvider::parent)).apply(it, ::Int2NumberProvider)
}
}
}
}

View File

@ -57,6 +57,7 @@ data class EllipsoidPlacement(
val yPow = yLength * yLength
count = minOf(count, (xLength * zLength * yLength * PI * (4.0 / 3.0)).roundToInt())
count = 600
return Stream.generate { position + BlockPos(this.x.sample(random), this.y.sample(random), this.z.sample(random)) }
.limit(count * 10L) // failsafe

View File

@ -17,6 +17,8 @@ object MBlockTags {
val REQUIRES_TRITANIUM_TOOL: TagKey<Block> = BlockTags.create(ResourceLocation("minecraft", "requires_tritanium_tool"))
val DILITHIUM_ORES: TagKey<Block> = BlockTags.create(ResourceLocation("c", "ores/dilithium"))
val HARDENED_GLASS_PANES: TagKey<Block> = BlockTags.create(ResourceLocation("c", "hardened_glass_panes"))
val HARDENED_GLASS_PANES_BLACK: TagKey<Block> = BlockTags.create(ResourceLocation("c", "hardened_glass_panes/black"))
val HARDENED_GLASS_PANES_BLUE: TagKey<Block> = BlockTags.create(ResourceLocation("c", "hardened_glass_panes/blue"))

View File

@ -194,7 +194,7 @@ object MBlocks {
UniformInt.of(0, 3),
BlockBehaviour.Properties.of()
.mapColor(MapColor.STONE)
.strength(3.25f, 6.0f)
.strength(3f, 15.0f)
.requiresCorrectToolForDrops(),
) }
@ -248,6 +248,26 @@ object MBlocks {
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).instrument(NoteBlockInstrument.BASEDRUM).strength(8.0f, 10f).requiresCorrectToolForDrops()
) }
val DILITHIUM_ORE: Block by registry.register("dilithium_ore") { DropExperienceBlock(
UniformInt.of(1, 6),
BlockBehaviour.Properties.of()
.mapColor(MapColor.STONE)
.strength(3.5f, 25.0f)
.requiresCorrectToolForDrops(),
) }
val DEEPSLATE_DILITHIUM_ORE: Block by registry.register("deepslate_dilithium_ore") { DropExperienceBlock(
UniformInt.of(1, 6),
BlockBehaviour.Properties.of()
.mapColor(MapColor.DEEPSLATE)
.strength(4.5f, 25.0f)
.requiresCorrectToolForDrops(),
) }
val DILITHIUM_CRYSTAL_BLOCK: Block by registry.register("dilithium_crystal_block") {
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).sound(SoundType.AMETHYST).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val LABORATORY_LAMP: Block by registry.register(MNames.LABORATORY_LAMP) { LaboratoryLamp(false) }
val LABORATORY_LAMP_INVERTED: Block by registry.register(MNames.LABORATORY_LAMP_INVERTED) { LaboratoryLamp(true) }
val LABORATORY_LAMP_LIGHT: Block by registry.register(MNames.LABORATORY_LAMP_LIGHT) { LaboratoryLampLight() }

View File

@ -160,6 +160,11 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) {
accept(MItems.TRITANIUM_INGOT)
accept(MItems.TRITANIUM_INGOT_BLOCK)
accept(MItems.DILITHIUM_ORE)
accept(MItems.DEEPSLATE_DILITHIUM_ORE)
accept(MItems.DILITHIUM_CRYSTAL)
accept(MItems.DILITHIUM_CRYSTAL_BLOCK)
accept(MItems.TRITANIUM_TOOLS)
accept(MItems.TRITANIUM_SHIELD)
accept(MItems.SIMPLE_TRITANIUM_ARMOR)

View File

@ -27,6 +27,9 @@ object MItemTags {
val INDUSTRIAL_GLASS: TagKey<Item> = ItemTags.create(ResourceLocation(OverdriveThatMatters.MOD_ID, "industrial_glass"))
val UPGRADES: TagKey<Item> = ItemTags.create(ResourceLocation(OverdriveThatMatters.MOD_ID, "upgrades"))
val DILITHIUM_ORES: TagKey<Item> = ItemTags.create(ResourceLocation("c", "ores/dilithium"))
val DILITHIUM_GEMS: TagKey<Item> = ItemTags.create(ResourceLocation("c", "gems/dilithium"))
val CRAFTING_TABLES: TagKey<Item> = ItemTags.create(ResourceLocation("c", "crafting_tables"))
val WORKBENCHES: TagKey<Item> = ItemTags.create(ResourceLocation("c", "workbenches"))
val WORKBENCH: TagKey<Item> = ItemTags.create(ResourceLocation("c", "workbench"))

View File

@ -325,6 +325,11 @@ object MItems {
val TRITANIUM_BARS: BlockItem by registry.register(MNames.TRITANIUM_BARS) { BlockItem(MBlocks.TRITANIUM_BARS, DEFAULT_PROPERTIES) }
val METAL_RAILING: BlockItem by registry.register(MNames.METAL_RAILING) { BlockItem(MBlocks.METAL_RAILING, DEFAULT_PROPERTIES) }
val DILITHIUM_CRYSTAL by registry.register("dilithium_crystal") { MatteryItem(DEFAULT_PROPERTIES) }
val DILITHIUM_ORE by registry.register("dilithium_ore") { BlockItem(MBlocks.DILITHIUM_ORE, DEFAULT_PROPERTIES) }
val DEEPSLATE_DILITHIUM_ORE by registry.register("deepslate_dilithium_ore") { BlockItem(MBlocks.DEEPSLATE_DILITHIUM_ORE, DEFAULT_PROPERTIES) }
val DILITHIUM_CRYSTAL_BLOCK by registry.register("dilithium_crystal_block") { BlockItem(MBlocks.DILITHIUM_CRYSTAL_BLOCK, DEFAULT_PROPERTIES) }
val REDSTONE_INTERACTOR: RedstoneInteractorItem by registry.register("redstone_interactor") { RedstoneInteractorItem() }
val ESSENCE_SERVO: EssenceServoItem by registry.register("essence_servo") { EssenceServoItem() }

View File

@ -15,17 +15,11 @@ import ru.dbotthepony.mc.otm.data.condition.ChanceCondition
object MLootItemConditions {
private val registry = MDeferredRegister(Registries.LOOT_CONDITION_TYPE, OverdriveThatMatters.MOD_ID)
val HAS_EXOPACK: LootItemConditionType by registry.register("has_exopack") { LootItemConditionType(
SingletonCodec(HasExoPackCondition)
) }
val HAS_EXOPACK: LootItemConditionType by registry.register("has_exopack") { LootItemConditionType(SingletonCodec(HasExoPackCondition)) }
val CHANCE_WITH_PLAYTIME: LootItemConditionType by registry.register("chance_with_playtime") { LootItemConditionType(ChanceWithPlaytimeCondition.CODEC) }
val ITEM_IN_INVENTORY: LootItemConditionType by registry.register("item_in_inventory") { LootItemConditionType(ItemInInventoryCondition.CODEC) }
val KILLED_BY_REAL_PLAYER: LootItemConditionType by registry.register("killed_by_real_player") { LootItemConditionType(
SingletonCodec(KilledByRealPlayer)
) }
val KILLED_BY_REAL_PLAYER_OR_INDIRECTLY: LootItemConditionType by registry.register("killed_by_real_player_or_indirectly") { LootItemConditionType(
SingletonCodec(KilledByRealPlayerOrIndirectly)
) }
val KILLED_BY_REAL_PLAYER: LootItemConditionType by registry.register("killed_by_real_player") { LootItemConditionType(SingletonCodec(KilledByRealPlayer)) }
val KILLED_BY_REAL_PLAYER_OR_INDIRECTLY: LootItemConditionType by registry.register("killed_by_real_player_or_indirectly") { LootItemConditionType(SingletonCodec(KilledByRealPlayerOrIndirectly)) }
val CHANCE: LootItemConditionType by registry.register("chance") { LootItemConditionType(ChanceCondition.CODEC) }
fun register(bus: IEventBus) {

View File

@ -0,0 +1,17 @@
package ru.dbotthepony.mc.otm.registry
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType
import net.neoforged.bus.api.IEventBus
import ru.dbotthepony.mc.otm.OverdriveThatMatters
import ru.dbotthepony.mc.otm.data.loot.Int2NumberProvider
object MLootNumberProviders {
private val registry = MDeferredRegister(BuiltInRegistries.LOOT_NUMBER_PROVIDER_TYPE, OverdriveThatMatters.MOD_ID)
fun register(bus: IEventBus) {
registry.register(bus)
}
val INT_2_NUMBER_TYPE by registry.register("int2number") { LootNumberProviderType(Int2NumberProvider.CODEC) }
}

View File

@ -58,7 +58,7 @@ object MNames {
const val STORAGE_CABLE = "storage_cable" // нужен рецепт
const val STORAGE_POWER_SUPPLIER = "storage_power_supplier" // нужен рецепт
const val GRILL = "grill" // нужен рецепт
const val GRILL = "grill"
const val DEBUG_EXPLOSION_SMALL = "debug_explosion_small"
const val DEBUG_SPHERE_POINTS = "debug_sphere_points"