Compare commits

..
5 Commits
47 changed files with 186 additions and 109 deletions

No files matched your search

-9
View File
@@ -1,9 +0,0 @@
directory="run/crash-reports"
if [ -d $directory ]; then
echo "Crash reports detected:"
cat $directory/*
exit 1
else
echo "No crash reports detected"
exit 0
fi
+27
View File
@@ -0,0 +1,27 @@
if [[ -d "run/crash-reports" ]]; then
echo "Crash reports detected:"
cat $directory/*
exit 1
fi
if grep --quiet "Fatal errors were detected" server.log; then
echo "Fatal errors detected:"
cat server.log
exit 1
fi
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then
echo "Server force stopped:"
cat server.log
exit 1
fi
if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
echo "Server didn't finish startup:"
cat server.log
exit 1
fi
echo "No crash reports detected"
exit 0
+6 -6
View File
@@ -29,17 +29,17 @@ jobs:
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Run server for 1 minute
- name: Run server for 1.5 minutes
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 60 ./gradlew runServer || true
timeout 90 ./gradlew runServer | tee --append server.log || true
- name: Test no crashes happend
- name: Test no errors reported during server run
run: |
chmod +x .github/scripts/test-no-crash-reports.sh
.github/scripts/test-no-crash-reports.sh
chmod +x .github/scripts/test-no-error-reports.sh
.github/scripts/test-no-error-reports.sh
+16
View File
@@ -43,3 +43,19 @@ jobs:
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar
- name: Set repository owner and name
run: |
echo "REPOSITORY_OWNER=${GITHUB_REPOSITORY%/*}" >> $GITHUB_ENV
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Publish package
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACT_GROUP_ID: com.github.${{ env.REPOSITORY_OWNER }}
ARTIFACT_ID: "${{ env.REPOSITORY_NAME }}"
ARTIFACT_VERSION: "${{ env.RELEASE_VERSION }}"
REPOSITORY_NAME: "${{ env.REPOSITORY_NAME }}"
REPOSITORY_OWNER: "${{ env.REPOSITORY_OWNER }}"
+3
View File
@@ -26,3 +26,6 @@ whitelist.json
*.ipr
*.iws
src/main/resources/mixins.*.json
*.bat
*.DS_Store
!gradlew.bat
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WirelessCraftingTerminal-Bigbass</name>
<comment/>
<projects/>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments/>
</buildCommand>
</buildSpec>
<linkedResources/>
</projectDescription>
-14
View File
@@ -1,14 +0,0 @@
#
#Thu Dec 22 15:15:52 EST 2016
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-4
View File
@@ -1,4 +0,0 @@
7b794048-f144-40bb-83dd-4789a5cf7cc8
74e9c6b2-c8e8-449c-a8c5-6bb514544759
7b44b6f9-0610-49fa-af9e-b2703c51a4f1
7a1bb7c4-a3eb-460e-8229-7a40f46f76bd
+34 -1
View File
@@ -1,4 +1,4 @@
//version: 928ecf7feb33a1149538b0e2cd17e3bc5f281428
//version: 29197fa3cf1ea6ef5c07884a613171d01c026d1d
/*
DO NOT CHANGE THIS FILE!
@@ -42,6 +42,7 @@ plugins {
id("org.ajoberstar.grgit") version("3.1.1")
id("com.github.johnrengelman.shadow") version("4.0.4")
id("com.palantir.git-version") version("0.12.3")
id("maven-publish")
}
apply plugin: 'forge'
@@ -460,6 +461,38 @@ artifacts {
}
}
// publishing
publishing {
publications {
maven(MavenPublication) {
artifact source: jar
artifact source: sourcesJar, classifier: "src"
artifact source: devJar, classifier: "dev"
if (apiPackage) {
artifact source: apiJar, classifier: "api"
}
groupId = System.getenv("ARTIFACT_GROUP_ID") ?: group
artifactId = System.getenv("ARTIFACT_ID") ?: project.name
version = System.getenv("ARTIFACT_VERSION") ?: project.version
}
}
repositories {
maven {
String owner = System.getenv("REPOSITORY_OWNER") ?: "Unknown"
String repositoryName = System.getenv("REPOSITORY_NAME") ?: "Unknown"
String githubRepositoryUrl = "https://maven.pkg.github.com/$owner/$repositoryName"
name = "GitHubPackages"
url = githubRepositoryUrl
credentials {
username = System.getenv("GITHUB_ACTOR") ?: "NONE"
password = System.getenv("GITHUB_TOKEN") ?: "NONE"
}
}
}
}
// Updating
task updateBuildScript {
doLast {
+7 -9
View File
@@ -1,17 +1,15 @@
// Add your dependencies here
dependencies {
implementation "com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev"
implementation("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev") {
compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:master-SNAPSHOT:dev")
compile("com.github.GTNewHorizons:Baubles:master-SNAPSHOT:dev")
compile("curse.maven:cofh-core-69162:2388751")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:master-SNAPSHOT:dev") {
transitive = false
}
implementation("com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev") {
transitive = false
}
implementation("com.github.GTNewHorizons:EnderCore:master-SNAPSHOT:dev") {
transitive = false
}
implementation("com.github.GTNewHorizons:Baubles:master-SNAPSHOT:dev") {
compileOnly("com.github.GTNewHorizons:EnderIO:master-SNAPSHOT:dev") {
transitive = false
}
}
+3 -3
View File
@@ -26,7 +26,7 @@ developmentEnvironmentUserName = "Developer"
# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = Tags.java
replaceGradleTokenInFile = Reference.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
@@ -35,7 +35,7 @@ gradleTokenGroupName =
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
apiPackage =
apiPackage = api
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
# Example value: mymodid_at.cfg
@@ -61,4 +61,4 @@ usesShadowedDependencies = false
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
#customArchiveBaseName =
customArchiveBaseName = WirelessCraftingTerminal
Vendored Executable → Regular
View File
File mode changed.
-1
View File
@@ -1 +0,0 @@
1.7.10-rv2-1.8.7b
-1
View File
@@ -1 +0,0 @@
1.7.10-rv3-1.8.7.4b
Binary file not shown.
Binary file not shown.
+1 -4
View File
@@ -2,10 +2,7 @@
repositories {
maven {
url = "https://gregtech.overminddl1.com/"
}
maven {
url = "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/"
url "https://cursemaven.com"
}
maven {
url = "https://jitpack.io"
@@ -1375,4 +1375,15 @@ public class GuiWirelessCraftingTerminal extends GuiContainer implements ISortSo
return this.configSrc.getSetting(Settings.VIEW_MODE);
}
public boolean isOverSearchField(int x, int y)
{
return searchField.isMouseIn(x - guiLeft, y - guiTop);
}
public void setSearchString(String memoryText)
{
this.searchField.setText(memoryText);
this.repo.setSearchString(memoryText);
this.repo.updateView();
this.setScrollBar();
}
}
@@ -29,7 +29,7 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
@Mod(modid = Reference.MODID, acceptedMinecraftVersions = "[1.7.10]", name = Reference.NAME, version = Reference.VERSION, guiFactory = Reference.GUI_FACTORY, dependencies = "" + "required-after:Forge@[" + net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",);" + "required-after:appliedenergistics2@[rv3-beta-1,);required-after:p455w0rdslib;after:NotEnoughItems;")
+ net.minecraftforge.common.ForgeVersion.buildVersion + ",);" + "required-after:appliedenergistics2@[rv3-beta-1,);after:NotEnoughItems;")
public class WirelessCraftingTerminal {
@@ -1,14 +1,14 @@
package net.p455w0rd.wirelesscraftingterminal.integration;
import java.lang.invoke.MethodHandle;
import java.lang.reflect.Field;
import java.util.Iterator;
import java.util.Map;
import cpw.mods.fml.common.Loader;
import crazypants.enderio.enchantment.EnchantmentSoulBound;
import crazypants.enderio.enchantment.Enchantments;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.item.ItemStack;
import p455w0rdslib.util.ReflectionUtils;
/**
* @author p455w0rd
@@ -16,32 +16,60 @@ import p455w0rdslib.util.ReflectionUtils;
*/
public class EnderIO {
private static Field soulBound;
private static Field id;
static {
try {
soulBound = Enchantments.class.getDeclaredField("soulBound");
soulBound.setAccessible(true);
id = EnchantmentSoulBound.class.getDeclaredField("id");
id.setAccessible(true);
}
catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
private static EnchantmentSoulBound getEnchantmentSoulBound(Enchantments enchantments) throws IllegalAccessException {
return (EnchantmentSoulBound) soulBound.get(enchantments);
}
private static int getEnchantmentId(EnchantmentSoulBound enchantmentSoulBound) throws IllegalAccessException {
return id.getInt(enchantmentSoulBound);
}
private static Boolean isEnderIOLoaded = null;
public static boolean isLoaded() {
return Loader.isModLoaded("EnderIO");
if(isEnderIOLoaded == null) {
isEnderIOLoaded = Loader.isModLoaded("EnderIO");
}
return isEnderIOLoaded;
}
@SuppressWarnings("rawtypes")
public static boolean isSoulBound(ItemStack stack) {
if (isLoaded() && crazypants.enderio.config.Config.enchantmentSoulBoundEnabled) {
int soulboundId;
try {
MethodHandle GET_SOULBOUND = ReflectionUtils.findFieldGetter(crazypants.enderio.enchantment.Enchantments.class, "soulBound");
EnchantmentSoulBound soulbound = (EnchantmentSoulBound) GET_SOULBOUND.invoke(crazypants.enderio.enchantment.Enchantments.getInstance());
MethodHandle GET_ID = ReflectionUtils.findFieldGetter(crazypants.enderio.enchantment.EnchantmentSoulBound.class, "id");
int soulboundId = (int) GET_ID.invoke(soulbound);
//int soulboundId = crazypants.enderio.config.Config.enchantmentSoulBoundId;
Map<Short, Short> enchants = EnchantmentHelper.getEnchantments(stack);
if (enchants != null) {
Iterator i = enchants.keySet().iterator();
while (i.hasNext()) {
int enchId = (int) i.next();
if (soulboundId != enchId) {
continue;
}
return true;
}
}
soulboundId = getEnchantmentId(getEnchantmentSoulBound(Enchantments.getInstance()));
}
catch (Throwable e) {
catch (IllegalAccessException e) {
return false;
}
Map<Short, Short> enchants = EnchantmentHelper.getEnchantments(stack);
if (enchants != null) {
Iterator i = enchants.keySet().iterator();
while (i.hasNext()) {
int enchId = (int) i.next();
if (soulboundId != enchId) {
continue;
}
return true;
}
}
}
return false;
@@ -34,6 +34,7 @@ import net.p455w0rd.wirelesscraftingterminal.integration.IIntegrationModule;
import net.p455w0rd.wirelesscraftingterminal.integration.IntegrationHelper;
import net.p455w0rd.wirelesscraftingterminal.integration.abstraction.INEI;
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIAEShapedRecipeHandler;
import net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers.NEIGUIHandler;
public class NEI implements INEI, IContainerTooltipHandler, IIntegrationModule {
@Reflected
@@ -62,25 +63,8 @@ public class NEI implements INEI, IContainerTooltipHandler, IIntegrationModule {
API.registerGuiOverlay(net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal.class, "crafting", new WCTSlotPositioner());
API.registerGuiOverlayHandler(net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal.class, new WCTOverlayHandler(), "crafting");
API.registerRecipeHandler(new NEIAEShapedRecipeHandler());
API.registerRecipeHandler( new NEIAEShapelessRecipeHandler() );
/*
final Method registerGuiOverlay = this.apiClass.getDeclaredMethod("registerGuiOverlay", Class.class, String.class, IStackPositioner.class);
registerGuiOverlay.invoke(this.apiClass, net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal.class, "crafting",
new WCTSlotPositioner());
final Class overlayHandler = Class.forName("codechicken.nei.api.IOverlayHandler");
WCTOverlayHandler craftingOverlayHandler = new WCTOverlayHandler();
final Method registrar = this.apiClass.getDeclaredMethod("registerGuiOverlayHandler", Class.class, overlayHandler, String.class);
registrar.invoke(this.apiClass, net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal.class,
craftingOverlayHandler, "crafting");
*/
// final Class<NEICraftingHandler> defaultHandler =
// NEICraftingHandler.class;
// final Constructor defaultConstructor = defaultHandler.getConstructor(
// int.class, int.class );
API.registerRecipeHandler(new NEIAEShapelessRecipeHandler());
API.registerNEIGuiHandler(new NEIGUIHandler());
}
@@ -0,0 +1,25 @@
package net.p455w0rd.wirelesscraftingterminal.integration.modules.NEIHelpers;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import codechicken.nei.api.INEIGuiAdapter;
import net.p455w0rd.wirelesscraftingterminal.client.gui.GuiWirelessCraftingTerminal;
public class NEIGUIHandler extends INEIGuiAdapter
{
@Override
public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button)
{
if (gui instanceof GuiWirelessCraftingTerminal && draggedStack != null && draggedStack.getItem() != null)
{
GuiWirelessCraftingTerminal gmm = (GuiWirelessCraftingTerminal)gui;
if (gmm.isOverSearchField(mousex, mousey))
{
gmm.setSearchString(draggedStack.getDisplayName());
return true;
}
}
return super.handleDragNDrop(gui, mousex, mousey, draggedStack, button);
}
}
@@ -2,7 +2,7 @@ package net.p455w0rd.wirelesscraftingterminal.reference;
public class Reference {
public static final String MODID = "ae2wct";
public static final String VERSION = "@version@";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String NAME = "AE2 Wireless Crafting Terminal";
public static final String SERVER_PROXY_CLASS = "net.p455w0rd.wirelesscraftingterminal.proxy.CommonProxy";
public static final String CLIENT_PROXY_CLASS = "net.p455w0rd.wirelesscraftingterminal.proxy.ClientProxy";
File renamed without changes.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 398 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

File renamed without changes.
File renamed without changes.