Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5a35d54
Feat/silicon (#77)
Hiiragi283 Sep 18, 2026
6d0b275
refactor: レシピを更新
Hiiragi283 Sep 19, 2026
2874d24
fix: HTSingleRecipeCategory において出力スロットの割り当てが入力になっていた
Hiiragi283 Sep 19, 2026
cde3715
feat: HTOreSlurryData に色のパラメータを追加
Hiiragi283 Sep 19, 2026
38397d6
refactor: RegistryAliasAcceptor を追加
Hiiragi283 Sep 19, 2026
3d98b44
feat: Ancient Debris Slurry を追加
Hiiragi283 Sep 19, 2026
88c8b57
feat: 新しいブロックを追加
Hiiragi283 Sep 19, 2026
5ae413b
refactor: やっぱやりづらいから自前のレシピビルダー使うわ
Hiiragi283 Sep 19, 2026
93de8cc
refactor: VanillaRecipeBuilders を追加
Hiiragi283 Sep 19, 2026
01d4dec
feat: SiO2 + C -> Si + CO2 のレシピにおいて,材料に粉も受け付けるように
Hiiragi283 Sep 19, 2026
7f72731
refactor!: IntrusiveWrapper を削除
Hiiragi283 Sep 19, 2026
c848ad5
feat: 新しいブロックを追加
Hiiragi283 Sep 19, 2026
a2e54b9
feat: タンクに中身の描画を追加
Hiiragi283 Sep 19, 2026
766f94e
refactor: kdocを修正
Hiiragi283 Sep 19, 2026
3092699
feat: 新しいブロックを追加
Hiiragi283 Sep 19, 2026
8dbffe3
feat: Mixer, Planter に機能を実装
Hiiragi283 Sep 19, 2026
41a3b9c
feat: レシピの追加
Hiiragi283 Sep 19, 2026
96a08f0
feat: 新しいブロックを追加
Hiiragi283 Sep 19, 2026
0fe5f4c
feat: アルミニウムとそれに関する素材を追加
Hiiragi283 Sep 20, 2026
d915c0f
refactor: 細かい修正
Hiiragi283 Sep 20, 2026
8dc069f
build: libClient モジュールを追加
Hiiragi283 Sep 20, 2026
211b36a
feat: HTTripleItemToItemRecipe を追加
Hiiragi283 Sep 20, 2026
ff40939
feat: 新しいブロックを追加
Hiiragi283 Sep 20, 2026
61f3757
feat: Assembling レシピを追加
Hiiragi283 Sep 20, 2026
414e9b9
refactor: Alloying レシピも HTTripleItemToItemRecipe に変更
Hiiragi283 Sep 20, 2026
906169b
feat!: Alumina Dust を削除
Hiiragi283 Sep 20, 2026
c81189e
build: 依存関係を更新
Hiiragi283 Sep 20, 2026
4c4ef91
refactor: HTInputSlot を再構成
Hiiragi283 Sep 21, 2026
029939f
refactor: HTOutputSlot も再構成
Hiiragi283 Sep 21, 2026
6e42a49
Merge pull request #79 from Hiiragi283/feat/aluminum
Hiiragi283 Sep 21, 2026
10022c9
refactor: HTOutputSlotHelper を追加
Hiiragi283 Sep 21, 2026
6676abb
feat: 新しい液体を追加
Hiiragi283 Sep 22, 2026
9ccd1d5
feat: 新しいレシピタイプを追加
Hiiragi283 Sep 22, 2026
d04b3ec
refactor: 今後使わなさそうなクラスを削除
Hiiragi283 Sep 22, 2026
065bd39
refactor: 安全な判定メソッドを追加
Hiiragi283 Sep 22, 2026
556d7f0
feat: Alumina Dust を再び追加
Hiiragi283 Sep 22, 2026
4c38707
feat: 新しいダメージタイプを追加
Hiiragi283 Sep 22, 2026
3d4e202
refactor: NonEmptyList を最適化
Hiiragi283 Sep 23, 2026
186b50b
refactor: Table を最適化
Hiiragi283 Sep 23, 2026
319f1fb
refactor!: MultiMap を削除
Hiiragi283 Sep 23, 2026
fcc4519
fix: ポーション瓶の中身を出し入れするレシピについて,JEI上での処理時間の表示が実際と異なっていた
Hiiragi283 Sep 24, 2026
877e04f
feat: JEI上の矢印に必要エネルギー/時間を表示
Hiiragi283 Sep 24, 2026
285719a
build: バージョンの末尾に`-beta`を追加
Hiiragi283 Sep 24, 2026
6ff0c51
feat: 新しいブロックを追加
Hiiragi283 Sep 24, 2026
a1c09b3
refactor: JEI上の液体の描画を改善
Hiiragi283 Sep 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 19 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,16 @@ scmVersion {
base {
archivesName = modId
group = "io.github.hiiragi283"
version = scmVersion.version
version = "${scmVersion.version}-beta"
}

val libModule: SourceSet = sourceSets.register("lib").get()
val libClientModule: SourceSet =
sourceSets
.register("libClient") {
compileClasspath += libModule.output + libModule.compileClasspath
runtimeClasspath += libModule.output + libModule.runtimeClasspath
}.get()
val mainModule: SourceSet =
sourceSets
.named("main") {
Expand All @@ -89,7 +95,9 @@ val clientModule: SourceSet =
sourceSets
.register("client") {
compileClasspath += mainModule.output + mainModule.compileClasspath
compileClasspath += libClientModule.output + libClientModule.compileClasspath
runtimeClasspath += mainModule.output + mainModule.runtimeClasspath
runtimeClasspath += libClientModule.output + libClientModule.runtimeClasspath
}.get()
val dataModule: SourceSet =
sourceSets
Expand Down Expand Up @@ -216,6 +224,7 @@ neoForge {
// multi mod projects should define one per mod
create(modId) {
sourceSet(libModule)
sourceSet(libClientModule)
sourceSet(sourceSets.main.get())
sourceSet(clientModule)
sourceSet(dataModule)
Expand Down Expand Up @@ -252,12 +261,15 @@ dependencies {
runtimeClasspath.get().extendsFrom(create("localRuntime"))

val libCompileClasspath: Configuration = named("libCompileClasspath").get()
val libClientCompileClasspath: Configuration = named("libClientCompileClasspath").get()
val compileClasspath: Configuration = named("compileClasspath").get()
val clientCompileClasspath: Configuration = named("clientCompileClasspath").get()
val dataCompileClasspath: Configuration = named("dataCompileClasspath").get()

libCompileClasspath.extendsFrom(compileClasspath)
libCompileClasspath.extendsFrom(libClientCompileClasspath)
compileClasspath.extendsFrom(clientCompileClasspath)
libClientCompileClasspath.extendsFrom(clientCompileClasspath)
clientCompileClasspath.extendsFrom(dataCompileClasspath)
}

Expand All @@ -267,6 +279,9 @@ dependencies {
implementation(libs.bundles.common.impl)
compileOnly(libs.bundles.common.compile)
"localRuntime"(libs.bundles.common.runtime)

"libClientCompileOnly"(libs.jei.api)
"clientRuntimeOnly"(libs.jei)
}

// Example configuration to allow publishing using the maven-publish plugin
Expand Down Expand Up @@ -336,7 +351,7 @@ dokka {
dokkaSourceSets {
configureEach {
sourceRoots.from(
listOf(libModule, clientModule)
listOf(libModule, libClientModule)
.map { it.kotlin }
.map { it.srcDirs.filter { "lib" in it.path } }
)
Expand Down Expand Up @@ -379,12 +394,12 @@ tasks {
from("LICENSE") {
rename { "${it}_ragium" }
}
from(libModule.output, clientModule.output)
from(libModule.output, libClientModule.output, clientModule.output)
}

named<Jar>("sourcesJar") {
dependsOn("libClasses", "clientClasses")
duplicatesStrategy = DuplicatesStrategy.FAIL
from(libModule.allSource, clientModule.allSource)
from(libModule.allSource, libClientModule.allSource)
}
}
11 changes: 4 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
minecraft = "26.1.2"

neo-moddev = "2.0.146"
neo-version = "26.1.2.107"
neo-version = "26.1.2.109"
kff-version = "6.3.0"

kotlin = "2.4.0"
Expand All @@ -13,10 +13,10 @@ axion-release = "1.21.2"
maven-publish = "0.37.0"
mod-publish = "2.1.1"

ae2 = "26.1.11-beta"
ae2 = "26.1.12-beta"
curios = "15.0.0+26.1.2"
jade = "26.1.10+neoforge"
jei = "29.37.0.98"
jei = "29.37.0.100"

[libraries]

Expand All @@ -32,15 +32,12 @@ jei-api = { group = "mezz.jei", name = "jei-26.1.2-neoforge-api", version.ref =

common-impl = []

common-compile = [
"jei-api",
]
common-compile = []

common-runtime = [
"ae2",
"curios",
"jade",
"jei"
]

[plugins]
Expand Down
52 changes: 41 additions & 11 deletions src/client/kotlin/hiiragi283/ragium/client/RagiumClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,31 @@ import hiiragi283.lib.mod.HTClientMod
import hiiragi283.lib.network.HTPayloadHandlers
import hiiragi283.lib.resource.vanillaId
import hiiragi283.ragium.api.RagiumAPI
import hiiragi283.ragium.api.data.oreSlurry.HTOreSlurryDataHelper
import hiiragi283.ragium.client.gui.screen.HTWidgetContainerScreen
import hiiragi283.ragium.client.gui.screen.tooltip.HTMemoryDiscClientTooltipComponent
import hiiragi283.ragium.client.gui.widget.HTEnergySlotWidgetRenderer
import hiiragi283.ragium.client.gui.widget.HTFluidWidgetRenderer
import hiiragi283.ragium.client.gui.widget.HTItemWidgetRenderer
import hiiragi283.ragium.client.gui.widget.HTProgressWidgetRenderer
import hiiragi283.ragium.client.gui.widget.HTWidgetRendererManager
import hiiragi283.ragium.client.render.HTMemoryDiscClientTooltipComponent
import hiiragi283.ragium.client.renderer.HTTankBlockEntityRenderer
import hiiragi283.ragium.common.block.entity.RagiumBlockEntityTypes
import hiiragi283.ragium.common.fluid.RagiumFluids
import hiiragi283.ragium.common.gui.factory.HTBlockWidgetHolderContext
import hiiragi283.ragium.common.gui.widget.RagiumWidgetTypes
import hiiragi283.ragium.common.item.tooltip.HTMemoryDiscTooltipComponent
import hiiragi283.ragium.common.network.HTUpdateBlockEntityPacket
import hiiragi283.ragium.common.network.HTUpdateMenuPacket
import net.minecraft.client.resources.model.sprite.Material
import net.minecraft.util.ARGB
import net.minecraft.world.item.DyeColor
import net.neoforged.api.distmarker.Dist
import net.neoforged.bus.api.IEventBus
import net.neoforged.fml.ModContainer
import net.neoforged.fml.common.Mod
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent
import net.neoforged.neoforge.client.event.EntityRenderersEvent
import net.neoforged.neoforge.client.event.RegisterClientTooltipComponentFactoriesEvent
import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent
import net.neoforged.neoforge.client.network.event.RegisterClientPayloadHandlersEvent
Expand Down Expand Up @@ -72,13 +77,14 @@ data object RagiumClient : HTClientMod() {
register.register(RagiumFluids.HONEY) {
still = Material(vanillaId(HTConstants.BLOCK, "honey_block_top"), true)
}
register.register(RagiumFluids.RESIN) {
still = Material(vanillaId(HTConstants.BLOCK, "resin_block"))
}
register.register(RagiumFluids.POTION) {
dull()
tintSource =
FluidStackTintSource { stack: FluidStack ->
"ff000000".hexToInt() or
HTPotionHelper.getContents(stack).color
}
tintSource = FluidStackTintSource { stack: FluidStack ->
ARGB.opaque(HTPotionHelper.getContents(stack).color)
}
}
register.register(RagiumFluids.OMINOUS_FLUX) {
molten()
Expand Down Expand Up @@ -116,19 +122,19 @@ data object RagiumClient : HTClientMod() {
}

register.register(RagiumFluids.WOOD_TAR) {
dull()
molten()
colorTint(Color(0x663333))
}
register.register(RagiumFluids.COAL_TAR) {
dull()
molten()
colorTint(Color(0x333366))
}
register.register(RagiumFluids.AROMATIC_COMPOUND) {
transparent()
colorTint(Color(0xffcc99))
}
register.register(RagiumFluids.CRUDE_OIL) {
sticky()
molten()
colorTint(Color(0x333333))
}
register.register(RagiumFluids.NAPHTHA) {
Expand All @@ -143,6 +149,10 @@ data object RagiumClient : HTClientMod() {
dull()
colorTint(Color(0xff9933))
}
register.register(RagiumFluids.SYNTHETIC_RESIN) {
molten()
colorTint(Color(0xff6633))
}
register.register(RagiumFluids.NITRIC_ACID) {
dull()
colorTint(Color(0x9999cc))
Expand All @@ -151,10 +161,23 @@ data object RagiumClient : HTClientMod() {
dull()
colorTint(Color(0xcc3333))
}
register.register(RagiumFluids.HYDROGEN_FLUORIDE) {
transparent()
colorTint(Color(0x33cc66))
}
register.register(RagiumFluids.HYDROFLUORIC_ACID) {
dull()
colorTint(Color(0x33cc66))
}

register.register(RagiumFluids.NAOH_SOLUTION) {
dull()
colorTint(Color(0x003366))
}
register.register(RagiumFluids.ALUMINA_SOLUTION) {
transparent()
colorTint(Color(0xffcccc))
}
register.register(RagiumFluids.SULFUR_DIOXIDE) {
transparent()
colorTint(Color(0x996600))
Expand All @@ -181,12 +204,19 @@ data object RagiumClient : HTClientMod() {
}

register.register(RagiumFluids.ORE_SLURRY) {
dull()
colorTint(Color(0x3399cc))
still = Material(vanillaId(HTConstants.BLOCK, "white_concrete_powder"))
tintSource = FluidStackTintSource { stack: FluidStack ->
ARGB.opaque(HTOreSlurryDataHelper.getData(stack)?.color ?: 0x333300)
}
}
}

override fun registerScreens(event: RegisterMenuScreensEvent) {
event.register(HTBlockWidgetHolderContext.MENU_TYPE.get(), ::HTWidgetContainerScreen)
}

override fun registerEntityRenderer(event: EntityRenderersEvent.RegisterRenderers) {
event.registerBlockEntityRenderer(RagiumBlockEntityTypes.TANK.get(), ::HTTankBlockEntityRenderer)
event.registerBlockEntityRenderer(RagiumBlockEntityTypes.CREATIVE_TANK.get(), ::HTTankBlockEntityRenderer)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data object RagiumClientEventHandler {
@SubscribeEvent
fun onFluidTooltip(event: FluidTooltipEvent) {
val stack: FluidStack = event.fluidStack
if (stack.`is`(RagiumFluids.POTION.getOrThrow())) {
if (RagiumFluids.POTION.isOf(stack)) {
HTPotionHelper.getContents(stack).addToTooltip(event.context, event.toolTip::add, event.flags, stack)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hiiragi283.ragium.client.render
package hiiragi283.ragium.client.gui.screen.tooltip

import hiiragi283.lib.text.Text
import hiiragi283.ragium.api.text.RagiumTranslation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ package hiiragi283.ragium.client.gui.widget

import hiiragi283.lib.gui.HTBounds
import hiiragi283.lib.gui.HTGuiAccess
import hiiragi283.lib.gui.HTGuiRenderHelper
import hiiragi283.lib.text.Text
import hiiragi283.lib.transfer.fluid.getFluidStack
import hiiragi283.ragium.api.util.HTStorageHelper
import hiiragi283.ragium.client.util.HTSpriteRenderHelper
import hiiragi283.ragium.common.gui.widget.HTFluidWidget
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiGraphicsExtractor
import net.minecraft.client.renderer.block.FluidModel
import net.minecraft.client.renderer.texture.TextureAtlasSprite
import net.minecraft.resources.Identifier
import net.minecraft.world.item.Item
Expand All @@ -28,14 +27,9 @@ class HTFluidWidgetRenderer(gui: HTGuiAccess, widget: HTFluidWidget) :

override fun shouldRender(): Boolean = !widget.isEmpty

private fun getModel(): FluidModel = Minecraft.getInstance()
.modelManager
.fluidStateModelSet
.get(widget.resource.fluid.defaultFluidState())
override fun getSprite(): TextureAtlasSprite? = HTGuiRenderHelper.getSprite(widget.resource)

override fun getSprite(): TextureAtlasSprite = getModel().stillMaterial().sprite()

override fun getColor(): Int = getModel().fluidTintSource()?.colorAsStack(widget.getFluidStack()) ?: 0
override fun getColor(): Int = HTGuiRenderHelper.getColor(widget.getFluidStack())

override fun getLevel(): Float = when (widget) {
is HTFluidWidget.Slot -> 1f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ abstract class HTSpriteWidgetRenderer<WIDGET : HTWidget>(gui: HTGuiAccess, widge

private fun renderSprite(bounds: HTBounds, graphics: GuiGraphicsExtractor) {
if (!shouldRender()) return
val sprite: TextureAtlasSprite = getSprite()
val sprite: TextureAtlasSprite = getSprite() ?: return
val color: Int = getColor()
val fillLevel: Int = getScaledLevel().toInt()

Expand All @@ -62,6 +62,7 @@ abstract class HTSpriteWidgetRenderer<WIDGET : HTWidget>(gui: HTGuiAccess, widge
y++
width -= 2
height -= 2
graphics.enableScissor(x, y, x + width, y + height)
graphics.blitTiledSprite(
RenderPipelines.GUI_TEXTURED,
sprite,
Expand All @@ -77,6 +78,7 @@ abstract class HTSpriteWidgetRenderer<WIDGET : HTWidget>(gui: HTGuiAccess, widge
tileScaling.height,
color
) // TODO
graphics.disableScissor()
}

protected fun getTooltipFlag(): TooltipFlag = ClientTooltipFlag.of(
Expand All @@ -90,7 +92,7 @@ abstract class HTSpriteWidgetRenderer<WIDGET : HTWidget>(gui: HTGuiAccess, widge

protected abstract fun shouldRender(): Boolean

protected abstract fun getSprite(): TextureAtlasSprite
protected abstract fun getSprite(): TextureAtlasSprite?

protected fun getSprite(atlasId: Identifier, id: Identifier): TextureAtlasSprite = Minecraft
.getInstance()
Expand Down
Loading
Loading