Skip to content

Commit

Permalink
Animated Flowing Amber + Hardcoded Textures
Browse files Browse the repository at this point in the history
  • Loading branch information
KekeCreations committed Aug 8, 2024
1 parent a57d846 commit 32cccca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
package com.uraneptus.sullysmod.common.fluids;

import com.uraneptus.sullysmod.SullysMod;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
import net.minecraftforge.fluids.FluidType;

import java.util.function.Consumer;

public class MoltenAmberFluidType extends FluidType {
private final ResourceLocation stillTexture;
private final ResourceLocation flowingTexture;
private final ResourceLocation stillTexture = new ResourceLocation(SullysMod.MOD_ID,"block/amber");;
private final ResourceLocation flowingTexture = new ResourceLocation(SullysMod.MOD_ID,"block/flowing_molten_amber");;

public MoltenAmberFluidType(final ResourceLocation stillTexture, final ResourceLocation flowingTexture, final Properties properties) {
public MoltenAmberFluidType(final Properties properties) {
super(properties);
this.stillTexture = stillTexture;
this.flowingTexture = flowingTexture;
}

public ResourceLocation getStillTexture() {
return stillTexture;
}

public ResourceLocation getFlowingTexture() {
return flowingTexture;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@

public class SMFluidTypes {

public static final ResourceLocation MOLTEN_AMBER_STILL = new ResourceLocation(SullysMod.MOD_ID,"block/amber");
public static final ResourceLocation MOLTEN_AMBER_FLOWING = new ResourceLocation(SullysMod.MOD_ID,"block/amber");

public static final DeferredRegister<FluidType> FLUID_TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, SullysMod.MOD_ID);

public static final RegistryObject<FluidType> MOLTEN_AMBER_FLUID_TYPE = register("molten_amber_fluid",
Expand All @@ -23,6 +20,6 @@ public class SMFluidTypes {


private static RegistryObject<FluidType> register(String name, FluidType.Properties properties) {
return FLUID_TYPES.register(name, () -> new MoltenAmberFluidType(MOLTEN_AMBER_STILL, MOLTEN_AMBER_FLOWING, properties));
return FLUID_TYPES.register(name, () -> new MoltenAmberFluidType(properties));
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"animation": {
"frametime": 4
}
}

0 comments on commit 32cccca

Please sign in to comment.