Skip to content

Commit

Permalink
update to 1.17.1-37.0.41
Browse files Browse the repository at this point in the history
- remove test library
  • Loading branch information
cech12 committed Aug 20, 2021
1 parent 99e987c commit d4956be
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 104 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name: Build

on:
push:
branches: [ "1.16" ]
branches: [ "1.17" ]
pull_request:
branches: [ "1.16" ]
branches: [ "1.17" ]

jobs:
build:
Expand All @@ -15,10 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '16'
distribution: 'adopt'
- uses: actions/cache@v2
name: Cache MC Assets
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Publish
on:
push:
tags:
- "1.16*"
- "1.17*"

jobs:
publish:
Expand All @@ -15,10 +15,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 8
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '8'
java-version: '16'
distribution: 'adopt'
- uses: actions/cache@v2
name: Cache MC Assets
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [1.17.1-1.5.0.0] - 2021-08-20
### Changed
- Update mod to 1.17.1-37.0.41

### Known Bugs
- Interaction with Beehives, Pumpkins and Tripwire Hooks do not work for now.

## [1.16.5-1.5.0.0] - 2021-08-20
### Added
- Russian and Ukrainian translation (thanks to vstannumdum aka DMHYT) #10
Expand Down
34 changes: 2 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ version = "${minecraft_version}-${mod_version}"
group = "cech12.${mod_id}" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "${mod_id}"

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
// Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16.
java.toolchain.languageVersion = JavaLanguageVersion.of(16)

println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft {
Expand Down Expand Up @@ -70,30 +71,6 @@ minecraft {
}
}

def testClasses = String.join(File.pathSeparator,
"${mod_id}%%${sourceSets.main.output.resourcesDir}",
"${mod_id}%%${sourceSets.main.output.classesDirs.asPath}",
"${mod_id}%%${sourceSets.test.output.resourcesDir}",
"${mod_id}%%${sourceSets.test.output.classesDirs.asPath}")

serverTest {
parent runs.server // This run config inherits settings from the server config
workingDirectory project.file('run')
main 'com.alcatrazescapee.mcjunitlib.DedicatedTestServerLauncher' // The main class which launches a customized server which then runs JUnit tests
ideaModule "${project.name}.test" // Tell IDEA to use the classpath of the test module
property 'forge.logging.console.level', 'unittest' // This logging level prevents any other server information messages and leaves only the test output
environment 'MOD_CLASSES', testClasses
environment 'target', 'fmltestserver' // This is a custom service used to launch with ModLauncher's transforming class loader
environment 'targetModId', "${mod_id}" // Pass the mod ID directly to mcjunitlib, to find integration test classes from the mod annotation scan data
arg '--crashOnFailedTests' // Optional. Recommended when running in an automated environment. Without it, the server will continue running (and can be connected to via localhost) to inspect why tests failed.
forceExit = false // Optional. Recommended when running in an automated environment, or via the console rather than run configurations. This will allow the task to pass successfully when all tests pass. Use if you see errors along the lines of 'Gradle daemon disappeared unexpectedly'.
mods {
ceramicshears {
sources sourceSets.main, sourceSets.test
}
}
}

data {
workingDirectory project.file('run')

Expand All @@ -114,18 +91,11 @@ minecraft {
}
}

repositories {
//for mcjunitlib
maven { url 'https://jitpack.io' }
}

dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}"

testImplementation fg.deobf("com.github.alcatrazEscapee:mcjunitlib:${project.mcjunitlib_version}")
}

// Example for how to get properties into the manifest for reading by the runtime..
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ org.gradle.daemon=false

mod_id=ceramicshears
mod_version=1.5.0.0
minecraft_version=1.16.5
forge_version=36.1.15
minecraft_version=1.17.1
forge_version=37.0.41

# mcjunitlib
mcjunitlib_version=1.4.3-1.16.5
# mcjunitlib_version=1.4.3-1.16.5

#Curseforge
curseforge_id=363553
curseforge_release=release
curseforge_versions=1.16.5
curseforge_release=beta
curseforge_versions=1.17.1
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions-snapshots/gradle-7.2-20210702220150+0000-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
55 changes: 34 additions & 21 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ 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=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -56,7 +72,7 @@ case "`uname`" in
Darwin* )
darwin=true
;;
MINGW* )
MSYS* | MINGW* )
msys=true
;;
NONSTOP* )
Expand All @@ -66,6 +82,7 @@ esac

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


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -109,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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
Expand All @@ -138,19 +156,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
i=`expr $i + 1`
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -159,14 +177,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
APP_ARGS=`save "$@"`

# 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" "$@"
43 changes: 24 additions & 19 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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 DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -35,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -45,28 +64,14 @@ echo location of your Java installation.

goto fail

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

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cech12.ceramicshears.api.item;

import net.minecraft.item.Item;
import net.minecraft.world.item.Item;

public class CeramicShearsItems {

Expand Down
18 changes: 9 additions & 9 deletions src/main/java/cech12/ceramicshears/init/ModItems.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cech12.ceramicshears.init;

import cech12.ceramicshears.api.item.CeramicShearsItems;
import net.minecraft.block.DispenserBlock;
import net.minecraft.dispenser.BeehiveDispenseBehavior;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ShearsItem;
import net.minecraft.world.level.block.DispenserBlock;
import net.minecraft.core.dispenser.ShearsDispenseItemBehavior;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ShearsItem;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
Expand All @@ -18,11 +18,11 @@ public class ModItems {

@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event) {
CeramicShearsItems.CLAY_SHEARS_PART = registerItem("clay_shears_part", new Item((new Item.Properties()).tab(ItemGroup.TAB_MISC)));
CeramicShearsItems.CERAMIC_SHEARS_PART = registerItem("ceramic_shears_part", new Item((new Item.Properties()).tab(ItemGroup.TAB_MISC)));
CeramicShearsItems.CERAMIC_SHEARS = registerItem("ceramic_shears", new ShearsItem((new Item.Properties()).durability(179).tab(ItemGroup.TAB_TOOLS)));
CeramicShearsItems.CLAY_SHEARS_PART = registerItem("clay_shears_part", new Item((new Item.Properties()).tab(CreativeModeTab.TAB_MISC)));
CeramicShearsItems.CERAMIC_SHEARS_PART = registerItem("ceramic_shears_part", new Item((new Item.Properties()).tab(CreativeModeTab.TAB_MISC)));
CeramicShearsItems.CERAMIC_SHEARS = registerItem("ceramic_shears", new ShearsItem((new Item.Properties()).durability(179).tab(CreativeModeTab.TAB_TOOLS)));

DispenserBlock.registerBehavior(CeramicShearsItems.CERAMIC_SHEARS.asItem(), new BeehiveDispenseBehavior());
DispenserBlock.registerBehavior(CeramicShearsItems.CERAMIC_SHEARS.asItem(), new ShearsDispenseItemBehavior());
}

private static Item registerItem(String name, Item item) {
Expand Down
Loading

0 comments on commit d4956be

Please sign in to comment.