Skip to content

Commit

Permalink
Merge branch 'master' into refactor/inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
ExE-Boss committed Jun 28, 2018
2 parents 81b6062 + 59455b7 commit f942ebc
Show file tree
Hide file tree
Showing 294 changed files with 1,266 additions and 952 deletions.
42 changes: 42 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Java Gradle CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo

environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx2048mb
TERM: dumb

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: ./gradlew dependencies

- save_cache:
paths:
- ~/gradle
key: v1-dependencies-{{ checksum "build.gradle" }}

# run tests!
- run: ./gradlew check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
# Travis
!/.travis.yml

# CircleCI
!/.circleci

# unwanted os-generated files
.DS_Store
.DS_Store?
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://img.shields.io/travis/NOVA-Team/NOVA-Core.svg?style=flat-square)](https://travis-ci.org/NOVA-Team/NOVA-Core)
[![Build Status](https://img.shields.io/travis/NOVA-Team/NOVA-Core/master.svg?style=flat-square)](https://travis-ci.org/NOVA-Team/NOVA-Core)
[![Coverage](https://img.shields.io/codecov/c/github/NOVA-Team/NOVA-Core.svg?style=flat-square)](https://codecov.io/github/NOVA-Team/NOVA-Core)
[![Tests](https://img.shields.io/jenkins/t/http/ci.novaapi.net/NOVA-Core.svg?style=flat-square)](http://ci.novaapi.net/job/NOVA-Core/lastCompletedBuild/testReport/)
[![waffle.io](https://img.shields.io/badge/tracker-waffle.io-blue.svg?style=flat-square)](https://waffle.io/NOVA-Team/NOVA-Core)
Expand Down
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ plugins {
apply from: "https://raw.githubusercontent.com/NOVA-Team/NOVA-Gradle/master/shared-scripts/java.gradle"

dependencies {
compile 'com.google.guava:guava:18.0'
compile 'com.typesafe:config:1.2.1'
compile 'se.jbee:silk-di:0.6'
compile 'org.slf4j:slf4j-api:1.7.10'
compile 'org.apache.commons:commons-math3:3.5'
compile 'javax.json:javax.json-api:1.0'
compile 'net.jodah:typetools:0.4.9'

runtime 'org.glassfish:javax.json:1.0.4'
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
api 'com.google.guava:guava:18.0'
api 'com.typesafe:config:1.2.1'
api 'se.jbee:silk-di:0.6'
api 'org.slf4j:slf4j-api:1.7.10'
api 'org.apache.commons:commons-math3:3.5'
api 'javax.json:javax.json-api:1.0'
implementation 'net.jodah:typetools:0.5.0'

runtimeOnly 'org.glassfish:javax.json:1.0.4'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'

//checkstyle 'com.puppycrawl.tools:checkstyle:6.2'
}
Expand Down
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 @@
#Thu Aug 18 16:23:23 BRT 2016
#Mon Mar 19 14:35:32 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
22 changes: 15 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
2 changes: 1 addition & 1 deletion minecraft/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
!/.gitignore

!/1.8
!/1.7
!/1.7.10
File renamed without changes.
6 changes: 2 additions & 4 deletions minecraft/1.7/build.gradle → minecraft/1.7.10/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ configurations {
dependencies {
fatJar project(":")
fatJar 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-beta9'
testCompile project(path: ':', configuration: 'wrapperTests')
testImplementation project(path: ':', configuration: 'wrapperTests')

testCompile "junit:junit:4.12"
testCompile 'org.assertj:assertj-core:3.0.0'
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ group = nova.core

minecraft.version = 1.7.10
forge.version = 10.13.4.1448-1.7.10
forgeGradleVersion = 1.2-SNAPSHOT

packaging = jar
info.inceptionYear = 2015
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17;
package nova.core.wrapper.mc.forge.v1_7_10;

import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion;
import nova.core.wrapper.mc.forge.v17.asm.transformers.Transformers;
import nova.core.wrapper.mc.forge.v1_7_10.asm.transformers.Transformers;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17;
package nova.core.wrapper.mc.forge.v1_7_10;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
Expand All @@ -40,10 +40,10 @@
import net.minecraft.launchwrapper.LaunchClassLoader;
import nova.core.loader.Mod;
import nova.core.util.ClassLoaderUtil;
import nova.core.wrapper.mc.forge.v17.util.ReflectionUtil;
import nova.core.wrapper.mc.forge.v17.wrapper.assets.NovaFileResourcePack;
import nova.core.wrapper.mc.forge.v17.wrapper.assets.NovaFolderResourcePack;
import nova.core.wrapper.mc.forge.v17.wrapper.assets.NovaResourcePack;
import nova.core.wrapper.mc.forge.v1_7_10.util.ReflectionUtil;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.assets.NovaFileResourcePack;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.assets.NovaFolderResourcePack;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.assets.NovaResourcePack;
import nova.internal.core.Game;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17.asm;
package nova.core.wrapper.mc.forge.v1_7_10.asm;

import net.minecraft.block.Block;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.chunk.Chunk;
import nova.core.component.misc.FactoryProvider;
import nova.core.event.BlockEvent;
import nova.core.wrapper.mc.forge.v17.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v17.wrapper.block.backward.BWBlock;
import nova.core.wrapper.mc.forge.v17.wrapper.block.forward.FWBlock;
import nova.core.wrapper.mc.forge.v17.wrapper.block.forward.FWTile;
import nova.core.wrapper.mc.forge.v17.wrapper.block.forward.FWTileLoader;
import nova.core.wrapper.mc.forge.v17.wrapper.block.forward.MCBlockTransform;
import nova.core.wrapper.mc.forge.v17.wrapper.block.world.WorldConverter;
import nova.core.wrapper.mc.forge.v1_7_10.launcher.NovaMinecraft;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.backward.BWBlock;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.forward.FWBlock;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.forward.FWTile;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.forward.FWTileLoader;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.forward.MCBlockTransform;
import nova.core.wrapper.mc.forge.v1_7_10.wrapper.block.world.WorldConverter;
import nova.internal.core.Game;
import nova.internal.core.launch.NovaLauncher;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
Expand Down Expand Up @@ -75,10 +75,10 @@ public static void chunkSetBlockEvent(Chunk chunk, int x, int y, int z, Block ol

/**
* Used to inject forwarded TileEntites
* @param data
* @param clazz
* @return
* @throws Exception
* @param data The TileEntity data
* @param clazz The TileEntity class
* @return The new TileEntity instance
* @throws Exception If an exception occurred
*/
public static TileEntity loadTileEntityHook(NBTTagCompound data, Class<? extends TileEntity> clazz) throws Exception {
if (clazz.equals(FWTile.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
Expand Down Expand Up @@ -64,8 +64,8 @@ public class ASMHelper {

static {
try {
defineClass1 = ClassLoader.class.getDeclaredMethod("defineClass", new Class[] { String.class, byte[].class, int.class, int.class });
defineClass2 = ClassLoader.class.getDeclaredMethod("defineClass", new Class[] { String.class, byte[].class, int.class, int.class, ProtectionDomain.class });
defineClass1 = ClassLoader.class.getDeclaredMethod("defineClass", String.class, byte[].class, int.class, int.class);
defineClass2 = ClassLoader.class.getDeclaredMethod("defineClass", String.class, byte[].class, int.class, int.class, ProtectionDomain.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down Expand Up @@ -135,7 +135,7 @@ public static byte[] injectMethods(String name, byte[] bytes, Multimap<String, M
if (method == null) {
throw new RuntimeException("Method not found: " + injector.method);
}
Game.logger().info("Injecting into {}\n", injector.method, printInsnList(injector.injection));
Game.logger().info("Injecting into {}\n{}", injector.method, printInsnList(injector.injection));

List<AbstractInsnNode> callNodes;
if (injector.before) {
Expand Down Expand Up @@ -314,6 +314,7 @@ public static <T> Class<T> defineClass(ClassNode cn, int flags) {
try {
byte[] bytes = createBytes(cn, flags);
defineClass1.setAccessible(true);
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) defineClass1.invoke(Thread.currentThread().getContextClassLoader(), cn.name.replaceAll("/", "."), bytes, 0, bytes.length);
defineClass1.setAccessible(false);
return clazz;
Expand All @@ -329,6 +330,7 @@ public static <T> Class<T> defineClass(ClassNode cn, int flags, ProtectionDomain
try {
byte[] bytes = createBytes(cn, flags);
defineClass2.setAccessible(true);
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) defineClass2.invoke(Thread.currentThread().getContextClassLoader(), cn.name.replaceAll("/", "."), bytes, 0, bytes.length, domain);
defineClass2.setAccessible(false);
return clazz;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v18.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import org.objectweb.asm.ClassWriter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper;
import net.minecraft.launchwrapper.IClassTransformer;
Expand Down Expand Up @@ -59,10 +59,10 @@ public static String unKey(String name) {
}

/**
* Returns true if clazz extends, either directly or indirectly, superclass.
* Returns true if the class extends, either directly or indirectly, the superclass.
* @param name The class in question
* @param superclass The class being extended
* @return
* @return If the class extends or not
*/
public static boolean classExtends(String name, String superclass) {
name = toKey(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v18.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import nova.core.component.Component;
import nova.core.component.ComponentMap;
Expand Down Expand Up @@ -46,7 +46,7 @@
* The ComponentInjector is capable of creating dynamic classes that implement a
* specified super class and implement the interfaces specified by
* {@link Component} and {@link Passthrough}.
* @param <T>
* @param <T> The component type
* @author Vic Nightfall
*/
public class ComponentInjector<T> implements Opcodes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import org.objectweb.asm.Label;
import org.objectweb.asm.Opcodes;
Expand Down Expand Up @@ -123,6 +123,7 @@ public void visitInsn(AbstractInsnNode insn) {
_visitInsn(insn);
}

@SuppressWarnings("deprecation")
private void _visitInsn(AbstractInsnNode insn) {
switch (insn.getType()) {
case 0:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* along with NOVA. If not, see <http://www.gnu.org/licenses/>.
*/

package nova.core.wrapper.mc.forge.v17.asm.lib;
package nova.core.wrapper.mc.forge.v1_7_10.asm.lib;

import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.FieldInsnNode;
Expand Down
Loading

0 comments on commit f942ebc

Please sign in to comment.