Skip to content

Commit

Permalink
Added JEI fish fillet recipes config option. Closes #265
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Sep 8, 2021
1 parent 0c4e759 commit fb37889
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public ResourceLocation getEntityTexture(@Nonnull AquaFishEntity fishEntity) {
}

@Override
protected void applyRotations(AquaFishEntity fishEntity, @Nonnull MatrixStack matrixStack, float ageInTicks, float rotationYaw, float partialTicks) {
protected void applyRotations(@Nonnull AquaFishEntity fishEntity, @Nonnull MatrixStack matrixStack, float ageInTicks, float rotationYaw, float partialTicks) {
super.applyRotations(fishEntity, matrixStack, ageInTicks, rotationYaw, partialTicks);
FishType fishType = AquaFishEntity.TYPES.get(fishEntity.getType());
if (fishType != FishType.JELLYFISH) {
Expand Down Expand Up @@ -108,7 +108,7 @@ protected void applyRotations(AquaFishEntity fishEntity, @Nonnull MatrixStack ma
}

@Override
protected void preRenderCallback(AquaFishEntity fishEntity, MatrixStack matrixStack, float partialTickTime) {
protected void preRenderCallback(AquaFishEntity fishEntity, @Nonnull MatrixStack matrixStack, float partialTickTime) {
ResourceLocation location = fishEntity.getType().getRegistryName();
float scale = 0.0F;
if (location != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.teammetallurgy.aquaculture.Aquaculture;
import com.teammetallurgy.aquaculture.integration.jei.recipes.FilletKnifeRecipeMaker;
import com.teammetallurgy.aquaculture.misc.AquaConfig;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin;
import mezz.jei.api.constants.VanillaRecipeCategoryUid;
Expand All @@ -20,7 +21,9 @@ public ResourceLocation getPluginUid() {
}

@Override
public void registerRecipes(IRecipeRegistration registration) {
registration.addRecipes(FilletKnifeRecipeMaker.createFilletKnifeRecipes(), VanillaRecipeCategoryUid.CRAFTING);
public void registerRecipes(@Nonnull IRecipeRegistration registration) {
if (AquaConfig.BASIC_OPTIONS.showFilletRecipesInJEI.get()) {
registration.addRecipes(FilletKnifeRecipeMaker.createFilletKnifeRecipes(), VanillaRecipeCategoryUid.CRAFTING);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static class BasicOptions {
public ForgeConfigSpec.BooleanValue aqFishToBreedCats;
public ForgeConfigSpec.IntValue messageInABottleAmount;
public ForgeConfigSpec.BooleanValue debugMode;
public ForgeConfigSpec.BooleanValue showFilletRecipesInJEI;

BasicOptions(ForgeConfigSpec.Builder builder) {
builder.push(BASIC_OPTIONS);
Expand All @@ -30,6 +31,7 @@ public static class BasicOptions {
aqFishToBreedCats = builder.define("Should Aquaculture fish be able to be used to breed cats & ocelots?", true);
messageInABottleAmount = builder.defineInRange("Amount of Message In A Bottle messages. Used to add additional custom messages", 29, 0, 255);
debugMode = builder.define("Enable debug mode? (Enables additional logging)", false);
showFilletRecipesInJEI = builder.define("Show Fillet recipes in JEI?", true);
builder.pop();
}
}
Expand Down

0 comments on commit fb37889

Please sign in to comment.