Compare commits
2 Commits
5d232a28ed
...
480fa7cf7c
Author | SHA1 | Date | |
---|---|---|---|
480fa7cf7c | |||
05544df25b |
@ -1,5 +1,6 @@
|
||||
package ru.dbotthepony.mc.otm.datagen.blocks
|
||||
|
||||
import ru.dbotthepony.mc.otm.datagen.modLocation
|
||||
import ru.dbotthepony.mc.otm.datagen.models.MatteryBlockModelProvider
|
||||
import ru.dbotthepony.mc.otm.registry.game.MBlocks
|
||||
|
||||
@ -14,6 +15,11 @@ fun addBlockModels(provider: MatteryBlockModelProvider) {
|
||||
resourceCubeAll(MBlocks.DEEPSLATE_DILITHIUM_ORE)
|
||||
resourceCubeAll(MBlocks.DILITHIUM_CRYSTAL_BLOCK)
|
||||
|
||||
provider.exec {
|
||||
provider.cubeAll("reinforced_redstone_lamp", modLocation("block/reinforced_redstone_lamp"))
|
||||
provider.cubeAll("reinforced_redstone_lamp_on", modLocation("block/reinforced_redstone_lamp_on"))
|
||||
}
|
||||
|
||||
cubeAll(MBlocks.FLYWHEEL_HOUSING)
|
||||
column(MBlocks.FLYWHEEL_BEARING, "block/flywheel_bearing","block/flywheel_bearing_top")
|
||||
column(MBlocks.FLYWHEEL_SHAFT, "block/flywheel_shaft","block/flywheel_shaft_top")
|
||||
|
@ -9,6 +9,8 @@ import ru.dbotthepony.mc.otm.block.entity.WorkerState
|
||||
import ru.dbotthepony.mc.otm.block.matter.MatterBottlerBlock
|
||||
import ru.dbotthepony.mc.otm.block.tech.AndroidChargerBlock
|
||||
import ru.dbotthepony.mc.otm.block.tech.EssenceStorageBlock
|
||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.core.math.BlockRotationFreedom
|
||||
import ru.dbotthepony.mc.otm.core.math.xRotationBlockstateNorth
|
||||
import ru.dbotthepony.mc.otm.core.math.xRotationBlockstateSouth
|
||||
@ -124,6 +126,29 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
|
||||
provider.block(MBlocks.PAINTER)
|
||||
provider.block(MBlocks.INFINITE_WATER_SOURCE)
|
||||
|
||||
provider.exec {
|
||||
provider.getVariantBuilder(MBlocks.REDSTONE_LAMP_INVERTED)
|
||||
.forAllStates {
|
||||
ConfiguredModel.builder()
|
||||
.modelFile(provider.models().getExistingFile(ResourceLocation("minecraft", "redstone_lamp${if (it[BlockStateProperties.LIT]) "" else "_on"}")))
|
||||
.build()
|
||||
}
|
||||
|
||||
provider.getVariantBuilder(MBlocks.REINFORCED_REDSTONE_LAMP)
|
||||
.forAllStates {
|
||||
ConfiguredModel.builder()
|
||||
.modelFile(provider.models().getExistingFile(modLocation("reinforced_redstone_lamp${if (it[BlockStateProperties.LIT]) "_on" else ""}")))
|
||||
.build()
|
||||
}
|
||||
|
||||
provider.getVariantBuilder(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED)
|
||||
.forAllStates {
|
||||
ConfiguredModel.builder()
|
||||
.modelFile(provider.models().getExistingFile(modLocation("reinforced_redstone_lamp${if (it[BlockStateProperties.LIT]) "" else "_on"}")))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
provider.exec {
|
||||
for (block in MBlocks.ESSENCE_STORAGE.values) {
|
||||
provider.getVariantBuilder(block).forAllStates {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package ru.dbotthepony.mc.otm.datagen.items
|
||||
|
||||
import net.minecraft.world.item.DyeColor
|
||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.core.registryName
|
||||
import ru.dbotthepony.mc.otm.datagen.modLocation
|
||||
import ru.dbotthepony.mc.otm.registry.game.MItems
|
||||
@ -38,6 +39,10 @@ fun addItemModels(provider: MatteryItemModelProvider) {
|
||||
provider.block(MItems.DEEPSLATE_DILITHIUM_ORE)
|
||||
provider.block(MItems.DILITHIUM_CRYSTAL_BLOCK)
|
||||
|
||||
provider.withExistingParent(MItems.REDSTONE_LAMP_INVERTED, ResourceLocation("minecraft", "block/redstone_lamp_on"))
|
||||
provider.withExistingParent(MItems.REINFORCED_REDSTONE_LAMP, modLocation("block/reinforced_redstone_lamp"))
|
||||
provider.withExistingParent(MItems.REINFORCED_REDSTONE_LAMP_INVERTED, modLocation("block/reinforced_redstone_lamp_on"))
|
||||
|
||||
MRegistry.VENT.allItems.values.forEach(provider::block)
|
||||
MRegistry.VENT_ALTERNATIVE.allItems.values.forEach(provider::block)
|
||||
MRegistry.TRITANIUM_BLOCK.allItems.values.forEach(provider::block)
|
||||
|
@ -32,6 +32,8 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
|
||||
fun block(item: Item) = exec { withExistingParent(item.registryName!!.path, modLocation("block/${item.registryName!!.path}")) }
|
||||
fun block(item: Item, path: String) = exec { withExistingParent(item.registryName!!.path, modLocation("block/$path")) }
|
||||
|
||||
fun withExistingParent(item: Item, path: ResourceLocation) = exec { withExistingParent(item.registryName!!.path, path) }
|
||||
|
||||
fun inherit(item: Item, parent: Item) {
|
||||
exec { withExistingParent(item.registryName!!.path, parent.registryName!!) }
|
||||
}
|
||||
|
@ -657,9 +657,13 @@ private fun blocks(provider: MatteryLanguageProvider) {
|
||||
add(MBlocks.PHANTOM_ATTRACTOR, "Phantom Attractor")
|
||||
add(MBlocks.PHANTOM_ATTRACTOR, "desc", "Attracts Phantoms when it is night time")
|
||||
|
||||
add(MBlocks.REDSTONE_LAMP_INVERTED, "Redstone Lamp (Inverted signal)")
|
||||
add(MBlocks.REINFORCED_REDSTONE_LAMP, "Reinforced Redstone Lamp")
|
||||
add(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, "Reinforced Redstone Lamp (Inverted signal)")
|
||||
|
||||
add(MBlocks.LABORATORY_LAMP, "Laboratory Lamp")
|
||||
add(MBlocks.LABORATORY_LAMP, "description", "Provides directional light with redstone switch")
|
||||
add(MBlocks.LABORATORY_LAMP_INVERTED, "Laboratory Lamp (Inverted Signal)")
|
||||
add(MBlocks.LABORATORY_LAMP_INVERTED, "Laboratory Lamp (Inverted signal)")
|
||||
add(MBlocks.DANGER_STRIPE_BLOCK, "Danger Stripes")
|
||||
add(MBlocks.METAL_BEAM, "Metal Beam")
|
||||
|
||||
|
@ -653,6 +653,10 @@ private fun blocks(provider: MatteryLanguageProvider) {
|
||||
add(MBlocks.PHANTOM_ATTRACTOR, "Приманщик фантомов")
|
||||
add(MBlocks.PHANTOM_ATTRACTOR, "desc", "Приманивает фантомов в ночное время")
|
||||
|
||||
add(MBlocks.REDSTONE_LAMP_INVERTED, "Лампа (инвертированный сигнал)")
|
||||
add(MBlocks.REINFORCED_REDSTONE_LAMP, "Укреплённая лампа")
|
||||
add(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, "Укреплённая лампа (инвертированный сигнал)")
|
||||
|
||||
add(MBlocks.LABORATORY_LAMP, "Лабораторная лампа")
|
||||
add(MBlocks.LABORATORY_LAMP, "description", "Освещает на несколько блоков в направлении своей лампы, с переключателем красного камня")
|
||||
add(MBlocks.LABORATORY_LAMP_INVERTED, "Лабораторная лампа (инвентированный сигнал)")
|
||||
|
@ -51,6 +51,9 @@ fun addDecorativeLoot(lootTables: LootTables) {
|
||||
lootTables.dropsSelf(MBlocks.FLYWHEEL_BEARING) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
|
||||
lootTables.dropsSelf(MBlocks.ENGINE) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
lootTables.dropsSelf(MBlocks.REDSTONE_LAMP_INVERTED) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
lootTables.dropsSelf(MBlocks.REINFORCED_REDSTONE_LAMP) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
lootTables.dropsSelf(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
|
||||
for (block in MBlocks.TRITANIUM_ANVIL)
|
||||
lootTables.dropsSelf(block) { condition(ExplosionCondition.survivesExplosion()) }
|
||||
|
@ -267,6 +267,42 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
|
||||
.save(consumer, modLocation("decorative/industrial_glass_pane/recolor/${color.name.lowercase()}"))
|
||||
}
|
||||
|
||||
ShapelessRecipeBuilder(RecipeCategory.REDSTONE, MItems.REDSTONE_LAMP_INVERTED, 1)
|
||||
.requires(Items.REDSTONE_LAMP)
|
||||
.unlockedBy(Items.REDSTONE_LAMP)
|
||||
.save(consumer, modLocation("decorative/inverted_redstone_lamp"))
|
||||
|
||||
ShapelessRecipeBuilder(RecipeCategory.REDSTONE, Items.REDSTONE_LAMP, 1)
|
||||
.requires(MItems.REDSTONE_LAMP_INVERTED)
|
||||
.unlockedBy(MItems.REDSTONE_LAMP_INVERTED)
|
||||
.save(consumer, modLocation("decorative/inverted_redstone_lamp2"))
|
||||
|
||||
MatteryRecipe(MItems.REINFORCED_REDSTONE_LAMP, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.TRITANIUM_PLATES, Items.REDSTONE_LAMP, MItemTags.TRITANIUM_PLATES)
|
||||
.build(consumer, modLocation("decorative/reinforced_redstone_lamp"))
|
||||
|
||||
MatteryRecipe(MItems.REINFORCED_REDSTONE_LAMP_INVERTED, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.TRITANIUM_PLATES, MItems.REDSTONE_LAMP_INVERTED, MItemTags.TRITANIUM_PLATES)
|
||||
.build(consumer, modLocation("decorative/reinforced_redstone_lamp_inverted"))
|
||||
|
||||
MatteryRecipe(MItems.LABORATORY_LAMP, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.IRON_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS, MItemTags.IRON_PLATES)
|
||||
.row(MItems.MIRROR, Items.REDSTONE_LAMP, MItems.MIRROR)
|
||||
.row(MItemTags.TRITANIUM_PLATES, Tags.Items.DUSTS_REDSTONE, MItemTags.TRITANIUM_PLATES)
|
||||
.build(consumer, modLocation("decorative/lab_lamp"))
|
||||
|
||||
MatteryRecipe(MItems.LABORATORY_LAMP, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.IRON_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS, MItemTags.IRON_PLATES)
|
||||
.row(MItems.MIRROR, MItems.REINFORCED_REDSTONE_LAMP, MItems.MIRROR)
|
||||
.rowB(Tags.Items.DUSTS_REDSTONE)
|
||||
.build(consumer, modLocation("decorative/lab_lamp_alt"))
|
||||
|
||||
MatteryRecipe(MItems.LABORATORY_LAMP_INVERTED, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.IRON_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS, MItemTags.IRON_PLATES)
|
||||
.row(MItems.MIRROR, MItems.REINFORCED_REDSTONE_LAMP_INVERTED, MItems.MIRROR)
|
||||
.rowB(Tags.Items.DUSTS_REDSTONE)
|
||||
.build(consumer, modLocation("decorative/lab_lamp_inv_alt"))
|
||||
|
||||
ShapelessRecipeBuilder(RecipeCategory.REDSTONE, MItems.LABORATORY_LAMP, 1)
|
||||
.requires(MItems.LABORATORY_LAMP_INVERTED)
|
||||
.unlockedBy(MItems.LABORATORY_LAMP_INVERTED)
|
||||
@ -352,13 +388,6 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
|
||||
.unlockedBy(Items.IRON_BARS)
|
||||
.build(consumer, modLocation("decorative/metal_mesh"))
|
||||
|
||||
// лампа
|
||||
MatteryRecipe(MItems.LABORATORY_LAMP, category = RecipeCategory.REDSTONE)
|
||||
.row(MItemTags.IRON_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS, MItemTags.IRON_PLATES)
|
||||
.row(MItems.MIRROR, Items.GLOWSTONE, MItems.MIRROR)
|
||||
.row(MItemTags.TRITANIUM_PLATES, Tags.Items.DUSTS_REDSTONE, MItemTags.TRITANIUM_PLATES)
|
||||
.build(consumer, modLocation("decorative/lamp"))
|
||||
|
||||
// Голо табличка
|
||||
MatteryRecipe(MItems.HOLO_SIGN, category = RecipeCategory.DECORATIONS)
|
||||
.row(MItemTags.BASIC_CIRCUIT, MItemTags.TRITANIUM_PLATES, MItemTags.HARDENED_GLASS_PANES_COLORLESS)
|
||||
|
@ -73,6 +73,9 @@ fun addMineableTags(tagsProvider: TagsProvider) {
|
||||
MBlocks.MATTER_OUTPUT_HATCH,
|
||||
MBlocks.ENERGY_INPUT_INTERFACE,
|
||||
MBlocks.ENERGY_OUTPUT_INTERFACE,
|
||||
|
||||
MBlocks.REINFORCED_REDSTONE_LAMP,
|
||||
MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED,
|
||||
), Tiers.IRON)
|
||||
|
||||
tagsProvider.requiresPickaxe(listOf(
|
||||
|
@ -51,7 +51,7 @@ data class ChartLevelLabels(
|
||||
val font: Font? = null,
|
||||
val lineColor: RGBAColor = RGBAColor.DARK_GREEN,
|
||||
val textColor: RGBAColor = RGBAColor.DARK_GREEN,
|
||||
val textGravity: RenderGravity = RenderGravity.TOP_RIGHT,
|
||||
val textGravity: RenderGravity = RenderGravity.TOP_LEFT,
|
||||
val textOutline: RGBAColor = RGBAColor.BLACK
|
||||
)
|
||||
|
||||
|
@ -4,6 +4,9 @@ import ru.dbotthepony.mc.otm.OverdriveThatMatters
|
||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||
|
||||
object MNames {
|
||||
const val REDSTONE_LAMP_INVERTED = "redstone_lamp_inverted"
|
||||
const val REINFORCED_REDSTONE_LAMP = "reinforced_redstone_lamp"
|
||||
const val REINFORCED_REDSTONE_LAMP_INVERTED = "reinforced_redstone_lamp_inverted"
|
||||
const val LABORATORY_LAMP = "laboratory_lamp"
|
||||
const val LABORATORY_LAMP_INVERTED = "laboratory_lamp_inverted"
|
||||
const val LABORATORY_LAMP_LIGHT = "laboratory_lamp_light"
|
||||
|
@ -6,9 +6,11 @@ import net.minecraft.core.registries.BuiltInRegistries
|
||||
import net.minecraft.util.valueproviders.UniformInt
|
||||
import net.minecraft.world.level.block.AnvilBlock
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.DropExperienceBlock
|
||||
import net.minecraft.world.level.block.IronBarsBlock
|
||||
import net.minecraft.world.level.block.LiquidBlock
|
||||
import net.minecraft.world.level.block.RedstoneLampBlock
|
||||
import net.minecraft.world.level.block.RotatedPillarBlock
|
||||
import net.minecraft.world.level.block.SlabBlock
|
||||
import net.minecraft.world.level.block.SoundType
|
||||
@ -16,6 +18,7 @@ import net.minecraft.world.level.block.StairBlock
|
||||
import net.minecraft.world.level.block.TransparentBlock
|
||||
import net.minecraft.world.level.block.WallBlock
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties
|
||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument
|
||||
import net.minecraft.world.level.material.MapColor
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
@ -87,6 +90,7 @@ import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
||||
import ru.dbotthepony.mc.otm.config.CablesConfig
|
||||
import ru.dbotthepony.mc.otm.core.collect.SupplierList
|
||||
import ru.dbotthepony.mc.otm.core.collect.SupplierMap
|
||||
import ru.dbotthepony.mc.otm.core.get
|
||||
import ru.dbotthepony.mc.otm.registry.MDeferredRegister
|
||||
import ru.dbotthepony.mc.otm.registry.MNames
|
||||
import ru.dbotthepony.mc.otm.registry.MRegistry
|
||||
@ -282,6 +286,31 @@ object MBlocks {
|
||||
Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).sound(SoundType.AMETHYST).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
|
||||
}
|
||||
|
||||
val REDSTONE_LAMP_INVERTED by registry.register(MNames.REDSTONE_LAMP_INVERTED) { RedstoneLampBlock(
|
||||
BlockBehaviour.Properties.ofFullCopy(Blocks.REDSTONE_LAMP)
|
||||
.lightLevel { if (it[BlockStateProperties.LIT]) 0 else 15 }
|
||||
) }
|
||||
|
||||
val REINFORCED_REDSTONE_LAMP by registry.register(MNames.REINFORCED_REDSTONE_LAMP) { RedstoneLampBlock(
|
||||
BlockBehaviour.Properties.of()
|
||||
.mapColor(MapColor.COLOR_LIGHT_GRAY)
|
||||
.explosionResistance(40f)
|
||||
.destroyTime(1.5f)
|
||||
.requiresCorrectToolForDrops()
|
||||
.lightLevel { if (it[BlockStateProperties.LIT]) 15 else 0 }
|
||||
.isValidSpawn { p_61031_, p_61032_, p_61033_, p_61034_ -> true }
|
||||
) }
|
||||
|
||||
val REINFORCED_REDSTONE_LAMP_INVERTED by registry.register(MNames.REINFORCED_REDSTONE_LAMP_INVERTED) { RedstoneLampBlock(
|
||||
BlockBehaviour.Properties.of()
|
||||
.mapColor(MapColor.COLOR_LIGHT_GRAY)
|
||||
.explosionResistance(40f)
|
||||
.destroyTime(1.5f)
|
||||
.requiresCorrectToolForDrops()
|
||||
.lightLevel { if (it[BlockStateProperties.LIT]) 0 else 15 }
|
||||
.isValidSpawn { p_61031_, p_61032_, p_61033_, p_61034_ -> true }
|
||||
) }
|
||||
|
||||
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() }
|
||||
|
@ -295,8 +295,12 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) {
|
||||
|
||||
private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
|
||||
with(consumer) {
|
||||
accept(MItems.REDSTONE_LAMP_INVERTED)
|
||||
accept(MItems.REINFORCED_REDSTONE_LAMP)
|
||||
accept(MItems.REINFORCED_REDSTONE_LAMP_INVERTED)
|
||||
accept(MItems.LABORATORY_LAMP)
|
||||
accept(MItems.LABORATORY_LAMP_INVERTED)
|
||||
|
||||
accept(MItems.DANGER_STRIPE_BLOCK)
|
||||
accept(MItems.METAL_BEAM)
|
||||
accept(MItems.ENGINE)
|
||||
|
@ -481,6 +481,10 @@ object MItems {
|
||||
|
||||
val NUTRIENT_PASTE: Item by registry.register(MNames.NUTRIENT_PASTE) { Item(Properties().stacksTo(64).food(FoodProperties.Builder().nutrition(8).saturationModifier(0.9F).build())) }
|
||||
|
||||
val REDSTONE_LAMP_INVERTED by registry.register(MNames.REDSTONE_LAMP_INVERTED) { BlockItem(MBlocks.REDSTONE_LAMP_INVERTED, DEFAULT_PROPERTIES) }
|
||||
val REINFORCED_REDSTONE_LAMP by registry.register(MNames.REINFORCED_REDSTONE_LAMP) { BlockItem(MBlocks.REINFORCED_REDSTONE_LAMP, DEFAULT_PROPERTIES) }
|
||||
val REINFORCED_REDSTONE_LAMP_INVERTED by registry.register(MNames.REINFORCED_REDSTONE_LAMP_INVERTED) { BlockItem(MBlocks.REINFORCED_REDSTONE_LAMP_INVERTED, DEFAULT_PROPERTIES) }
|
||||
|
||||
val LABORATORY_LAMP: Item by registry.register(MNames.LABORATORY_LAMP) { BlockItem(MBlocks.LABORATORY_LAMP, DEFAULT_PROPERTIES) }
|
||||
val LABORATORY_LAMP_INVERTED: Item by registry.register(MNames.LABORATORY_LAMP_INVERTED) { BlockItem(MBlocks.LABORATORY_LAMP_INVERTED, DEFAULT_PROPERTIES) }
|
||||
val DANGER_STRIPE_BLOCK: Item by registry.register(MNames.DANGER_STRIPE_BLOCK) { BlockItem(MBlocks.DANGER_STRIPE_BLOCK, DEFAULT_PROPERTIES) }
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user