Skip to content

Commit

Permalink
Merge pull request #6 from Hojosa/release
Browse files Browse the repository at this point in the history
fixes & tag support
  • Loading branch information
Alatyami authored Nov 25, 2023
2 parents d832817 + e8f2377 commit d545cda
Show file tree
Hide file tree
Showing 72 changed files with 719 additions and 334 deletions.
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
# Growthcraft 7 for Minecraft 1.18.2 (Forge)

[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-8.1.0-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.19)
[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-7.1.1-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.18)
[![](http://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/)
[![](http://cf.way2muchnoise.eu/short_growthcraft-community-edition.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/)
[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-43.1.7-yellow.svg)](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.19.3.html)
[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-40.2.13-yellow.svg)](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.18.2.html)

[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGrowthcraftCE%2FGrowthcraft-1.19%2Fbadge%3Fref%3Ddevelopment&style=flat)](https://actions-badge.atrox.dev/GrowthcraftCE/Growthcraft-1.19/goto?ref=development)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/GrowthcraftCE/Growthcraft-1.19)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGrowthcraftCE%2FGrowthcraft-1.18%2Fbadge%3Fref%3Ddevelopment&style=flat)](https://actions-badge.atrox.dev/GrowthcraftCE/Growthcraft-1.18/goto?ref=development)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/GrowthcraftCE/Growthcraft-1.18)
[![Discord Channel](https://img.shields.io/discord/333690296334548994.svg?color=green)](https://discord.gg/Quh76Jn)

Welcome to Growthcraft. Growthcraft is a collection of Minecraft mods that adds an extra layer of immersion into the
world of Minecraft. Growthcraft adds the ability to grow Apple tress, collect honey from bees, grow hops and grapes on vines that will crawl along rope. You can make cheese, yogurt, ice cream, butter, rice for a flavorfull meal. Additionally, you can make Ale, Wine, Juice, Ciders, kumis, and sake and make it extra potent for a stronger affect.

## Getting Started

There are multiple starting points to Growthcraft. As we continue to develop and expand Growthcraft, we will be adding to our GitHub wiki documentation.
There are multiple starting points to Growthcraft. As we continue to develop and expand Growthcraft, we will be adding
to our GitHub wiki documentation. As of version 7 we have included an in-game manual.

## History

### Growthcraft 8 (Minecraft 1.19)
### Growthcraft 9 (Minecraft 1.20.1)

End of Support: TBD
Latest Version: 9.1.2
Stable Version: 9.1.3

### Growthcraft 8 (Minecraft 1.19.4)

End of Support: TBD
Latest Version: 8.1.0
Stable Version: TBD
Stable Version: 8.1.0

### Growthcraft 7 (Minecraft 1.18)
### Growthcraft 7 (Minecraft 1.18.2)

End of Support: TBD
Latest Version: 7.0.0
Stable Version: TBD
Latest Version: 7.1.1
Stable Version: 7.1.1

### Growthcraft 6 (Minecraft 1.16)

Expand Down
12 changes: 10 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ minecraft {
// Mappings
mappings channel: 'official', version: "${minecraft_version}"
// Access Transformers, this is a fixed path.
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.

runs {
client {
Expand Down Expand Up @@ -117,19 +117,27 @@ sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
// Curse Forge
maven { url "https://www.cursemaven.com" }
maven { //JEI
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
}

dependencies {
minecraft "net.minecraftforge:forge:${forge_version}"

// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api")
//compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api")
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"))
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"))

// Runtime mods for testing
runtimeOnly fg.deobf("curse.maven:theoneprobe-${curseforge_theoneprobe}")
runtimeOnly fg.deobf("curse.maven:jei-${curseforge_jei}")
runtimeOnly fg.deobf("curse.maven:patchouli-${curseforge_patchouli}")
runtimeOnly fg.deobf("curse.maven:appleskin-${curseforge_appleskin}")

runtimeOnly fg.deobf("curse.maven:farmers_delight-${curseforge_farmers_delight}")
}

jar {
Expand Down
12 changes: 8 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ org.gradle.daemon=false
# | | Bug Fix / Maintenance Release
# | Feature Release
# Product Release
growthcraft_version=7.1.0
growthcraft_version=7.1.1

# Changing these values prompts a Product release
minecraft_version=1.18.2
minecraft_version_short=1.18

# Change these values prompts a Feature release
# https://files.minecraftforge.net/net/minecraftforge/forge/index_1.19.4.html
forge_version=1.18.2-40.2.10
forge_version=1.18.2-40.2.13

# Mod Compatibility
# ------------------------------------------------
Expand All @@ -29,7 +29,7 @@ curseforge_growthcraft_trapper=453124:4458345
curseforge_growthcraft_deco=454039:3859414
# JEI - https://www.curseforge.com/minecraft/mc-mods/jei/files
curseforge_jei=238222:4593548
jei_version=10.2.1.1005
jei_version=10.2.1.283
# ------------------------------------------------
# TheOneProbe https://www.curseforge.com/minecraft/mc-mods/the-one-probe/files
curseforge_theoneprobe=245211:3965688
Expand All @@ -39,4 +39,8 @@ curseforge_theoneprobe=245211:3965688
curseforge_patchouli=306770:3846086
# ------------------------------------------------
# AppleSkin https://www.curseforge.com/minecraft/mc-mods/appleskin/files
curseforge_appleskin=248787:4770822
curseforge_appleskin=248787:4770822
# ------------------------------------------------
# Farmer's Delight, for testing rice tags
curseforge_farmers_delight=398521:4679315
# ------------------------------------------------
2 changes: 2 additions & 0 deletions src/main/java/growthcraft/apples/GrowthcraftApples.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import growthcraft.apples.init.client.GrowthcraftApplesBlockRenders;
import growthcraft.apples.init.config.GrowthcraftApplesConfig;
import growthcraft.apples.shared.Reference;
import growthcraft.apples.world.GrowthcraftApplesPlacedFeatures;
import growthcraft.core.world.GrowthcraftPlacedFeatures;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.server.ServerStartingEvent;
import net.minecraftforge.eventbus.api.IEventBus;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
package growthcraft.apples.world;

import growthcraft.apples.init.GrowthcraftApplesBlocks;
import growthcraft.apples.shared.Reference;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.data.worldgen.placement.PlacementUtils;
import net.minecraft.data.worldgen.placement.VegetationPlacements;
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.RegistryObject;

public class GrowthcraftApplesPlacedFeatures {

public static final DeferredRegister<PlacedFeature> PLACED_FEATURES = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, Reference.MODID);

public static final RegistryObject<PlacedFeature> APPLE_TREE_PLACED_KEY = PLACED_FEATURES.register(Reference.UnlocalizedName.APPLE_TREE + "_placed",
() -> new PlacedFeature((Holder<ConfiguredFeature<?,?>>)(Holder<? extends ConfiguredFeature<?,?>>)
public static final Holder<PlacedFeature> APPLE_TREE_PLACED_KEY = PlacementUtils.register(Reference.UnlocalizedName.APPLE_TREE + "_placed",
GrowthcraftApplesConfiguredFeatures.APPLE_TREE_SPAWN, VegetationPlacements.treePlacement(
PlacementUtils.countExtra(3, 0.1f, 2), GrowthcraftApplesBlocks.APPLE_TREE_SAPLING.get())));

PlacementUtils.countExtra(3, 0.1f, 2)));
}

Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ public void tick(Level level, BlockPos blockPos, BlockState blockState, BrewKett
} else {
this.resetTickClock();
}
} else {
this.resetTickClock();
}
} else {
// Do nothing on the client side.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.Ingredient;

public class BrewKettleRecipeCategory implements IRecipeCategory<BrewKettleRecipe> {

Expand Down Expand Up @@ -87,9 +88,11 @@ public void setRecipe(IRecipeLayoutBuilder builder, BrewKettleRecipe recipe, IFo
.addItemStack(new ItemStack(GrowthcraftCellarItems.BREW_KETTLE_LID.get()));
}

// Input Item
builder.addSlot(RecipeIngredientRole.INPUT, 70, 25)
.addItemStack(recipe.getInputItemStack());
// Input Item with Tag Support
for (Ingredient ingredient : recipe.getIngredients()) {
builder.addSlot(RecipeIngredientRole.INPUT, 70, 25)
.addIngredients(ingredient);
}

// TODO: Input Fluid
builder.addSlot(RecipeIngredientRole.INPUT, 36, 7)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package growthcraft.cellar.compat.jei.category;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import com.mojang.blaze3d.vertex.PoseStack;

import growthcraft.cellar.GrowthcraftCellar;
Expand All @@ -25,6 +28,7 @@
import net.minecraft.network.chat.FormattedText;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FormattedCharSequence;
import net.minecraft.world.item.ItemStack;

public class CultureJarRecipeCategory implements IRecipeCategory<CultureJarRecipe> {
Expand Down Expand Up @@ -104,8 +108,14 @@ public void draw(CultureJarRecipe recipe, IRecipeSlotsView recipeSlotsView, Pose
} catch (Exception ex) {
GrowthcraftCellar.LOGGER.error("Failure to draw heat texture for Culture Jar recipe with JEI integration.");
}

font.drawWordWrap(FormattedText.of("Culturing requires a item to grow."), 160, 125, 50, 0x404040);

List<FormattedCharSequence> splitFont = font.split(FormattedText.of("Culturing requires a item to grow."), 50);
AtomicInteger hight = new AtomicInteger(7);

splitFont.forEach((f) -> {
font.draw(stack, f, 0, hight.get(), 0x404040);
hight.getAndAdd(9);
});

font.draw(stack, "(" + TickUtils.toHoursMinutesSeconds(recipe.getRecipeProcessingTime()) + ")", 106, 50, 0x404040);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package growthcraft.cellar.compat.jei.category;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import com.mojang.blaze3d.vertex.PoseStack;

import growthcraft.cellar.GrowthcraftCellar;
Expand All @@ -26,6 +29,7 @@
import net.minecraft.network.chat.FormattedText;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FormattedCharSequence;
import net.minecraft.world.item.ItemStack;

public class CultureJarStarterRecipeCategory implements IRecipeCategory<CultureJarStarterRecipe> {
Expand Down Expand Up @@ -101,10 +105,14 @@ public void draw(CultureJarStarterRecipe recipe, IRecipeSlotsView recipeSlotsVie
} catch (Exception ex) {
GrowthcraftCellar.LOGGER.error("Failure to draw heat texture for Culture Jar recipe with JEI integration.");
}

font.drawWordWrap(FormattedText.of("Leave the item slot empty for creating a starter."), 160, 125, 50, 0x404040);

font.draw(stack, "(" + TickUtils.toHoursMinutesSeconds(recipe.getRecipeProcessingTime()) + ")", 106, 50, 0x404040);

List<FormattedCharSequence> splitFont = font.split(FormattedText.of("Leave the item slot empty for creating a starter."), 50);
AtomicInteger hight = new AtomicInteger(7);

splitFont.forEach((f) -> {
font.draw(stack, f, 0, hight.get(), 0x404040);
hight.getAndAdd(9);
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package growthcraft.cellar.compat.jei.category;

import java.util.List;

import com.mojang.blaze3d.vertex.PoseStack;

import growthcraft.cellar.compat.jei.JEIGrowthcraftCellarModPlugin;
Expand All @@ -23,6 +25,7 @@
import net.minecraft.network.chat.FormattedText;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FormattedCharSequence;
import net.minecraft.world.item.ItemStack;

public class FermentationBarrelRecipeCategory implements IRecipeCategory<FermentationBarrelRecipe> {
Expand Down Expand Up @@ -86,6 +89,12 @@ public void draw(FermentationBarrelRecipe recipe, IRecipeSlotsView recipeSlotsVi
Font font = Minecraft.getInstance().font;

font.drawWordWrap(FormattedText.of("Time multiplies based on amount."), 274, 125, 50, 0x404040);

List<FormattedCharSequence> splitFont = font.split(FormattedText.of("Time multiplies based on amount."), 50);
font.draw(stack, splitFont.get(0), 114, 7, 0x404040);
font.draw(stack, splitFont.get(1), 114, 16, 0x404040);
font.draw(stack, splitFont.get(2), 114, 25, 0x404040);
font.draw(stack, splitFont.get(3), 114, 34, 0x404040);

font.draw(stack, "(" + TickUtils.toHoursMinutesSeconds(recipe.getProcessingTime()) + ")", 0, 55, 0x404040);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,12 @@ public void draw(FruitPressRecipe recipe, IRecipeSlotsView recipeSlotsView, Pose
stack.scale(0.8F, 0.8F, 0.8F);

List<FormattedCharSequence> splitFont = font.split(FormattedText.of("Watch for drainage particles until completed."), 60);
font.draw(stack, splitFont.get(0), 144, 7, 0x404040);
font.draw(stack, splitFont.get(1), 144, 17, 0x404040);
font.draw(stack, splitFont.get(2), 144, 27, 0x404040);
font.draw(stack, splitFont.get(3), 144, 37, 0x404040);
font.draw(stack, splitFont.get(4), 144, 47, 0x404040);

font.split(FormattedText.of("Watch for drainage particles until completed."), 60);


AtomicInteger hight = new AtomicInteger(7);

splitFont.forEach((f) -> {
font.draw(stack, f, 144, hight.get(), 0x404040);
hight.getAndAdd(9);
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package growthcraft.cellar.compat.jei.category;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import com.mojang.blaze3d.vertex.PoseStack;

import growthcraft.cellar.compat.jei.JEIGrowthcraftCellarModPlugin;
Expand All @@ -23,6 +26,7 @@
import net.minecraft.network.chat.FormattedText;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FormattedCharSequence;
import net.minecraft.world.item.ItemStack;

public class RoasterRecipeCategory implements IRecipeCategory<RoasterRecipe> {
Expand Down Expand Up @@ -77,10 +81,15 @@ public void draw(RoasterRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseSta
IRecipeCategory.super.draw(recipe, recipeSlotsView, stack, mouseX, mouseY);
Font font = Minecraft.getInstance().font;

font.drawWordWrap(FormattedText.of("Roasting time is the same regardless of amount."), 160, 119, 150, 0x404040);
List<FormattedCharSequence> splitFont = font.split(FormattedText.of("Roasting time is the same regardless of amount."), 140);
AtomicInteger hight = new AtomicInteger(7);

font.drawWordWrap(FormattedText.of("Roasting Level " + recipe.getRecipeProcessingTime() + " for " + TickUtils.toHoursMinutesSeconds(recipe.getRecipeProcessingTime() * 30 * 20)), 160, 181, 150, 0x404040);
splitFont.forEach((f) -> {
font.draw(stack, f, 0, hight.get(), 0x404040);
hight.getAndAdd(9);
});

font.draw(stack, FormattedText.of("Roasting Level " + recipe.getRecipeProcessingTime() + " for " + TickUtils.toHoursMinutesSeconds(recipe.getRecipeProcessingTime() * 30 * 20)).getString(), 0, 63, 0x404040);
}

@Override
Expand Down
Loading

0 comments on commit d545cda

Please sign in to comment.