Compare commits

...
20 Commits
Author SHA1 Message Date
Johann Bernhardt a1f4378fe7 Migrated to unified build script 2021-11-22 13:24:52 +01:00
Johann Bernhardt af42a25d2e Strip unused core plugin 2021-11-22 13:22:32 +01:00
Thomas Guimbretiere 07b0b83f4a Added localization for NEI keybind.
Fixes issue #185
2015-07-12 19:24:21 +02:00
Thomas Guimbretiere d932d91a77 Potential fix for issue #200
Stupid java 1.6 on macs...
2015-07-12 18:55:01 +02:00
Thomas Guimbretiere 87261267e1 Added tag v1.5.10_1.7.10 for changeset 02ba9c022a25 2015-07-12 18:42:20 +02:00
Thomas Guimbretiere 7af9692632 Added czech translation. Many thx to nalimleinad.
Closes issue #204
2015-07-12 18:33:03 +02:00
Thomas Guimbretiere 1eb78112eb Added a config option (in Modules/General) to turn on/off the display of entity tooltips.
It is located there so it can be enforced server side if required (for pvp, etc).

Fixes issue #196
2015-07-12 18:29:28 +02:00
Thomas Guimbretiere 4ed103dd25 NBT is synced only when the tooltip is visible to reduce ressource usage.
Fixes issue #179
2015-07-12 17:56:04 +02:00
Thomas Guimbretiere 118bab5a2b Updated to latest NEIs and forge 2015-07-12 16:43:29 +02:00
Thomas Guimbretiere ce6474fc29 Fixed case where config is written too many times in "press to show" mode. 2015-05-21 19:13:38 +02:00
Thomas Guimbretiere cbeb3b3628 Fixed derp with logs.
Still have a huge derp with CCC that need to be resolved...
2015-05-16 22:03:25 +02:00
Thomas Guimbretiere d27d6db57c Updated to latest CCC & Forge 2015-05-16 20:38:30 +02:00
Thomas Guimbretiere e60974ab20 Version bump 2015-03-18 16:09:14 +01:00
Thomas Guimbretiere f481e46fb2 Tabbing correction 2015-03-09 18:31:56 +01:00
Thomas Guimbretiere 7638322f7f Merge 2015-03-09 18:29:22 +01:00
Thomas Guimbretiere 0afbc6efb4 Added tag v1.5.9_1.7.10 for changeset 32b8eca2f373 2015-03-09 18:29:13 +01:00
Lordmau5 737c4e2cbf Added support for Thermal Dynamics (Fluiducts showing content, so far) 2015-03-09 15:46:18 +01:00
Lordmau5 f4f5920d88 Fix for Thermal Expansion stuff - Also added HUD for Caches :) 2015-03-09 15:46:00 +01:00
Lordmau5 ea95fadb78 Fix for Extra Utilities Drums 2015-03-09 15:45:26 +01:00
Lordmau5 77277c6024 Fix for networking code (Fixes issues with data on dedicated servers) 2015-03-09 15:23:18 +01:00
42 changed files with 1495 additions and 377 deletions

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
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
+45
View File
@@ -0,0 +1,45 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build and test
on:
pull_request:
branches: [ master, main ]
push:
branches: [ master, main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Run server for 1 minute
run: |
mkdir run
echo "eula=true" > run/eula.txt
timeout 10 ./gradlew runServer || true
- name: Test no crashes happend
run: |
chmod +x .github/scripts/test-no-crash-reports.sh
.github/scripts/test-no-crash-reports.sh
+44
View File
@@ -0,0 +1,44 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release latest build
on:
push:
branches: [ master, main ]
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Update latest tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Latest build"
files: build/libs/*.jar
+45
View File
@@ -0,0 +1,45 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Release tagged build
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup the workspace
run: ./gradlew setupCIWorkspace
- name: Build the mod
run: ./gradlew build
- name: Release under current tag
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar
+28
View File
@@ -0,0 +1,28 @@
.gradle
.settings
/.idea/
/run/
/build/
/eclipse/
.classpath
.project
/bin/
/config/
/crash-reports/
/logs/
options.txt
/saves/
usernamecache.json
banned-ips.json
banned-players.json
eula.txt
ops.json
server.properties
servers.dat
usercache.json
whitelist.json
/out/
*.iml
*.ipr
*.iws
src/main/resources/mixins.*.json
-2
View File
@@ -1,2 +0,0 @@
syntax: glob
*.orig
-25
View File
@@ -1,25 +0,0 @@
28ccc9a07b5421f7e529c417b9baf0cf0a384d9f v1.2.0
38f148ebeb8f6cfbdbaff0afc93612eb297188cd v1.3.1
4a92f4e3296c1b64557ecf30023c61badf598a3e 1.3.2
8ee781ebab6c82631601fee3dc1fb4d3a03f9351 1.3.3
2f6144f8e55ca2f0fa6ccbbee707ca58f5e75c80 1.3.4
45e01e7ee1a8e1587832e388584fd102672066ae 1.3.8_1.6.2
1e7cde94ccceb8c1425a03c90fe2523afbe20d53 1.3.9_1.6.2
02ebbb4aeebe23b3eaaded32bda20dad2fe14381 Nightly_131024
bc4937f3a7d4c8eef31b8273cab6e043a8b354ef Nightly_131025
246642120b36fb05ed2682ef79e7b48020edf21d Nightly_131116
9280666656c77770a35c2797129f9fb806ed6367 Nightly_13111
d2ec5e84d19f679d5b482112ed1fab4cb4d0b427 Nightly_131118
c7e3d16cb236195aaa6d978fe15706d63831a4e2 Nightly_131121a
e8b1906c3f51a14a12539850404b4622311b936b v1.4.0
f9daea609042db35e35989da99a1c4c8696eb8ab 1.4.1
1c391d52f3d955eebe3437d81dd8eca8ca142a8c 1.4.3
7ff010d0fad85eb59eca7f1bc6583a6dada6ef8d 1.4.5
5dd753fa7c80d22c3526714d48cf9c3a01918dec 1.4.5a
1066f782daede2a968ec282d4e3eba5a6ec74a53 Waila_1.5.0_dev2
ad46f8b41bbe08c95a6ae4a6c609be96196148ca Waila_1.5.0
<<<<<<< local
be89d97648acdc95afe1f7fea6a190641ae629d5 v1.5.2
=======
bb4fc720238a6545946c35de78e417141625a69c v1.4.5_1.7.2
>>>>>>> other
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

+460 -108
View File
@@ -1,153 +1,505 @@
//version: eb0b030ab9cb1d0f9a31f11e69e1ceed1dab2c89
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates.
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.util.concurrent.TimeUnit
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
url = "https://maven.minecraftforge.net"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "Scala CI dependencies"
url = "https://repo1.maven.org/maven2/"
}
maven {
name = "jitpack"
url = "https://jitpack.io"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.4'
}
}
plugins {
id 'idea'
id 'scala'
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")
}
apply plugin: 'forge'
def projectJavaVersion = JavaLanguageVersion.of(8)
java {
toolchain {
languageVersion.set(projectJavaVersion)
}
}
idea {
module {
inheritOutputDirs = true
downloadJavadoc = true
downloadSources = true
}
}
checkPropertyExists("modName")
checkPropertyExists("modId")
checkPropertyExists("modGroup")
checkPropertyExists("autoUpdateBuildScript")
checkPropertyExists("minecraftVersion")
checkPropertyExists("forgeVersion")
checkPropertyExists("replaceGradleTokenInFile")
checkPropertyExists("gradleTokenModId")
checkPropertyExists("gradleTokenModName")
checkPropertyExists("gradleTokenVersion")
checkPropertyExists("gradleTokenGroupName")
checkPropertyExists("apiPackage")
checkPropertyExists("accessTransformersFile")
checkPropertyExists("usesMixins")
checkPropertyExists("mixinPlugin")
checkPropertyExists("mixinsPackage")
checkPropertyExists("coreModClass")
checkPropertyExists("containsMixinsAndOrCoreModOnly")
checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName")
def checkPropertyExists(String propertyName) {
if (project.hasProperty(propertyName) == false) {
throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/gradle.properties")
}
}
String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) {
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
}
if(apiPackage) {
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) {
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
}
}
if(accessTransformersFile) {
String targetFile = "src/main/resources/META-INF/" + accessTransformersFile
if(new File(targetFile).exists() == false) {
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
}
}
if(usesMixins.toBoolean()) {
if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
}
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
if((new File(targetPackageJava).exists() || new File(targetPackageScala).exists()) == false) {
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
}
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
if((new File(targetFileJava).exists() || new File(targetFileScala).exists() || new File(targetFileScalaJava).exists()) == false) {
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava)
}
}
if(coreModClass) {
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala"
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
if((new File(targetFileJava).exists() || new File(targetFileScala).exists() || new File(targetFileScalaJava).exists()) == false) {
throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava)
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
// Make sure GregTech build won't time out
System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String)
System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String)
}
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
'git config core.fileMode false'.execute()
// Pulls version from git tag
version = minecraftVersion + "-" + gitVersion()
group = modGroup
archivesBaseName = modId
minecraft {
version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion
runDir = "run"
if (replaceGradleTokenInFile) {
replaceIn replaceGradleTokenInFile
if(gradleTokenModId) {
replace gradleTokenModId, modId
}
if(gradleTokenModName) {
replace gradleTokenModName, modName
}
if(gradleTokenVersion) {
replace gradleTokenVersion, versionDetails().lastTag
}
if(gradleTokenGroupName) {
replace gradleTokenGroupName, modGroup
}
}
}
if(file("addon.gradle").exists()) {
apply from: "addon.gradle"
}
apply from: 'repositories.gradle'
configurations {
deployerJars
//packed
//compile.extendsFrom packed
implementation.extendsFrom(shadowImplementation)
}
//add dependency repositories
repositories {
mavenLocal()
mavenCentral()
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
name = "Overmind forge repo mirror"
url = "https://gregtech.overminddl1.com/"
}
if(usesMixins.toBoolean()) {
maven {
name = "sponge"
url = "https://repo.spongepowered.org/repository/maven-public"
}
maven {
url = "https://jitpack.io"
}
}
}
apply plugin: 'java'
apply plugin: 'forge'
apply plugin: 'maven'
version = "1.5.9_1.7.10"
group= "mcp.mobius.waila" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Waila"
// Define properties file
ext.configFile = file "build.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
dependencies {
compile "codechicken:CodeChickenLib:${config.mc_version}-${config.ccl_version}:dev"
compile "codechicken:CodeChickenCore:${config.mc_version}-${config.ccc_version}:dev"
compile "codechicken:NotEnoughItems:${config.mc_version}-${config.nei_version}:dev"
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
minecraft {
version = "1.7.10-10.13.2.1291"
runDir = "eclipse"
}
def root = project.projectDir.parentFile
sourceSets {
main {
java {
srcDir new File(root, "src")
if(usesMixins.toBoolean()) {
annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3")
annotationProcessor("com.google.guava:guava:24.1.1-jre")
annotationProcessor("com.google.code.gson:gson:2.8.6")
annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT")
// using 0.8 to workaround a issue in 0.7 which fails mixin application
compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: "launchwrapper"
exclude module: "guava"
exclude module: "gson"
exclude module: "commons-io"
exclude module: "log4j-core"
}
resources {
srcDir new File(root, "resources")
compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev")
}
}
apply from: 'dependencies.gradle'
def mixinConfigJson = "mixins." + modId + ".json"
def mixingConfigRefMap = "mixins." + modId + ".refmap.json"
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
task generateAssets {
if(usesMixins.toBoolean()) {
new File(projectDir.toString() + "/src/main/resources/", mixinConfigJson).text = """{
"required": true,
"minVersion": "0.7.11",
"package": "${modGroup}.${mixinsPackage}",
"plugin": "${modGroup}.${mixinPlugin}",
"refmap": "${mixingConfigRefMap}",
"target": "@env(DEFAULT)",
"compatibilityLevel": "JAVA_8"
}
"""
}
}
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = modGroup + ".shadow"
}
shadowJar {
manifest {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation]
dependsOn(relocateShadowJar)
}
jar {
manifest {
attributes(getManifestAttributes())
}
if(usesShadowedDependencies.toBoolean()) {
dependsOn(shadowJar)
enabled = false
}
}
reobf {
if(usesMixins.toBoolean()) {
addExtraSrgFile mixinSrg
}
}
afterEvaluate {
if(usesMixins.toBoolean()) {
tasks.compileJava {
options.compilerArgs += [
"-AreobfSrgFile=${tasks.reobf.srg}",
"-AoutSrgFile=${mixinSrg}",
"-AoutRefMapFile=${refMap}",
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
"-XDenableSunApiLintControl",
"-XDignore.symbol.file"
]
}
}
}
runClient {
def arguments = []
if(usesMixins.toBoolean()) {
arguments += [
"--mods=../build/libs/$modId-${version}.jar",
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
}
if(developmentEnvironmentUserName) {
arguments += [
"--username",
developmentEnvironmentUserName
]
}
args(arguments)
}
runServer {
def arguments = []
if (usesMixins.toBoolean()) {
arguments += [
"--mods=../build/libs/$modId-${version}.jar",
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
}
args(arguments)
}
tasks.withType(JavaExec).configureEach {
javaLauncher.set(
javaToolchains.launcherFor {
languageVersion = projectJavaVersion
}
)
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand "minecraftVersion": project.minecraft.version,
"modVersion": versionDetails().lastTag,
"modId": modId,
"modName": modName
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
def getManifestAttributes() {
def manifestAttributes = [:]
if(containsMixinsAndOrCoreModOnly.toBoolean() == false) {
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
if(accessTransformersFile) {
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
}
if(coreModClass) {
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
}
if(usesMixins.toBoolean()) {
manifestAttributes += [
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
"MixinConfigs" : mixinConfigJson,
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
]
}
return manifestAttributes
}
//def commonManifest = {
// attributes 'FMLCorePlugin': 'mcp.mobius.wailacore.asm.CoreDescription'
// attributes 'FMLCorePluginContainsFMLMod': 'mcp.mobius.waila.Waila'
//}
jar {
exclude "**/client/gui/inventory/GuiContainer.class"
exclude "**/client/gui/inventory/GuiContainer.java"
// manifest commonManifest
// from {
// configurations.packed.collect {
// it.isDirectory() ? it : zipTree(it).matching {
// exclude "META-INF", "META-INF/**", "*META-INF*", "meta-inf"
// exclude "**.jar", "**/*.jar", "*.jar"
// }
// }
// }
task sourcesJar(type: Jar) {
from (sourceSets.main.allJava)
from (file("$projectDir/LICENSE"))
getArchiveClassifier().set('sources')
}
task sourceJar(type: Jar) {
from sourceSets.main.java
from new File(root, "dev")
classifier = 'sources'
task shadowDevJar(type: ShadowJar) {
from sourceSets.main.output
getArchiveClassifier().set("dev")
manifest {
attributes(getManifestAttributes())
}
minimize() // This will only allow shading for actually used classes
configurations = [project.configurations.shadowImplementation]
}
task relocateShadowDevJar(type: ConfigureShadowRelocation) {
target = tasks.shadowDevJar
prefix = modGroup + ".shadow"
}
task circularResolverJar(type: Jar) {
dependsOn(relocateShadowDevJar)
dependsOn(shadowDevJar)
enabled = false
}
task devJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
getArchiveClassifier().set("dev")
manifest {
attributes(getManifestAttributes())
}
if(usesShadowedDependencies.toBoolean()) {
dependsOn(circularResolverJar)
enabled = false
}
}
task apiJar(type: Jar) {
from (sourceSets.main.allJava) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**'
}
from (sourceSets.main.output) {
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**'
}
from (sourceSets.main.resources.srcDirs) {
include("LICENSE")
}
getArchiveClassifier().set('api')
}
artifacts {
archives sourceJar, devJar
}
uploadArchives {
dependsOn 'reobf'
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "scp://mobiusstrip.eu/home/mobius/web/maven"){
authentication(userName: "mobius")
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'Waila '
url 'http://mobiusstrip.eu'
}
}
archives sourcesJar
archives devJar
if(apiPackage) {
archives apiJar
}
}
// Updating
task updateBuildScript {
doLast {
if (updateBuildScript()) return
print("Build script already up-to-date!")
}
}
if (isNewBuildScriptVersionAvailable()) {
if (autoUpdateBuildScript.toBoolean()) {
updateBuildScript()
} else {
println("Build script update available! Run 'gradle updateBuildScript'")
}
}
static URL availableBuildScriptUrl() {
new URL("https://raw.githubusercontent.com/SinTh0r4s/ExampleMod1.7.10/main/build.gradle")
}
static boolean updateBuildScript() {
if (isNewBuildScriptVersionAvailable()) {
def buildscriptFile = new File("build.gradle")
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
return true
}
return false
}
static boolean isNewBuildScriptVersionAvailable() {
Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
String currentBuildScript = new File("build.gradle").getText()
String currentBuildScriptHash = getVersionHash(currentBuildScript)
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
String availableBuildScriptHash = getVersionHash(availableBuildScript)
boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
return !isUpToDate
}
static String getVersionHash(String buildScriptContent) {
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
if(versionLine != null) {
return versionLine.split(": ").last()
}
return ""
}
configure(updateBuildScript) {
group = 'forgegradle'
description = 'Updates the build script to the latest version'
}
-7
View File
@@ -1,7 +0,0 @@
mc_version=1.7.10
forge_version=10.13.0.1187
ccl_version=1.1.1.106
ccc_version=1.0.4.+
nei_version=1.0.4.+
mod_version=1.0
waila_version=1.5.2a
+5
View File
@@ -0,0 +1,5 @@
// Add your dependencies here
dependencies {
compile("com.github.GTNewHorizons:NotEnoughItems:unified-build-script-SNAPSHOT:dev")
}
+60
View File
@@ -0,0 +1,60 @@
modName = Waila
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId = Waila
modGroup = mcp.mobius.waila
# WHY is there no version field?
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
# Will update your build.gradle automatically whenever an update is available
autoUpdateBuildScript = false
minecraftVersion = 1.7.10
forgeVersion = 10.13.4.1614
# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
developmentEnvironmentUserName = "Developer"
# Define a source file of your project with:
# public static final String VERSION = "GRADLETOKEN_VERSION";
# 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 = Waila.java
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
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 =
# 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
accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatability only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies = false
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+188
View File
@@ -0,0 +1,188 @@
#!/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
##
##############################################################################
# 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
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='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
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
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# 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
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((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" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
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" "$@"
Vendored
+100
View File
@@ -0,0 +1,100 @@
@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
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
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="-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
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
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%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+2
View File
@@ -0,0 +1,2 @@
before_install:
- ./gradlew setupCIWorkspace
+7
View File
@@ -0,0 +1,7 @@
// Add any additional repositiroes for your dependencies here
repositories {
maven {
url = "https://jitpack.io"
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ import mcp.mobius.waila.cbcore.LangUtil;
import mcp.mobius.waila.client.KeyEvent;
import mcp.mobius.waila.commands.CommandDumpHandlers;
@Mod(modid="Waila", name="Waila", version="1.5.8", dependencies="after:NotEnoughItems@[1.0.4.0,)", acceptableRemoteVersions="*")
@Mod(modid="Waila", name="Waila", version="GRADLETOKEN_VERSION", dependencies="after:NotEnoughItems@[1.0.4.0,)", acceptableRemoteVersions="*")
/*
@NetworkMod(channels = {"Waila"},clientSideRequired=false, serverSideRequired=false, connectionHandler = WailaConnectionHandler.class,
packetHandler = WailaPacketHandler.class, versionBounds="[1.5.0,)")
@@ -14,7 +14,7 @@ public class ExtraUtilitiesModule {
try{
Class ModExtraUtilities = Class.forName("extrautils.ExtraUtils");
Class ModExtraUtilities = Class.forName("com.rwtema.extrautils.ExtraUtils");
Waila.log.log(Level.INFO, "ExtraUtilities mod found.");
} catch (ClassNotFoundException e){
Waila.log.log(Level.INFO, "[ExtraUtilities] ExtraUtilities mod not found.");
@@ -22,7 +22,7 @@ public class ExtraUtilitiesModule {
}
try{
TileEntityDrum = Class.forName("extrautils.tileentity.TileEntityDrum");
TileEntityDrum = Class.forName("com.rwtema.extrautils.tileentity.TileEntityDrum");
} catch (ClassNotFoundException e){
Waila.log.log(Level.WARN, "[ExtraUtilities] Class not found. " + e);
return;
@@ -0,0 +1,71 @@
package mcp.mobius.waila.addons.thermaldynamics;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import java.util.List;
/**
* Created by Lordmau5 on 28.02.2015.
*/
public class HUDHandlerDuct implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
return null;
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("thermaldynamics.fluiductsFluid")) return currenttip;
FluidStack fluid = FluidStack.loadFluidStackFromNBT(accessor.getNBTData());
String name = "";
try{
name += String.format(" < %s >", fluid.getFluid().getLocalizedName(fluid));
} catch (NullPointerException f){
name += " " + LangUtil.translateG("hud.msg.empty");
}
currenttip.add(name);
return currenttip;
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("thermaldynamics.fluiductsAmount")) return currenttip;
int amount = 0;
NBTTagCompound tag = accessor.getNBTData();
if (tag.hasKey("Amount"))
amount = accessor.getNBTInteger(tag, "Amount");
currenttip.add(String.format(" %d / 1000 mB", amount));
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
@Override
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
if (te != null)
te.writeToNBT(tag);
return tag;
}
}
@@ -0,0 +1,44 @@
package mcp.mobius.waila.addons.thermaldynamics;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import org.apache.logging.log4j.Level;
public class ThermalDynamicsModule {
public static Class TileFluidDuct = null;
public static void register(){
// XXX : We register the Fluiduct
try{
TileFluidDuct = Class.forName("cofh.thermaldynamics.ducts.fluid.TileFluidDuct");
ModuleRegistrar.instance().addConfigRemote("Thermal Dynamics", "thermaldynamics.fluidDuctsFluid");
ModuleRegistrar.instance().addConfigRemote("Thermal Dynamics", "thermaldynamics.fluidDuctsAmount");
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerDuct(), TileFluidDuct);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerDuct(), TileFluidDuct);
ModuleRegistrar.instance().registerNBTProvider (new HUDHandlerDuct(), TileFluidDuct);
} catch (Exception e){
Waila.log.log(Level.WARN, "[Thermal Dynamics] Error while loading FluidDuct hooks." + e);
}
// XXX : We register the IBlockInfo interface
/*
try{
IBlockInfo = Class.forName("cofh.api.block.IBlockInfo");
IBlockInfo_getBlockInfo = IBlockInfo.getMethod("getBlockInfo", IBlockAccess.class, int.class, int.class, int.class, ForgeDirection.class, EntityPlayer.class, List.class, boolean.class);
//ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energyhandler");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIBlockInfo(), IBlockInfo);
ModuleRegistrar.instance().registerNBTProvider (new HUDHandlerIBlockInfo(), IBlockInfo);
} catch (Exception e){
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading IBlockInfo hooks." + e);
}
*/
}
}
@@ -0,0 +1,111 @@
package mcp.mobius.waila.addons.thermalexpansion;
import cpw.mods.fml.common.registry.GameData;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.SpecialChars;
import mcp.mobius.waila.cbcore.LangUtil;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
public class HUDHandlerCache implements IWailaDataProvider {
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { return null; }
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if(!config.getConfig("thermalexpansion.cache"))
return currenttip;
try {
ItemStack storedItem = null;
if(accessor.getNBTData().hasKey("Item"))
storedItem = readItemStack(accessor.getNBTData().getCompoundTag("Item"));
String name = currenttip.get(0);
String color = "";
if(name.startsWith("\u00a7"))
color = name.substring(0, 2);
if(storedItem != null) {
String namex = GameData.getItemRegistry().getNameForObject(storedItem.getItem());
name += String.format(" < " + SpecialChars.getRenderString("waila.stack", "1", namex, "0", String.valueOf(storedItem.getItemDamage())) + color + " %s >", storedItem.getDisplayName());
}
else
name += " " + LangUtil.translateG("hud.msg.empty");
currenttip.set(0, name);
} catch (Exception e) {
throw new RuntimeException(e);
}
return currenttip;
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
if (!config.getConfig("thermalexpansion.cache"))
return currenttip;
NBTTagCompound tag = accessor.getNBTData();
ItemStack storedItem = null;
if(tag.hasKey("Item"))
storedItem = readItemStack(tag.getCompoundTag("Item"));
int stored = 0;
int maxStored = 0;
if(tag.hasKey("Stored"))
stored = tag.getInteger("Stored");
if(tag.hasKey("MaxStored"))
maxStored = tag.getInteger("MaxStored");
if(storedItem != null) {
currenttip.add("Stored: " + stored + "/" + maxStored);
}
else
currenttip.add("Capacity: " + maxStored);
return currenttip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
return currenttip;
}
@Override
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
if(te != null)
te.writeToNBT(tag);
try {
tag.setInteger("MaxStored", (Integer) ThermalExpansionModule.TileCache_getMaxStored.invoke(te));
tag.setInteger("Stored", (Integer) ThermalExpansionModule.TileCache_getStored.invoke(te));
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return tag;
}
public ItemStack readItemStack(NBTTagCompound tag) {
ItemStack is = new ItemStack(Item.getItemById(tag.getShort("id")));
is.stackSize = tag.getInteger("Count");
is.setItemDamage(Math.max(0, tag.getShort("Damage")));
if (tag.hasKey("tag", 10)) {
is.stackTagCompound = tag.getCompoundTag("tag");
}
return is;
}
}
@@ -1,16 +1,12 @@
package mcp.mobius.waila.addons.thermalexpansion;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import net.minecraftforge.common.util.ForgeDirection;
import org.apache.logging.log4j.Level;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import org.apache.logging.log4j.Level;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
public class ThermalExpansionModule {
@@ -44,6 +40,11 @@ public class ThermalExpansionModule {
public static Class ISecureTile = null;
public static Method ISecureTile_getAccess = null;
public static Method ISecureTile_getOwnerName = null;
public static Class TileCache = null;
public static Method TileCache_getItemStack = null;
public static Method TileCache_getMaxStored = null;
public static Method TileCache_getStored = null;
public static Class BlockMultipart = null;
@@ -76,15 +77,15 @@ public class ThermalExpansionModule {
} catch (Exception e){
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Energy hooks." + e);
}
}
// XXX : We register the energy cell
try{
TileEnergyCell = Class.forName("thermalexpansion.block.cell.TileCell");
TileEnergyCell = Class.forName("cofh.thermalexpansion.block.cell.TileCell");
TileEnergyCell_Recv = TileEnergyCell.getDeclaredField("energyReceive");
TileEnergyCell_Send = TileEnergyCell.getDeclaredField("energySend");
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energycell");
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energycell");
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerEnergyCell(), TileEnergyCell);
ModuleRegistrar.instance().registerNBTProvider (new HUDHandlerEnergyCell(), TileEnergyCell);
@@ -94,7 +95,7 @@ public class ThermalExpansionModule {
// XXX : We register the Tank interface
try{
TileTank = Class.forName("thermalexpansion.block.tank.TileTank");
TileTank = Class.forName("cofh.thermalexpansion.block.tank.TileTank");
TileTank_getTankFluid = TileTank.getMethod("getTankFluid");
TileTank_getTankCapacity = TileTank.getMethod("getTankCapacity");
TileTank_getTankAmount = TileTank.getMethod("getTankFluidAmount");
@@ -113,7 +114,7 @@ public class ThermalExpansionModule {
// XXX : We register the Tesseract interface
try{
TileTesseract = Class.forName("thermalexpansion.block.ender.TileTesseract");
TileTesseract = Class.forName("cofh.thermalexpansion.block.ender.TileTesseract");
TileTesseract_Item = TileTesseract.getDeclaredField("modeItem");
TileTesseract_Fluid = TileTesseract.getDeclaredField("modeFluid");
TileTesseract_Energy = TileTesseract.getDeclaredField("modeEnergy");
@@ -141,9 +142,25 @@ public class ThermalExpansionModule {
} catch (Exception e){
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading ISecureTile hooks." + e);
}
// XXX : We register the IBlockInfo interface
}
// XXX : We register the Cache interface
try{
TileCache = Class.forName("cofh.thermalexpansion.block.cache.TileCache");
TileCache_getItemStack = TileCache.getDeclaredMethod("getStoredItemType");
TileCache_getMaxStored = TileCache.getDeclaredMethod("getMaxStoredCount");
TileCache_getStored = TileCache.getDeclaredMethod("getStoredCount");
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.cache");
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerCache(), TileCache);
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerCache(), TileCache);
ModuleRegistrar.instance().registerNBTProvider (new HUDHandlerCache(), TileCache);
} catch (Exception e){
Waila.log.log(Level.WARN, "[Thermal Expansion] Error while loading Tesseract hooks." + e);
}
// XXX : We register the IBlockInfo interface
/*
try{
IBlockInfo = Class.forName("cofh.api.block.IBlockInfo");
@@ -40,6 +40,9 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
static Block doubleplant = Blocks.double_plant;
static Block leave = Blocks.leaves;
static Block leave2 = Blocks.leaves2;
static Block log = Blocks.log;
static Block log2 = Blocks.log2;
static Block quartz = Blocks.quartz_block;
@Override
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
@@ -84,6 +87,14 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
return new ItemStack(block, 1, accessor.getMetadata() - 4);
}
if (block == log || block == log2){
return new ItemStack(block, 1, accessor.getMetadata()%4);
}
if ((block == quartz) && (accessor.getMetadata() > 2)){
return new ItemStack(block, 1, 2);
}
return null;
}
@@ -228,6 +239,9 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
ModuleRegistrar.instance().registerStackProvider(provider, crops.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, leave.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, leave2.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, log.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, log2.getClass());
ModuleRegistrar.instance().registerStackProvider(provider, quartz.getClass());
//ModuleRegistrar.instance().registerStackProvider(provider, Block.class);
ModuleRegistrar.instance().registerHeadProvider(provider, mobSpawner.getClass());
@@ -135,7 +135,10 @@ public class ConfigHandler implements IWailaConfigHandler {
}
/* Some accessor helpers */
public boolean showTooltip(){
return getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
}
@@ -14,6 +14,7 @@ import mcp.mobius.waila.cbcore.Layout;
import mcp.mobius.waila.network.Message0x01TERequest;
import mcp.mobius.waila.network.Message0x03EntRequest;
import mcp.mobius.waila.network.WailaPacketHandler;
import mcp.mobius.waila.utils.Constants;
import mcp.mobius.waila.utils.WailaExceptionHandler;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
@@ -23,6 +24,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.config.Configuration;
public class MetaDataProvider{
@@ -68,7 +70,7 @@ public class MetaDataProvider{
public List<String> handleBlockTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, DataAccessorCommon accessor, List<String> currenttip, Layout layout) {
Block block = accessor.getBlock();
if (accessor.getTileEntity() != null && Waila.instance.serverPresent && accessor.isTimeElapsed(250)){
if (accessor.getTileEntity() != null && Waila.instance.serverPresent && accessor.isTimeElapsed(250) && ConfigHandler.instance().showTooltip()){
accessor.resetTimer();
HashSet<String> keys = new HashSet<String>();
@@ -81,7 +83,7 @@ public class MetaDataProvider{
if (keys.size() != 0 || ModuleRegistrar.instance().hasNBTProviders(block) || ModuleRegistrar.instance().hasNBTProviders(accessor.getTileEntity()))
WailaPacketHandler.INSTANCE.sendToServer(new Message0x01TERequest(accessor.getTileEntity(), keys));
} else if (accessor.getTileEntity() != null && !Waila.instance.serverPresent && accessor.isTimeElapsed(250)) {
} else if (accessor.getTileEntity() != null && !Waila.instance.serverPresent && accessor.isTimeElapsed(250) && ConfigHandler.instance().showTooltip()) {
try{
NBTTagCompound tag = new NBTTagCompound();
@@ -1,5 +1,6 @@
package mcp.mobius.waila.client;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.gui.truetyper.FontLoader;
import mcp.mobius.waila.gui.truetyper.TrueTypeFont;
@@ -40,7 +41,10 @@ public class ProxyClient extends ProxyServer {
if (Loader.isModLoaded("NotEnoughItems")){
try{
Class.forName("mcp.mobius.waila.handlers.nei.NEIHandler").getDeclaredMethod("register").invoke(null);
} catch (Exception e){}
} catch (Exception e){
Waila.log.error("Failed to hook into NEI properly. Reverting to Vanilla tooltip handler");
MinecraftForge.EVENT_BUS.register(new VanillaTooltipHandler());
}
} else {
MinecraftForge.EVENT_BUS.register(new VanillaTooltipHandler());
}
@@ -53,7 +57,8 @@ public class ProxyClient extends ProxyServer {
ModuleRegistrar.instance().registerTailProvider(new HUDHandlerEntities(), Entity.class);
//ModuleRegistrar.instance().registerShortDataProvider(new SummaryProviderDefault(), Item.class);
ModuleRegistrar.instance().addConfig("General", "general.showents");
ModuleRegistrar.instance().addConfig("General", "general.showhp");
ModuleRegistrar.instance().addConfig("General", "general.showcrop");
@@ -1,12 +1,10 @@
package mcp.mobius.waila.network;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.utils.AccessHelper;
@@ -20,10 +18,11 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
public class Message0x01TERequest extends SimpleChannelInboundHandler<Message0x01TERequest> implements IWailaMessage {
@@ -146,11 +145,10 @@ public class Message0x01TERequest extends SimpleChannelInboundHandler<Message0x0
tag.setInteger("WailaX", msg.posX);
tag.setInteger("WailaY", msg.posY);
tag.setInteger("WailaZ", msg.posZ);
tag.setString ("WailaID", (String)((HashMap)classToNameMap.get(null)).get(entity.getClass()));
ctx.writeAndFlush(new Message0x02TENBTData(tag)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
tag.setString ("WailaID", (String)((HashMap)classToNameMap.get(null)).get(entity.getClass()));
WailaPacketHandler.INSTANCE.sendTo(new Message0x02TENBTData(tag), WailaPacketHandler.getPlayer(ctx));
//ctx.writeAndFlush(new Message0x02TENBTData(tag)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}catch(Throwable e){
WailaExceptionHandler.handleErr(e, entity.getClass().toString(), null);
}
@@ -1,10 +1,10 @@
package mcp.mobius.waila.network;
import java.util.HashSet;
import java.util.List;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import mcp.mobius.waila.api.IWailaEntityProvider;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.utils.AccessHelper;
@@ -17,10 +17,9 @@ import net.minecraft.network.NetHandlerPlayServer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import java.util.HashSet;
import java.util.List;
public class Message0x03EntRequest extends SimpleChannelInboundHandler<Message0x03EntRequest> implements IWailaMessage {
@@ -94,7 +93,8 @@ public class Message0x03EntRequest extends SimpleChannelInboundHandler<Message0x
tag.setInteger("WailaEntityID", entity.getEntityId());
ctx.writeAndFlush(new Message0x04EntNBTData(tag)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
WailaPacketHandler.INSTANCE.sendTo(new Message0x04EntNBTData(tag), WailaPacketHandler.getPlayer(ctx));
//ctx.writeAndFlush(new Message0x04EntNBTData(tag)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}catch(Throwable e){
WailaExceptionHandler.handleErr(e, entity.getClass().toString(), null);
}
@@ -1,24 +1,23 @@
package mcp.mobius.waila.network;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import java.io.IOException;
import java.util.EnumMap;
import com.google.common.base.Charsets;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTSizeTracker;
import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
import cpw.mods.fml.common.network.FMLOutboundHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.relauncher.Side;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTSizeTracker;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.NetHandlerPlayServer;
import java.io.IOException;
import java.util.EnumMap;
public enum WailaPacketHandler {
INSTANCE;
@@ -123,5 +122,9 @@ public enum WailaPacketHandler {
int j = buffer.readShort();
String s = new String(buffer.readBytes(j).array(), Charsets.UTF_8);
return s;
}
}
public static EntityPlayerMP getPlayer(ChannelHandlerContext ctx){
return ((NetHandlerPlayServer) ctx.channel().attr(NetworkRegistry.NET_HANDLER).get()).playerEntity;
}
}
@@ -31,7 +31,7 @@ public class OverlayRenderer {
mc.theWorld != null &&
Minecraft.isGuiEnabled() &&
!mc.gameSettings.keyBindPlayerList.getIsKeyPressed() &&
ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true) &&
ConfigHandler.instance().showTooltip() &&
RayTracing.instance().getTarget() != null))
return;
@@ -40,7 +40,7 @@ public class OverlayRenderer {
renderOverlay(WailaTickHandler.instance().tooltip);
}
if (RayTracing.instance().getTarget().typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY)
if (RayTracing.instance().getTarget().typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && ConfigHandler.instance().getConfig("general.showents"))
{
renderOverlay(WailaTickHandler.instance().tooltip);
}
@@ -107,7 +107,7 @@ public class Tooltip {
for (String s : textData){
ArrayList<String> line = new ArrayList(Arrays.asList(patternTab.split(s)));
ArrayList<String> line = new ArrayList<String>(Arrays.asList(patternTab.split(s)));
ArrayList<Integer> size = new ArrayList<Integer>();
for (String ss : line)
size.add(DisplayUtil.getDisplayWidth(ss));
@@ -59,8 +59,10 @@ public class WailaTickHandler{
@SideOnly(Side.CLIENT)
public void tickClient(TickEvent.ClientTickEvent event) {
if (!Keyboard.isKeyDown(KeyEvent.key_show.getKeyCode()) && !ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false)){
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
if (!Keyboard.isKeyDown(KeyEvent.key_show.getKeyCode()) &&
!ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, false) &&
ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false)){
ConfigHandler.instance().setConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, false);
}
@@ -1,7 +1,5 @@
package mcp.mobius.waila.server;
import java.lang.reflect.Method;
import cpw.mods.fml.common.Loader;
import mcp.mobius.waila.Waila;
import mcp.mobius.waila.addons.agriculture.AgricultureModule;
@@ -20,6 +18,7 @@ import mcp.mobius.waila.addons.railcraft.RailcraftModule;
import mcp.mobius.waila.addons.statues.StatuesModule;
import mcp.mobius.waila.addons.stevescarts.StevesCartsModule;
import mcp.mobius.waila.addons.thaumcraft.ThaumcraftModule;
import mcp.mobius.waila.addons.thermaldynamics.ThermalDynamicsModule;
import mcp.mobius.waila.addons.thermalexpansion.ThermalExpansionModule;
import mcp.mobius.waila.addons.twilightforest.TwilightForestModule;
import mcp.mobius.waila.addons.vanillamc.HUDHandlerFurnace;
@@ -29,6 +28,8 @@ import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.handlers.DecoratorFMP;
import mcp.mobius.waila.handlers.HUDHandlerFMP;
import java.lang.reflect.Method;
public class ProxyServer {
public ProxyServer() {}
@@ -60,6 +61,9 @@ public class ProxyServer {
/* Thermal Expansion */
ThermalExpansionModule.register();
/* Thermal Dynamics */
ThermalDynamicsModule.register();
/* ETB */
ETBModule.register();
@@ -1,12 +0,0 @@
package mcp.mobius.wailacore.asm;
import java.io.IOException;
import cpw.mods.fml.common.asm.transformers.AccessTransformer;
public class CoreAccessTransformer extends AccessTransformer {
public CoreAccessTransformer() throws IOException {
//super("waila_at.cfg");
}
}
@@ -1,35 +0,0 @@
package mcp.mobius.wailacore.asm;
import java.util.Arrays;
import com.google.common.eventbus.EventBus;
import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.ModMetadata;
public class CoreContainer extends DummyModContainer {
public CoreContainer()
{
super(new ModMetadata());
ModMetadata md = getMetadata();
md.modId = "WailaCore";
md.name = "WailaCore";
md.version = "1.0.0";
md.credits = "ProfMobius";
md.authorList = Arrays.asList("ProfMobius");
md.description = "Coremod associated with Waila to force backward compatibility with the API";
md.url = "profmobius.blogspot.com";
}
@Override
public boolean registerBus(EventBus bus, LoadController controller)
{
//bus.register(this);
// this needs to return true, otherwise the mod will be deactivated by FML
return true;
}
}
@@ -1,43 +0,0 @@
package mcp.mobius.wailacore.asm;
import java.io.File;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import cpw.mods.fml.relauncher.IFMLLoadingPlugin;
@IFMLLoadingPlugin.TransformerExclusions("mcp.mobius.wailacore.asm")
public class CoreDescription implements IFMLLoadingPlugin {
public static final Logger log = LogManager.getLogger("WailaCore");
@Override
public String[] getASMTransformerClass() {
return new String[] { "mcp.mobius.wailacore.asm.CoreTransformer" };
}
@Override
public String getModContainerClass() {
return "mcp.mobius.wailacore.asm.CoreContainer";
}
@Override
public String getSetupClass() {
return null;
}
@Override
public void injectData(Map<String, Object> data) {
if(data.containsKey("coremodLocation"))
location = (File) data.get("coremodLocation");
}
public static File location;
@Override
public String getAccessTransformerClass() {
return "mcp.mobius.wailacore.asm.CoreAccessTransformer";
}
}
@@ -1,73 +0,0 @@
package mcp.mobius.wailacore.asm;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import net.minecraft.launchwrapper.IClassTransformer;
public class CoreTransformer implements IClassTransformer {
public CoreTransformer(){
super();
}
@Override
public byte[] transform(String name, String srgname, byte[] bytes) {
/*
boolean changed = false;
ClassNode classNode = new ClassNode();
ClassReader classReader = new ClassReader(bytes);
classReader.accept(classNode, 0);
for (MethodNode methodNode : classNode.methods){
if (methodNode.name.equals("getNBTData")
&& methodNode.desc.equals("(Lnet/minecraft/tileentity/TileEntity;Lnet/minecraft/nbt/NBTTagCompound;Lnet/minecraft/world/World;III)Lnet/minecraft/nbt/NBTTagCompound;"))
{
methodNode.desc = "(Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/tileentity/TileEntity;Lnet/minecraft/nbt/NBTTagCompound;Lnet/minecraft/world/World;III)Lnet/minecraft/nbt/NBTTagCompound;";
changed = true;
CoreDescription.log.info(String.format("Class %s implements outdated getNBTData signature. Updating signature to most recent API.", name));
}
}
if (changed){
ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
classNode.accept(writer);
return writer.toByteArray();
}
*/
/*
if (classNode.interfaces.contains("mcp/mobius/waila/api/IWailaDataProvider")){
CoreDescription.log.info(String.format("Identified Waila plugin class : %s", name));
for (MethodNode methodNode : classNode.methods){
CoreDescription.log.info(String.format(" %s - %s | %s | %s | %s", name, methodNode.access, methodNode.name, methodNode.desc, methodNode.signature));
if (methodNode.name.equals("getNBTData")
&& methodNode.desc.equals("(Lnet/minecraft/tileentity/TileEntity;Lnet/minecraft/nbt/NBTTagCompound;Lnet/minecraft/world/World;III)Lnet/minecraft/nbt/NBTTagCompound;"))
{
methodNode.desc = "(Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/tileentity/TileEntity;Lnet/minecraft/nbt/NBTTagCompound;Lnet/minecraft/world/World;III)Lnet/minecraft/nbt/NBTTagCompound;";
CoreDescription.log.info(String.format("Class %s implements outdated getNBTData signature. Updating signature to most recent API.", name));
}
}
ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
classNode.accept(writer);
return writer.toByteArray();
}
*/
return bytes;
}
}
@@ -0,0 +1,148 @@
screen.button.waila=Waila
screen.button.modules=Moduly
screen.label.scale=Mìøítko
screen.label.dragtuto=Chytni HUD pro nastavení jeho pozice.
screen.button.default=Defaultní
screen.button.cancel=Zrušit
screen.button.ok=Ok
screen.button.yes=Ano
screen.button.no=Ne
screen.button.back=Zpìt
screen.button.hidden=Skrytý
screen.button.visible=Viditelný
screen.button.maintained=Spravované
screen.button.toggled=Pøepnuté
choice.showhidewaila=Zobrazit/Skrýt Wailu
choice.showhideidmeta=Zobrazit ID:Metadata
choice.toggledmaintained=Pøepnuté/Spravované
choice.showliquids=Tekutiny
choice.shifttoggledblock=Pliž se pro pøepnutí blokù
choice.shifttoggledents=Pliž se pro pøepnutí entit
screen.button.configureaspect=Nastavení vzhledu...
enchant.title.name=Jméno
enchant.title.minlvl=Minimální lvl
enchant.title.maxlvl=Maximální lvl
enchant.title.weight=Hmotnost
enchant.label.enchantability=Oèarovatelnost
waila.keybind.wailaconfig=[Waila] Nastavení obrazu
waila.keybind.wailadisplay=[Waila] Zobrazit/Skrýt
waila.keybind.liquid=[Waila] Zobrazit tekutiny
waila.keybind.recipe=[Waila] Zobrazit recept
waila.keybind.usage=[Waila] Zobrazit použití
waila.keybind.testing=[Waila] Testování
client.msg.norecipe=Nenalezen žádný recept.
client.msg.nousage=Nenalezeno žádné využití.
hud.msg.none=<Nic>
hud.msg.empty=<Prázdný>
hud.msg.output=Výstup
hud.msg.input=Vstup
hud.msg.out=Ven
hud.msg.in=Dovnitø
hud.msg.power=Energie
hud.msg.storage=Úložištì
hud.msg.stored=Uloženo
hud.msg.any=Jakýkoliv
hud.msg.mode=Mód
hud.msg.maxpower=Maximální Energie
hud.msg.trigger=Spouštìè
hud.msg.maxio=Maximální propustnost
hud.msg.send=Odeslat
hud.msg.recv=Obdržet
hud.msg.item=Pøedmìt
hud.msg.fluid=Tekutina
hud.msg.energ=Energie
hud.msg.frequency=Frekvence
hud.msg.owner=Vlastník
hud.msg.public=Veøejné
hud.msg.restricted=Omezené
hud.msg.private=Soukromé
hud.msg.white=Bílá
hud.msg.orange=Oranžová
hud.msg.magenta=Purpurová
hud.msg.lblue=Svìtle modrá
hud.msg.yellow=Žlutá
hud.msg.lime=Svìtle zelená
hud.msg.pink=Rùžová
hud.msg.gray=Šedá
hud.msg.lgray=Svìtle šedá
hud.msg.cyan=Tyrkysová
hud.msg.purple=Fialová
hud.msg.blue=Modrá
hud.msg.brown=Hnìdá
hud.msg.green=Zelená
hud.msg.red=Èervená
hud.msg.black=Èerná
hud.msg.growth=Rùst
hud.msg.mature=Stáøí
hud.msg.off=Vypnuto
hud.msg.on=Zapnuto
hud.msg.state=Stav
hud.msg.delay=Prodleva
hud.msg.comparator=Porovnávaè
hud.msg.substractor=Substraktor
hud.msg.record=Záznam
hud.msg.offers=Poskytuje
hud.msg.demands=Požaduje
option.appeng.monitorcontent=Obsah monitoru
option.bb.content=Obsah barelu
option.bc.tankamount=Množství tekutiny
option.bc.tanktype=Typ tekutiny
option.enderstorage.colors=Barvy
option.ic2.inputeumach=Maximální pøíjem EU [Stroje]
option.ic2.inputeuother=Maximální pøíjem EU [Ostatní]
option.ic2.inputeu=Maximální pøijem EU
option.ic2.outputeu=Maximální výstup EU
option.ic2.storage=Uloženo energie
option.ic2.consump=Zobrazit spotøebu
option.ic2.tradeomat=Zobrazit Trade-O-Mat požadavek
option.thaumcraft.storedvis=Úložištì kondenzátoru
option.thermalexpansion.energyhandler=Zobrazit úložištì RF
option.thermalexpansion.energycell=Zobrazit ECell VSTUP/VÝSTUP
option.thermalexpansion.fluidtype=Zobrazit typ tekutiny
option.thermalexpansion.fluidamount=Zobrazit množství tekutiny
option.thermalexpansion.tankmode=Zobrazit mód nádrže
option.thermalexpansion.tesssendrecv=Tesseract mode
option.thermalexpansion.tessfreq=Frekvence Teseraktu
option.thermalexpansion.owner=Zobrazit majitele
option.thermalexpansion.conditemmode=Zobrazit mód Itemduktu
option.vanilla.spawntype=Typ spawneru
option.vanilla.growthvalue=Hodnota rùstu
option.vanilla.leverstate=Stav páky
option.vanilla.repeater=Prodleva opakovaèe
option.vanilla.comparator=Mód porovnávaèe
option.vanilla.redstone=Ruditová energie
option.vanilla.jukebox=Jukeboxový disk
option.vanilla.silverfish=Skrýt rybenku
option.etb.displaydata=Zobrazit data slotu
option.enderio.inout=Zobrazit vstup/výstup
option.enderio.storage=Zobrazit uskladnìné MJ
option.enderio.owner=Zobrazit majitele bloku
option.enderio.channel=Zobrazit kanál nadkrychle
option.bcapi.storage=Zobrazit uskladnìné MJ
option.bcapi.consump=Zobrazit maximální energii
option.bcapi.trigger=Zobrazit spouštìjící se energii
option.pr.showio=Zobrazit IO brány
option.pr.showdata=Zobrazit data bran
option.extrautilities.fluidamount=Zobrazit množství tekutin
option.openblocks.fluidamount=Zobrazit množství tekutin
option.railcraft.fluidamount=Zobrazit množství tekutin
option.secretrooms.hide=Skrýt camo bloky
option.carpenters.hide=Skrýt camo bloky
option.stevescarts.showall=Zobrazit data
option.stevescarts.colorblind=Barevný mód
option.stevescarts.shifttoggle=Shift pro pøepnutí
option.general.showhp=Zobrazit zdraví entit
option.general.showcrop=Zobrazit rùst plodin
option.thaumcraft.aspects=Zobrazit aspekty
@@ -143,6 +143,9 @@ option.carpenters.hide=Hide camo blocks
option.stevescarts.showall=Show data
option.stevescarts.colorblind=Colorblind mode
option.stevescarts.shifttoggle=Shift toggle
option.general.showents=Show entities
option.general.showhp=Show entities health
option.general.showcrop=Show crop growth
option.thaumcraft.aspects=Show aspects
option.thaumcraft.aspects=Show aspects
nei.options.keys.showenchant=Show enchanting values
+4 -4
View File
@@ -1,10 +1,10 @@
[
{
"modid": "waila",
"name": "Waila",
"modid": "${modId}",
"name": "${modName}",
"description": "All your data are belong to us.",
"version": "${version}",
"mcversion": "${mcversion}",
"version": "${modVersion}",
"mcversion": "${minecraftVersion}",
"url": "",
"updateUrl": "",
"authors": ["ProfMobius"],