Skip to content

Commit 2233d21

Browse files
committed
feat: update acid fluid with wip texture
1 parent dba87ab commit 2233d21

File tree

14 files changed

+46
-12
lines changed

14 files changed

+46
-12
lines changed

src/datagen/java/com/github/elenterius/biomancy/datagen/models/ModBlockStateProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,18 @@ protected void registerStatesAndModels() {
177177
directionalBlockWithItem(ModBlocks.CHRYSALIS.get());
178178

179179
particleOnly(ModBlocks.ACID_FLUID_BLOCK, BiomancyMod.rl("block/acid_flat"));
180-
layeredCauldron(ModBlocks.ACID_CAULDRON);
180+
layeredCauldron(ModBlocks.ACID_CAULDRON, BiomancyMod.rl("block/acid_still"));
181181
multifaceBlockWithPropertyVariants(ModBlocks.ACID_SPLATTER.get(), SplatterBlock.AGE.get(), String::valueOf);
182182
multifaceBlockWithPropertyVariants(ModBlocks.VOLATILE_SPLATTER.get(), SplatterBlock.AGE.get(), String::valueOf);
183183

184184
existingBlockWithItem(ModBlocks.WATER_GEL_BLOCK);
185185
}
186186

187-
public <T extends LayeredCauldronBlock> void layeredCauldron(RegistryObject<T> registryObject) {
187+
public <T extends LayeredCauldronBlock> void layeredCauldron(RegistryObject<T> registryObject, ResourceLocation fluidTexture) {
188188
T block = registryObject.get();
189189
String path = path(block);
190190

191-
TextureMapping textureMapping = TextureMapping.cauldron(TextureMapping.getBlockTexture(Blocks.WATER, "_still"));
191+
TextureMapping textureMapping = TextureMapping.cauldron(fluidTexture);
192192
TextureSlot[] texturesSlots = {TextureSlot.CONTENT, TextureSlot.INSIDE, TextureSlot.TOP, TextureSlot.BOTTOM, TextureSlot.SIDE, TextureSlot.PARTICLE};
193193

194194
ModelFile modelLevel1 = getTemplateModelWithTextures(path + "_level_1", new ResourceLocation("minecraft:block/template_cauldron_level1"), texturesSlots, textureMapping).renderType("translucent");

src/generated/resources/assets/biomancy/models/block/acid_cauldron_full.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"render_type": "minecraft:translucent",
44
"textures": {
55
"bottom": "minecraft:block/cauldron_bottom",
6-
"content": "minecraft:block/water_still",
6+
"content": "biomancy:block/acid_still",
77
"inside": "minecraft:block/cauldron_inner",
88
"particle": "minecraft:block/cauldron_side",
99
"side": "minecraft:block/cauldron_side",

src/generated/resources/assets/biomancy/models/block/acid_cauldron_level_1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"render_type": "minecraft:translucent",
44
"textures": {
55
"bottom": "minecraft:block/cauldron_bottom",
6-
"content": "minecraft:block/water_still",
6+
"content": "biomancy:block/acid_still",
77
"inside": "minecraft:block/cauldron_inner",
88
"particle": "minecraft:block/cauldron_side",
99
"side": "minecraft:block/cauldron_side",

src/generated/resources/assets/biomancy/models/block/acid_cauldron_level_2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"render_type": "minecraft:translucent",
44
"textures": {
55
"bottom": "minecraft:block/cauldron_bottom",
6-
"content": "minecraft:block/water_still",
6+
"content": "biomancy:block/acid_still",
77
"inside": "minecraft:block/cauldron_inner",
88
"particle": "minecraft:block/cauldron_side",
99
"side": "minecraft:block/cauldron_side",

src/main/java/com/github/elenterius/biomancy/init/ModFluids.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public final class ModFluids {
2727
public static final DeferredRegister<FluidType> FLUID_TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, BiomancyMod.MOD_ID);
2828
public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, BiomancyMod.MOD_ID);
2929

30-
public static final RegistryObject<TintedFluidType> ACID_TYPE = registerTintedType("acid", 0xFF_39FF14, properties -> properties.density(1024).viscosity(1024));
30+
public static final RegistryObject<FluidType> ACID_TYPE = registerType("acid", properties -> properties.density(1024).viscosity(1024));
3131
public static final Supplier<ForgeFlowingFluid.Properties> ACID_FLUID_PROPERTIES = () -> new ForgeFlowingFluid
3232
.Properties(ACID_TYPE, ModFluids.ACID, ModFluids.FLOWING_ACID)
3333
.slopeFindDistance(2)
@@ -61,9 +61,9 @@ private static RegistryObject<TintedFluidType> registerTintedType(String name, i
6161
private static RegistryObject<FluidType> registerType(String name, UnaryOperator<FluidType.Properties> operator) {
6262
return FLUID_TYPES.register(name, () -> new FluidType(operator.apply(createFluidTypeProperties())) {
6363

64-
private final ResourceLocation stillTexture = BiomancyMod.rl("fluid/%s_still".formatted(name));
65-
private final ResourceLocation flowingTexture = BiomancyMod.rl("fluid/%s_flowing".formatted(name));
66-
private final ResourceLocation overlayTexture = BiomancyMod.rl("fluid/%s_overlay".formatted(name));
64+
private final ResourceLocation stillTexture = BiomancyMod.rl("block/%s_still".formatted(name));
65+
private final ResourceLocation flowingTexture = BiomancyMod.rl("block/%s_flowing".formatted(name));
66+
private final ResourceLocation overlayTexture = BiomancyMod.rl("block/%s_overlay".formatted(name));
6767

6868
@Override
6969
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {

src/main/java/com/github/elenterius/biomancy/init/client/ClientSetupHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public static void onItemColorRegistry(final RegisterColorHandlersEvent.Item eve
198198
public static void onBlockColorRegistry(final RegisterColorHandlersEvent.Block event) {
199199
event.register(VialHolderBlock::getTintColor, ModBlocks.VIAL_HOLDER.get());
200200
event.register(BiometricMembraneBlock::getTintColor, ModBlocks.BIOMETRIC_MEMBRANE.get());
201-
event.register((state, level, pos, tintIndex) -> tintIndex == 0 ? ModFluids.ACID_TYPE.get().getTintColor() : 0xFF_FFFFFF, ModBlocks.ACID_CAULDRON.get());
201+
// event.register((state, level, pos, tintIndex) -> tintIndex == 0 ? ModFluids.ACID_TYPE.get().getTintColor() : 0xFF_FFFFFF, ModBlocks.ACID_CAULDRON.get());
202202
}
203203

204204
@SubscribeEvent
796 Bytes
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"animation": {
3+
"frametime": 2
4+
}
5+
}
796 Bytes
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"animation": {
3+
"frametime": 2
4+
}
5+
}

0 commit comments

Comments
 (0)