mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-10-26 22:33:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5d52beaf2 | ||
|
|
0c65054f49 | ||
|
|
f966d15a85 | ||
|
|
25cd9fe361 | ||
|
|
07f477b898 | ||
|
|
fe4ab6a67a | ||
|
|
5333c14329 | ||
|
|
5dd720fbab | ||
|
|
6121b635ad | ||
|
|
78f4ca4b62 | ||
|
|
e8a6bcca07 | ||
|
|
ad254fbded | ||
|
|
d01d10f25e | ||
|
|
a8478c00dc | ||
|
|
1f144067a9 | ||
|
|
9d2c64c34c | ||
|
|
37fbe0a668 | ||
|
|
1eba34b256 | ||
|
|
d5b4687dbf | ||
|
|
7cf2bcca38 | ||
|
|
cef6034f0d | ||
|
|
505da020e4 | ||
|
|
7ca87b36cd | ||
|
|
ee5164c3b3 | ||
|
|
59a478d14c | ||
|
|
21981128ac | ||
|
|
e65bfc1ea6 | ||
|
|
52f6b868ba | ||
|
|
162d9c46d6 | ||
|
|
c867c3a3a1 | ||
|
|
6ed7fc5cc6 | ||
|
|
759018100c | ||
|
|
f0d845ee3f | ||
|
|
1032180d60 | ||
|
|
614e5541d5 | ||
|
|
9c2c528df1 | ||
|
|
06eca83f44 | ||
|
|
57c5b560e8 | ||
|
|
5917addb7e | ||
|
|
d73596cb82 | ||
|
|
bc9f1093c2 | ||
|
|
9e210c2602 | ||
|
|
1f0d2aafe8 | ||
|
|
24b3af116c |
No files matched your search
@@ -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
|
||||
|
||||
@@ -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.5 minutes
|
||||
run: |
|
||||
mkdir run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 90 ./gradlew runServer | tee --append server.log || true
|
||||
|
||||
- name: Test no errors reported during server run
|
||||
run: |
|
||||
chmod +x .github/scripts/test-no-error-reports.sh
|
||||
.github/scripts/test-no-error-reports.sh
|
||||
@@ -0,0 +1,51 @@
|
||||
# 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
|
||||
|
||||
- name: Publish to Maven
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
+30
-29
@@ -1,30 +1,31 @@
|
||||
# Exclude Everything!!!
|
||||
|
||||
/*
|
||||
|
||||
# Linux temporary files
|
||||
|
||||
/*~
|
||||
|
||||
# Except the stuff i want to keep
|
||||
|
||||
# Gradle Stuff
|
||||
!gradle/
|
||||
!gradlew
|
||||
.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
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
!build.gradle
|
||||
!build.properties
|
||||
!settings.gradle
|
||||
|
||||
# Git Stuff
|
||||
!.gitignore
|
||||
|
||||
# Other Important Files
|
||||
!LICENSE
|
||||
!README.md
|
||||
!Change Log.txt
|
||||
!VERSION.txt
|
||||
|
||||
# Other Important Folders
|
||||
!src/
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Any Github changes require admin approval
|
||||
/.github/** @GTNewHorizons/admin
|
||||
|
||||
+7
-1
@@ -1,5 +1,11 @@
|
||||
######## 1.0.2h ########
|
||||
-added config option to disable flight.
|
||||
-removed some log spam.
|
||||
-fixed issue which makes it impossible to charge new bows after crafting.
|
||||
-fixed config option to disable arrow explosion damage.
|
||||
|
||||
######## 1.0.2g ########
|
||||
-fixed server crash
|
||||
-fixed server crash.
|
||||
|
||||
######## 1.0.2f ########
|
||||
-fixed shield sound effect being too loud.
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
## Description
|
||||
|
||||
## Base information
|
||||
* Minecraft version:
|
||||
* Minecraft Forge version:
|
||||
* Draconic Evolution version:
|
||||
|
||||
## Mod List or Mod Pack (include version)
|
||||
...
|
||||
list other mods being used
|
||||
...
|
||||
|
||||
## Crash report
|
||||
```
|
||||
CRASH REPORT HERE
|
||||
```
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2013-2016 brandon3055
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -1,7 +1,23 @@
|
||||
Draconic-Evolution
|
||||
==================
|
||||
|
||||
Draconic Evolution adds powerful new tools, Items, weapons and Armor. The premise is the enigmatic ore - Draconium. As you progress you find it has many uses from the mundane such as machines and items, to the near-mystical at the top with Awakened Draconium to make extremely powerful armor and tools.
|
||||
Forked and maintained by the GTNH Team for 1.7.10.
|
||||
|
||||
Draconic Evolution adds powerful new tools, Items, weapons and Armor. The premise is the enigmatic ore - Draconium.
|
||||
As you progress you find it has many uses from the mundane such as machines and items, to the near-mystical at the
|
||||
top with Awakened Draconium to make extremely powerful armor and tools.
|
||||
|
||||
## License / Use in Modpacks
|
||||
This mod is [licensed under the **MIT license**](https://github.com/brandon3055/Draconic-Evolution/blob/master/LICENSE). All **assets are public domain**, unless otherwise stated; all are free to be distributed as long as the license / source credits are kept. This means you can use this mod in any mod pack **as you please**.
|
||||
This mod is [licensed under the **LGPL license**](https://github.com/GTNewHorizons/Draconic-Evolution/blob/master/LICENSE.txt).
|
||||
All **assets are public domain**, unless otherwise stated; all are free to be distributed as long as the license / source credits are kept.
|
||||
This means you can use this mod in any mod pack **as you please**; however if you make any changes you must make the source available!
|
||||
|
||||
Original code Copyright (c) 2013-2016 brandon3055 and was licensed MIT
|
||||
|
||||
GTNH Modifications:
|
||||
|
||||
Copyright (c) 2021 GTNH Team
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
|
||||
Use this however you want, but please give back any modifications!
|
||||
@@ -1,3 +0,0 @@
|
||||
Version:1.0.2g
|
||||
Snapshot:0
|
||||
ReleaseNote:Fixed a little server crash
|
||||
+638
-44
@@ -1,58 +1,378 @@
|
||||
//version: 1643020202
|
||||
/*
|
||||
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/GTNewHorizons/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.7'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'CB Maven FS'
|
||||
url "http://chickenbones.net/maven/"
|
||||
}
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
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")
|
||||
id('de.undercouch.download') version('4.1.2')
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
// Define properties file
|
||||
ext.configFile = file "build.properties"
|
||||
def projectJavaVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
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
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(projectJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
version = "${config.minecraft_version}-${config.mod_version}"
|
||||
group = "com.brandon3055.draconicevolution"
|
||||
archivesBaseName = "Draconic-Evolution"
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = true
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
|
||||
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
|
||||
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
|
||||
}
|
||||
|
||||
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")
|
||||
|
||||
boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
if((getFile(targetPackageJava).exists() || getFile(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((getFile(targetPackageJava).exists() || getFile(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(getFile(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((getFile(targetPackageJava).exists() || getFile(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((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(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((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(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 first from the VERSION env and then git tag
|
||||
String identifiedVersion
|
||||
try {
|
||||
String versionOverride = System.getenv("VERSION") ?: null
|
||||
identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
|
||||
version = minecraftVersion + "-" + identifiedVersion
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag, or the VERSION override must be set!");
|
||||
}
|
||||
|
||||
group = modGroup
|
||||
if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
archivesBaseName = customArchiveBaseName
|
||||
}
|
||||
else {
|
||||
archivesBaseName = modId
|
||||
}
|
||||
|
||||
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
|
||||
]
|
||||
jvmArguments += [
|
||||
"-Dmixin.debug.countInjections=true", "-Dmixin.debug.verbose=true", "-Dmixin.debug.export=true"
|
||||
]
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
clientIntellijRun {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
|
||||
if(developmentEnvironmentUserName) {
|
||||
args("--username", developmentEnvironmentUserName)
|
||||
}
|
||||
}
|
||||
|
||||
serverIntellijRun {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
}
|
||||
|
||||
if(file("addon.gradle").exists()) {
|
||||
apply from: "addon.gradle"
|
||||
}
|
||||
|
||||
apply from: 'repositories.gradle'
|
||||
|
||||
configurations {
|
||||
implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored
|
||||
implementation.extendsFrom(shadowCompile)
|
||||
implementation.extendsFrom(shadeCompile)
|
||||
}
|
||||
|
||||
repositories {
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "codechicken:CodeChickenLib:${config.minecraft_version}-${config.CCLIB_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${config.minecraft_version}-${config.ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${config.minecraft_version}-${config.NEI_version}:dev"
|
||||
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("com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH") {
|
||||
// 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"
|
||||
}
|
||||
compile("com.github.GTNewHorizons:SpongeMixins:1.5.0")
|
||||
}
|
||||
}
|
||||
|
||||
if (file('../BrandonsCore/').exists()) compile project('../BrandonsCore')
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
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()) {
|
||||
getFile("/src/main/resources/mixins." + modId + ".json").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 {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
|
||||
dependsOn(relocateShadowJar)
|
||||
}
|
||||
|
||||
jar {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
if(developmentEnvironmentUserName) {
|
||||
arguments += [
|
||||
"--username",
|
||||
developmentEnvironmentUserName
|
||||
]
|
||||
}
|
||||
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
|
||||
runServer {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
|
||||
tasks.withType(JavaExec).configureEach {
|
||||
javaLauncher.set(
|
||||
javaToolchains.launcherFor {
|
||||
languageVersion = projectJavaVersion
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
processResources
|
||||
@@ -64,38 +384,312 @@ processResources
|
||||
// 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
|
||||
expand "minecraftVersion": project.minecraft.version,
|
||||
"modVersion": versionDetails().lastTag,
|
||||
"modId": modId,
|
||||
"modName": modName
|
||||
}
|
||||
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'idea'
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = true
|
||||
def getManifestAttributes() {
|
||||
def manifestAttributes = [:]
|
||||
if(containsMixinsAndOrCoreModOnly.toBoolean() == false && (usesMixins.toBoolean() || coreModClass)) {
|
||||
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
|
||||
}
|
||||
|
||||
if(coreModClass) {
|
||||
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
manifestAttributes += [
|
||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||
"MixinConfigs" : "mixins." + modId + ".json",
|
||||
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
|
||||
]
|
||||
}
|
||||
return manifestAttributes
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from (sourceSets.main.allJava)
|
||||
from (file("$projectDir/LICENSE"))
|
||||
getArchiveClassifier().set('sources')
|
||||
}
|
||||
|
||||
task shadowDevJar(type: ShadowJar) {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
getArchiveClassifier().set("dev")
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
|
||||
}
|
||||
|
||||
task relocateShadowDevJar(type: ConfigureShadowRelocation) {
|
||||
target = tasks.shadowDevJar
|
||||
prefix = modGroup + ".shadow"
|
||||
}
|
||||
|
||||
task circularResolverJar(type: Jar) {
|
||||
dependsOn(relocateShadowDevJar)
|
||||
dependsOn(shadowDevJar)
|
||||
enabled = false
|
||||
}
|
||||
|
||||
task devJar(type: Jar) {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
getArchiveClassifier().set("dev")
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
dependsOn(circularResolverJar)
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
task deobfJar(type: Jar) { // Generate deobfuscated
|
||||
from sourceSets.main.output
|
||||
classifier = 'deobf'
|
||||
}
|
||||
task apiJar(type: Jar) {
|
||||
from (sourceSets.main.allJava) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
task sourceJar(type: Jar) { // Generate sources
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
}
|
||||
from (sourceSets.main.output) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
tasks.build.dependsOn('sourceJar', 'deobfJar')
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
include("LICENSE")
|
||||
}
|
||||
|
||||
getArchiveClassifier().set('api')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
archives sourceJar
|
||||
archives jar
|
||||
}
|
||||
if(!noPublishedSources) {
|
||||
archives sourcesJar
|
||||
}
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
archives apiJar
|
||||
}
|
||||
}
|
||||
|
||||
// The gradle metadata includes all of the additional deps that we disabled from POM generation (including forgeBin with no groupID),
|
||||
// and isn't strictly needed with the POM so just disable it.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
||||
// publishing
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
artifact source: shadowJar, classifier: ""
|
||||
}
|
||||
if(!noPublishedSources) {
|
||||
artifact source: sourcesJar, classifier: "src"
|
||||
}
|
||||
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
|
||||
if (apiPackage) {
|
||||
artifact source: apiJar, classifier: "api"
|
||||
}
|
||||
|
||||
groupId = System.getenv("ARTIFACT_GROUP_ID") ?: "com.github.GTNewHorizons"
|
||||
artifactId = System.getenv("ARTIFACT_ID") ?: project.name
|
||||
// Using the identified version, not project.version as it has the prepended 1.7.10
|
||||
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
|
||||
|
||||
// Remove all non GTNH deps here.
|
||||
// Original intention was to remove an invalid forgeBin being generated without a groupId (mandatory), but
|
||||
// it also removes all of the MC deps
|
||||
pom.withXml {
|
||||
Node pomNode = asNode()
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
it.groupId.text() != 'com.github.GTNewHorizons'
|
||||
}.each() {
|
||||
it.parent().remove(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases"
|
||||
credentials {
|
||||
username = System.getenv("MAVEN_USER") ?: "NONE"
|
||||
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Updating
|
||||
task updateBuildScript {
|
||||
doLast {
|
||||
if (performBuildScriptUpdate(projectDir.toString())) return
|
||||
|
||||
print("Build script already up-to-date!")
|
||||
}
|
||||
}
|
||||
|
||||
if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
|
||||
if (autoUpdateBuildScript.toBoolean()) {
|
||||
performBuildScriptUpdate(projectDir.toString())
|
||||
} else {
|
||||
println("Build script update available! Run 'gradle updateBuildScript'")
|
||||
}
|
||||
}
|
||||
|
||||
static URL availableBuildScriptUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle")
|
||||
}
|
||||
|
||||
boolean performBuildScriptUpdate(String projectDir) {
|
||||
if (isNewBuildScriptVersionAvailable(projectDir)) {
|
||||
def buildscriptFile = getFile("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
|
||||
}
|
||||
|
||||
boolean isNewBuildScriptVersionAvailable(String projectDir) {
|
||||
Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
|
||||
|
||||
String currentBuildScript = getFile("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'
|
||||
}
|
||||
|
||||
// Deobfuscation
|
||||
|
||||
def deobf(String sourceURL) {
|
||||
try {
|
||||
URL url = new URL(sourceURL)
|
||||
String fileName = url.getFile()
|
||||
|
||||
//get rid of directories:
|
||||
int lastSlash = fileName.lastIndexOf("/")
|
||||
if(lastSlash > 0) {
|
||||
fileName = fileName.substring(lastSlash + 1)
|
||||
}
|
||||
//get rid of extension:
|
||||
if(fileName.endsWith(".jar")) {
|
||||
fileName = fileName.substring(0, fileName.lastIndexOf("."))
|
||||
}
|
||||
|
||||
String hostName = url.getHost()
|
||||
if(hostName.startsWith("www.")) {
|
||||
hostName = hostName.substring(4)
|
||||
}
|
||||
List parts = Arrays.asList(hostName.split("\\."))
|
||||
Collections.reverse(parts)
|
||||
hostName = String.join(".", parts)
|
||||
|
||||
return deobf(sourceURL, hostName + "/" + fileName)
|
||||
} catch(Exception e) {
|
||||
return deobf(sourceURL, "deobf/" + String.valueOf(sourceURL.hashCode()))
|
||||
}
|
||||
}
|
||||
|
||||
// The method above is to be prefered. Use this method if the filename is not at the end of the URL.
|
||||
def deobf(String sourceURL, String fileName) {
|
||||
String cacheDir = System.getProperty("user.home") + "/.gradle/caches/"
|
||||
String bon2Dir = cacheDir + "forge_gradle/deobf"
|
||||
String bon2File = bon2Dir + "/BON2-2.5.0.jar"
|
||||
String obfFile = cacheDir + "modules-2/files-2.1/" + fileName + ".jar"
|
||||
String deobfFile = cacheDir + "modules-2/files-2.1/" + fileName + "-deobf.jar"
|
||||
|
||||
if(file(deobfFile).exists()) {
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
download {
|
||||
src 'https://github.com/GTNewHorizons/BON2/releases/download/2.5.0/BON2-2.5.0.CUSTOM-all.jar'
|
||||
dest bon2File
|
||||
quiet true
|
||||
overwrite false
|
||||
}
|
||||
|
||||
download {
|
||||
src sourceURL
|
||||
dest obfFile
|
||||
quiet true
|
||||
overwrite false
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', '1.7.10', '--mappingsVer', 'stable_12', '--notch'
|
||||
workingDir bon2Dir
|
||||
standardOutput = new ByteArrayOutputStream()
|
||||
}
|
||||
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
|
||||
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/GTNewHorizons/ExampleMod1.7.10/blob/main/gradle.properties")
|
||||
}
|
||||
}
|
||||
|
||||
def getFile(String relativePath) {
|
||||
return new File(projectDir, relativePath)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
minecraft_version=1.7.10
|
||||
mod_version=1.0.2g
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
CCLIB_version=1.1.3.140
|
||||
NEI_version=1.0.5.120
|
||||
ccc_version=1.0.7.47
|
||||
|
||||
|
||||
//Version System A.B.CD A=Minecraft version (increments with each new minecraft version) B=Major mod change (May break saves) C=Release Number (Increments with each public release) D=Bugfix version (a-z)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile("curse.maven:brandons-core-231382:2297163")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.4.5:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:OpenComputers:1.7.5.20-GTNH:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.2.3-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.5.13:dev") {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("curse.maven:computercraft-67504:2269339") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("curse.maven:cofh-lib-220333:2388748") {
|
||||
transitive = false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
modName = Draconic Evolution
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
modId = DraconicEvolution
|
||||
|
||||
modGroup = com.brandon3055.draconicevolution
|
||||
|
||||
# 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 username 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 mod's 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 = VersionHandler.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 = 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
|
||||
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 compatibility 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
|
||||
|
||||
# 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 = Draconic-Evolution
|
||||
Vendored
BIN
Binary file not shown.
+1
-2
@@ -1,6 +1,5 @@
|
||||
#Fri Feb 20 03:02:45 EST 2015
|
||||
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
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||
@@ -1,4 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -6,47 +22,6 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# 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
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
@@ -61,9 +36,49 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
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
|
||||
|
||||
@@ -90,7 +105,7 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
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
|
||||
@@ -110,10 +125,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
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
@@ -154,11 +170,19 @@ if $cygwin ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+20
-10
@@ -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
|
||||
@@ -8,14 +24,14 @@
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -46,10 +62,9 @@ echo location of your Java installation.
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
@@ -60,11 +75,6 @@ set _SKIP=2
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
before_install:
|
||||
- ./gradlew setupCIWorkspace
|
||||
@@ -0,0 +1,14 @@
|
||||
// Add any additional repositories for your dependencies here
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "GTNH Maven"
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
|
||||
}
|
||||
maven {
|
||||
url "https://cursemaven.com"
|
||||
}
|
||||
maven {
|
||||
url = "https://jitpack.io"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
if(file('../BrandonsCore/').exists()) { include '../BrandonsCore' }
|
||||
@@ -15,11 +15,11 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
||||
@Mod(modid = References.MODID, name = References.MODNAME, version = References.VERSION, canBeDeactivated = false, guiFactory = References.GUIFACTORY, dependencies = "after:NotEnoughItems;" +
|
||||
"after:NotEnoughItems;" +
|
||||
"after:ThermalExpansion;" +
|
||||
"after:ThermalFoundation;" +
|
||||
"required-after:BrandonsCore@[1.0.0.11,);")
|
||||
@Mod(modid = References.MODID, name = References.MODNAME, version = References.VERSION, canBeDeactivated = false, guiFactory = References.GUIFACTORY,
|
||||
dependencies = "after:NotEnoughItems;" +
|
||||
"after:ThermalExpansion;" +
|
||||
"after:ThermalFoundation;" +
|
||||
"required-after:BrandonsCore@[1.0.0.11,);")
|
||||
public class DraconicEvolution {
|
||||
|
||||
@Mod.Instance(References.MODID)
|
||||
|
||||
@@ -52,7 +52,6 @@ public class GUIDissEnchanter extends GuiContainer {
|
||||
fontRendererObj.drawString("Damage: " + (40 - tile.bookPower) + "%", 5, 49, 0x0000ff);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -117,7 +117,6 @@ public class GUIDraconiumChest extends GuiContainer implements INEIGuiHandler {
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GUIGenerator extends GuiContainer {
|
||||
this.player = invPlayer.player;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/Grinder.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/GGrinder.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int X, int Y) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GUIGrinder extends GuiContainer {
|
||||
this.player = invPlayer.player;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/Grinder.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation(References.MODID.toLowerCase(), "textures/gui/GGrinder.png");
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int X, int Y) {
|
||||
|
||||
@@ -116,7 +116,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
super.mouseClicked(x, y, button);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
@@ -524,7 +523,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
fontRendererObj.drawString("> " + random_scale1, col2, posY + ln2 + 7 * 22, 0x000000, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page1Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
@@ -616,7 +614,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page2Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
@@ -689,7 +686,6 @@ public class GUIParticleGenerator extends GuiScreen {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void page3Buttons() {
|
||||
int posX = (this.width - xSize) / 2;
|
||||
int posY = (this.height - ySize) / 2;
|
||||
|
||||
@@ -84,7 +84,6 @@ public class GUIPlayerDetector extends GuiContainer {
|
||||
drawHoveringText(lines, x, y, fontRendererObj);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -48,7 +48,6 @@ public class GUISunDial extends GuiContainer {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -302,7 +302,6 @@ public class GUITeleporter extends GuiScreen {
|
||||
else if (!editingNew) ((GuiButton) buttonList.get(4)).enabled = true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
buttonList.clear();
|
||||
|
||||
@@ -231,7 +231,6 @@ public class GUIUpgradeModifier extends GuiContainer {
|
||||
fontRendererObj.drawString(">" + (coreSlots - usedSlots), guiLeft + 4, guiTop + 67, 0x000000);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f) {
|
||||
super.drawScreen(x, y, f);
|
||||
|
||||
@@ -61,7 +61,6 @@ public class GUIWeatherController extends GuiContainer {
|
||||
public static final String STORM_TEXT = "Thunder Storm";
|
||||
public static String text;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -30,7 +30,6 @@ public class GuiHudConfig extends GuiScreen {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
+18
-13
@@ -319,13 +319,13 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
is.close();
|
||||
os.close();
|
||||
|
||||
JsonReader reader = new JsonReader(new InputStreamReader(new FileInputStream(manualJSON),"utf-8"));
|
||||
|
||||
JsonReader reader = new JsonReader(new FileReader(manualJSON));
|
||||
List<String> images;
|
||||
List<String> content;
|
||||
|
||||
reader.beginArray();
|
||||
|
||||
|
||||
//Read next page
|
||||
while (reader.hasNext()) {
|
||||
String name;
|
||||
@@ -335,13 +335,16 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
content = new ArrayList<String>();
|
||||
|
||||
reader.beginObject();
|
||||
|
||||
|
||||
//Read page name
|
||||
String s = reader.nextName();
|
||||
if (s.equals("name")) {
|
||||
name = reader.nextString();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
} else {
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
|
||||
|
||||
//Read page images
|
||||
s = reader.nextName();
|
||||
@@ -362,9 +365,10 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
if (!imageURLs.contains(url)) imageURLs.add(url);
|
||||
}
|
||||
reader.endArray();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"images\" [Found:\"" + s + "\"])");
|
||||
|
||||
} else{
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
//Read page content
|
||||
s = reader.nextName();
|
||||
if (s.equals("content")) {
|
||||
@@ -373,17 +377,17 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
content.add(reader.nextString());
|
||||
}
|
||||
reader.endArray();
|
||||
} else
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"content\" [Found:\"" + s + "\"])");
|
||||
|
||||
} else{
|
||||
reader.close();
|
||||
throw new IOException("Error reading manual.json (invalid name in place of \"name\" [Found:\"" + s + "\"])");
|
||||
}
|
||||
reader.endObject();
|
||||
|
||||
if (isValidPage(name))
|
||||
pageList.add(new ManualPage(name, images.toArray(new String[images.size()]), content.toArray(new String[content.size()]), nameL, meta));
|
||||
}
|
||||
|
||||
reader.endArray();
|
||||
|
||||
reader.close();
|
||||
}
|
||||
catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
@@ -391,6 +395,7 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
||||
catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
-1
@@ -48,7 +48,6 @@ public class GUIToolConfig extends GUIBase {
|
||||
addDependentComponents();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
-1
@@ -71,7 +71,6 @@ public class ComponentFieldButton extends ComponentBase {
|
||||
drawString(fontRendererObj, field.getLocalizedName(), x + offsetX + 2, y + offsetY + (getHeight() / 2) - (fontRendererObj.FONT_HEIGHT / 2), 0xffffff);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
if (isMouseOver(mouseX, mouseY)) {
|
||||
|
||||
-1
@@ -380,7 +380,6 @@ public class ComponentManualPage extends ComponentScrollingBase {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Object[] getRecipeInput(IRecipe recipe) {
|
||||
if (recipe instanceof ShapelessOreRecipe) return ((ShapelessOreRecipe) recipe).getInput().toArray();
|
||||
else if (recipe instanceof ShapedOreRecipe) return getShapedOreRecipe((ShapedOreRecipe) recipe);
|
||||
|
||||
@@ -107,6 +107,7 @@ public class KeyInputHandler {
|
||||
if (c > 0 && c < 8) return c + i;
|
||||
if (c == 0 && i < 0) return 8;
|
||||
if (c == 8 && i > 0) return 0;
|
||||
if (c == 150 && i < 0) return 152;
|
||||
return c + i;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -31,7 +31,7 @@ public class RenderTileCrystal extends TileEntitySpecialRenderer {
|
||||
private IModelCustom modelCrystalTransceiver;
|
||||
|
||||
public RenderTileCrystal() {
|
||||
modelCrystal = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/Crystal.obj"));
|
||||
modelCrystal = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/CCrystal.obj"));
|
||||
modelCrystalTransceiver = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/CrystalTransceiver.obj"));
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,6 @@ public class CommonProxy {
|
||||
DETab.initialize();
|
||||
PotionHandler.init();
|
||||
CCOCIntegration.init();
|
||||
ModHelper.init();
|
||||
DragonChunkLoader.init();
|
||||
|
||||
LogHelper.info("Finished Initialization");
|
||||
|
||||
@@ -69,7 +69,6 @@ public class DraconiumBlock extends BlockDE {
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
|
||||
@@ -68,7 +68,6 @@ public class InfusedObsidian extends BlockDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("info.infusedObsidian.txt"));
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ public class CKeyStoneItemBlock extends ItemBlock {
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ public class DraconiumChestItemBlock extends ItemBlockCustomData {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(StatCollector.translateToLocal("info.draconiumChestInfo1.txt"));
|
||||
|
||||
-2
@@ -29,7 +29,6 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
|
||||
protected int maxReceive = BalanceConfigHandler.draconiumBlockChargingSpeed;
|
||||
protected int maxExtract = BalanceConfigHandler.draconiumBlockChargingSpeed;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -94,7 +93,6 @@ public class DraconiumItemBlock extends ItemBlock implements IEnergyContainerIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
if (stack.hasTagCompound()) list.add(getEnergyStored(stack) + " / " + getMaxEnergyStored(stack) + "RF");
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
||||
ModBlocks.register(this, EnergyCrystalItemBlock.class);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
|
||||
@@ -65,7 +65,6 @@ public class Generator extends BlockCustomDrop {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
@@ -63,7 +63,6 @@ public class Grinder extends BlockCustomDrop {
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion) {
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ public class WeatherController extends BlockCustomDrop {
|
||||
else return icon_top;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List par3list) {
|
||||
|
||||
-1
@@ -51,7 +51,6 @@ public class ContainerPlayerDetector extends Container {
|
||||
addSlotToContainer(new SlotOpaqueBlock(tileDetector, 0, 145, 15));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void updateContainerSlots() {
|
||||
if (gui == null) {
|
||||
return;
|
||||
|
||||
+3
-2
@@ -83,8 +83,9 @@ public class EntityChaosCrystal extends EntityLivingBase {
|
||||
int j = MathHelper.floor_double(this.posY);
|
||||
int k = MathHelper.floor_double(this.posZ);
|
||||
|
||||
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire)
|
||||
if (this.worldObj.provider instanceof WorldProviderEnd && this.worldObj.getBlock(i, j, k).isBlockSolid(this.worldObj, i, j, k, 0) && this.worldObj.getBlock(i, j, k) != Blocks.fire) {
|
||||
this.worldObj.setBlock(i, j, k, Blocks.fire);
|
||||
}
|
||||
|
||||
} else if (deathAnimation > 0) deathAnimation -= 0.1F;
|
||||
|
||||
@@ -170,7 +171,7 @@ public class EntityChaosCrystal extends EntityLivingBase {
|
||||
|
||||
private EntityChaosGuardian getGuardian() {
|
||||
if (guardian == null) {
|
||||
@SuppressWarnings("unchecked") List<EntityChaosGuardian> list = worldObj.getEntitiesWithinAABB(EntityChaosGuardian.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(512, 512, 512));
|
||||
List<EntityChaosGuardian> list = worldObj.getEntitiesWithinAABB(EntityChaosGuardian.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(512, 512, 512));
|
||||
if (list.size() > 0) guardian = list.get(0);
|
||||
if (guardian != null && guardian.crystals != null && !guardian.crystals.contains(this)) {
|
||||
guardian.crystals.add(this);
|
||||
|
||||
+5
-2
@@ -443,6 +443,9 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
case GUARDING:
|
||||
break;
|
||||
|
||||
case FIREBOMB:
|
||||
break;
|
||||
|
||||
case CHARGING:
|
||||
if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME;
|
||||
break;
|
||||
@@ -530,7 +533,7 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
else if (nextAttackTimer == 0) {
|
||||
|
||||
Entity attackTarget = target;
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> targets = attackTarget == null ? worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(homeX, homeY, homeZ, homeX, homeY, homeZ).expand(100, 100, 100)) : null;
|
||||
List<EntityPlayer> targets = attackTarget == null ? worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(homeX, homeY, homeZ, homeX, homeY, homeZ).expand(100, 100, 100)) : null;
|
||||
|
||||
if (targets != null && targets.size() > 0) {
|
||||
Iterator<EntityPlayer> i = targets.iterator();
|
||||
@@ -748,7 +751,7 @@ public class EntityChaosGuardian extends EntityDragon {//summon DraconicEvolutio
|
||||
|
||||
break;
|
||||
case FIREBOMB:
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> targets = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(150, 150, 150));
|
||||
List<EntityPlayer> targets = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(150, 150, 150));
|
||||
target = null;
|
||||
while (targets.size() > 0 && target == null) {
|
||||
EntityPlayer potentialTarget = targets.get(rand.nextInt(targets.size()));
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class EntityChaosVortex extends Entity {
|
||||
double intensity = (ticksExisted - 130) / 100D;
|
||||
if (intensity > 1D) intensity = 1D;
|
||||
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(200, 200, 200));
|
||||
List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, boundingBox.expand(200, 200, 200));
|
||||
|
||||
for (EntityPlayer player : players) {
|
||||
double x = (rand.nextDouble() - 0.5) * 2 * intensity;
|
||||
|
||||
+2
-2
@@ -3,6 +3,7 @@ package com.brandon3055.draconicevolution.common.entity;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
@@ -93,7 +94,6 @@ public class EntityCustomArrow extends EntityArrow {
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
//region Entity Update And motion
|
||||
@@ -416,7 +416,7 @@ public class EntityCustomArrow extends EntityArrow {
|
||||
|
||||
public void onHitAnything() {
|
||||
if (bowProperties.explosionPower > 0 && !worldObj.isRemote) {
|
||||
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, true);
|
||||
worldObj.createExplosion(this, prevPosX, prevPosY, prevPosZ, bowProperties.explosionPower, ConfigHandler.bowBlockDamage);
|
||||
setDead();
|
||||
}
|
||||
if (bowProperties.shockWavePower > 0 && !worldObj.isRemote) {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class EntityDraconicArrow extends EntityArrow {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
//super.onUpdate();
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ public class EntityDragonHeart extends Entity {
|
||||
}
|
||||
break;
|
||||
}
|
||||
@SuppressWarnings("unchecked") List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||
List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||
for (EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if (Utills.getDistanceAtoB(posX, posY + 0.5, posZ, item.posX, item.posY, item.posZ) < 1) {
|
||||
|
||||
+3
-3
@@ -216,8 +216,8 @@ public class EntityDragonProjectile extends Entity {
|
||||
worldObj.playSoundEffect(posX, posY, posZ, "random.explode", 4.0F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
int i = 3 + rand.nextInt(3);
|
||||
EntityDragonProjectile newProjectile;
|
||||
@SuppressWarnings("unchecked") List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(shooter, boundingBox.expand(60, 60, 60), Utills.selectPlayer);
|
||||
for (i = i; i > 0; i--) {
|
||||
List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(shooter, boundingBox.expand(60, 60, 60), Utills.selectPlayer);
|
||||
for (i =+ 0; i > 0; i--) {
|
||||
newProjectile = new EntityDragonProjectile(worldObj, MINI_CHAOS_CHASER, list.size() > 0 ? list.get(rand.nextInt(list.size())) : null, power / 2F, shooter);
|
||||
newProjectile.motionY = 0;
|
||||
int randDir = rand.nextInt();
|
||||
@@ -285,7 +285,7 @@ public class EntityDragonProjectile extends Entity {
|
||||
|
||||
private void damageEntitiesInRadius(DamageSource source, double radius, float damage) {
|
||||
if (worldObj.isRemote) return;
|
||||
@SuppressWarnings("unchecked") List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(radius, radius, radius));
|
||||
List<EntityLivingBase> entities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX, posY, posZ).expand(radius, radius, radius));
|
||||
|
||||
for (EntityLivingBase entityLivingBase : entities) {
|
||||
if (entityLivingBase == shooter) continue;
|
||||
|
||||
@@ -102,7 +102,6 @@ public class EntityEnderArrow extends EntityDraconicArrow {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
for (int i = 0; i < 10; i++)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.brandon3055.draconicevolution.common.handler;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigHandler {
|
||||
|
||||
public static Configuration config;
|
||||
@@ -47,6 +47,7 @@ public class ConfigHandler {
|
||||
public static boolean useOldD2DToolTextures;
|
||||
public static boolean disableGuardianCrystalRespawn;
|
||||
public static boolean disableLog;
|
||||
public static boolean enableFlight;
|
||||
private static String[] itemDislocatorBlacklist;
|
||||
public static Map<String, Integer> itemDislocatorBlacklistMap = new HashMap<String, Integer>();
|
||||
|
||||
@@ -123,6 +124,7 @@ public class ConfigHandler {
|
||||
disableGuardianCrystalRespawn = config.get(Configuration.CATEGORY_GENERAL, "Disable Guardian Crystal Respawn", false, "(Wuss mode) Setting this to true will disable the chaos guardians ability to respawn healing crystals. Under certain circumstances such as on a Spigot server where entity render distance is significantly lower this may be required.").getBoolean(false);
|
||||
itemDislocatorBlacklist = config.getStringList("Item Dislocator Blacklist", Configuration.CATEGORY_GENERAL, new String[]{"appliedenergistics2:item.ItemCrystalSeed"}, "A list of items of items that should be ignored by the item dislocator. Use the items registry name e.g. minecraft:apple you can also add a meta value like so minecraft:wool|4");
|
||||
disableLog = config.get(Configuration.CATEGORY_GENERAL, "Disable Log", false, "If you are having issued with console spam that you cant fix setting this to true will disable all log output from Draconic Evolution (Not recommended)").getBoolean(false);
|
||||
enableFlight = config.get(Configuration.CATEGORY_GENERAL, "Enable Flight", true, "Set this to false to disable flight given by draconic armor.").getBoolean(true);
|
||||
|
||||
|
||||
//Spawner
|
||||
|
||||
+2
-2
@@ -64,7 +64,6 @@ import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class MinecraftForgeEventHandler {
|
||||
|
||||
Random random = new Random();
|
||||
@@ -171,8 +170,9 @@ public class MinecraftForgeEventHandler {
|
||||
}
|
||||
|
||||
for (Object o : event.entity.worldObj.playerEntities) {
|
||||
if (o instanceof EntityPlayer)
|
||||
if (o instanceof EntityPlayer) {
|
||||
((EntityPlayer) o).addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("msg.de.dragonDeath.txt")));
|
||||
}
|
||||
}
|
||||
|
||||
int count = 30 + event.entity.worldObj.rand.nextInt(30);
|
||||
|
||||
@@ -25,7 +25,6 @@ public class DraconicCore extends ItemDE {
|
||||
ModItems.register(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
|
||||
@@ -40,7 +40,6 @@ public class DraconiumEnergyCore extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
@@ -479,7 +479,6 @@ public class Tclogo extends ItemDE {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
list.add(EnumChatFormatting.RED + "Warning! this is an item used to test random bits of code. You should not play with it");
|
||||
list.add(EnumChatFormatting.RED + "because depending on what i used it for last it could do anything.");
|
||||
|
||||
+42
-41
@@ -1,15 +1,13 @@
|
||||
package com.brandon3055.draconicevolution.common.items.armor;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
@@ -26,6 +24,8 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 13/11/2014.
|
||||
*/
|
||||
@@ -211,54 +211,55 @@ public class CustomArmorHandler {
|
||||
public static void tickArmorEffects(ArmorSummery summery, EntityPlayer player) {
|
||||
|
||||
//region/*----------------- Flight ------------------*/
|
||||
if (ConfigHandler.enableFlight) {
|
||||
if (summery != null && summery.flight[0]) {
|
||||
playersWithFlight.put(player, true);
|
||||
player.capabilities.allowFlying = true;
|
||||
if (summery.flight[1]) player.capabilities.isFlying = true;
|
||||
|
||||
if (summery != null && summery.flight[0]) {
|
||||
playersWithFlight.put(player, true);
|
||||
player.capabilities.allowFlying = true;
|
||||
if (summery.flight[1]) player.capabilities.isFlying = true;
|
||||
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
|
||||
|
||||
if (player.worldObj.isRemote) setPlayerFlySpeed(player, 0.05F + (0.05F * summery.flightSpeedModifier));
|
||||
|
||||
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
|
||||
if ((!player.onGround && player.capabilities.isFlying) && player.motionY != 0 && summery.flightVModifier > 0) {
|
||||
// float percentIncrease = summery.flightVModifier;
|
||||
|
||||
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
|
||||
//LogHelper.info(player.motionY);
|
||||
player.motionY = 0.225F * summery.flightVModifier;
|
||||
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
|
||||
//LogHelper.info(player.motionY);
|
||||
player.motionY = 0.225F * summery.flightVModifier;
|
||||
}
|
||||
|
||||
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
|
||||
player.motionY = -0.225F * summery.flightVModifier;
|
||||
}
|
||||
}
|
||||
|
||||
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
|
||||
player.motionY = -0.225F * summery.flightVModifier;
|
||||
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
if (summery.flight[2] && player.moveForward == 0 && player.moveStrafing == 0 && player.capabilities.isFlying) {
|
||||
player.motionX *= 0.5;
|
||||
player.motionZ *= 0.5;
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!playersWithFlight.containsKey(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
}
|
||||
|
||||
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
|
||||
playersWithFlight.put(player, false);
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
player.sendPlayerAbilities();
|
||||
LogHelper.info("Send Disable");
|
||||
} else {
|
||||
if (!playersWithFlight.containsKey(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
LogHelper.info("Put Client");
|
||||
setPlayerFlySpeed(player, 0.05F);
|
||||
if (playersWithFlight.get(player) && !player.worldObj.isRemote) {
|
||||
playersWithFlight.put(player, false);
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
player.sendPlayerAbilities();
|
||||
}
|
||||
}
|
||||
|
||||
if (player.worldObj.isRemote && playersWithFlight.get(player)) {
|
||||
playersWithFlight.put(player, false);
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
player.capabilities.allowFlying = false;
|
||||
player.capabilities.isFlying = false;
|
||||
}
|
||||
setPlayerFlySpeed(player, 0.05F);
|
||||
}
|
||||
}
|
||||
}
|
||||
//endregion
|
||||
|
||||
+1
-7
@@ -92,7 +92,6 @@ public class DraconicArmor
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item), "Energy", 0));
|
||||
@@ -213,7 +212,6 @@ public class DraconicArmor
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||
@@ -221,7 +219,6 @@ public class DraconicArmor
|
||||
ToolBase.holdCTRLForUpgrades(list, stack);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean clearNegativeEffects(Entity par3Entity) {
|
||||
boolean flag = false;
|
||||
if (par3Entity.ticksExisted % 20 == 0) {
|
||||
@@ -240,7 +237,7 @@ public class DraconicArmor
|
||||
}
|
||||
for (PotionEffect potion : potions) {
|
||||
int id = potion.getPotionID();
|
||||
if (ReflectionHelper.getPrivateValue(Potion.class, Potion.potionTypes[id], new String[]{"isBadEffect", "field_76418_K", "J"})) {
|
||||
if ((Boolean) ReflectionHelper.getPrivateValue(Potion.class, Potion.potionTypes[id], new String[]{"isBadEffect", "field_76418_K", "J"})) {
|
||||
if (potion.getPotionID() == Potion.digSlowdown.id && ModHelper.isHoldingCleaver(player)) break;
|
||||
if ((player.getHeldItem() == null || (player.getHeldItem().getItem() != ModItems.wyvernBow && player.getHeldItem().getItem() != ModItems.draconicBow)) || id != 2) {
|
||||
player.removePotionEffect(id);
|
||||
@@ -259,7 +256,6 @@ public class DraconicArmor
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int receive = Math.min(maxReceive, Math.min(getMaxEnergyStored(container) - stored, maxTransfer));
|
||||
|
||||
if (!simulate) {
|
||||
stored += receive;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
@@ -269,10 +265,8 @@ public class DraconicArmor
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int extract = Math.min(maxExtract, Math.min(maxTransfer, stored));
|
||||
|
||||
if (!simulate) {
|
||||
stored -= extract;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
|
||||
@@ -66,7 +66,6 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item), "Energy", 0));
|
||||
@@ -197,7 +196,6 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int receive = Math.min(maxReceive, Math.min(getMaxEnergyStored(container) - stored, maxTransfer));
|
||||
|
||||
if (!simulate) {
|
||||
stored += receive;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
@@ -207,10 +205,8 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
int stored = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int extract = Math.min(maxExtract, Math.min(maxTransfer, stored));
|
||||
|
||||
if (!simulate) {
|
||||
stored -= extract;
|
||||
ItemNBTHelper.setInteger(container, "Energy", stored);
|
||||
|
||||
@@ -101,7 +101,6 @@ public class AdminSpawnEgg extends ItemDE {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean p_77624_4_) {
|
||||
|
||||
-2
@@ -28,7 +28,6 @@ public class CreativeStructureSpawner extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -107,7 +106,6 @@ public class CreativeStructureSpawner extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
if (stack.getItemDamage() == 1)
|
||||
|
||||
-1
@@ -88,7 +88,6 @@ public class DraconicDistructionStaff extends MiningTool implements IInventoryTo
|
||||
return super.onItemRightClick(stack, world, player);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean extended) {
|
||||
|
||||
+4
-16
@@ -31,7 +31,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
@@ -180,7 +179,6 @@ public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRende
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
InfoHelper.addEnergyInfo(stack, list);
|
||||
@@ -190,32 +188,22 @@ public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRende
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
-2
@@ -55,7 +55,6 @@ public class DraconiumFluxCapacitor extends RFItemBase implements IUpgradableIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -136,7 +135,6 @@ public class DraconiumFluxCapacitor extends RFItemBase implements IUpgradableIte
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ public class EnderArrow extends ItemDE {
|
||||
itemIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "ender_arrow");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.ITALIC + StatCollector.translateToLocal("info.arrowInfo.txt"));
|
||||
|
||||
@@ -57,7 +57,6 @@ public class Magnet extends ItemDE {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@@ -75,7 +74,6 @@ public class Magnet extends ItemDE {
|
||||
return ItemNBTHelper.getBoolean(stack, "MagnetEnabled", false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean hotbar) {
|
||||
if (!entity.isSneaking() && entity.ticksExisted % 5 == 0 && ItemNBTHelper.getBoolean(stack, "MagnetEnabled", false) && entity instanceof EntityPlayer) {
|
||||
@@ -109,7 +107,7 @@ public class Magnet extends ItemDE {
|
||||
|
||||
for (EntityXPOrb orb : xp) {
|
||||
if (!world.isRemote) {
|
||||
if (orb.field_70532_c == 0) {
|
||||
if (orb.field_70532_c == 0 && orb.isEntityAlive()) {
|
||||
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(player, orb))) continue;
|
||||
world.playSoundAtEntity(player, "random.orb", 0.1F, 0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
|
||||
player.onItemPickup(orb, 1);
|
||||
@@ -128,7 +126,6 @@ public class Magnet extends ItemDE {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
list.add(StatCollector.translateToLocal("info.de.shiftRightClickToActivate.txt"));
|
||||
|
||||
@@ -40,7 +40,6 @@ public class SafetyMatch extends ItemDE {
|
||||
else return super.getUnlocalizedName(itemStack) + "Box";
|
||||
}
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs p_150895_2_, List list) {
|
||||
@@ -116,7 +115,6 @@ public class SafetyMatch extends ItemDE {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ALL")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
|
||||
|
||||
@@ -111,7 +111,6 @@ public class TeleporterMKI extends ItemDE {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (!ItemNBTHelper.getBoolean(stack, "IsSet", false)) {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class TeleporterMKII extends TeleporterMKI implements IHudDisplayItem {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack teleporter, final EntityPlayer player, final List list2, final boolean extraInformation) {
|
||||
short selected = ItemNBTHelper.getShort(teleporter, "Selection", (short) 0);
|
||||
|
||||
@@ -72,7 +72,6 @@ public class Wrench extends ItemDE implements IHudDisplayItem {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.wrenchMode." + currentMode + ".txt"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean bool) {
|
||||
|
||||
+47
-16
@@ -13,20 +13,26 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.server.S18PacketEntityTeleport;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -37,6 +43,7 @@ import net.minecraftforge.event.world.BlockEvent;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 2/01/2015.
|
||||
* Modified by bartimaeusnek on 23/05/2018
|
||||
*/
|
||||
public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
|
||||
@@ -160,7 +167,8 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
if (player.worldObj.getTileEntity(xPos, yPos, zPos) != null) {
|
||||
TileEntity te = player.worldObj.getTileEntity(xPos, yPos, zPos);
|
||||
if (te != null && !ModHelper.isGregTechTileEntityOre(te)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
player.addChatComponentMessage(new ChatComponentTranslation("msg.de.baseSafeAOW.txt"));
|
||||
} else
|
||||
@@ -172,15 +180,26 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
player.worldObj.getChunkFromBlockCoords(xPos, zPos).sendUpdates=false;
|
||||
breakExtraBlock(stack, player.worldObj, xPos, yPos, zPos, breakRadius * ((breakDepth / 2) + 1), player, refStrength, Math.abs(x - xPos) <= 1 && Math.abs(y - yPos) <= 1 && Math.abs(z - zPos) <= 1, blockMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked") List<EntityItem> items = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x - xMin, y + yOffset - yMin, z - zMin, x + xMax + 1, y + yOffset + yMax + 1, z + zMax + 1));
|
||||
for (int xPos = x - xMin; xPos <= x + xMax; xPos++) {
|
||||
for (int yPos = y + yOffset - yMin; yPos <= y + yOffset + yMax; yPos++) {
|
||||
for (int zPos = z - zMin; zPos <= z + zMax; zPos++) {
|
||||
player.worldObj.getChunkFromBlockCoords(x, z).sendUpdates=true;
|
||||
player.worldObj.getChunkFromBlockCoords(x, z).isModified=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<EntityItem> items = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x - xMin, y + yOffset - yMin, z - zMin, x + xMax + 1, y + yOffset + yMax + 1, z + zMax + 1));
|
||||
for (EntityItem item : items) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
item.setLocationAndAngles(player.posX, player.posY, player.posZ, 0, 0);
|
||||
@@ -192,7 +211,7 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
protected void breakExtraBlock(ItemStack stack, World world, int x, int y, int z, int totalSize, EntityPlayer player, float refStrength, boolean breakSound, Map<Block, Integer> blockMap) {
|
||||
if (world.isAirBlock(x, y, z)) return;
|
||||
|
||||
@@ -243,23 +262,35 @@ public abstract class MiningTool extends ToolBase implements IUpgradableItem {
|
||||
extractEnergy(stack, scaledPower, false);
|
||||
|
||||
if (!world.isRemote) {
|
||||
|
||||
|
||||
block.onBlockHarvested(world, x, y, z, meta, player);
|
||||
|
||||
if (block.removedByPlayer(world, player, x, y, z, true)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
block.harvestBlock(world, player, x, y, z, meta);
|
||||
player.addExhaustion(-0.025F);
|
||||
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0)
|
||||
player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||
}
|
||||
|
||||
|
||||
ArrayList<ItemStack> drops = block.getDrops(world, x, y, z, meta, EnchantmentHelper.getFortuneModifier(player));
|
||||
for (ItemStack is : drops) {
|
||||
if (!player.inventory.addItemStackToInventory(is)) {
|
||||
if (world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots){
|
||||
float f = 0.7F;
|
||||
double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, is);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
player.addExhaustion(-0.025F);
|
||||
if (block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)) > 0)
|
||||
player.addExperience(block.getExpDrop(world, meta, EnchantmentHelper.getFortuneModifier(player)));
|
||||
EntityPlayerMP mpPlayer = (EntityPlayerMP) player;
|
||||
mpPlayer.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world));
|
||||
|
||||
} else {
|
||||
if (breakSound) world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(block) + (meta << 12));
|
||||
if (block.removedByPlayer(world, player, x, y, z, true)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
if (block.removedByPlayer(world, player, x, y, z, false)) {
|
||||
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, x, y, z, Minecraft.getMinecraft().objectMouseOver.sideHit));
|
||||
|
||||
+13
-8
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.tools.baseclasses;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -19,10 +16,14 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 8/01/2015.
|
||||
*/
|
||||
@@ -82,7 +83,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getCapacity(container) - energy, Math.min(getMaxReceive(container), maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -92,9 +92,11 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
if (container.getTagCompound() == null) {
|
||||
container.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(getMaxExtract(container), maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -123,7 +125,6 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -149,10 +150,14 @@ public class RFItemBase extends ItemDE implements IEnergyContainerItem, IConfigu
|
||||
int preset = ItemNBTHelper.getInteger(stack, "ConfigProfile", 0);
|
||||
list.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("info.de.capacitorMode.txt") + ": " + ItemNBTHelper.getString(stack, "ProfileName" + preset, "Profile " + preset));
|
||||
}
|
||||
for (ItemConfigField field : getFields(stack, 0))
|
||||
|
||||
for (ItemConfigField field : getFields(stack, 0)){
|
||||
list.add(field.getTooltipInfo());//list.add(field.getLocalizedName() + ": " + field.getFormattedValue());
|
||||
if (capacity > 0)
|
||||
}
|
||||
|
||||
if (getCapacity(stack) > 0) {
|
||||
list.add(InfoHelper.ITC() + StatCollector.translateToLocal("info.de.charge.txt") + ": " + InfoHelper.HITC() + Utills.formatNumber(getEnergyStored(stack)) + " / " + Utills.formatNumber(capacity));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
-2
@@ -75,7 +75,6 @@ public class ToolBase extends RFItemBase {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setHarvestLevel(String toolClass, int level) {
|
||||
if (toolClass.equals("pickaxe")) blockOverrides.addAll(PICKAXE_OVERRIDES);
|
||||
@@ -234,7 +233,6 @@ public class ToolBase extends RFItemBase {
|
||||
return toolMaterial;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void holdCTRLForUpgrades(List list, ItemStack stack) {
|
||||
if (stack == null || !(stack.getItem() instanceof IUpgradableItem)) return;
|
||||
if (!InfoHelper.isCtrlKeyDown())
|
||||
|
||||
-1
@@ -201,7 +201,6 @@ public class ToolHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unused"})
|
||||
public static void AOEAttack(EntityPlayer player, Entity entity, ItemStack stack, int range) {
|
||||
World world = player.worldObj;
|
||||
AxisAlignedBB box = AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range).expand(1.0D, 1.0D, 1.0D);
|
||||
|
||||
+3
-15
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.weapons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
|
||||
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
|
||||
|
||||
@@ -111,7 +111,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
boolean show = InfoHelper.holdShiftForDetails(list);
|
||||
if (show) {
|
||||
@@ -126,7 +125,6 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -283,13 +281,8 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -299,13 +292,8 @@ public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableI
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
|
||||
+4
-16
@@ -32,7 +32,6 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -88,7 +87,6 @@ public class DraconicSword extends ItemSword implements IEnergyContainerWeaponIt
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
@@ -111,32 +109,22 @@ public class DraconicSword extends ItemSword implements IEnergyContainerWeaponIt
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
+3
-15
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.items.weapons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -36,6 +33,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableItem, IEnergyContainerWeaponItem, IHudDisplayItem {
|
||||
|
||||
public static final String[] bowPullIconNameArray = new String[]{"pulling_0", "pulling_1", "pulling_2"};
|
||||
@@ -122,7 +122,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
boolean show = InfoHelper.holdShiftForDetails(list);
|
||||
if (show) {
|
||||
@@ -137,7 +136,6 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -281,13 +279,8 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
@@ -297,13 +290,8 @@ public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableIte
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
|
||||
+4
-17
@@ -33,7 +33,6 @@ import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -59,7 +58,6 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(ItemNBTHelper.setInteger(new ItemStack(item, 1, 0), "Energy", 0));
|
||||
@@ -91,7 +89,6 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer player, final List list, final boolean extraInformation) {
|
||||
if (InfoHelper.holdShiftForDetails(list)) {
|
||||
@@ -119,32 +116,22 @@ public class WyvernSword extends ItemSword implements IEnergyContainerWeaponItem
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null) {
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyReceived = Math.min(getMaxEnergyStored(container) - energy, Math.min(this.maxReceive, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
energy += energyReceived;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyReceived;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
|
||||
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Energy")) {
|
||||
return 0;
|
||||
}
|
||||
int energy = container.stackTagCompound.getInteger("Energy");
|
||||
int energy = ItemNBTHelper.getInteger(container, "Energy", 0);
|
||||
int energyExtracted = Math.min(energy, Math.min(this.maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
energy -= energyExtracted;
|
||||
container.stackTagCompound.setInteger("Energy", energy);
|
||||
ItemNBTHelper.setInteger(container, "Energy", energy);
|
||||
}
|
||||
return energyExtracted;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,13 @@ package com.brandon3055.draconicevolution.common.lib;
|
||||
* Created by Brandon on 24/02/2015.
|
||||
*/
|
||||
public class VersionHandler {
|
||||
public static final String VERSION = "1.0.2g";
|
||||
public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
|
||||
|
||||
public static final int SNAPSHOT = 0;
|
||||
public static final String MCVERSION = "1.7.10";
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT : "");
|
||||
}
|
||||
|
||||
|
||||
+5
-2
@@ -47,7 +47,9 @@ public class ContributorPacket implements IMessage {
|
||||
ContributorHandler.Contributor contributor1 = ContributorHandler.contributors.get(message.contributor);
|
||||
|
||||
if (ctx.side == Side.SERVER) {
|
||||
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) return null;
|
||||
if (!contributor1.isUserValid(ctx.getServerHandler().playerEntity)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
contributor1.contributorWingsEnabled = message.wings;
|
||||
contributor1.patreonBadgeEnabled = message.badge;
|
||||
@@ -55,8 +57,9 @@ public class ContributorPacket implements IMessage {
|
||||
DraconicEvolution.network.sendToAll(message);
|
||||
} else {
|
||||
EntityPlayer player = BrandonsCore.proxy.getClientPlayer();
|
||||
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName()))
|
||||
if (!contributor1.isUserValid(player) || message.contributor.equals(player.getCommandSenderName())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
contributor1.contributorWingsEnabled = message.wings;
|
||||
contributor1.patreonBadgeEnabled = message.badge;
|
||||
|
||||
-1
@@ -77,7 +77,6 @@ public class TileDissEnchanter extends TileEntity implements ISidedInventory {
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void buttonClick(EntityPlayer player) {
|
||||
if (!isValidRecipe) return;
|
||||
if (player.experienceLevel < dissenchantCost && !player.capabilities.isCreativeMode) return;
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ public class TileDraconiumChest extends TileEntity implements ISidedInventory, I
|
||||
if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + this.xCoord + this.yCoord + this.zCoord) % 200 == 0) {
|
||||
this.numUsingPlayers = 0;
|
||||
float var1 = 5.0F;
|
||||
@SuppressWarnings("unchecked") List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double) ((float) this.xCoord - var1), (double) ((float) this.yCoord - var1), (double) ((float) this.zCoord - var1), (double) ((float) (this.xCoord + 1) + var1), (double) ((float) (this.yCoord + 1) + var1), (double) ((float) (this.zCoord + 1) + var1)));
|
||||
List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double) ((float) this.xCoord - var1), (double) ((float) this.yCoord - var1), (double) ((float) this.zCoord - var1), (double) ((float) (this.xCoord + 1) + var1), (double) ((float) (this.yCoord + 1) + var1), (double) ((float) (this.zCoord + 1) + var1)));
|
||||
|
||||
for (EntityPlayer var4 : var2) {
|
||||
if (var4.openContainer instanceof ContainerDraconiumChest) {
|
||||
|
||||
+5
-5
@@ -1,8 +1,5 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
@@ -32,6 +29,9 @@ import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public class TileGrinder extends TileObjectSync implements ISidedInventory, IEnergyReceiver {
|
||||
//########### variables #############//
|
||||
public int meta = -1;
|
||||
@@ -147,13 +147,13 @@ public class TileGrinder extends TileObjectSync implements ISidedInventory, IEne
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean killNextEntity() {
|
||||
if (worldObj.isRemote) return false;
|
||||
//fakePlayer = null;
|
||||
if (fakePlayer == null) {
|
||||
fakePlayer = FakePlayerFactory.get((WorldServer) worldObj, new GameProfile(UUID.fromString("5b5689b9-e43d-4282-a42a-dc916f3616b7"), "[Draconic-Evolution]"));
|
||||
}
|
||||
if (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword)) {
|
||||
if (BalanceConfigHandler.grinderShouldUseLooting && (fakePlayer.getHeldItem() == null || !ItemStack.areItemStacksEqual(fakePlayer.getHeldItem(), diamondSword))) {
|
||||
fakePlayer.setCurrentItemOrArmor(0, diamondSword);
|
||||
}
|
||||
killBox = AxisAlignedBB.getBoundingBox(centreX - 4.5, centreY - 4.5, centreZ - 4.5, centreX + 4.5, centreY + 4.5, centreZ + 4.5);
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ public class TilePlayerDetectorAdvanced extends TileEntity implements IInventory
|
||||
return b;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked"})
|
||||
private void findEntitys() {
|
||||
double x1 = xCoord + 0.5 - range;
|
||||
double y1 = yCoord + 0.5 - range;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class UpdateChecker {
|
||||
thread.start();
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({"unused"})
|
||||
@SubscribeEvent
|
||||
public void tickStart(TickEvent.PlayerTickEvent event) {
|
||||
if (event.phase != TickEvent.Phase.START) return;
|
||||
@@ -41,13 +41,15 @@ public class UpdateChecker {
|
||||
if (!thread.getVersion().equals(VersionHandler.VERSION) || (VersionHandler.SNAPSHOT > 0 && thread.getSnapshot() == 0)) {
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.LIGHT_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New version available:"));
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Draconic Evolution v" + thread.getVersion()));
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote()))
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote())){
|
||||
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
|
||||
}
|
||||
} else if (thread.getSnapshot() > VersionHandler.SNAPSHOT) {
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "[Draconic Evolution]" + EnumChatFormatting.RESET + " New snapshot version available:"));
|
||||
event.player.addChatComponentMessage(new ChatComponentText(EnumChatFormatting.BLUE + "Draconic Evolution v" + thread.getVersion() + "-snapshot_" + thread.getSnapshot()));
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote()))
|
||||
if (!StringUtils.isNullOrEmpty(thread.getNote())){
|
||||
event.player.addChatComponentMessage(new ChatComponentText(thread.getNote()));
|
||||
}
|
||||
}
|
||||
|
||||
} else if (thread.isFailed()) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
|
||||
/**
|
||||
@@ -12,17 +13,32 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||
*/
|
||||
public class ModHelper {
|
||||
|
||||
public static boolean isTConInstalled;
|
||||
public static boolean isAvaritiaInstalled;
|
||||
public static boolean isRotaryCraftInstalled;
|
||||
private static boolean isTConInstalled;
|
||||
private static boolean isAvaritiaInstalled;
|
||||
//private static boolean isRotaryCraftInstalled;
|
||||
private static boolean isGregTechInstalled;
|
||||
|
||||
private static Item cleaver;
|
||||
private static Item avaritiaSword;
|
||||
private static Item bedrockSword;
|
||||
//private static Item bedrockSword;
|
||||
|
||||
public static void init() {
|
||||
private static Class bwores;
|
||||
private static Class GTores;
|
||||
|
||||
static {
|
||||
isTConInstalled = Loader.isModLoaded("TConstruct");
|
||||
isAvaritiaInstalled = Loader.isModLoaded("Avaritia");
|
||||
isRotaryCraftInstalled = Loader.isModLoaded("RotaryCraft");
|
||||
//isRotaryCraftInstalled = Loader.isModLoaded("RotaryCraft");
|
||||
isGregTechInstalled = Loader.isModLoaded("gregtech");
|
||||
|
||||
if (isGregTechInstalled)
|
||||
try {
|
||||
GTores = Class.forName("gregtech.common.blocks.GT_TileEntity_Ores");
|
||||
} catch (ClassNotFoundException e) {}
|
||||
if (Loader.isModLoaded("bartworks"))
|
||||
try {
|
||||
bwores = Class.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGeneratedOreTE");
|
||||
} catch (ClassNotFoundException e) {}
|
||||
}
|
||||
|
||||
public static boolean isHoldingCleaver(EntityPlayer player) {
|
||||
@@ -39,12 +55,12 @@ public class ModHelper {
|
||||
return avaritiaSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(avaritiaSword);
|
||||
}
|
||||
|
||||
public static boolean isHoldingBedrockSword(EntityPlayer player) {
|
||||
if (!isRotaryCraftInstalled) return false;
|
||||
else if (bedrockSword == null) bedrockSword = GameRegistry.findItem("RotaryCraft", "rotarycraft_item_bedsword");
|
||||
|
||||
return bedrockSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(bedrockSword);
|
||||
}
|
||||
// public static boolean isHoldingBedrockSword(EntityPlayer player) {
|
||||
// if (!isRotaryCraftInstalled) return false;
|
||||
// else if (bedrockSword == null) bedrockSword = GameRegistry.findItem("RotaryCraft", "rotarycraft_item_bedsword");
|
||||
//
|
||||
// return bedrockSword != null && player.getHeldItem() != null && player.getHeldItem().getItem().equals(bedrockSword);
|
||||
// }
|
||||
|
||||
public static float applyModDamageAdjustments(ArmorSummery summery, LivingAttackEvent event) {
|
||||
if (summery == null) return event.ammount;
|
||||
@@ -57,15 +73,17 @@ public class ModHelper {
|
||||
if (isHoldingAvaritiaSword(attacker)) {
|
||||
event.entityLiving.hurtResistantTime = 0;
|
||||
return 300F;
|
||||
} else if (isHoldingBedrockSword(attacker)) {
|
||||
summery.entropy += 10;
|
||||
|
||||
if (summery.entropy > 100) {
|
||||
summery.entropy = 100;
|
||||
}
|
||||
|
||||
return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
|
||||
} else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
}
|
||||
// else if (isHoldingBedrockSword(attacker)) {
|
||||
// summery.entropy += 10;
|
||||
//
|
||||
// if (summery.entropy > 100) {
|
||||
// summery.entropy = 100;
|
||||
// }
|
||||
//
|
||||
// return Math.max(event.ammount, Math.min(50F, summery.protectionPoints));
|
||||
// }
|
||||
else if (event.source.isUnblockable() || event.source.canHarmInCreative()) {
|
||||
summery.entropy += 3;
|
||||
|
||||
if (summery.entropy > 100) {
|
||||
@@ -78,4 +96,8 @@ public class ModHelper {
|
||||
return event.ammount;
|
||||
}
|
||||
|
||||
public static boolean isGregTechTileEntityOre(TileEntity te) {
|
||||
return isGregTechInstalled && GTores.isInstance(te) || isGregTechInstalled && Loader.isModLoaded("bartworks") && bwores.isInstance(te);
|
||||
}
|
||||
|
||||
}
|
||||
-4
@@ -61,7 +61,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
if (quantity != 0) moveIngredients(gui, assignedIngredients, quantity);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean clearIngredients(GuiContainer gui, List<PositionedStack> ingreds) {
|
||||
int offsetx = getOffsetX(gui);
|
||||
int offsety = getOffsetY(gui);
|
||||
@@ -77,7 +76,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void moveIngredients(GuiContainer gui, List<IngredientDistribution> assignedIngredients, int quantity) {
|
||||
for (IngredientDistribution distrib : assignedIngredients) {
|
||||
ItemStack pstack = distrib.permutation;
|
||||
@@ -212,7 +210,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return assignedIngredients;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void findInventoryQuantities(GuiContainer gui, List<DistributedIngred> ingredStacks) {
|
||||
for (Slot slot : (List<Slot>) gui.inventorySlots.inventorySlots)//work out how much we have to go round
|
||||
{
|
||||
@@ -241,7 +238,6 @@ public class CraftingChestOverlayHandler implements IOverlayHandler {
|
||||
return slot.inventory instanceof InventoryPlayer || slot.inventory instanceof TileDraconiumChest;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Slot[][] mapIngredSlots(GuiContainer gui, List<PositionedStack> ingredients) {
|
||||
int offsetx = getOffsetX(gui);
|
||||
int offsety = getOffsetY(gui);
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package invtweaks.api.container;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting
|
||||
* buttons for this container.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface ChestContainer {
|
||||
// Size of a chest row
|
||||
int rowSize() default 9;
|
||||
|
||||
// Uses 'large chest' mode for sorting buttons
|
||||
// (Renders buttons vertically down the right side of the GUI)
|
||||
boolean isLargeChest() default false;
|
||||
|
||||
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
|
||||
// Signature int func()
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface RowSizeCallback {
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
//Description format \n=Force new line \% at start of line=add half line space above line
|
||||
//Tile Information ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
tile.draconicevolution:xRayBlock.name=透视方块
|
||||
tile.draconicevolution:sunDial.name=日晷
|
||||
@@ -16,6 +15,7 @@ tile.draconicevolution:longRangeDislocator1.name=创造错位宝石
|
||||
tile.draconicevolution:longRangeDislocator0.name=长距离错位宝石
|
||||
tile.draconicevolution:generator.name=发电机
|
||||
tile.draconicevolution:energyStorageCore.name=能量核心
|
||||
tile.draconicevolution:invisibleMultiblock.name=能量核心(隐藏)
|
||||
tile.draconicevolution:energyPylon.name=能量塔
|
||||
tile.draconicevolution:draconium0.name=龙块
|
||||
tile.draconicevolution:draconium1.name=复活石
|
||||
@@ -35,6 +35,7 @@ tile.draconicevolution:reactorStabilizer.name=反应堆稳定器
|
||||
tile.draconicevolution:reactorEnergyInjector.name=反应堆能量喷射器
|
||||
tile.draconicevolution:chaosCrystal.name=混沌晶体
|
||||
tile.draconicevolution:upgradeModifier.name=升级调整器
|
||||
|
||||
tile.draconicevolution:energyCrystal0.name=能量中继器
|
||||
tile.draconicevolution:energyCrystal1.name=高级能量中继器
|
||||
tile.draconicevolution:energyCrystal2.name=能量收发器
|
||||
@@ -130,25 +131,25 @@ msg.teleporterBound.txt=§a传送器绑定到:
|
||||
msg.teleporterLowHealth.txt= 你生命值低
|
||||
msg.teleporterSentMob.txt=实体已被送到
|
||||
msg.teleporterEntityDimensional.txt=§c你不能把生物跨纬度传送!
|
||||
msg.teleporterAlreadySet.txt=§cError传送石只能被绑定到一个位置
|
||||
msg.teleporterAlreadySet.txt=§c[错误]传送石只能被绑定到一个位置!
|
||||
msg.teleporterOutOfFuel.txt=§c燃料耗尽! ! !
|
||||
msg.teleporterOutOfPearls.txt=§c末影珍珠耗尽! ! !
|
||||
msg.teleporterPlayerT1.txt=你需要一个更强大的错位宝石
|
||||
msg.teleporterPlayerConsent.txt=玩家必须用潜行Shift同意他们
|
||||
msg.teleporterPlayerConsent.txt=玩家必须用潜行(Shift)同意他们
|
||||
msg.spawnerInfo1.txt=生物类型
|
||||
msg.spawnerInfo2.txt=需要玩家
|
||||
msg.spawnerInfo3.txt=忽视生成条件
|
||||
msg.spawnerInfo4.txt=刷怪笼等级
|
||||
msg.spawnerInfo5.txt=按住Shift键查看升级信息
|
||||
msg.spawnerInfo6.txt=需要物品:§3下届之星
|
||||
msg.spawnerInfo7.txt=需要物品:§3Notch的苹果
|
||||
msg.spawnerInfo6.txt=需要物品:§3下界之星
|
||||
msg.spawnerInfo7.txt=需要物品:§3附魔金苹果
|
||||
msg.spawnerInfo8.txt=需要物品:§3双足飞龙核心
|
||||
msg.spawnerInfo9.txt=需要物品:§3觉醒核心
|
||||
msg.dislocatorUnsafe.txt=目的地不安全,请再试一次
|
||||
msg.dislocatorNoGround.txt=错误,世界无法找到
|
||||
msg.range.txt=范围:
|
||||
msg.energyStorageCoreUTA.txt=无法激活(无效的配置)
|
||||
msg.SpawnDragonToFarFrom00.txt=(错误)从0,0
|
||||
msg.SpawnDragonToFarFrom00.txt=(错误)离0,0太远了
|
||||
msg.SpawnDragonMustBeInTheEnd.txt=你必须在末地进行这个仪式!
|
||||
msg.wrongKey.txt=这把钥匙不符合这把锁
|
||||
msg.cKeyStoneType0.txt=永久激活(消耗钥匙)
|
||||
@@ -166,7 +167,7 @@ msg.draconiumChestEditL4.txt=使用纸右键龙箱复制颜色到其他龙箱
|
||||
msg.draconiumChestEdit2.txt=请使用一张纸
|
||||
msg.de.dragonDeath.txt=§5龙心被龙死亡所引起的爆炸暂时唤醒了
|
||||
msg.de.baseSafeAOW.txt=§9(§a安全的§a范围§a挖掘§a模式§a已开启§9)§操作§c取消§c因为§c检测§c到§c一个§实体
|
||||
§cdetectedmsg.de.guardianAttackBlocked.txt =你的攻击被守护者水晶屏蔽了!
|
||||
msg.de.guardianAttackBlocked.txt=你的攻击被混沌水晶所阻挡!
|
||||
msg.de.shieldDepleted.txt=警告!强大的打击!
|
||||
msg.de.shockWaveForEnergyBoltsOnly.txt=冲击波只能由龙火之矢发出
|
||||
msg.de.explosiveNotForEnergyBolts.txt=爆炸不能由龙火之矢发出
|
||||
@@ -276,7 +277,7 @@ info.de.shiftRightClickToActivate.txt=Shift + 右键来激活
|
||||
info.de.blockRange.txt=方块范围
|
||||
|
||||
info.de.manual.nav1.txt=导航提示
|
||||
info.de.manual.nav2.txt=按退格键Backspace回到上一页
|
||||
info.de.manual.nav2.txt=按退格键(Backspace)回到上一页
|
||||
info.de.manual.nav3.txt=按住Shift快速浏览
|
||||
|
||||
//Energy Net
|
||||
@@ -354,11 +355,11 @@ achievement.draconicevolution.dleggs.desc=造一条龙之护腿
|
||||
achievement.draconicevolution.dboots=越来越高!
|
||||
achievement.draconicevolution.dboots.desc=升级到龙之靴。
|
||||
|
||||
achievement.draconicevolution.dpick=有权力的我!
|
||||
achievement.draconicevolution.dpick=我即是权威!
|
||||
achievement.draconicevolution.dpick.desc=造一把龙之镐
|
||||
achievement.draconicevolution.dshovel=移动山脉
|
||||
achievement.draconicevolution.dshovel.desc=升级双足飞龙铲
|
||||
achievement.draconicevolution.daxe=科学的砍树!
|
||||
achievement.draconicevolution.daxe=科学地砍树!
|
||||
achievement.draconicevolution.daxe.desc=造一个龙之斧
|
||||
achievement.draconicevolution.dsword=像蜜蜂一样刺!
|
||||
achievement.draconicevolution.dsword.desc=升级到龙之剑
|
||||
@@ -368,6 +369,7 @@ achievement.draconicevolution.flux2=无可披靡的宇宙力量啊!细碎的生
|
||||
achievement.draconicevolution.flux2.desc=造出龙之通量电容器
|
||||
achievement.draconicevolution.dhoe=把它踢上去!
|
||||
achievement.draconicevolution.dhoe.desc=创造龙之锄
|
||||
|
||||
achievement.draconicevolution.dstaff=与你的力量结合起来!
|
||||
achievement.draconicevolution.dstaff.desc=创造一把龙权之杖
|
||||
|
||||
@@ -377,6 +379,7 @@ achievement.draconicevolution.sundial=计时员
|
||||
achievement.draconicevolution.sundial.desc=造出日晷仪,控制昼夜
|
||||
achievement.draconicevolution.manual=智慧已经满了!
|
||||
achievement.draconicevolution.manual.desc=创造龙之研究信息板
|
||||
|
||||
//InfoHelper ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
info.de.charge.txt=充能
|
||||
info.de.hold.txt=按住
|
||||
@@ -386,7 +389,6 @@ info.de.ctrl.txt=CTRL
|
||||
info.de.forUpgrades.txt=查看有关属性
|
||||
info.de.useUpgradeModifier.txt=用升级调整器加强那些属性!
|
||||
|
||||
|
||||
//Lore ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
item.draconicevolution:wyvernPickaxe.lore=普通的镐子太菜了,使用龙力,你能增加开采面积和开采速度
|
||||
item.draconicevolution:wyvernShovel.lore=一次一个方块?不是龙力的风格!更快,面积更大,这只是一个开始!
|
||||
@@ -397,12 +399,14 @@ item.draconicevolution:wyvernHelm.lore=比钻石更强大,现在可以承受
|
||||
item.draconicevolution:wyvernChest.lore=用龙力注入的钻石盔甲,大大增强了防御力
|
||||
item.draconicevolution:wyvernLeggs.lore=钻石护腿也注入了龙力,你现在感到更强更快
|
||||
item.draconicevolution:wyvernBoots.lore=你改善了靴子,它似乎让你更加敏捷
|
||||
|
||||
item.draconicevolution:draconicPickaxe.lore=细心的研究,让你可以挖更大的区域
|
||||
item.draconicevolution:draconicAxe.lore=在大量的试验和错误中,你现在可以一下子砍下一整棵树
|
||||
item.draconicevolution:draconicShovel.lore=更好的效率,你现在可以挖更大的区域
|
||||
item.draconicevolution:draconicHoe.lore=龙力甚至能改善农业,只需点一下整个农田就能耕好
|
||||
item.draconicevolution:draconicSword.lore=双足飞龙是不错,但龙力武器攻击力更加强大,能击杀更多的敌人
|
||||
item.draconicevolution:draconicBow.lore=完美的距离,更快的射击频率,爆炸性的箭头,堪比机枪,你还有什么想要的吗?
|
||||
|
||||
item.draconicevolution:draconicHelm.lore=麻麻我再也不怕黑夜啦,你现在无论什么时候都看得见了
|
||||
item.draconicevolution:draconicChest.lore=龙心使得你更强大,拥有了飞行的能力
|
||||
item.draconicevolution:draconicLeggs.lore=更强的装备,龙力灵魂保护着你,使你跑得更快
|
||||
@@ -414,22 +418,26 @@ item.draconicevolution:draconicDistructionStaff.lore=通过一条又长又艰苦
|
||||
entity.DraconicEvolution.EnderDragon.name=上古末影龙
|
||||
entity.DraconicEvolution.ChaosGuardian.name=混沌守卫
|
||||
|
||||
|
||||
//KeyBinding ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
key.placeItem=把物品放置到世界里
|
||||
key.toolConfig=工具和装甲配置 GUI
|
||||
key.toolProfileChange=更改工具配置
|
||||
key.toggleFlight=切换创造飞行模式
|
||||
|
||||
//Damage ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
death.attack.chaos=被混沌守卫撕裂
|
||||
death.attack.damage.de.fusionExplode=被爆发的高能量融合物蒸发
|
||||
death.attack.chaosBurst=被暗能量毁灭
|
||||
|
||||
death.attack.de.GuardianFireball=被混沌守卫燃烧炸死
|
||||
death.attack.de.GuardianEnergyBall=像一只小虫子一样被混沌守卫击溃
|
||||
death.attack.de.GuardianChaosBall=被混沌守卫的暗能量覆灭
|
||||
|
||||
death.attack.chaosImplosion=被拉进一个能量漩涡,被永远的遗忘
|
||||
death.attack.chrystalMoved=太顽皮而被龙息惩罚
|
||||
death.attack.administrative.kill=%1$s 被不可阻止的力量打倒了
|
||||
|
||||
death.attack.administrative.kill=%1$s 被不可阻止的力量打倒了
|
||||
|
||||
//Buttons ----------------------------------------------------------------------------------------------------------------------------------------
|
||||
button.de.chestAutoFeed0.txt=关闭.关闭自动补充燃料
|
||||
@@ -473,6 +481,8 @@ button.de.BaseSafeAOE.name=范围挖掘安全模式
|
||||
button.de.VerticalAcceleration.name=垂直加速度
|
||||
button.de.EffectiveOnSprint.name=有效的冲刺
|
||||
button.de.GogglesOfRevealing.name=神奇的感觉
|
||||
button.de.ApiaristArmor.name=养蜂人护甲
|
||||
button.de.NaturalistArmor.name=自然科学家视角
|
||||
button.de.BowArrowSpeedModifier.name=弓箭速率调整器
|
||||
button.de.BowAutoFire.name=自动开火
|
||||
button.de.BowArrowDamage.name=基本伤害
|
||||
@@ -585,4 +595,6 @@ potion.de.flight.txt=飞行
|
||||
potion.de.highStep.txt=自动跳跃
|
||||
potion.de.swiftness.txt=速度
|
||||
potion.de.fireImmune.txt=抗火
|
||||
potion.de.jumpBoost.txt=跳跃提升
|
||||
potion.de.jumpBoost.txt=跳跃提升
|
||||
|
||||
item.draconicevolution:draconicAxe.lore=2经过多次尝试与失败后\n你现在可以一下就砍倒一整棵树
|
||||
File diff suppressed because it is too large.
Load diff
File renamed without changes.
File renamed without changes.
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user