From f1efd37858ed5c6fdffb5280a5db2cab3299d2eb Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sat, 15 Jul 2023 20:57:25 +0300 Subject: [PATCH] Remove most of the model injection code (#165) * new raw ore textures i got made, feel free to reorder/remove as you please * fix-a-mixin (removed most of the ModelBakeryMixin code, and moved it to the respective renderer classes as suppliers) also fixed create fluid tank rendering on forge * revert to the old raw ore block for dull, this one is too dark --------- Co-authored-by: KilaBash --- .../api/data/chemical/material/Material.java | 11 -- .../gtceu/api/item/MaterialPipeBlockItem.java | 10 ++ .../renderer/block/MaterialBlockRenderer.java | 6 +- .../renderer/block/OreBlockRenderer.java | 12 +- .../block/TextureOverrideRenderer.java | 13 +++ .../renderer/item/TagPrefixItemRenderer.java | 21 ++-- .../gtceu/common/data/GTBlocks.java | 2 +- .../gtceu/core/mixins/ModelBakeryMixin.java | 104 +++--------------- .../item/material_sets/diamond/raw_ore.json | 6 + .../item/material_sets/fine/raw_ore.json | 6 + .../item/material_sets/lignite/raw_ore.json | 6 + .../item/material_sets/shiny/raw_ore.json | 6 + .../material_sets/dull/raw_ore_block.png | Bin 1203 -> 267 bytes .../material_sets/dull/raw_ore_block_old.png | Bin 0 -> 1203 bytes .../material_sets/lignite/raw_ore_block.png | Bin 0 -> 5962 bytes .../material_sets/rough/raw_ore_block.png | Bin 0 -> 5978 bytes .../material_sets/shiny/raw_ore_block.png | Bin 0 -> 1203 bytes .../item/material_sets/diamond/raw_ore.png | Bin 0 -> 4812 bytes .../item/material_sets/dull/raw_ore.png | Bin 1203 -> 4867 bytes .../item/material_sets/fine/raw_ore.png | Bin 0 -> 1203 bytes .../item/material_sets/shiny/raw_ore.png | Bin 0 -> 4885 bytes .../registrate/fabric/GTFluidBuilder.java | 4 +- .../gtceu/core/fabric/MixinHelpersImpl.java | 6 + .../forge/GTClientFluidTypeExtensions.java | 7 +- .../registrate/forge/GTFluidBuilder.java | 8 +- .../gtceu/core/forge/MixinHelpersImpl.java | 14 +-- 26 files changed, 99 insertions(+), 143 deletions(-) create mode 100644 common/src/main/resources/assets/gtceu/models/item/material_sets/diamond/raw_ore.json create mode 100644 common/src/main/resources/assets/gtceu/models/item/material_sets/fine/raw_ore.json create mode 100644 common/src/main/resources/assets/gtceu/models/item/material_sets/lignite/raw_ore.json create mode 100644 common/src/main/resources/assets/gtceu/models/item/material_sets/shiny/raw_ore.json create mode 100644 common/src/main/resources/assets/gtceu/textures/block/material_sets/dull/raw_ore_block_old.png create mode 100644 common/src/main/resources/assets/gtceu/textures/block/material_sets/lignite/raw_ore_block.png create mode 100644 common/src/main/resources/assets/gtceu/textures/block/material_sets/rough/raw_ore_block.png create mode 100644 common/src/main/resources/assets/gtceu/textures/block/material_sets/shiny/raw_ore_block.png create mode 100644 common/src/main/resources/assets/gtceu/textures/item/material_sets/diamond/raw_ore.png create mode 100644 common/src/main/resources/assets/gtceu/textures/item/material_sets/fine/raw_ore.png create mode 100644 common/src/main/resources/assets/gtceu/textures/item/material_sets/shiny/raw_ore.png diff --git a/common/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java b/common/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java index 5e850e8e58..5a150652f0 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java +++ b/common/src/main/java/com/gregtechceu/gtceu/api/data/chemical/material/Material.java @@ -1084,17 +1084,6 @@ private void verifyInfo(MaterialProperties p, boolean averageRGB) { } } - // Verify FluidTexture - if (p.hasProperty(PropertyKey.FLUID)) { - var fluid = p.getProperty(PropertyKey.FLUID); - if (fluid.getStillTexture() == null) { - fluid.setStillTexture(MaterialIconType.fluid.getBlockTexturePath(iconSet, true)); - } - if (fluid.getFlowTexture() == null) { - fluid.setFlowTexture(fluid.getStillTexture()); - } - } - } } } diff --git a/common/src/main/java/com/gregtechceu/gtceu/api/item/MaterialPipeBlockItem.java b/common/src/main/java/com/gregtechceu/gtceu/api/item/MaterialPipeBlockItem.java index e8028070e2..ee5f964aae 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/api/item/MaterialPipeBlockItem.java +++ b/common/src/main/java/com/gregtechceu/gtceu/api/item/MaterialPipeBlockItem.java @@ -7,6 +7,7 @@ import net.fabricmc.api.Environment; import net.minecraft.MethodsReturnNonnullByDefault; import net.minecraft.client.color.item.ItemColor; +import net.minecraft.network.chat.Component; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; import org.jetbrains.annotations.Nullable; @@ -49,4 +50,13 @@ public IRenderer getRenderer(ItemStack stack) { return getBlock().getRenderer(getBlock().defaultBlockState()); } + @Override + public Component getDescription() { + return this.getBlock().getName(); + } + + @Override + public Component getName(ItemStack stack) { + return getDescription(); + } } diff --git a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/MaterialBlockRenderer.java b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/MaterialBlockRenderer.java index de4acd2616..9b670b735c 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/MaterialBlockRenderer.java +++ b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/MaterialBlockRenderer.java @@ -28,11 +28,7 @@ public static MaterialBlockRenderer getOrCreate(MaterialIconType type, MaterialI } protected MaterialBlockRenderer(MaterialIconType type, MaterialIconSet iconSet) { - super(GTCEu.id("block/tinted_cube_all"), Map.of("all", type.getBlockTexturePath(iconSet, true))); - } - - public void setBlockTexture(ResourceLocation newBlockTexture) { - setTextureOverride(Map.of("all", newBlockTexture)); + super(GTCEu.id("block/tinted_cube_all"), () -> Map.of("all", type.getBlockTexturePath(iconSet, true))); } @Override diff --git a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/OreBlockRenderer.java b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/OreBlockRenderer.java index 8726da261a..b744787149 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/OreBlockRenderer.java +++ b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/OreBlockRenderer.java @@ -39,22 +39,19 @@ */ public class OreBlockRenderer extends BlockStateRenderer { private final Supplier stone; + private Supplier overlaySupplier; private ResourceLocation overlay; private final boolean emissive; - public OreBlockRenderer(Supplier stone, ResourceLocation overlay, boolean emissive) { + public OreBlockRenderer(Supplier stone, Supplier overlaySupplier, boolean emissive) { this.stone = stone; - this.overlay = overlay; + this.overlaySupplier = overlaySupplier; this.emissive = emissive; if (LDLib.isClient()) { registerEvent(); } } - public void setOverlayTexture(ResourceLocation newOverlay) { - this.overlay = newOverlay; - } - @Override public BlockInfo getBlockInfo() { return new BlockInfo(stone.get()); @@ -95,6 +92,9 @@ public List renderModel(BlockAndTintGetter level, BlockPos pos, Block public void onPrepareTextureAtlas(ResourceLocation atlasName, Consumer register) { super.onPrepareTextureAtlas(atlasName, register); if (atlasName.equals(TextureAtlas.LOCATION_BLOCKS)) { + if (overlaySupplier != null) { + overlay = overlaySupplier.get(); + } register.accept(overlay); } } diff --git a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/TextureOverrideRenderer.java b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/TextureOverrideRenderer.java index fe613a49a8..ea16cad42b 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/TextureOverrideRenderer.java +++ b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/block/TextureOverrideRenderer.java @@ -19,6 +19,7 @@ import java.util.Collections; import java.util.Map; import java.util.function.Consumer; +import java.util.function.Supplier; /** * @author KilaBash @@ -30,6 +31,8 @@ public class TextureOverrideRenderer extends CTMModelRenderer { @Nonnull protected Map override; + @Nullable + protected Supplier> overrideSupplier; public TextureOverrideRenderer(ResourceLocation model, @Nonnull Map override) { super(model); @@ -39,6 +42,15 @@ public TextureOverrideRenderer(ResourceLocation model, @Nonnull Map> overrideSupplier) { + super(model); + this.override = Collections.emptyMap(); + this.overrideSupplier = overrideSupplier; + if (LDLib.isClient()) { + registerEvent(); + } + } + public TextureOverrideRenderer(ResourceLocation model) { super(model); this.override = Collections.emptyMap(); @@ -83,6 +95,7 @@ public BakedModel getRotatedModel(Direction frontFacing) { public void onPrepareTextureAtlas(ResourceLocation atlasName, Consumer register) { super.onPrepareTextureAtlas(atlasName, register); if (atlasName.equals(TextureAtlas.LOCATION_BLOCKS)) { // prepare for override. + if (overrideSupplier != null) override = overrideSupplier.get(); for (Object value : override.values()) { register.accept(new ResourceLocation(value.toString())); } diff --git a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/item/TagPrefixItemRenderer.java b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/item/TagPrefixItemRenderer.java index 288fd79bec..c12b5381a8 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/client/renderer/item/TagPrefixItemRenderer.java +++ b/common/src/main/java/com/gregtechceu/gtceu/client/renderer/item/TagPrefixItemRenderer.java @@ -2,12 +2,10 @@ import com.google.common.collect.Table; import com.google.common.collect.Tables; -import com.gregtechceu.gtceu.GTCEu; import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialIconSet; import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialIconType; import com.lowdragmc.lowdraglib.client.model.ModelFactory; import com.lowdragmc.lowdraglib.client.renderer.impl.IModelRenderer; -import lombok.Setter; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.block.model.BlockModel; @@ -16,9 +14,9 @@ import net.minecraft.resources.ResourceLocation; import javax.annotation.Nullable; -import java.io.FileNotFoundException; import java.util.HashMap; import java.util.function.Consumer; +import java.util.function.Supplier; /** * @author KilaBash @@ -28,16 +26,14 @@ public class TagPrefixItemRenderer extends IModelRenderer { private static final Table MODELS = Tables.newCustomTable(new HashMap<>(), HashMap::new); + @Nullable private ResourceLocation modelLocation; + @Nullable + private Supplier modelLocationSupplier; private TagPrefixItemRenderer(MaterialIconType type, MaterialIconSet iconSet) { - super(type.getItemModelPath(iconSet, true)); - this.modelLocation = type.getItemModelPath(iconSet, true); - } - - public void setModelLocation(ResourceLocation newModelLocation) { - this.modelLocation = newModelLocation; - this.itemModel = null; + super(null); + this.modelLocationSupplier = () -> type.getItemModelPath(iconSet, true); } public static TagPrefixItemRenderer getOrCreate(MaterialIconType type, MaterialIconSet iconSet) { @@ -85,6 +81,9 @@ public BakedModel getRotatedModel(Direction frontFacing) { @Override @Environment(EnvType.CLIENT) public void onAdditionalModel(Consumer registry) { - // no-op, handled in ModelBakeryMixin.java + if (modelLocationSupplier != null) { + modelLocation = modelLocationSupplier.get(); + } + registry.accept(modelLocation); } } diff --git a/common/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java b/common/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java index 2b1c6e4749..40fc4f2fa8 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java +++ b/common/src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java @@ -160,7 +160,7 @@ public static void generateMaterialBlocks() { var entry = REGISTRATE.block("%s%s_ore".formatted(oreTag != TagPrefix.ore ? FormattingUtil.toLowerCaseUnder(oreTag.name) + "_" : "", material.getName()), oreType.material(), properties -> new MaterialBlock(properties, oreTag, material, Platform.isClient() ? new OreBlockRenderer(oreType.stoneType(), - Objects.requireNonNull(oreTag.materialIconType()).getBlockTexturePath(material.getMaterialIconSet(), true), + () -> Objects.requireNonNull(oreTag.materialIconType()).getBlockTexturePath(material.getMaterialIconSet(), true), oreProperty.isEmissive()) : null)) .initialProperties(() -> oreType.stoneType().get().getBlock()) .properties(properties -> { diff --git a/common/src/main/java/com/gregtechceu/gtceu/core/mixins/ModelBakeryMixin.java b/common/src/main/java/com/gregtechceu/gtceu/core/mixins/ModelBakeryMixin.java index ceb9c4f549..1a90610b9a 100644 --- a/common/src/main/java/com/gregtechceu/gtceu/core/mixins/ModelBakeryMixin.java +++ b/common/src/main/java/com/gregtechceu/gtceu/core/mixins/ModelBakeryMixin.java @@ -1,117 +1,41 @@ package com.gregtechceu.gtceu.core.mixins; -import com.gregtechceu.gtceu.GTCEu; -import com.gregtechceu.gtceu.api.block.MaterialBlock; +import com.google.common.collect.Sets; import com.gregtechceu.gtceu.api.data.chemical.material.Material; -import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialFlags; import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialIconSet; import com.gregtechceu.gtceu.api.data.chemical.material.info.MaterialIconType; import com.gregtechceu.gtceu.api.data.chemical.material.properties.FluidProperty; import com.gregtechceu.gtceu.api.data.chemical.material.properties.PropertyKey; -import com.gregtechceu.gtceu.api.data.tag.TagPrefix; import com.gregtechceu.gtceu.api.registry.GTRegistries; -import com.gregtechceu.gtceu.client.renderer.block.MaterialBlockRenderer; -import com.gregtechceu.gtceu.client.renderer.block.OreBlockRenderer; -import com.gregtechceu.gtceu.client.renderer.item.TagPrefixItemRenderer; -import com.gregtechceu.gtceu.common.data.GTBlocks; import com.gregtechceu.gtceu.core.MixinHelpers; -import com.tterrag.registrate.util.entry.BlockEntry; -import net.minecraft.client.renderer.texture.TextureAtlas; +import com.mojang.datafixers.util.Pair; import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.UnbakedModel; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.util.profiling.ProfilerFiller; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; -import java.util.Map; -import java.util.Set; +import java.util.LinkedHashSet; @Mixin(value = ModelBakery.class, priority = 999) public abstract class ModelBakeryMixin { - @Shadow - public abstract UnbakedModel getModel(ResourceLocation modelLocation); - - @Shadow @Final - private Map unbakedCache; - - @Shadow @Final private Map topLevelModels; - - @Shadow @Final private ResourceManager resourceManager; - - @Shadow @Final private static Set UNREFERENCED_TEXTURES; - - /** - * register additional models as what forge does - */ - @Redirect(method = "", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiling/ProfilerFiller;popPush(Ljava/lang/String;)V", ordinal = 4)) - private void gtceu$injectModelBakery(ProfilerFiller profiler, String name) { // Have to use a redirect here cuz it's to constructor and mixin doesn't like that much + @Redirect(method = "", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/Sets;newLinkedHashSet()Ljava/util/LinkedHashSet;", ordinal = 0)) + private LinkedHashSet> gtceu$injectModelBakery() { // Have to use a redirect here cuz it's to constructor and mixin doesn't like that much for (Material material : GTRegistries.MATERIALS.values()) { MaterialIconSet iconSet = material.getMaterialIconSet(); - - { - if (material.hasProperty(PropertyKey.ORE) && !material.hasProperty(PropertyKey.GEM)) { - MaterialBlockRenderer.getOrCreate(MaterialIconType.rawOreBlock, iconSet).setBlockTexture(gtceu$generateBlockTexture(iconSet, MaterialIconType.rawOreBlock)); - } - if (material.hasProperty(PropertyKey.INGOT) || material.hasProperty(PropertyKey.GEM) || material.hasFlag(MaterialFlags.FORCE_GENERATE_BLOCK)) { - MaterialBlockRenderer.getOrCreate(MaterialIconType.block, iconSet).setBlockTexture(gtceu$generateBlockTexture(iconSet, MaterialIconType.block)); - } - if (material.hasProperty(PropertyKey.DUST) && material.hasFlag(MaterialFlags.GENERATE_FRAME)) { - MaterialBlockRenderer.getOrCreate(MaterialIconType.frameGt, iconSet).setBlockTexture(gtceu$generateBlockTexture(iconSet, MaterialIconType.frameGt)); + if (material.hasProperty(PropertyKey.FLUID)) { + FluidProperty fluid = material.getProperty(PropertyKey.FLUID); + if (fluid.getStillTexture() == null) { + ResourceLocation foundTexture = MaterialIconType.fluid.getBlockTexturePath(iconSet, false); + fluid.setStillTexture(foundTexture); } - if (material.hasProperty(PropertyKey.FLUID)) { - FluidProperty prop = material.getProperty(PropertyKey.FLUID); - prop.setStillTexture(gtceu$generateBlockTexture(iconSet, MaterialIconType.fluid)); - prop.setFlowTexture(prop.getStillTexture()); - MaterialBlockRenderer.getOrCreate(MaterialIconType.fluid, iconSet).setBlockTexture(prop.getStillTexture()); - MixinHelpers.addFluidTexture(material, prop); - } - } - - prefixLoop: - for (TagPrefix tagPrefix : TagPrefix.values()) { - MaterialIconType type = tagPrefix.materialIconType(); - - if (material.hasProperty(PropertyKey.ORE)) { - BlockEntry blockEntry = GTBlocks.MATERIAL_BLOCKS.get(tagPrefix, material); - if (blockEntry != null && blockEntry.isPresent()) { - MaterialBlock block = blockEntry.get(); - if (block.getRenderer(block.defaultBlockState()) instanceof OreBlockRenderer oreRenderer) { - oreRenderer.setOverlayTexture(gtceu$generateBlockTexture(iconSet, type)); - } - continue prefixLoop; - } - } - - if (tagPrefix.doGenerateItem(material)) { - ResourceLocation model = GTCEu.id(String.format("item/material_sets/%s/%s", iconSet.name, type.name())); - ResourceLocation foundModel = type.getItemModelPath(iconSet, false); - - UnbakedModel unbakedmodel = this.getModel(foundModel); - this.unbakedCache.put(model, unbakedmodel); - this.topLevelModels.put(model, unbakedmodel); - TagPrefixItemRenderer.getOrCreate(type, iconSet).setModelLocation(model); + if (fluid.getFlowTexture() == null) { + fluid.setFlowTexture(fluid.getStillTexture()); } + MixinHelpers.addFluidTexture(material, fluid); } } - profiler.popPush(name); - } - - @Unique - private ResourceLocation gtceu$generateBlockTexture(MaterialIconSet iconSet, MaterialIconType type) { - ResourceLocation texture = GTCEu.id(String.format("block/material_sets/%s/%s", iconSet.name, type.name())); - ResourceLocation foundTexture = type.getBlockTexturePath(iconSet, false); - - ResourceLocation path = GTCEu.id(String.format("textures/block/material_sets/%s/%s.png", iconSet.name, type.name())); - foundTexture = this.resourceManager.getResource(path).isPresent() ? texture : foundTexture; - - UNREFERENCED_TEXTURES.add(new net.minecraft.client.resources.model.Material(TextureAtlas.LOCATION_BLOCKS, foundTexture)); - return foundTexture; + return Sets.newLinkedHashSet(); } } diff --git a/common/src/main/resources/assets/gtceu/models/item/material_sets/diamond/raw_ore.json b/common/src/main/resources/assets/gtceu/models/item/material_sets/diamond/raw_ore.json new file mode 100644 index 0000000000..0caea56adf --- /dev/null +++ b/common/src/main/resources/assets/gtceu/models/item/material_sets/diamond/raw_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gtceu:item/material_sets/diamond/raw_ore" + } +} diff --git a/common/src/main/resources/assets/gtceu/models/item/material_sets/fine/raw_ore.json b/common/src/main/resources/assets/gtceu/models/item/material_sets/fine/raw_ore.json new file mode 100644 index 0000000000..7b7a3d6534 --- /dev/null +++ b/common/src/main/resources/assets/gtceu/models/item/material_sets/fine/raw_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gtceu:item/material_sets/fine/raw_ore" + } +} diff --git a/common/src/main/resources/assets/gtceu/models/item/material_sets/lignite/raw_ore.json b/common/src/main/resources/assets/gtceu/models/item/material_sets/lignite/raw_ore.json new file mode 100644 index 0000000000..2a4468ee66 --- /dev/null +++ b/common/src/main/resources/assets/gtceu/models/item/material_sets/lignite/raw_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gtceu:item/material_sets/lignite/raw_ore" + } +} diff --git a/common/src/main/resources/assets/gtceu/models/item/material_sets/shiny/raw_ore.json b/common/src/main/resources/assets/gtceu/models/item/material_sets/shiny/raw_ore.json new file mode 100644 index 0000000000..8d839b779e --- /dev/null +++ b/common/src/main/resources/assets/gtceu/models/item/material_sets/shiny/raw_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "gtceu:item/material_sets/shiny/raw_ore" + } +} diff --git a/common/src/main/resources/assets/gtceu/textures/block/material_sets/dull/raw_ore_block.png b/common/src/main/resources/assets/gtceu/textures/block/material_sets/dull/raw_ore_block.png index 532dff9408bc997ff00b86f66d609a46a9a00be0..033f74f8790757482ff5fe612edb88fe561644d7 100644 GIT binary patch delta 250 zcmV4p^lCZT2Lt=AI(OpAHjB63;+NC07*qoM6N<$f*Pi2 AQUCw| literal 1203 zcmY+Dv5yi_5XOh|WjVkz2MHl6iI-qWu*6_NbRitkI}SCdm7b9c7NnGO}da?W9l}IMV6L|Y2|Jrp1o$_8W_&XRrd->X( z#jQ=(b>1o7ckJiK$Mt89*e~mcPW{Qwo2O1=r&QiMxcBZ{Ld0Aw7p~vE8Vzil`QJdZ z*<8(LGdEYHTCK`pF!0u+(MXcXq@+?QNhA_79*2IGSS+?C zfmrwC^La_9(=we-#lTDz(Cv1;BxQ$yBpyE@ib$sLnMfpZGMP-oRU)BKNS4c`WHK4C zZCkS0tSlCbQ!$clw_qtWnWYaGR`R%@-sz|6x$0c$;(TCL`t2!0(d1=*`b)~7&#VUi4V zX#IZQvx#dVe~}IDKfMF`Rc35|Rct^qduWARZw45E03^Eh7XM#by;7-omkc)r4EJAw zY*nL@A=S2s@gLB;0O0w85QZn^(%9ysO$#+2C8nih6$m8=cBxHBQ)ww8rn(R-4b(-gXu!4ZT)6TN zxKdaC13@sQ%Yw_ci&#hkg(ifw&|pZt&%lH@;huZX%z5XXdFSNA#(F+59vv5vKw%~O zzcfqZ%f1;V;UH2m?hDTyNm#!U-~q5m~CviTuyrrhr@Dp zb*0ssULvwrGMeCA*>4(unT$AV^4lQ`og}D LThD&K_w4;YnsACt literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/gtceu/textures/block/material_sets/lignite/raw_ore_block.png b/common/src/main/resources/assets/gtceu/textures/block/material_sets/lignite/raw_ore_block.png new file mode 100644 index 0000000000000000000000000000000000000000..5a427e871ac9c9322520b0c215e18c91c5be1b5c GIT binary patch literal 5962 zcmeHLc~leE8oyvfNI{lr-8Dv(3M85AB!Gw@5FvfZngj^A(7N!fRMA=~ zDh0HP3o7mkZbgM>1r$-^3PRPYNJRlrK;+FG7V*5E^N#1d{^#Y)%)Q_8`@Zk@-MKJ) z9~K&DM;=ZF0N9Cw{Ac1%2Y6Xq;rB63ohShP=}8e$#+hgWMW@%wRk0Ywn5e@jm`NoE zz;tIvlNTosuF0%1_=Lu|9HXvqSQJdn?QD9DB-ctB zFMHTrb!o7lPcOJIY>L-@x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USSMvMT%hYu&(3(JKW_gti&2}Dm%PX|h+l86k~aPW9Mz~OL+j=zvhLI8<^g4){JUZta>Bgo9mB#2}%7~t;RyMzsNfL(xO XS}J^EMqM#5p-eP2)PMh!=w<%_FH4%> literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/gtceu/textures/block/material_sets/rough/raw_ore_block.png b/common/src/main/resources/assets/gtceu/textures/block/material_sets/rough/raw_ore_block.png new file mode 100644 index 0000000000000000000000000000000000000000..5bf2c43d13298d0ea20b6d815992aefcef67e2d2 GIT binary patch literal 5978 zcmeHLX;f3!7Ct}_WKckqQHenigvGEO-0l;`pT3EO~6iFs(wCY$z0!q}UYEUAY zqKE|`rQzUb5d|IY76bCh5$SHzzkayl>mNIam$UP>+}YIGe>y8#dDJ+L8)#ZQc=c|@ zfSaA+%vRo^%>r(7*Dbj>>4yiUm%1}5Vy>&{ZvTL4chK1{RdeFY5?u01 zo(%on_NC*-tyZ(MBKHdiC#-47cAjjV>$|pOVb0-;-e(IAowvNWhgGJ2LL388Dlym2Fq=+LJeV$!l_ZiQ@I! za}H^P7@f9ub%|P=NUJ^m@g6m+nj)Ug_%!;UZNuX1B~Q&9#BGlE4*0J%7)V=s#3uK` zQ`&|#;aezZZl;4*q`5JTVw7%Ei$j( z6=iU5!Pna>zv7nfpt~OqgCt+at-cJ-5+W z@D07nIXJg@(&5dLzj+?sO5es3{W|@^UhS_3Gp~|%Y&=F`9LSlph(A#C)I#oC_m8Wg z2fz67^^XLCYd?OWBBe|Y~YhtT+Scb=^awEz5vErIkK zQ;whPw>wrYv7{bqsf;_8#hK4G_-Ws>=7pw$R)72KZHAt4d-qNqUvi=5PIJe_>w}q# z)0=A|*46Bywaq3@6hC!t`X;1h&`wS1qc%M&W3;*_mdT#h-d=RxT! z8|@rZc1$r&y;8Jyt!-#|*oo=M*{REB#ZZEJUWD3)AMNq!DhS?rPZ*zl@=)oOkmb8+ z`q21Q^SZs;R6~e)Te!Mo9hRN!$oI)bVF#pz&xA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b{`~3AO z2DL36TnQ0sLIX^VU{&rLONNHaBKtgO3KB_;-sT0!e#4R?Rj6ULVDEN)ktHA`*ZE5U@hX<_bgzn~w+(wnC}mu|+~e zfeHBm0!)DQg9_IgDNL&*Xea>AApwpE=Me}Z&IJ${pRFKx{%jam`EwO~KA*>j z`$5bxkf16tb^oYnC>%g>1wtXLmc?b#%P%dB2<)M5Szx>QC*y(Y8ldZ)7? zFCY`RDphJd3&1sNLgZ|@)OO)wNTt&5?(U9`j^g6ty1F`p!2oVJ3WXv&JKHb#bPh1G zqoN|B8PnRDz`ryMJH@O}2_t8)XBZeb>%-!W48~A5`n6+hEExloj#Riz>e%l1p0n@R zhW1+xKvf(rnJ#zov@2xjy20?zk3Eaoqx3>%*aUn3n9xjG@`}M#W}Bc4mKM>1cf3j& zp9zFqizU`Vt5|+%79$Ysy|%4STb~33L1M0jq-|E1b8_e$7*6!)ZBP2&M|CEQP8dzk Ng-atOWiu9L{TH10=?nk> literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/gtceu/textures/item/material_sets/dull/raw_ore.png b/common/src/main/resources/assets/gtceu/textures/item/material_sets/dull/raw_ore.png index a8ae434456b75bbc006fcb92b3b53248c81d1c83..b9c01319eeb2792df7d9d4be235654afbb512c67 100644 GIT binary patch literal 4867 zcmeHLc~nzZ8V`sfi?sp+s8BNjETS*VOF|Y2DuyL$kgbZMqc1Nn@E}{0M-oMg(g75x zs6ZKUL0bitals0LXpwP{q97t8q7@xPr{V(4sI;P^b6-G~Gd*XH=S=_Oo%53Ke#`HE z_jkYho!o2<3k{xRJI$6tp-hs5h$F!F$K-1@4tzdqzYi2v{Pj`ML#%Dc!+W0iv%H(IiM;eyok;E29D%cr)eSYlHlsh-@)%EaW zkI#}5Ud+cNrW5J2p{2z(YckxHC6!p`Cix_FRR{L{Gxt&Wnu{H_cMkP;cAdZUebX() zj*TZH()AH~pDMXwcdF|FkBW})XH)bCUhjRnt^8EWS<_CfonI`@h)d0y;2rZ=o}^$~d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ze`GTgayxr97N~Yh#0#P(x?60gXx@S0&_kn9N!gOd5yNJIBNhjeDoe3gEFyamMIGu34ZMtrJr| g1ySI!HW~*6@^kyQ&I|3j)|yCJ5*R8z9F0w)?#oK*=G_|? zTx;%cKP=AwnM>%Zs+tmuFBXgTx?sn>8vw}pe4b*l7_Uzz6B>`lh;7l6#8?2CAp3ki zn$2bujYcUD2#~Jp?Az`3$zs^O*=(B2<-7i&hW;fU3A$0H^)&ts^;+NSN7dmU*}h7!DDe{FML*5P=tSR4CBD`KzCe RTMs95E=x(PsZYu5+n;{z6J7uS diff --git a/common/src/main/resources/assets/gtceu/textures/item/material_sets/fine/raw_ore.png b/common/src/main/resources/assets/gtceu/textures/item/material_sets/fine/raw_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..a8ae434456b75bbc006fcb92b3b53248c81d1c83 GIT binary patch literal 1203 zcmbtSL5NaO6up*=B~46F0w)?#oK*=G_|? zTx;%cKP=AwnM>%Zs+tmuFBXgTx?sn>8vw}pe4b*l7_Uzz6B>`lh;7l6#8?2CAp3ki zn$2bujYcUD2#~Jp?Az`3$zs^O*=(B2<-7i&hW;fU3A$0H^)&ts^;+NSN7dmU*}h7!DDe{FML*5P=tSR4CBD`KzCe RTMs95E=x(PsZYu5+n;{z6J7uS literal 0 HcmV?d00001 diff --git a/common/src/main/resources/assets/gtceu/textures/item/material_sets/shiny/raw_ore.png b/common/src/main/resources/assets/gtceu/textures/item/material_sets/shiny/raw_ore.png new file mode 100644 index 0000000000000000000000000000000000000000..36c28d47fd1466686611a4d8489936b15f765949 GIT binary patch literal 4885 zcmeHLc~leU77wV%qPSHMtT+U)Zj+fT1QOW^n~x|$L_|<0nF$PJGZ{!gkOQ?M*a}4i zMJx)>s>s7#6cp;K)(sRDmm+8@g0#3iq3W|*d|whoJg?`x<2kSYk#i>VefPWf_uc!u z_q!)wa>5n_jkUD5q|s<&LxKh2;5}adj2r>JAGhBJf{}t$Q4|%9X(5$bDJ5kDM5U+* zh|rNz8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;*w(gkI7_AkIlb?U;bYkPWjL0f3yKFi0nt zDKvbYC*6R{2V=b$p+g20D$$c3B@Bc7m1+XwFgOep4$zUwEV`E^0pJ%Ne^Mf5D*%Pnp9DwQUU2P zF|jg<@}$$jI`qyzxk@M;gjZ+=SO9z=I!uKy87Lx`BSS4TR6sHS8F1)NEi@v~mXUBm zqfAmuh=625K{*YDz$JtBswB0{5DqRu2pJ&^MfseLWE(17J3TeNV&>j1<3wD zlOm<>$@;)I{fZ%+p^gCaLEI0t-^FfF23kTPU!asE>D>zvc+&Oz^Kqqw#QBCHD#m#n z2@8jrVs{MYU?>~Lq#!X|j)Y6NGjWU{h#^oR3JrxRB!nIcfHO#dBf;G{OjkA=W@D~m zm_vwNVX>F~Bk|N#Zd@90B^rK*7F~lYdeS1cyT~F%*Xh78`{*5-AUM=WuzjtJs~(l}cG+ z3C=UHFo>>EN+~U-CVb-nkAN#spa!m>nFFbs^`X8tp3vt3PzIxJ@O#QQbYvh{MBg#q zMeBk57atx5g&{2l*coM@b%9QZ47S1nzJRZPg)fMp`E=a|fA`Q##D5DC(AJNd77Qj9s^Fy> z8qI2w{xPAIluiM{(Nu^qVD!V$))vkqWnP>dAleop@D-U)Gs&kZ--7AjhYlHsrW}@W z { - registry.register(stillTexture); - registry.register(flowingTexture); + if (stillTexture != null) registry.register(stillTexture); + if (flowingTexture != null) registry.register(flowingTexture); }); } diff --git a/fabric/src/main/java/com/gregtechceu/gtceu/core/fabric/MixinHelpersImpl.java b/fabric/src/main/java/com/gregtechceu/gtceu/core/fabric/MixinHelpersImpl.java index bb05f2855f..b371d4020d 100644 --- a/fabric/src/main/java/com/gregtechceu/gtceu/core/fabric/MixinHelpersImpl.java +++ b/fabric/src/main/java/com/gregtechceu/gtceu/core/fabric/MixinHelpersImpl.java @@ -5,6 +5,8 @@ import com.gregtechceu.gtceu.common.data.GTFluids; import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry; import net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler; +import net.fabricmc.fabric.api.event.client.ClientSpriteRegistryCallback; +import net.minecraft.world.inventory.InventoryMenu; public class MixinHelpersImpl { @@ -13,6 +15,10 @@ public static void addFluidTexture(Material material, FluidProperty prop) { var fluids = GTFluids.MATERIAL_FLUID_FLOWING.get(prop); if (fluids != null) { FluidRenderHandlerRegistry.INSTANCE.register(fluids.get().getFirst(), fluids.get().getSecond(), new SimpleFluidRenderHandler(prop.getStillTexture(), prop.getFlowTexture(), material.getMaterialRGB())); + ClientSpriteRegistryCallback.event(InventoryMenu.BLOCK_ATLAS).register((atlas, registry) -> { + registry.register(prop.getStillTexture()); + registry.register(prop.getFlowTexture()); + }); } } } diff --git a/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTClientFluidTypeExtensions.java b/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTClientFluidTypeExtensions.java index 9d9480346c..77687435e5 100644 --- a/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTClientFluidTypeExtensions.java +++ b/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTClientFluidTypeExtensions.java @@ -5,17 +5,12 @@ import net.minecraft.resources.ResourceLocation; import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; -import java.util.HashMap; -import java.util.Map; - public class GTClientFluidTypeExtensions implements IClientFluidTypeExtensions { - public static final Map FLUID_TYPES = new HashMap<>(); - public GTClientFluidTypeExtensions(ResourceLocation still, ResourceLocation stillTexture, ResourceLocation flowingTexture, int tintColor) { + public GTClientFluidTypeExtensions(ResourceLocation stillTexture, ResourceLocation flowingTexture, int tintColor) { this.stillTexture = stillTexture; this.flowingTexture = flowingTexture; this.tintColor = tintColor; - FLUID_TYPES.put(still, this); } @Getter @Setter diff --git a/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTFluidBuilder.java b/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTFluidBuilder.java index 2130e32127..16479081e7 100644 --- a/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTFluidBuilder.java +++ b/forge/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/forge/GTFluidBuilder.java @@ -67,7 +67,7 @@ public class GTFluidBuilder extends AbstractBuil @FunctionalInterface public interface FluidTypeFactory { - FluidType create(String langKey, Material material, ResourceLocation stillId, FluidType.Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture, int color); + FluidType create(String langKey, Material material, FluidType.Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture, int color); } private final String sourceName, bucketName; @@ -104,7 +104,7 @@ public GTFluidBuilder(AbstractRegistrate owner, P parent, Material material, this.stillTexture = stillTexture; this.flowingTexture = flowingTexture; this.fluidFactory = fluidFactory; - this.fluidType = NonNullSupplier.lazy(() -> typeFactory.create(langKey, material, new ResourceLocation(owner.getModid(), name), makeTypeProperties(), this.stillTexture, this.flowingTexture, this.color)); + this.fluidType = NonNullSupplier.lazy(() -> typeFactory.create(langKey, material, makeTypeProperties(), this.stillTexture, this.flowingTexture, this.color)); this.registerType = true; defaultBucket(); @@ -338,11 +338,11 @@ protected RegistryEntry createEntryWrapper(RegistryObject delegate) { return new FluidEntry<>(getOwner(), delegate); } - public static FluidType defaultFluidType(String langKey, Material material, ResourceLocation still, FluidType.Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture, int color) { + public static FluidType defaultFluidType(String langKey, Material material, FluidType.Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture, int color) { return new FluidType(properties) { @Override public void initializeClient(Consumer consumer) { - consumer.accept(new GTClientFluidTypeExtensions(still, stillTexture, flowingTexture, color)); + consumer.accept(new GTClientFluidTypeExtensions(stillTexture, flowingTexture, color)); } @Override diff --git a/forge/src/main/java/com/gregtechceu/gtceu/core/forge/MixinHelpersImpl.java b/forge/src/main/java/com/gregtechceu/gtceu/core/forge/MixinHelpersImpl.java index 183f3dd1bf..b3776b4eb8 100644 --- a/forge/src/main/java/com/gregtechceu/gtceu/core/forge/MixinHelpersImpl.java +++ b/forge/src/main/java/com/gregtechceu/gtceu/core/forge/MixinHelpersImpl.java @@ -3,17 +3,17 @@ import com.gregtechceu.gtceu.api.data.chemical.material.Material; import com.gregtechceu.gtceu.api.data.chemical.material.properties.FluidProperty; import com.gregtechceu.gtceu.api.registry.registrate.forge.GTClientFluidTypeExtensions; -import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; public class MixinHelpersImpl { public static void addFluidTexture(Material material, FluidProperty prop) { - if (prop == null || !prop.hasFluidSupplier()) return; - GTClientFluidTypeExtensions extensions = GTClientFluidTypeExtensions.FLUID_TYPES.get(ForgeRegistries.FLUIDS.getKey(prop.getFluid())); - if (extensions != null) { - extensions.setFlowingTexture(prop.getFlowTexture()); - extensions.setStillTexture(prop.getStillTexture()); - extensions.setTintColor(material.getMaterialRGB()); + if (prop == null || !prop.hasFluidSupplier() || prop.getFluid() == null) return; + IClientFluidTypeExtensions extensions = IClientFluidTypeExtensions.of(prop.getFluid()); + if (extensions instanceof GTClientFluidTypeExtensions gtExtensions) { + gtExtensions.setFlowingTexture(prop.getFlowTexture()); + gtExtensions.setStillTexture(prop.getStillTexture()); + gtExtensions.setTintColor(material.getMaterialARGB()); } } }