Skip to content

Commit

Permalink
test add fluid
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPlacentino committed Jan 1, 2023
1 parent dbbfefd commit 2dcf49d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/main/java/com/obsilab/mcsc/fluid/BaseFluidType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.obsilab.mcsc.fluid;

import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions;
import net.minecraftforge.fluids.FluidType;
import org.joml.Vector3f;

import java.util.function.Consumer;

public class BaseFluidType extends FluidType {
private final ResourceLocation stillTexture; // only this for gas, not placeable
//private final ResourceLocation flowingTexture;
//private final ResourceLocation overlayTexture;
//private final int tintColor;
//private final Vector3f fogColor; // fog when inside the fluid

//contructor:
public BaseFluidType(final ResourceLocation stillTexture, final Properties properties) {
super(properties);
this.stillTexture = stillTexture;
}

//getter(s):
public ResourceLocation getStillTexture() {
return stillTexture;
}

@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getStillTexture() {
return stillTexture;
}

// @Nullable for the getOverlayTexture override, if used
// @NotNull for the modifyFogColor override, if used

});
}
}
8 changes: 8 additions & 0 deletions src/main/java/com/obsilab/mcsc/fluid/ModFluids.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.obsilab.mcsc.fluid;



// fluids: NF3 gas (Nitrogen Trifluoride) for dry (plasma) etching, Nitrogen gas for internal FOUP atmosphere ...
public class ModFluids {
//TODO
}
5 changes: 5 additions & 0 deletions src/main/java/com/obsilab/mcsc/fluid/ModFluidsTypes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.obsilab.mcsc.fluid;

public class ModFluidsTypes { // liquid, gas, plasma ?
//TODO
}

0 comments on commit 2dcf49d

Please # to comment.