Skip to content

Port to Minecraft 1.12.2 #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 56 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
5f2b31c
Update MDK and build.gradle
BestOwl Jul 14, 2020
af6916d
Fix build
BestOwl Jul 14, 2020
4ee40a0
Now this mod can run on 1.12.2, but still missing many features
BestOwl Jul 14, 2020
1e5c7f9
Removed legecy items and blocks
BestOwl Jul 14, 2020
5a3515c
Add some items
Java0 Jul 15, 2020
bf2ecdb
Removed unused config
BestOwl Jul 15, 2020
2ee144a
Degrade to ForgeGradle 2.3 because ForgeGradle 3 could not correctly …
BestOwl Jul 15, 2020
4e4f5a9
Fix registration
BestOwl Jul 15, 2020
3ff2cd2
Add new item type "Card".
Java0 Jul 15, 2020
91c21b1
Merge branch 'mc1.12.2' of https://github.com/GoodTimeStudio/Producti…
Java0 Jul 15, 2020
364577d
Update language files
BestOwl Jul 15, 2020
9683a4a
Update language files
BestOwl Jul 15, 2020
62fc413
Merge branch 'mc1.12.2' of https://github.com/GoodTimeStudio/Producti…
Java0 Jul 15, 2020
823552a
Merge branch 'mc1.12.2' of https://github.com/GoodTimeStudio/Producti…
Java0 Jul 15, 2020
ff502be
Merge branch 'mc1.12.2' of https://github.com/GoodTimeStudio/Producti…
Java0 Jul 15, 2020
22b79c1
Add recipe for desert_eye
BestOwl Jul 16, 2020
0d1ec97
A little bit this, a little bit that
Java0 Jul 16, 2020
2881dff
Merge branch 'mc1.12.2' of https://github.com/GoodTimeStudio/Producti…
Java0 Jul 16, 2020
872b37b
Delete crash
Java0 Jul 16, 2020
90e9234
Added water power generator
BestOwl Jul 17, 2020
5406d15
Fixed items appear on other creative tabs
BestOwl Jul 18, 2020
435e911
Cleanup codes
BestOwl Jul 18, 2020
4b2c365
Make generator better
Java0 Jul 18, 2020
3cfb781
Fixed water generator's logic
BestOwl Jul 18, 2020
bda4490
Enable ore generation and cleanup codes
BestOwl Jul 18, 2020
4cede92
Add references to Botania API
BestOwl Jul 21, 2020
6d7a100
Plan To Add "The Flower Of Osiris" (Unfinished)
Java0 Jul 23, 2020
feba3e6
add Generator GUI(Unfinished)
James-Heller Jul 24, 2020
9e7806b
Plan To Add "The Flower Of Osiris" (Unfinished)
Java0 Jul 24, 2020
0f43406
Rename to TileTefnutTear
BestOwl Jul 24, 2020
3859bf1
Refactor the flower of osiris
BestOwl Jul 24, 2020
992c509
Try adding features to the flowers
Java0 Jul 31, 2020
ab802a6
Add Mixn lib and create Mixin class
Java0 Aug 1, 2020
eafccc1
Try to use mixin to implement the function, but failed
Java0 Aug 2, 2020
f464a8a
add feature(turn GeneratingFlower to DeadBush when Multi Osiris aroun…
James-Heller Aug 3, 2020
5269f6d
Comment out the code that is not used temporarily
Java0 Aug 3, 2020
2e0a277
Change some details
Java0 Aug 5, 2020
7137dec
add lang to Osiris flower
Java0 Aug 6, 2020
f83a6df
Revert commit "Add Mixn lib and create Mixin class"
BestOwl Aug 10, 2020
d9ff8ae
Load mixin properly
BestOwl Aug 10, 2020
928a1cc
Add event to detect whether the square placed by player can be logistics
Java0 Aug 11, 2020
51dc11f
Create a class for wireless machine registration(Maybe Unfinished)
Java0 Aug 12, 2020
9e6afc2
Deleted useless imports and changed ingot-iridium`s recipe
Java0 Aug 12, 2020
7ca5dc3
Add wireless interface
Java0 Aug 12, 2020
351d2d2
Little change
Java0 Aug 13, 2020
292aea4
Try to realize wireless function(unfinished)
Java0 Aug 13, 2020
6a32417
Make event great again
Java0 Aug 14, 2020
99705fe
Disable MixinSubTileGenerating because it will cause the game crashed
BestOwl Aug 14, 2020
97d02b7
Fix mixin config
BestOwl Aug 14, 2020
c7a6051
Register model for the flower of Osiris
BestOwl Aug 14, 2020
3fae9e9
Remove unnecessary field in PLRecipes and Fix gradle build
BestOwl Aug 14, 2020
bb11662
Call PLRecipes.init() during mod initialization
BestOwl Aug 14, 2020
4b3c801
Finished event for block breaked
Java0 Aug 14, 2020
2baa528
Modify energy consumption formula
Java0 Aug 15, 2020
699212e
Further improve the event
Java0 Aug 15, 2020
aaa5544
List initialized
Java0 Aug 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ mods/
saves/
logs/

/gradle.properties

CREDITS-fml.txt
LICENSE-fml.txt
MinecraftForge-Credits.txt
Expand Down
77 changes: 40 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,45 +1,60 @@
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
url = "https://files.minecraftforge.net/maven"
}
jcenter()
mavenCentral()
maven {
name = "sponge"
url = "http://repo.spongepowered.org/maven"
url = "https://repo.spongepowered.org/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
}
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

version = "dev.0.5" + getBuildNumber()
version = "dev.0.6" + getBuildNumber()
group= "com.mcgoodtime.productionline"
archivesBaseName = "ProductionLine"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

minecraft {
version = "1.10.2-12.18.3.2221"
version = "1.12.2-14.23.5.2847"
runDir = "run"
mappings = "stable_29"

// the mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD snapshot are built nightly.
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings = "snapshot_20171003"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

repositories {
maven {
name = "ic2"
url = "http://maven.ic2.player.to"
url = "https://maven.ic2.player.to"
}
maven {
name = "sponge"
url = "http://repo.spongepowered.org/maven"
}
maven {
name = "botania"
url = "https://maven.blamejared.com/"
}
maven {
name = "baubles"
url = "https://maven.thiakil.com"
}
maven {
name = "jei"
Expand All @@ -48,25 +63,12 @@ repositories {
}

dependencies {
compile ('org.spongepowered:mixin:0.6.+') {
compile 'net.industrial-craft:industrialcraft-2:2.8.209-ex112:dev' //adds ic2 to the dev env
deobfCompile "vazkii.botania:Botania:r1.10-363.148"
deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
compile ('org.spongepowered:mixin:0.8') {
exclude module: 'launchwrapper'
}
deobfCompile 'net.industrial-craft:industrialcraft-2:2.6.161-ex110' //adds ic2 to the dev env
compile 'mezz.jei:jei_1.10.2:3.14.4.404'
}

jar {
manifest {
attributes (
'FMLCorePlugin': 'com.mcgoodtime.productionline.core.coremod.PLCore',
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'TweakOrder': 0,
'MixinConfigs': 'mixins.productionline.core.json',
'FMLCorePluginContainsFMLMod': true,
'FMLAT': 'productionline_at.cfg',
'ForceLoadAsMod': true
)
}
}

mixin {
Expand All @@ -79,24 +81,25 @@ compileJava {
options.encoding = 'UTF-8'
}

idea.module.inheritOutputDirs = true

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

from (sourceSets.main.resources.srcDirs) {

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version' : project.version, 'mcversion' : project.minecraft.version

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}

from (sourceSets.main.resources.srcDirs) {

// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

static def getBuildNumber() {
return "$System.env.BUILD_NUMBER" != "null" ? "." + Integer.parseInt("$System.env.BUILD_NUMBER") : ""
}

tasks.jar.dependsOn "check"
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 04 20:07:23 PDT 2016
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
52 changes: 26 additions & 26 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,12 @@
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

Expand All @@ -48,7 +30,6 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -59,11 +40,31 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -89,7 +90,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -113,7 +114,6 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down
8 changes: 4 additions & 4 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

Expand Down Expand Up @@ -46,7 +46,7 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windows variants
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
package com.mcgoodtime.productionline.blocks;

import com.mcgoodtime.productionline.inventory.Inventories;
import com.mcgoodtime.productionline.tiles.TileFacing;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
Expand All @@ -46,7 +45,7 @@ public abstract class BlockContainerPL extends BlockPL implements ITileEntityPro

public BlockContainerPL(Material material, String name) {
super(material, name);
this.isBlockContainer = true;
//this.isBlockContainer = true;
}

@Override
Expand All @@ -66,7 +65,7 @@ public boolean eventReceived(IBlockState state, World world, BlockPos pos, int i
return tileentity != null && tileentity.receiveClientEvent(id, param);
}

protected abstract Class<? extends TileFacing> getTileEntityClass(IBlockState state);
protected abstract Class<? extends TileEntity> getTileEntityClass(IBlockState state);

@Override
public TileEntity createTileEntity(World world, IBlockState state) {
Expand Down
Loading