Skip to content

Commit

Permalink
Merge pull request #298 from VonZeeple/master
Browse files Browse the repository at this point in the history
Compat with Animania's milk
  • Loading branch information
Alatyami authored Jan 1, 2020
2 parents 330b7f9 + a8ada11 commit 8667d0a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/growthcraft/core/shared/compat/Compat.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private Compat() {
public static final String MODID_FORESTRY = "forestry";
public static final String MODID_RUSTIC = "rustic";
public static final String MODID_THAUMCRAFT = "thaumcraft";

public static final String MODID_ANIMANIA = "animania";

////////////
// Common
Expand All @@ -39,6 +39,8 @@ public static boolean isModAvailable_Thaumcraft() {
return Loader.isModLoaded(MODID_THAUMCRAFT);
}

public static boolean isModAvailable_Animania() { return Loader.isModLoaded(MODID_ANIMANIA); }

////////////
// Fluids
////////////
Expand All @@ -50,6 +52,15 @@ public static List<Fluid> getMilkFluids() {
if (ForestryModFluids.milk != null)
milks.add(ForestryModFluids.milk.getFluid());

//Animania Milk
String[] milk_names = {"milk_holstein","milk_friesian","milk_jersey","milk_goat","milk_sheep"};
if(isModAvailable_Animania()){
for(String milk : milk_names){
if(FluidRegistry.isFluidRegistered(milk)) {
milks.add(FluidRegistry.getFluid(milk));
}
}
}
// Automagy Milk
final Fluid fluidmilk = FluidRegistry.getFluid("fluidmilk");
if (fluidmilk != null)
Expand Down

0 comments on commit 8667d0a

Please sign in to comment.