From 55856e6aec47fb320ee0a460f96fd3b9bf65f607 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Fri, 4 Apr 2025 15:07:42 +0300 Subject: [PATCH 1/4] matter capacitor gauge --- .../mc/otm/datagen/items/ItemModels.kt | 6 ++-- .../datagen/items/MatteryItemModelProvider.kt | 27 ++++++++++++++++++ .../dbotthepony/mc/otm/registry/MRegistry.kt | 8 ++++++ .../item/matter_capacitor_gauge_1.png | Bin 0 -> 371 bytes .../item/matter_capacitor_gauge_2.png | Bin 0 -> 384 bytes .../item/matter_capacitor_gauge_3.png | Bin 0 -> 385 bytes .../item/matter_capacitor_gauge_4.png | Bin 0 -> 398 bytes .../item/matter_capacitor_gauge_5.png | Bin 0 -> 384 bytes .../item/matter_capacitor_gauge_6.png | Bin 0 -> 397 bytes .../item/matter_capacitor_gauge_7.png | Bin 0 -> 386 bytes .../item/matter_capacitor_gauge_8.png | Bin 0 -> 397 bytes .../textures/item/matter_capacitor_tier0.png | Bin 480 -> 466 bytes .../textures/item/matter_capacitor_tier1.png | Bin 491 -> 480 bytes .../textures/item/matter_capacitor_tier2.png | Bin 491 -> 480 bytes .../textures/item/matter_capacitor_tier3.png | Bin 491 -> 480 bytes .../textures/item/matter_capacitor_tier4.png | Bin 493 -> 483 bytes 16 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_1.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_2.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_3.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_4.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_5.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_6.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_7.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_8.png diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index 433ac243f..1530d2f33 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -132,9 +132,9 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.generated(MItems.BATTERY_CREATIVE) provider.generated(MItems.PROCEDURAL_BATTERY, modLocation("item/battery_procedural")) - provider.generated(MItems.MATTER_CAPACITOR_BASIC, modLocation("item/matter_capacitor_tier1")) - provider.generated(MItems.MATTER_CAPACITOR_NORMAL, modLocation("item/matter_capacitor_tier2")) - provider.generated(MItems.MATTER_CAPACITOR_DENSE, modLocation("item/matter_capacitor_tier3")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_BASIC, baseTexture = modLocation("item/matter_capacitor_tier1")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_NORMAL, baseTexture = modLocation("item/matter_capacitor_tier2")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_DENSE, baseTexture = modLocation("item/matter_capacitor_tier3")) provider.generated(MItems.MATTER_CAPACITOR_CREATIVE) provider.generated(MItems.MachineUpgrades.Basic.BLANK, modLocation("item/machine_upgrade_tier1")) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt index a29a176f6..fe681f140 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt @@ -143,6 +143,33 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event .texture("layer1", modLocation("item/machine_upgrade_icon_$upgradeType")) } + fun capacitorWithGauge(item: Item, fillTextures: Int = 8, baseTexture: ResourceLocation?) = exec { + val path = item.registryName!!.path + val texture = baseTexture ?: modLocation("item/$path") + + val empty = withExistingParent("${path}_empty", GENERATED) + .texture("layer0", texture) + + val basic = withExistingParent(path, GENERATED) + .texture("layer0", texture) + .texture("layer1", modLocation("item/matter_capacitor_gauge_$fillTextures")) + .override() + .predicate(modLocation("matter_capacitor_fill"), 0f) + .model(empty) + .end() + + for (i in 1 .. fillTextures) { + val model = withExistingParent("${path}_fill_$i", GENERATED) + .texture("layer0", texture) + .texture("layer1", modLocation("item/matter_capacitor_gauge_$i")) + + basic.override() + .predicate(modLocation("matter_capacitor_fill"), i.toFloat() / fillTextures.toFloat()) + .model(model) + .end() + } + } + companion object { val ARMOR_TRIM_MATERIALS = listOf("quartz", "iron", "netherite", "redstone", "copper", "gold", "emerald", "diamond", "lapis", "amethyst") val GENERATED = ResourceLocation("minecraft", "item/generated") diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index ccb666bc1..fcb55735e 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -36,6 +36,7 @@ import ru.dbotthepony.mc.otm.block.decorative.CargoCrateBlock import ru.dbotthepony.mc.otm.block.decorative.ComputerTerminalBlock import ru.dbotthepony.mc.otm.block.decorative.StarChairBlock import ru.dbotthepony.mc.otm.block.decorative.TritaniumPressurePlate +import ru.dbotthepony.mc.otm.capability.MatteryCapability import ru.dbotthepony.mc.otm.capability.matteryEnergy import ru.dbotthepony.mc.otm.client.MatteryGUI import ru.dbotthepony.mc.otm.util.ResourceLocation @@ -317,6 +318,13 @@ object MRegistry : IBlockItemRegistryAcceptor { val tag = stack.getOrDefault(MDataComponentTypes.Configurator.CONFIGURATION, CompoundTag()) if (tag.isEmpty) 0f else 1f } + + for (item in MItems.MATTER_CAPACITORS) { + ItemProperties.register(item, ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_fill")) { stack, _, _, _ -> + val cap = stack.getCapability(MatteryCapability.MATTER_ITEM) ?: return@register 1f + (cap.storedMatter / cap.maxStoredMatter).toFloat() + } + } } } diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_1.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_1.png new file mode 100644 index 0000000000000000000000000000000000000000..64428f359268bb05fa4424e2d0a77ed3ce1f0a0b GIT binary patch literal 371 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV92H*VL d!WVt*1zMIok%dXg|3eN)r>Co*%Q~loCIBT~N?`y1 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_2.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_2.png new file mode 100644 index 0000000000000000000000000000000000000000..f0f560b9283692610bf64a6031a7cd130a2384be GIT binary patch literal 384 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVzopr07t}5DgXcg literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_4.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_4.png new file mode 100644 index 0000000000000000000000000000000000000000..259e8844346ffe7bd99c99332bca07eac9f7efd3 GIT binary patch literal 398 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVfa%@;^8f7{%Z+v& s`f7MERDeOgFTOQ7#egTqfJ;JxVf_Z_fbaa=<{)D{UHx3vIVCg!03i`hO#lD@ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_6.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_6.png new file mode 100644 index 0000000000000000000000000000000000000000..49241e96102840c65fb5a3d7c5f38d27c2150bdc GIT binary patch literal 397 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVVOI&0vVEmjc{O|A$^|f3N zes!1~`1?O^2cxxQ?89F(9%yki@E>1)$k0fFO;3WAhlfEvK|av##Cm0rnVznGF6*2U FngDHNQ`7(e literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_7.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_gauge_7.png new file mode 100644 index 0000000000000000000000000000000000000000..ee270f646932d5b31966018f73203ab8cef38466 GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVf#5a?}SPN=h zq#yjNH^0*`w`W~Jtxtg{%YpXC;SVJwdv-N&=}EBi@Gz`9qV=P@ZmA^5Oix!omvv4F FO#tzxR`CD; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier0.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier0.png index 2bb6e4571c0cdc5d7679b1998513904305c8a0ac..fa28d455dca53f1da02e278ab4c5f97ddfd73c93 100644 GIT binary patch delta 235 zcmaFBe2IC2qnAX0Pl#(lK|x?(pqQ9geSJLx1B0olshXM^kRcVx;sK;MN`m}?|3d)7 zz2?1sKif|-EKW>pO;%y_%9pd@>dmGR+Pfr)e5RKs0a~HW940xO`s-)fh|9|6})r)37 zsI@T(_@erzp+~_p^T5X!tlNZt@NaF*^;w}8usUaZet?U|u7%kl?VOvR)YN7+3!DFE VNmuo`?Eo~C!PC{xWt~$(696r{R?z?e delta 249 zcmcb_{D66aqn~tuPl#(lK|x?(pqQ9geSN+8u?g<~cbl4;s;Q|lFfd%>WPbsqI7@>3 zg8xGSL$H5^5J<4VBeIx*f$snaGiF`ux1O?moYNDU}j)|(E*8> zc_n&&t|1DhdWL#NlNA^}i}`FzFST^VZ3mhb?CIhdq7j^XE}HLv0uS@S1i6R*)YrXs zS>brs-mS0Y?P__0t7{A&wEkOpK*IULr@PPRh@Ml*@8RY?u|pssHD(P{49kJLjB{99 kp9TnYe*LEalo5!`ytlkb26k8|MhBRt>t z7q~V};F|htx__L+V-9l#qZuVkxr=-a3Ovpi*KrvA``^4)dXmGQesy27p2hMGDF&|l0`x*R@n)@M{N|XQ z+rHI-X^X?5wIv?i4Buvo)iUb}y?Cc`-D%M?0|oBB>-~HZj~PYJvl+2&Vle^Qz~JfX K=d#Wzp$Py%1!%tj diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier2.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier2.png index 773c51f076fac6a1556ff1db67084bb34ee1b5c9..15fae90cd40dd65f448a33575c0a6771861df2f8 100644 GIT binary patch delta 249 zcmaFO{D66aV~|{cPl#(lK|x?(pqQ9geSQ70E#V9d3~T55n3|fZsi^_k-%Fo!0V%GM zAiv=MFu<_sjLvzWC})93WHAE+-+mBgv|tTZnK)gZ)$Gs3nu3nSlXD z2P9_ZmFW4ohA5co8S0r$)?xI_?>?v<;`#e~8_+a=PZ!4!jo{XEo_q%sc$@=|AL04F zzreL=0@u`E)BWQl9&?y07|obDQMhY&^~pE|%>(}!IVZHVL}jy@ZCI_mTsi~=&ni>NG!>LQ| z=|GCRB*-uLKO8W4`7?e33Ud~CL>4nJ@ErhQ#;j|doIpW|64!{5;QX|b^2DN4hJeJ( zyb?V>*AN9$JwrXC-+P$10o80vow&zWet#Jw!wY5x1{jT|cCrSeXBnSu>7|ygxa~kq zVV*9IAsWHC=PvR!DDXI6T*qPb?|<`J=}8WI`qh2SdKSw&q!_sF3(yPQ#GAF2@tb3I zZu?dTrY#PK)|Pm5GklvVR?Dm_^x~b$b*Dwo3>3KguJ`jvJZ2O<&t}BBiNyqH1B0il KpUXO@geCw?CjRVF0UGD;>Ealo5!`ytlkb26k8|MhBRt>t7q~V};F|htx__L+V-9l#qZu3=G$Hd!zs< z?vfzC;Qw&I;N{QwX=0rTtI_X0%-bez50YP2#>nu3nSlXD2P9_ZmFW4ohA5co8R{8L z)?oB3TOhM&R~XB|jX?9lJY5_^G=g)_UF2&};BmgVj>G8R|K_#QlN|Q+tNWVuES7gj zF>u`%pclG{H)}29H^=PU_N@*~TO1CpE%E4P_%>6lmRVQm#XFVjPK%xyC~)^(@8^?v Z%qV)E&4_gqiwV#M22WQ%mvv4FO#m%lTAcs@ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier4.png b/src/main/resources/assets/overdrive_that_matters/textures/item/matter_capacitor_tier4.png index f390825284c4a54ae364d38c6f368f720107b0c5..533101fc2a8614d40840a1be08d5bf7cdd2853de 100644 GIT binary patch delta 231 zcmaFM{Fr%yqpe(kPl#(lK|x?(pqQ9geSQ6gh#L$H3{$| zqi4~gOCf6$e|D(=jSKR0aSYK2ZaweFcR+!|Bw<1baNUdj4-Z8qF)=zJqb5 zgNsY4ld*C3Rc;Tp6ZQ)jR01EoFVdQ&MBb@0Bp%yA^-pY delta 241 zcmaFN{FZrwqoZPgPl#(lK|x?(pqQ9geSQ6gh#Tg|Cb<9KJ=J@=si~=&ni>NGgFDYV zA0WkD666>B9}XD2{24z@tTSOX`n`vF+r;fb^2^E?8D20mFu>@5#LT=BJwMkF1yemk zJ)_AQjGh$>WESlTV>!4HXkLV;i(`mJaPGNit^*1@E*DdBYEu4lznc-^`0{Un1<#5f zSNT1bEaI6FAQ!fY`HYT({fe#gHi%DBi1BbruIcDz_#!I)mqAa+;26UOak&GE>sdG3 eJboQ6zGJ^g5u1{@K$JJo4hBzGKbLh*2~7Zi3tPtk From 4faef9d7c92473282f37c9908cde0d2b0b8e920e Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Fri, 4 Apr 2025 22:09:35 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D0=A9=D0=90=D0=A1=20=D0=91=D0=A3=D0=94?= =?UTF-8?q?=D0=95=D0=A2=20=D0=A2=D0=95=D0=91=D0=95=20=D0=A2=D0=9E=D0=A7?= =?UTF-8?q?=D0=9D=D0=9E=D0=A1=D0=A2=D0=AC=20=D0=A7=D0=98=D0=A1=D0=9B=D0=90?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt index 84f29f5bf..16ecea421 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/matter/MatterBottlerBlockEntity.kt @@ -29,6 +29,7 @@ import ru.dbotthepony.mc.otm.registry.game.MBlockEntities import ru.dbotthepony.mc.otm.util.math.Decimal import ru.dbotthepony.mc.otm.util.countingLazy import ru.dbotthepony.mc.otm.graph.matter.SimpleMatterNode +import ru.dbotthepony.mc.otm.util.math.toDecimal import java.util.function.BooleanSupplier class MatterBottlerBlockEntity(blockPos: BlockPos, blockState: BlockState) : @@ -262,8 +263,8 @@ class MatterBottlerBlockEntity(blockPos: BlockPos, blockState: BlockState) : initialCapacity = initialCapacity ?: it.storedMatter hasCapacitors = true - val rate = MachinesConfig.MatterBottler.RATE * (1.0 + upgrades.speedBonus) - val energyRate = MachinesConfig.MatterBottler.VALUES.energyConsumption * (1.0 + upgrades.speedBonus) + val rate = MachinesConfig.MatterBottler.RATE * (Decimal.ONE + upgrades.speedBonus.toDecimal()) + val energyRate = MachinesConfig.MatterBottler.VALUES.energyConsumption * (Decimal.ONE + upgrades.speedBonus.toDecimal()) val energyRatio = if (energyRate <= Decimal.ZERO) Decimal.ONE else energy.extractEnergy(energyRate, true) / energyRate val matterRatio = matter.receiveMatter(it.extractMatterChecked(rate, true), true) / rate From 3e59eb55957f995508523b1dc1e07e6ea07d1b09 Mon Sep 17 00:00:00 2001 From: YuRaNnNzZZ Date: Sat, 5 Apr 2025 00:19:56 +0300 Subject: [PATCH 3/4] =?UTF-8?q?GearShocky=20=E2=80=94=20=D0=92=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B0,=20=D0=B2=2015:24=20=D0=BD=D1=83=20=D0=B4=D0=B0?= =?UTF-8?q?=D0=B2=D0=B0=D0=B9=20=D0=B5=D1=89=D1=91=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D1=81=D0=BA=D1=83=20=D0=BD=D0=B0=20=D0=B1=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B5=D0=B9=D0=BA=D0=B0=D1=85=20=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BF=D0=B8=20(=D0=BE=D0=BD=D0=B0=20=D1=81=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=85=D1=83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/datagen/items/ItemModels.kt | 18 +++++++++++------- .../datagen/items/MatteryItemModelProvider.kt | 10 +++++----- .../dbotthepony/mc/otm/registry/MRegistry.kt | 10 +++++++++- .../textures/item/battery_gauge_1.png | Bin 0 -> 368 bytes .../textures/item/battery_gauge_10.png | Bin 0 -> 376 bytes .../textures/item/battery_gauge_2.png | Bin 0 -> 372 bytes .../textures/item/battery_gauge_3.png | Bin 0 -> 377 bytes .../textures/item/battery_gauge_4.png | Bin 0 -> 374 bytes .../textures/item/battery_gauge_5.png | Bin 0 -> 374 bytes .../textures/item/battery_gauge_6.png | Bin 0 -> 374 bytes .../textures/item/battery_gauge_7.png | Bin 0 -> 374 bytes .../textures/item/battery_gauge_8.png | Bin 0 -> 377 bytes .../textures/item/battery_gauge_9.png | Bin 0 -> 373 bytes .../textures/item/battery_procedural.png | Bin 262 -> 486 bytes .../item/battery_procedural_gauge_1.png | Bin 0 -> 366 bytes .../item/battery_procedural_gauge_2.png | Bin 0 -> 376 bytes .../item/battery_procedural_gauge_3.png | Bin 0 -> 386 bytes .../item/battery_procedural_gauge_4.png | Bin 0 -> 379 bytes .../item/battery_procedural_gauge_5.png | Bin 0 -> 388 bytes .../item/battery_procedural_gauge_6.png | Bin 0 -> 378 bytes .../item/battery_procedural_gauge_7.png | Bin 0 -> 388 bytes .../item/battery_procedural_gauge_8.png | Bin 0 -> 380 bytes .../item/battery_procedural_gauge_9.png | Bin 0 -> 389 bytes .../textures/item/battery_tier0.png | Bin 484 -> 471 bytes .../textures/item/battery_tier1.png | Bin 505 -> 489 bytes .../textures/item/battery_tier2.png | Bin 505 -> 489 bytes .../textures/item/battery_tier3.png | Bin 505 -> 489 bytes .../textures/item/battery_tier4.png | Bin 508 -> 494 bytes .../textures/item/quantum_battery.png | Bin 494 -> 484 bytes .../textures/item/quantum_capacitor.png | Bin 498 -> 488 bytes 30 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_1.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_10.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_2.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_3.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_4.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_5.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_6.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_7.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_8.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_9.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_1.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_2.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_3.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_4.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_5.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_6.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_7.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_8.png create mode 100644 src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_9.png diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index 1530d2f33..3c7e681e3 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -128,13 +128,17 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.generated(MItems.BREAD_MONSTER_SPAWN_EGG, modLocation("item/egg/bread_monster")) provider.generated(MItems.LOADER_SPAWN_EGG, modLocation("item/egg/loader")) - provider.generatedTiered(MItems.BATTERIES, "battery_tier") + provider.capacitorWithGauge(MItems.BATTERY_CRUDE, 10, "battery_gauge_", modLocation("item/battery_tier0")) + provider.capacitorWithGauge(MItems.BATTERY_BASIC, 10, "battery_gauge_", modLocation("item/battery_tier1")) + provider.capacitorWithGauge(MItems.BATTERY_NORMAL, 10, "battery_gauge_", modLocation("item/battery_tier2")) + provider.capacitorWithGauge(MItems.BATTERY_DENSE, 10, "battery_gauge_", modLocation("item/battery_tier3")) + provider.capacitorWithGauge(MItems.BATTERY_CAPACITOR, 10, "battery_gauge_", modLocation("item/battery_tier4")) provider.generated(MItems.BATTERY_CREATIVE) - provider.generated(MItems.PROCEDURAL_BATTERY, modLocation("item/battery_procedural")) + provider.capacitorWithGauge(MItems.PROCEDURAL_BATTERY, 9, "battery_procedural_gauge_", modLocation("item/battery_procedural")) - provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_BASIC, baseTexture = modLocation("item/matter_capacitor_tier1")) - provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_NORMAL, baseTexture = modLocation("item/matter_capacitor_tier2")) - provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_DENSE, baseTexture = modLocation("item/matter_capacitor_tier3")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_BASIC, 8, "matter_capacitor_gauge_", modLocation("item/matter_capacitor_tier1")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_NORMAL, 8, "matter_capacitor_gauge_", modLocation("item/matter_capacitor_tier2")) + provider.capacitorWithGauge(MItems.MATTER_CAPACITOR_DENSE, 8, "matter_capacitor_gauge_", modLocation("item/matter_capacitor_tier3")) provider.generated(MItems.MATTER_CAPACITOR_CREATIVE) provider.generated(MItems.MachineUpgrades.Basic.BLANK, modLocation("item/machine_upgrade_tier1")) @@ -182,8 +186,8 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.upgrade(MItems.MachineUpgrades.Creative.MATTER_STORAGE_FLAT_SMALL, "matter", "creative") - provider.generated(MItems.QUANTUM_BATTERY) - provider.generated(MItems.QUANTUM_CAPACITOR) + provider.capacitorWithGauge(MItems.QUANTUM_BATTERY, 10, "battery_gauge_") + provider.capacitorWithGauge(MItems.QUANTUM_CAPACITOR, 10, "battery_gauge_") provider.generated(MItems.QUANTUM_BATTERY_CREATIVE) provider.generated(MItems.PATTERN_DRIVE_NORMAL, modLocation("item/pattern_drive_tier1")) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt index fe681f140..63b25454e 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/MatteryItemModelProvider.kt @@ -143,7 +143,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event .texture("layer1", modLocation("item/machine_upgrade_icon_$upgradeType")) } - fun capacitorWithGauge(item: Item, fillTextures: Int = 8, baseTexture: ResourceLocation?) = exec { + fun capacitorWithGauge(item: Item, fillTextures: Int, gaugePrefix: String, baseTexture: ResourceLocation? = null) = exec { val path = item.registryName!!.path val texture = baseTexture ?: modLocation("item/$path") @@ -152,19 +152,19 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event val basic = withExistingParent(path, GENERATED) .texture("layer0", texture) - .texture("layer1", modLocation("item/matter_capacitor_gauge_$fillTextures")) + .texture("layer1", modLocation("item/${gaugePrefix}$fillTextures")) .override() - .predicate(modLocation("matter_capacitor_fill"), 0f) + .predicate(modLocation("capacitor_gauge"), 0f) .model(empty) .end() for (i in 1 .. fillTextures) { val model = withExistingParent("${path}_fill_$i", GENERATED) .texture("layer0", texture) - .texture("layer1", modLocation("item/matter_capacitor_gauge_$i")) + .texture("layer1", modLocation("item/${gaugePrefix}$i")) basic.override() - .predicate(modLocation("matter_capacitor_fill"), i.toFloat() / fillTextures.toFloat()) + .predicate(modLocation("capacitor_gauge"), i.toFloat() / fillTextures.toFloat()) .model(model) .end() } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt index fcb55735e..5d71f2a39 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MRegistry.kt @@ -320,11 +320,19 @@ object MRegistry : IBlockItemRegistryAcceptor { } for (item in MItems.MATTER_CAPACITORS) { - ItemProperties.register(item, ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_capacitor_fill")) { stack, _, _, _ -> + ItemProperties.register(item, ResourceLocation(OverdriveThatMatters.MOD_ID, "capacitor_gauge")) { stack, _, _, _ -> val cap = stack.getCapability(MatteryCapability.MATTER_ITEM) ?: return@register 1f (cap.storedMatter / cap.maxStoredMatter).toFloat() } } + + for (item in MItems.ALL_BATTERIES) { + ItemProperties.register(item, ResourceLocation(OverdriveThatMatters.MOD_ID, "capacitor_gauge")) { stack, _, _, _ -> + val energy = stack.matteryEnergy ?: return@register 1f + + (energy.batteryLevel / energy.maxBatteryLevel).toFloat() + } + } } } diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_1.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_1.png new file mode 100644 index 0000000000000000000000000000000000000000..cf364706d34fc70b909aef1d4b73e7382ccb3e31 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVkOkFcXkY-6J;YIe?W$^&FOaG3>Eak-;h&r!5%=IfZ`=R>@)iHoU6fxZIz2Nm jFyIjAbU&yek;lOB@`l`$eWK=%K-xWB{an^LB{Ts5LAprA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_2.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_2.png new file mode 100644 index 0000000000000000000000000000000000000000..4815bb43527821798e64da18f3a57117a72395ce GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV;vf=G`FFgUhxvgPl*vje2x)78&qol`;+0BJ{0QUCw| literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_4.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_4.png new file mode 100644 index 0000000000000000000000000000000000000000..cdda38e13f458334b04634f69ce8b3628fcadb84 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVMZwfR3`XJ^ckFD&M`Yw=WPgg&ebxsLQ08I!?b^rhX literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_5.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_5.png new file mode 100644 index 0000000000000000000000000000000000000000..d0c4ca6d662dd81e19091dfc71728e281ac1b7e9 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV|@}w;c`1zz|OE|n^4pngQf`}&7Q7)F6*2UngBQ$OjQ5? literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_7.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_7.png new file mode 100644 index 0000000000000000000000000000000000000000..495ebefbc049b410e53910cac08ac803f8d4d668 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV|>C#;c`1zz{YS}Leyc!>l@M_&7Q7)F6*2UngBX8Oius+ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_8.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_gauge_8.png new file mode 100644 index 0000000000000000000000000000000000000000..30718eb5aed312a7b4c99bf26ea33b91f1fd8748 GIT binary patch literal 377 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVNS%G}f0G|+7Pjj;{2Zv-YPhBO&s^}=7Fc7?JyVMAz*h_-^g8zd7gOoS38&HU| zz$3Dlfr0NJ2s7@OnEe(gC{f}XQ4*Y=R#Ki=l*$m0n3-3i=jR%tV5(=RXZGjf@%2D8 z+fpMu(>y)37&w3&Rt70XRt82O%L|C5p=^*3G#Ht|;!HrcAtMvmM<7RKwzGi6vw&<6 zxLL-?@B-*j7>#Br15j!LI|B<)rGb&L0pkLQsURC!7eGv!0%U^#6VO~Hu*x7y3m^-s z%h138B-``V+~LWq@3(=>L{AsT5RKs2bAfyZ6gZeKY!i83|AbYtIQp-_K81#_+}93i z^Df~CNHK|UQOhuWV?Wd3$lb$2Mkk+h$1tq+;&RzkHHRzLLUbFKNw9+S%ukKBOV{0W l-kZ5sI?1R(v{dfL6Q+G%nVT}j)`CKa!PC{xWt~$(696Lhbx8mK delta 205 zcmaFH+{QG)v0fs;C&bm$+$_w&A=%4QS4pudI_m!e&;K_VfZ(0pdT}7dQ4-`A{2u}s z?ltd?1d4GMctjR6Fz_7$VMb96uLhuCvZsqU1A2;6t1rF!a?mPeYhC9rS_6>-O z68I?0sAnn=$QW@%%Hp@7!a80pWAy~LH`AS83S_x@TsnA!X^xuZ&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV`~_Nbmpv literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_2.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_2.png new file mode 100644 index 0000000000000000000000000000000000000000..8b5bc570ef3958bd73a87edfc6ad9ec210caa09f GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVpih u*?;iE|Np#fd)N#XaxY-u^XHIbtzcvj&E}bJu=H3f$RJNwKbLh*2~7YjOHnug literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_4.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_4.png new file mode 100644 index 0000000000000000000000000000000000000000..70450c03fbff17306030970f3c70b065dbdb32b0 GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkV&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVzdGJY7WBEZ2Mj&74{XJ!#e;}hgUHx3vIVCg!0D_fP^#A|> literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_6.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_6.png new file mode 100644 index 0000000000000000000000000000000000000000..c30cabcb7816ea71e5bd7f295de74dc92299dc0f GIT binary patch literal 378 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVrVFeGOm6#BUT*?*8G22WQ%mvv4FO#rjHP*wl{ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_7.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_7.png new file mode 100644 index 0000000000000000000000000000000000000000..c62b2526957f2e915c3514fb4474fd9fa0929149 GIT binary patch literal 388 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVaMM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_8.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_8.png new file mode 100644 index 0000000000000000000000000000000000000000..2a7391311e08355a08c76bbea369e5ead9dad6bb GIT binary patch literal 380 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1enP@=>&q9iy!t)x7$D3u`~F*C13&(AeP!Bo#s z&+N~|nAmtPE0&tPG4mmKP99L)jqLXfQH^#hHL?Lq;aB>!N_{ z%yt&AcovWi0-wql8D20WXf#V1fKn6K8CZZS4UCKp7#BcH1=+~D0AkVqpFcr;tman-!pAYU+ey85}Sb4q9e0N9aCyZ`_I literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_9.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_procedural_gauge_9.png new file mode 100644 index 0000000000000000000000000000000000000000..fa37a3c6a3a2612a2fd3b8355ee63b6a2c175974 GIT binary patch literal 389 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL5ULAh?3y^w370~qEv=}#LT=BJwMkF1yemk zJ+nU-kFN)+*_ImNnda%K#lQjNurf$7vNA9NSzbUa4P}E|qru1w7H0yo4H=ohu8RV) zGuv6f;#oj82qXY8NI#55vy_3EfnfqW0}D`vfswHR;{u4OARVj=ASO)#vO$0eXbuxt zWss!>kOkFcXkY-6J;YIe?W$^&FOX^C>Eak-;h&r!aqq!@=JWsm%UAq!7gv}1v;W|S x|NnW}_OKZ&Ealo5nOuSk?(*4hs#Aqu8RM{<{YYS zZ_~e<2^(xHU`k_AQhLTvX*F|!H{+71Ha71K_6$1Hc{maxcQIGb`OV(Ex=rirw>#Ik Xr@OKI6uP<_V@?{jP$Rg9ziv8nqs#`Em?ywVyZ@>|QmR m_?0$#Z%quVI`D>Rv%KbAHm5|9!kkzR7RXznckP*#3dFhr`9?4CB+Nsf3p^r=85sBuf-vKbiP>)_&X#92`n`vF z+r<4r@;A#E8D20mFu>@5#LT=BJwMkF1yemkJ)_A6jGiUSHTJFhEqd?`(6kUw7sn8d z;L@|6dBi#af#f3*WA)+?63AtJ+uvIK7*&LpUXO@geCy) C<899X diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier2.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier2.png index d8fbe8ca0220a10c3fce417ab4c3488f2427087f..742068645f72a0eeb9fbf959f3d514991435ec31 100644 GIT binary patch delta 258 zcmey#{E~TsW0XpOPl#(lK|x?(pqQALsi`Rg14Dg%{jn|KYv=leg@yGs+Nr6j0R=yW z<%`!%Y z7t9O{FghSHGp|I?&oxBBRL@Y)Y_bibXF<yDRkAmhiQ6eZs=R z`Wo%j)YKRl7&Lc(N(EBFr%o3SHr~F@~lR` z_b_jpxIak#QyC+}3uXoe7#)z9nOCCc=Nh75s%NNYG}(aBv!u`ZVEAS6J$^vbLOfj@ zLo|X*&wBD5P~dS6oV-Qz^WXkxrv*+Ob?@&TTM^CfaQ@)d4v`zopr E0NPk><^TWy diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier3.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier3.png index 892c1097ac3aa5413280cf946ec15a749c9c81d8..2fcd20d79497ba36cf5ad5849996ad0bf3a5fc2f 100644 GIT binary patch delta 258 zcmey#{E~TsW0XpOPl#(lK|x?(pqQALsi`Rg14Dg%{dPOMd8VdeVPWmMx@u}_KtZK4 z{S+X@QxfDC{2u`rgzld^2NdTl@Q5sCVBk9l!i+m6X1|@dT%OhJ&&A{GC!P+Hzgfn} z@Pe6v0Y(QTX6BXX`MHKDnCcnonN7A~^epK4YVPpl)%V*#(*itQ978mMOV2y<9Z=wK zxyZ<^aqs^=-X!1Tx9Q)_gfDFWz}my%;&O)ZY1C9kqu@|Zg^4CxSxp!IWehkz!PJ>y pdU$$5e{ubS&p8KmzJ9rLjn`e4ErNqtTL5S_gQu&X%Q~loCIBe9U|#?L delta 274 zcmaFK{F8ZtW14P&Pl#(lK|x?(pqQALsj2Dz8w~#+c-Gg~Pv|K>5MsaG&TgKmX;@fT zyRNR9ni>NGgVY_@EFi^S666>B9|bU6xie!SP>Qp_BeIx*f$tCqGm2_>HB6i>&ua90 z5A(K(`-9{^l`%5BU}j)|(E*8>c_n&&t|1DhdWL#NlMNU>OZu!2hF=!n;|DY?#M8ww zL?gKLtS8?A1s>FVdQ&MBb@ E0B#g(F8}}l diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier4.png b/src/main/resources/assets/overdrive_that_matters/textures/item/battery_tier4.png index 54a0104ff52f8576554000c101c68dafeadff283..febf757c87d1979fa9900f00748930f07bc1d297 100644 GIT binary patch delta 263 zcmeyv{Em5oW0XpOPl#(lK|x?(pqQALsi`Rg14Dg%{f3AeQ@yu`g@skwPE%7;0}84? z67m94JS9PX!T%9}LFoRub3k#<0*}aI1_r(ZAk3I`t&?-&a(Py>KNpX$pLjY*et#Jw z!wY5x1{fWXn3-3i=jR%tV5(=RXExb}(X&+b!5^F1r5O!C(?UI6978mMOV4}rH5hQX z23Bz7zWnz+d%^q}tEMxaoGGwE{-U%-a#9)_)011CP3O+|Fh`Wmn95t~@SAzjtadML u5r)byydNaKv)VE??C|e+=4CP8dKaS`1Dj`iw$dD+1q`09elF{r5}E+ssbZG^ delta 277 zcmaFI{D*mhW14P&Pl#(lK|x?(pqQALsj2Dz8w~#+c-Gg~Pv|M%m33r8#Eq%m+rz@b zs%)pJsi`qAFvLbibOI^DkkK4F()87d17$o%~P6~v(`7DU9Ma@!S?vW+f1v>rQ+Cc{9CVo4rm2~r>mdK II;Vst01Ihx`Tzg` diff --git a/src/main/resources/assets/overdrive_that_matters/textures/item/quantum_battery.png b/src/main/resources/assets/overdrive_that_matters/textures/item/quantum_battery.png index 0c9f47982973283ace7fe635ca4378a3dea925d9..d2da511c5f16457b6d004fc0dd6ef05a19199016 100644 GIT binary patch delta 202 zcmaFI{DgUeqpe(kPl#(lK|x?(pqQALsi`Rg14Dg%y_%ZZJ=_0>O&Y9tFoRoq_;K{Jz3DYno}aONkG)pLCs_f xZ`)p>^%5DISr+p@p648YJmrwa*Z0NY`ll*b;{!gND*+nM;OXk;vd$@?2>}1wRYU*) delta 212 zcmaFD{Em5oqpM1QPl#(lK|x?(pqQALsj2Dz8w~#+c-Gg~Pv|LEQ&YQV`~R@%0|o{L zwdW_xffP?kkYDhB1Yi)lf9~AGIull--+P$1P266)@hCT=faG@7iz=vmpxf7iK=ZI3WeOQffZ zV~9p@?%7_h0}32&fxqv}dHQ?*`z!w<-f*!lSK72#e!-f6j|~j_-dWC3IPb;O^&*R@ z|3c%G*6h!$TNYkreehSMzVN^rW)rv1aSf_RHb%E+ Date: Sat, 5 Apr 2025 00:43:44 +0300 Subject: [PATCH 4/4] matter dust in creative tab --- .../ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt | 7 +++++++ .../ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt index d28d2caf3..92cc40e3a 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/item/matter/MatterDustItem.kt @@ -163,6 +163,13 @@ class MatterDustItem : Item(Properties().stacksTo(64)), IMatterItem { return matter(stack) >= ItemsConfig.MATTER_DUST_CAPACITY } + fun makeStack(matterValue: Decimal = Decimal.ONE, count: Int = 1): ItemStack { + val stack = ItemStack(this, count) + matter(stack, matterValue) + + return stack + } + override fun overrideStackedOnOther( pStack: ItemStack, pSlot: Slot, diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt index 3f1c0a6a9..f4ddc6df5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/game/MCreativeTabs.kt @@ -223,7 +223,7 @@ private fun addMainCreativeTabItems(consumer: CreativeModeTab.Output) { accept(MItems.GRILL.values) - // accept(MItems.MATTER_DUST) + accept(MItems.MATTER_DUST.makeStack()) accept(MItems.TRITANIUM_ORE) accept(MItems.DEEPSLATE_TRITANIUM_ORE)