Skip to content

Commit

Permalink
Merge pull request #394 from GrowthcraftCE/development
Browse files Browse the repository at this point in the history
Growthcraft 4.3.0 Release
  • Loading branch information
Alatyami authored Mar 10, 2024
2 parents 5e9ff48 + 50daa00 commit 470a7c0
Show file tree
Hide file tree
Showing 135 changed files with 741 additions and 384 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: 8
distribution: adopt
- name: Setup Gradle
run: chmod +x gradlew
- name: Setup CI Workspace
run: ./gradlew setupCIWorkspace
- name: Build with Gradle
run: ./gradlew build
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run sonarqube
env:
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.organization=growthcraftce
-Dsonar.host.url=https://sonarcloud.io/
-Dsonar.projectKey=growthcraft:Growthcraft-1.12

#- name: Setup sonarqube
# uses: warchant/setup-sonar-scanner@v8
#- name: Run sonarqube
# env:
# # to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: sonar-scanner
# -Dsonar.login=${{ secrets.SONAR_TOKEN }}
# -Dsonar.organization=growthcraftce
# -Dsonar.host.url=https://sonarcloud.io/
# -Dsonar.projectKey=growthcraft:Growthcraft-1.12
11 changes: 6 additions & 5 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: 8
distribution: adopt
- name: Setup Gradle
run: chmod +x gradlew
- name: Setup CI Workspace
run: ./gradlew setupCIWorkspace
- name: Build with Gradle
run: ./gradlew build
- name: Create GitHub Release
uses: Roang-zero1/github-create-release-action@master
uses: Roang-zero1/github-create-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
Growthcraft
Growthcraft 4 for Minecraft 1.12.2 (Forge)
===========
[![](http://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/)
[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-4.2.2-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.12)
[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-14.23.4.2768-yellow.svg)](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html)
[![Java Version](https://img.shields.io/badge/JAVA-8-blue.svg)](https://www.java.com/en/)
[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-4.3.0-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.12)
[![](https://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://www.curseforge.com/minecraft/mc-mods/growthcraft-community-edition)
[![](https://cf.way2muchnoise.eu/short_growthcraft-community-edition.svg)](https://www.curseforge.com/minecraft/mc-mods/growthcraft-community-edition)
[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-14.23.5.2847-yellow.svg)](https://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html)


[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGrowthcraftCE%2FGrowthcraft-1.12%2Fbadge%3Fref%3Ddevelopment&style=flat)](https://actions-badge.atrox.dev/GrowthcraftCE/Growthcraft-1.12/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.12)
[![Discord Channel](https://img.shields.io/discord/333690296334548994.svg?color=green)](https://discord.gg/Quh76Jn)
[![](http://cf.way2muchnoise.eu/short_growthcraft-community-edition.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/)

This is a second major community fork of the original GrowthCraft developed by Gwafu.
The original forum post can be found on the [Minecraft Forums mod page](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286298-growthcraft-jul-15-2014-proper-1-7-10-release). We have created a [forum post](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for [Growthcraft CE](http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for general discussions, announcements and feedback. We have a Discord chat group (https://discord.gg/Quh76Jn).
The original forum post can be found on the [Minecraft Forums mod page](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1286298-growthcraft-jul-15-2014-proper-1-7-10-release). We have created a [forum post](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for [Growthcraft CE](https://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2505072-growthcraft-community-edition-proper-1-7-10) for general discussions, announcements and feedback. We have a Discord chat group (https://discord.gg/Quh76Jn).

## Wiki

We are using the [Gamepedia FTB Wiki](http://ftb.gamepedia.com/GrowthCraft) for publishing how the plugins work and tutorials.
For technical details please read our [Github Wiki](https://github.com/GrowthcraftCE/Growthcraft-1.12/wiki).
We are using the [Gamepedia FTB Wiki](https://ftb.gamepedia.com/GrowthCraft) for publishing how the plugins work and tutorials.
For technical details please read our [GitHub Wiki](https://github.com/GrowthcraftCE/Growthcraft-1.12/wiki).

## Contributing

For any contributions to this project, please refer to our [Contributing to Growthcraft](https://github.com/GrowthcraftCE/Growthcraft-1.12/wiki/Contributing-to-Growthcraft) wiki page and create a branch from our development branch. All pull requests need to be towards our development. Pull requests directly to the master branch will be closed without review.

## License

Until we find the right license model, for now we are allowing for others to modify the code for personal/private use. Do not ditribute your own version of the plugin, instead, submit your changes as this is a community project. If you add this mod or set of mods to your mod-pack, simply post an issue with a list of mods that you have included in your pack. It is that simple. We want the list of your mods so that we can determine where to invest time in cross-mod compatibility.
Until we find the right license model, for now we are allowing for others to modify the code for personal/private use. Do not distribute your own version of the plugin. Instead, submit your changes as this is a community project. If you add this mod or set of mods to your mod-pack, simply post an issue with a list of mods that you have included in your pack. It is that simple. We want the list of your mods so that we can determine where to invest time in cross-mod compatibility.
69 changes: 22 additions & 47 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,24 @@
buildscript {
repositories {
jcenter()
mavenCentral()
//jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "gradle"
url "https://plugins.gradle.org/m2/"
}
maven {
name = "CurseForge"
url = "https://minecraft.curseforge.com/api/maven/"
url = "https://maven.minecraftforge.net"
}
}

dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7'
classpath("com.anatawa12.forge:ForgeGradle:2.3-1.0.+") {
changing = true
}
}
}

repositories {
mavenLocal()
maven {
/*maven {
name 'DVS1 Maven FS'
url 'http://dvs1.progwml6.com/files/maven'
}
}*/
maven { // CraftTweaker
name 'jared maven'
url "http://maven.blamejared.com/"
Expand All @@ -39,16 +27,16 @@ repositories {
name 'tterrag maven'
url "http://maven.tterrag.com/"
}
maven { // compatlayer
/*maven { // compatlayer
name 'K-4u maven'
url "http://maven.k-4u.nl/"
}
}*/
maven {
url = "https://minecraft.curseforge.com/api/maven/"
}
maven {
/*maven {
name 'forge'
url 'http://files.minecraftforge.net/maven'
url 'https://maven.minecraftforge.net'
}
maven {
name = "CoFH Maven"
Expand All @@ -61,7 +49,7 @@ repositories {
maven {
name "IC2 Forestry"
url "http://maven.ic2.player.to/"
}
}*/
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
Expand All @@ -73,20 +61,12 @@ repositories {
url = "modmaven.k-4u.nl"
}
maven {
name = "hwyla"
url "https://maven.tehnut.info"
name = "CurseMaven"
url = "https://cursemaven.com"
}
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.sonarqube'

sonarqube {
properties {
property "sonar.projectName" , "Growthcraft-1.12"
property "sonar.projectKey", "growthcraft:Growthcraft-1.12"
}
}

ext.configFile = file "gradle.properties"
configFile.withReader {
Expand Down Expand Up @@ -123,15 +103,12 @@ def getArtifactVersion() {
} else {
"SNAPSHOT-" + revision
}

}

version = project.property('minecraft_version') + "-" + project.property('mod_version') + "-" + getArtifactVersion()
group = "growthcraft"
archivesBaseName = "growthcraft"



extractAnnotationsJar.doFirst {
sourceSets.main.output.resourcesDir.listFiles().each {
System.out.println('Resources: ' + it.absolutePath)
Expand All @@ -141,15 +118,15 @@ extractAnnotationsJar.doFirst {
}
}

sourceCompatibility = targetCompatibility = '1.8'
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
}

minecraft {
version = "1.12.2-14.23.5.2847"
runDir = "run"
mappings = "snapshot_20171003"
mappings = "stable_39"
//makeObfSourceJar = false
}

Expand All @@ -162,10 +139,11 @@ dependencies {

deobfProvided "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') + ":api"

compile "rustic:Rustic:" + project.property('rustic_version')
compile "curse.maven:rustic-256141:3107974"
compile "thaumcraft:Thaumcraft:" + project.property('minecraft_version') + ":" + project.property('thaumcraft_version')
compile "mcp.mobius.waila:Hwyla:" + project.property('hwyla_version')
compile "baubles:Baubles:" + project.property('minecraft_version_short') + ":" + project.property('baubles_version')
compile "curse.maven:hwyla-253449:2568751"
compile "curse.maven:baubles-227083:2518667"
compile "curse.maven:crafttweaker-239197:5013567"

runtime "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version')
}
Expand All @@ -177,6 +155,3 @@ processResources {
}

sourceSets { sourceSets -> main }



4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.logging.level=warn

# Growthcraft Version
mod_version=4.2.2
mod_version=4.3.0

# Minecraft Versions
minecraft_version=1.12.2
minecraft_version_short=1.12

# Forge and MCP Versions
forge_version=14.23.5.2847
mappings=snapshot_20171003
mappings=stable_39

# Dependency and Integration Versions
baubles_version=1.5.2
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/growthcraft/apples/common/block/BlockApple.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class BlockApple extends BlockBush implements ICropDataProvider, IGrowabl

public BlockApple(String unlocalizedName) {
super(Material.PLANTS);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setTickRandomly(true);
this.setSoundType(SoundType.WOOD);
Expand All @@ -83,7 +83,7 @@ public IBlockState getStateFromMeta(int meta) {
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
super.addInformation(stack, player, tooltip, advanced);
tooltip.add(TextFormatting.BLUE + I18n.format(this.getUnlocalizedName() + ".tooltip"));
tooltip.add(TextFormatting.BLUE + I18n.format(this.getTranslationKey() + ".tooltip"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class BlockAppleDoor extends BlockDoor {

public BlockAppleDoor(String unlocalizedName) {
super(Material.WOOD);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setSoundType(SoundType.WOOD);
this.disableStats();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class BlockAppleFence extends BlockFence {

public BlockAppleFence(String unlocalizedName) {
super(Material.WOOD, MapColor.RED);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setHardness(2.0F);
this.setHarvestLevel("axe", 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class BlockAppleFenceGate extends BlockHorizontal {

public BlockAppleFenceGate(String unlocalizedName) {
super(Material.WOOD);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setHardness(2.0F);
this.setHarvestLevel("axe", 1);
Expand Down Expand Up @@ -184,7 +184,7 @@ public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAc
@SuppressWarnings("deprecation")
@Override
public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(FACING, EnumFacing.getHorizontal(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0));
return this.getDefaultState().withProperty(FACING, EnumFacing.byHorizontalIndex(meta)).withProperty(OPEN, Boolean.valueOf((meta & 4) != 0)).withProperty(POWERED, Boolean.valueOf((meta & 8) != 0));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import java.util.Random;

Expand Down Expand Up @@ -120,4 +123,17 @@ protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int cha
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
return GrowthcraftApplesBlocks.blockAppleSapling.getItem();
}

// BlockRenderLayer.SOLID is currently a broken texture for this block.
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getRenderLayer() {
return BlockRenderLayer.CUTOUT_MIPPED;
}

@Override
public boolean isOpaqueCube(IBlockState state) {
return false;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BlockApplePlanks extends Block {

public BlockApplePlanks(String unlocalizedName) {
super(Material.WOOD);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setResistance(5.0F);
this.setHardness(2.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract class BlockAppleSlab extends BlockSlab {

public BlockAppleSlab(String unlocalizedName) {
super(Material.WOOD, MapColor.WOOD);
this.setUnlocalizedName(unlocalizedName);
this.setTranslationKey(unlocalizedName);
this.setRegistryName(new ResourceLocation(Reference.MODID, unlocalizedName));
this.setSoundType(SoundType.WOOD);
this.setResistance(5.0F);
Expand All @@ -38,8 +38,8 @@ public BlockAppleSlab(String unlocalizedName) {
}

@Override
public String getUnlocalizedName(int meta) {
return this.getUnlocalizedName();
public String getTranslationKey(int meta) {
return this.getTranslationKey();
}

@Override
Expand Down
Loading

0 comments on commit 470a7c0

Please sign in to comment.