Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c5c51e6fa | ||
|
|
37379acd3d | ||
|
|
3f62d4b8fe | ||
|
|
2257f1648c | ||
|
|
cefdfd7ca6 | ||
|
|
c802a448e4 | ||
|
|
daae5de075 | ||
|
|
abd62c1076 | ||
|
|
8e709b0190 | ||
|
|
a16181c480 | ||
|
|
9f9c413b48 | ||
|
|
31eb7b3516 | ||
|
|
d213b7bf0a | ||
|
|
c168882a48 | ||
|
|
073ae658b5 | ||
|
|
0e88bd8a9c | ||
|
|
9d1709dd74 | ||
|
|
ffdce1834c | ||
|
|
3fa2240e61 | ||
|
|
ec99a884b6 | ||
|
|
944aec7441 | ||
|
|
9d677e7734 | ||
|
|
0852f91ba7 | ||
|
|
38845602a9 | ||
|
|
4878e88fce | ||
|
|
fa850857e8 | ||
|
|
e0a0b1ec53 | ||
|
|
d42076af69 | ||
|
|
610dad28b7 | ||
|
|
eb767ebeaa | ||
|
|
1516aa495e | ||
|
|
bba06bcf46 | ||
|
|
d407ca2c31 | ||
|
|
c0daedcbd8 | ||
|
|
4ee06de9f0 | ||
|
|
506f2200ef | ||
|
|
98860ee317 | ||
|
|
5ca552ce88 | ||
|
|
db1ad3a768 | ||
|
|
c047644908 | ||
|
|
33be87e896 | ||
|
|
7c42710a1a | ||
|
|
e4b5b2c2ff | ||
|
|
8350bd9dc7 | ||
|
|
5dc4882038 | ||
|
|
9404223f53 | ||
|
|
9157df8e3b | ||
|
|
143b8286d8 | ||
|
|
825758d639 | ||
|
|
f4f7485a12 | ||
|
|
a0d7b4dde8 | ||
|
|
d3f4b99d23 | ||
|
|
96521a399b | ||
|
|
c5ceef1a78 | ||
|
|
c72988e435 | ||
|
|
26a8bd6a26 | ||
|
|
23e4f6760d | ||
|
|
72da2272d1 | ||
|
|
36deb60855 | ||
|
|
c387a30be8 | ||
|
|
bcf96ed130 | ||
|
|
7b767d52c5 | ||
|
|
e812d33caf | ||
|
|
a0ba2f2d6a | ||
|
|
10f4e05d37 | ||
|
|
2b586edcf2 | ||
|
|
36dfeea862 | ||
|
|
e8fb04df37 | ||
|
|
f5a21fe41e | ||
|
|
5b81cbe85e | ||
|
|
af57a9fa05 | ||
|
|
f323fe2ac0 | ||
|
|
903619e38c | ||
|
|
7f838cd24c | ||
|
|
512aa4eddb | ||
|
|
13d5384687 | ||
|
|
909cc503c5 | ||
|
|
12f260d494 | ||
|
|
0872239905 | ||
|
|
54508ae852 | ||
|
|
952f9b89ab | ||
|
|
67b44ca6f8 | ||
|
|
ff36cef1f2 | ||
|
|
d5c4e9217b | ||
|
|
6610499e7c | ||
|
|
ebcca54ad4 | ||
|
|
89237f644a | ||
|
|
052041f846 | ||
|
|
8f1d0abbeb | ||
|
|
d179ee57e9 | ||
|
|
1e2c85f898 | ||
|
|
f1900cd9b3 | ||
|
|
398af04ea5 | ||
|
|
d5beca8e52 | ||
|
|
db3e5b6388 | ||
|
|
177cb6af04 | ||
|
|
0c89751e53 | ||
|
|
98cb2bb68c | ||
|
|
7d615a0ceb | ||
|
|
d2be71b4e3 | ||
|
|
d03a0c697c | ||
|
|
e8da80454b | ||
|
|
272075dd51 | ||
|
|
56bd18670f | ||
|
|
29f0c6af40 | ||
|
|
5ed33dfa4f | ||
|
|
7a74dabcea | ||
|
|
68518a7858 | ||
|
|
f83cd1ab0b | ||
|
|
5595d0377c | ||
|
|
6c4d37a345 | ||
|
|
77e14f3c8a | ||
|
|
71e00772b7 | ||
|
|
cf60696c68 | ||
|
|
d24f3facfe | ||
|
|
5cdf19daac | ||
|
|
93e6a1f7ba | ||
|
|
1039b52854 | ||
|
|
33a26a5059 | ||
|
|
5ba45cb86d | ||
|
|
2f47326c7f | ||
|
|
876b18328d | ||
|
|
391406e1de | ||
|
|
dfaa6dde5a | ||
|
|
c14b5d4ddb | ||
|
|
c90e492a66 | ||
|
|
8a5fa6c441 | ||
|
|
3caf8954ad | ||
|
|
09ccf50fde | ||
|
|
54f79398b1 | ||
|
|
84e758e450 | ||
|
|
751640ccec | ||
|
|
4013121abf | ||
|
|
9be15c8ecd | ||
|
|
0c87c31d1d | ||
|
|
b25ef783b3 | ||
|
|
b2b13d9328 | ||
|
|
9e0c82ce36 | ||
|
|
b002bbdd44 | ||
|
|
d33b0cc836 | ||
|
|
5d5277c50b | ||
|
|
a3345d26d3 | ||
|
|
6dce0d9e7b | ||
|
|
6826c25e30 | ||
|
|
528a9a4010 | ||
|
|
c6f94fabc9 | ||
|
|
443aa9733b | ||
|
|
9bf784e82c | ||
|
|
21ce111286 | ||
|
|
19a4028e94 | ||
|
|
ef026803d4 | ||
|
|
a5e1140a2b | ||
|
|
8648533ca9 | ||
|
|
d9042019e5 | ||
|
|
538256cc45 | ||
|
|
8b85a621e1 | ||
|
|
12de9b630d | ||
|
|
7102cc427f | ||
|
|
27053bfeab | ||
|
|
da9019451b | ||
|
|
b8f7f4ee03 | ||
|
|
fe754d3733 | ||
|
|
8c685b42bc | ||
|
|
a7fb7e7b7d | ||
|
|
c0b8fffc40 | ||
|
|
208c74d877 | ||
|
|
74f0f48fd7 | ||
|
|
548ddfff1f | ||
|
|
c60e696f13 | ||
|
|
6a9362fa5e | ||
|
|
ba438bf6bd | ||
|
|
bd2be73856 | ||
|
|
3527358443 | ||
|
|
0ef2be2398 | ||
|
|
fcab91f992 | ||
|
|
6e13ea3fd8 | ||
|
|
8a84eb32e4 | ||
|
|
accc2ecbb5 | ||
|
|
ade0ef263b | ||
|
|
c0136f3078 | ||
|
|
f348b53fb7 | ||
|
|
dfe4d1e849 | ||
|
|
eb37715da2 | ||
|
|
86793652a1 | ||
|
|
980f854518 | ||
|
|
82cf90ce4c | ||
|
|
5495271fa2 | ||
|
|
588a02f385 | ||
|
|
da11e497fc | ||
|
|
3fb76acf57 | ||
|
|
2471642df7 |
No files matched your search
@@ -0,0 +1,44 @@
|
||||
* text eol=lf
|
||||
|
||||
*.[jJ][aA][rR] binary
|
||||
|
||||
*.[pP][nN][gG] binary
|
||||
*.[jJ][pP][gG] binary
|
||||
*.[jJ][pP][eE][gG] binary
|
||||
*.[gG][iI][fF] binary
|
||||
*.[tT][iI][fF] binary
|
||||
*.[tT][iI][fF][fF] binary
|
||||
*.[iI][cC][oO] binary
|
||||
*.[sS][vV][gG] text
|
||||
*.[eE][pP][sS] binary
|
||||
*.[xX][cC][fF] binary
|
||||
|
||||
*.[kK][aA][rR] binary
|
||||
*.[mM]4[aA] binary
|
||||
*.[mM][iI][dD] binary
|
||||
*.[mM][iI][dD][iI] binary
|
||||
*.[mM][pP]3 binary
|
||||
*.[oO][gG][gG] binary
|
||||
*.[rR][aA] binary
|
||||
|
||||
*.7[zZ] binary
|
||||
*.[gG][zZ] binary
|
||||
*.[tT][aA][rR] binary
|
||||
*.[tT][gG][zZ] binary
|
||||
*.[zZ][iI][pP] binary
|
||||
|
||||
*.[tT][cC][nN] binary
|
||||
*.[sS][oO] binary
|
||||
*.[dD][lL][lL] binary
|
||||
*.[dD][yY][lL][iI][bB] binary
|
||||
*.[pP][sS][dD] binary
|
||||
*.[tT][tT][fF] binary
|
||||
*.[oO][tT][fF] binary
|
||||
|
||||
*.[pP][aA][tT][cC][hH] -text
|
||||
|
||||
*.[bB][aA][tT] text eol=crlf
|
||||
*.[cC][mM][dD] text eol=crlf
|
||||
*.[pP][sS]1 text eol=crlf
|
||||
|
||||
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
|
||||
@@ -0,0 +1,62 @@
|
||||
name: Report Bug
|
||||
description: "Report a bug."
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "A bug/crash report with sufficient information and logs to reproduce and track down."
|
||||
- type: input
|
||||
id: discord
|
||||
attributes:
|
||||
label: Your GTNH Discord Username
|
||||
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
|
||||
placeholder: "Example: Fake#1234"
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Mod Version
|
||||
description: "What version of the Mod are you using?"
|
||||
placeholder: "Example: 1.0.0"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: report
|
||||
attributes:
|
||||
label: Bug Report
|
||||
description: "Relevant information, as well as relevant logs attached such as `logs/fml-client-latest.log."
|
||||
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: java
|
||||
attributes:
|
||||
label: Java Version
|
||||
description: What Java version are you using? It's worth mentioning that if you play on Java9+ you should try update to latest minor release (e.g. prefer Java 17.0.6 over 17.0.2) of that version.
|
||||
options:
|
||||
- Java 8
|
||||
- Java 9
|
||||
- Java 11
|
||||
- Java 17
|
||||
- Java 19
|
||||
- Java 20
|
||||
- Java 21
|
||||
- Other (Please Specify)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: modlist
|
||||
attributes:
|
||||
label: Mod List or GTNH Pack Version
|
||||
description: "List of mods, ideally a minimal reproducible set (can be retrieved from latest.log). If using GTNH please indicate pack version and any changed mods, not the entire modlist."
|
||||
placeholder: "List of mods or GTNH Pack version goes here"
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: final
|
||||
attributes:
|
||||
label: Final Checklist
|
||||
description: Certify that you read things
|
||||
options:
|
||||
- label: "I have searched the issues and haven't found a similar issue."
|
||||
required: true
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
name: Feature Request
|
||||
description: "Request a feature."
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Please use this form to request features. We ask you check if it was already requested though"
|
||||
- type: input
|
||||
id: discord
|
||||
attributes:
|
||||
label: Your GTNH Discord Username
|
||||
description: Leave empty if you don't have one, but this will make it harder to contact you if we need additional info.
|
||||
placeholder: "Example: Wumpus#1234"
|
||||
- type: textarea
|
||||
id: request
|
||||
attributes:
|
||||
label: Feature Request
|
||||
description: "Relevant information, as well as relevant images"
|
||||
placeholder: "Example: https://mclo.gs/ OR submit the file to github by dragging it to this textbox."
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: final
|
||||
attributes:
|
||||
label: Final Checklist
|
||||
description: Certify that you read things
|
||||
options:
|
||||
- label: "I have searched the issues and haven't found a similar issue."
|
||||
required: true
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
name: Release tagged build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ '*' ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release-tags:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
|
||||
secrets: inherit
|
||||
@@ -1,61 +1,38 @@
|
||||
## Windows
|
||||
Thumbs.db
|
||||
|
||||
## gradle
|
||||
/.gradle
|
||||
/build
|
||||
|
||||
## ForgeGradle
|
||||
/run
|
||||
|
||||
## eclipse
|
||||
/.settings
|
||||
/.metadata
|
||||
/.classpath
|
||||
/.project
|
||||
/eclipse
|
||||
/bin
|
||||
|
||||
## intellij
|
||||
/out
|
||||
/.idea
|
||||
/atlassian-ide-plugin.xml
|
||||
/*.ipr
|
||||
/*.iws
|
||||
/*.iml
|
||||
|
||||
## Private Stuffs
|
||||
/private.properties
|
||||
|
||||
## Jars
|
||||
*.jar
|
||||
!/gradle/wrapper/gradle-wrapper.jar
|
||||
!GardenOfGlass.jar
|
||||
|
||||
### OSX (adds a lot of garbage)###
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
.gradle
|
||||
.settings
|
||||
/.idea/
|
||||
/.vscode/
|
||||
/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
|
||||
.factorypath
|
||||
addon.local.gradle
|
||||
addon.local.gradle.kts
|
||||
addon.late.local.gradle
|
||||
addon.late.local.gradle.kts
|
||||
layout.json
|
||||
@@ -0,0 +1,3 @@
|
||||
# Any Github changes require admin approval
|
||||
/.github/** @GTNewHorizons/admin
|
||||
|
||||
@@ -1,18 +1,3 @@
|
||||
README:
|
||||
|
||||
This is williewillus' port and continuation of Botania for Minecraft versions 1.8.x and above
|
||||
|
||||
All licensing and distribution rights are exactly as 1.7.10 Botania.
|
||||
|
||||
Use at your own risk as bugs may pop up unexpectedly.
|
||||
|
||||
As of 2016 02 25, Vazkii has stopped working on Botania. Requests for design changes will still not be accepted here (post them on reddit). Even then, don't expect anything to be added without severe deliberation scrutiny.
|
||||
|
||||
Please report all 1.8+ issues to this repository.
|
||||
|
||||
These non-CurseForge builds can be openly used in modpacks of any kind, in accordance with the requirements of the license of this mod.
|
||||
|
||||
|
||||

|
||||
Welcome to the Botania repository.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 332 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 387 B |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 297 B |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 1,
|
||||
"description": "Alternate Botania textures by Futureazoo"
|
||||
}
|
||||
}
|
||||
@@ -1,237 +1,5 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
|
||||
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
|
||||
}
|
||||
//version: 1707058017
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhconvention'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "chickenbones"
|
||||
url = "http://chickenbones.net/maven/"
|
||||
}
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'com.matthewprenger.cursegradle'
|
||||
|
||||
ext.configFile = file('build.properties')
|
||||
|
||||
ext.config = parseConfig(configFile)
|
||||
ext.priv = parseConfig(file('private.properties'))
|
||||
|
||||
version = "${config.version}-${config.build_number}"
|
||||
group = "vazkii.botania" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = config.mod_name
|
||||
|
||||
minecraft {
|
||||
version = "${config.mc_version}-${config.forge_version}"
|
||||
runDir = "eclipse/assets"
|
||||
|
||||
mappings = "snapshot_20160402"
|
||||
//This, does the token replacement.
|
||||
//Though, I reccomend this to be replaced with a token such as @VERSION@
|
||||
replace 'GRADLE:BUILD', config.build_number
|
||||
replace 'GRADLE:VERSION', config.version
|
||||
|
||||
replaceIn 'LibMisc.java' //I may have missed another file, though I can only find it in here.
|
||||
useDepAts = true
|
||||
}
|
||||
|
||||
//This here is for SCP
|
||||
configurations {
|
||||
sshAntTask
|
||||
}
|
||||
|
||||
//End of the SCP config
|
||||
|
||||
dependencies {
|
||||
compile files(
|
||||
'Baubles-deobf.jar'
|
||||
)
|
||||
//compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
|
||||
//compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
|
||||
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
|
||||
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"
|
||||
deobfCompile "mezz.jei:jei_1.9:3.2.3.176"
|
||||
|
||||
//and a bit more for SCP
|
||||
sshAntTask "org.apache.ant:ant-jsch:1.7.1", "jsch:jsch:0.1.29"
|
||||
}
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info', '**/psd/**'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* These, go outside of the processResources {}* Though, this was added with the NEI intergation commit (8bf4680)
|
||||
*/
|
||||
task deobfJar(type: Jar) {
|
||||
from(sourceSets.main.output)
|
||||
archiveName = "${baseName}.${version}-deobf.${extension}"
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives deobfJar
|
||||
}
|
||||
/**
|
||||
* Increments the buildnumber in your config file, and saves it
|
||||
*/
|
||||
task incrementBuildNumber(dependsOn: 'reobfJar') << {
|
||||
config.build_number = (config.build_number.toString().toInteger()) + 1
|
||||
configFile.withWriter {
|
||||
config.toProperties().store(it, "")
|
||||
}
|
||||
|
||||
file('web/versions.ini').append("\n${version}=${minecraft.version}")
|
||||
file("${config.dir_repo}/version/${minecraft.version}.txt").write("${version}")
|
||||
}
|
||||
|
||||
// I have no idea what I'm doing
|
||||
task wtfGradle2(type: Copy) {
|
||||
from(jar.destinationDir)
|
||||
into file("${config.dir_output}/wtf")
|
||||
}
|
||||
|
||||
// Seriously, I'm desperate to make this work
|
||||
task wtfGradle1(type: Delete) {
|
||||
dependsOn "wtfGradle2"
|
||||
delete "${config.dir_output}/wtf/${deobfJar.archiveName}"
|
||||
}
|
||||
|
||||
task output(type: Copy) {
|
||||
dependsOn "wtfGradle1"
|
||||
from(jar.destinationDir)
|
||||
into file(config.dir_output)
|
||||
}
|
||||
|
||||
task outputDeobf(type: Copy) {
|
||||
dependsOn "output"
|
||||
from(config.dir_output) {
|
||||
include deobfJar.archiveName
|
||||
}
|
||||
into file("${config.dir_output}/deobf")
|
||||
}
|
||||
|
||||
task forgecraft(type: Copy) {
|
||||
dependsOn "outputDeobf"
|
||||
from "${config.dir_output}/wtf"
|
||||
into file(priv.dir_forgecraft)
|
||||
}
|
||||
|
||||
task sort(type: Delete) {
|
||||
dependsOn "forgecraft"
|
||||
delete "${config.dir_output}/${deobfJar.archiveName}", "${config.dir_output}/wtf"
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the upload task from the build.xml
|
||||
*/
|
||||
task upload() << {
|
||||
scp('/files') {
|
||||
fileset(file: jar.archivePath)
|
||||
}
|
||||
|
||||
scp('/files/deobf') {
|
||||
fileset(file: deobfJar.archivePath)
|
||||
}
|
||||
|
||||
scp('/') {
|
||||
fileset(file: 'web/changelog.txt')
|
||||
fileset(file: 'web/versions.ini')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is deply_web task
|
||||
*/
|
||||
task deployWeb << {
|
||||
scp('/') {
|
||||
fileset(dir: 'web') //everything from the web directory
|
||||
}
|
||||
}
|
||||
|
||||
def scp(String dir, Closure antFileset = {}) {
|
||||
ant {
|
||||
taskdef(
|
||||
name: 'scp',
|
||||
classname: 'org.apache.tools.ant.taskdefs.optional.ssh.Scp',
|
||||
classpath: configurations.sshAntTask.asPath)
|
||||
|
||||
String dirstr = priv.scp_dir + dir
|
||||
Map scpArgs = [
|
||||
todir : dirstr,
|
||||
password : priv.scp_pass,
|
||||
sftp: true,
|
||||
trust: 'yes'
|
||||
]
|
||||
|
||||
delegate.scp(scpArgs) {
|
||||
antFileset.delegate = delegate
|
||||
antFileset()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def parseConfig(File config) {
|
||||
config.withReader {
|
||||
def prop = new Properties()
|
||||
prop.load(it)
|
||||
return (new ConfigSlurper().parse(prop))
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
//rename the default output, for some better... sanity with scipts
|
||||
archiveName = "${baseName}-unofficial.${version}.${extension}"
|
||||
}
|
||||
|
||||
curseforge {
|
||||
apiKey = priv.cfkey
|
||||
project {
|
||||
id = "241973"
|
||||
changelog = """
|
||||
See https://github.com/williewillus/Botania/releases/tag/${version}
|
||||
"""
|
||||
releaseType = "beta"
|
||||
addGameVersion '1.8.9'
|
||||
addGameVersion 'Java 8'
|
||||
relations {
|
||||
requiredLibrary 'baubles'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//defaultTasks 'clean', 'build', 'sort', 'forgecraft', 'incrementBuildNumber', 'curse', 'upload'
|
||||
defaultTasks 'clean', 'build', 'incrementBuildNumber', 'curseforge'
|
||||
@@ -1,9 +0,0 @@
|
||||
#
|
||||
#Wed Apr 13 10:09:00 CDT 2016
|
||||
version=r1.8
|
||||
dir_output=../Build Output/Botania/
|
||||
forge_version=12.16.0.1865-1.9
|
||||
mc_version=1.9
|
||||
dir_repo=./
|
||||
build_number=302
|
||||
mod_name=Botania
|
||||
@@ -1,40 +0,0 @@
|
||||
Hey there. Looks like you want to contribute with an issue. Great. Here's what you have to do:
|
||||
* Have a look through the [Botania FAQ](http://botaniamod.net/faq.php), to see if your issue has been solved already;
|
||||
* Read through the steps on [Bug Reporting 101](http://vazkii.us/br101/) (You may skip this if you're already familiar with reporting issues, but it's good for newcomers);
|
||||
* Note the following points:
|
||||
* Issues regarding MCPC+/Cauldron that are not reproducible with forge only are **not accepted**;
|
||||
* Issues regarding outdated versions of the mod are **not accepted**;
|
||||
* Unless you manually update every mod on the pack to the latest, issues regarding any public modpack that is not officially maintained or supported by the botania developers (the ones in the modpack section of the website are not) are **not accepted**;
|
||||
* Duplicate issues or issues that have been solved already (use the search feature!) will be closed without asking.
|
||||
* Do not tag your issues' names. "Something Broke" is prefered to "[Bug] Something Broke" because there's a proper label system in place.
|
||||
* Suggestions are **not** accepted here. Post them on the forums or reddit instead. If there's any still open they're old ones before this rule was added.
|
||||
|
||||
The following "bugs" are not accepted:
|
||||
* Intended Behaviour
|
||||
* Double tall flowers need be harvested with shears to not clutter the inventory
|
||||
* Already fixed but people keep reporting it for some reason
|
||||
* Wearing a Ring of Loki or Ring of the Aesir shows a wireframe below bedrock
|
||||
* Not a botania problem/Not fixable
|
||||
* Crash on startup with ChromatiCraft installed (update CC)
|
||||
* Crash on startup with Blocks3D Mod installed
|
||||
* Crash on opening the Lexica Botania with Enchiridion installed (update Enchiridion)
|
||||
* Flowers don't render (Optifine issue)
|
||||
* Mana Bursts get destroyed on Cauldron by the ClearLagg plugin (add botania:manaBurst to the ClearLagg blacklist)
|
||||
* Force Relays destroy blocks when used very fast (Can't fix due to the nature of the block)
|
||||
* Terrasteel crafting won't start (make sure your checkerboard is correct, there's Livingrock under the plate)
|
||||
* The Horn of the Canopy doesn't break Thaumcraft leaves (Thaumcraft doesn't use the typical class or material)
|
||||
* Some Baubles don't work properly on LAN (Baubles bug)
|
||||
|
||||
[Report the Issue](https://github.com/Vazkii/Botania/issues)!
|
||||
|
||||
You can find me at most times on [#vazkii @ irc.esper.net](http://webchat.esper.net/?channels=vazkii), if you need to speak with me about the issue you would report. Just make sure to use common sense and read what the bot tells you.
|
||||
|
||||
---
|
||||
|
||||
If you want to make a Pull Request keep these in mind:
|
||||
* Do NOT use the github editor. Test your damn PRs before you submit them.
|
||||
* I'm very strict when it comes to syntax. Make sure your PR's syntax matches the syntax of the rest of the code. That includes spacing after if/for/(etc), proper bracket usage, camel casing and copyleft headers on new classes.
|
||||
* If your pull request edits very small chunks of code and isn't flawless I'll close it as it'll probably take less time to fix it myself rather than pull yours and change the code.
|
||||
* Unless you have a very good reason for it, keep your PRs all in one commit. You can do it with [rebase](https://git-scm.com/docs/git-rebase).
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# Devs
|
||||
#vazkii=6
|
||||
wiiv=marimorphosis
|
||||
dylangk=munchdew
|
||||
|
||||
# Cool People
|
||||
sl1pg8r=endoflame
|
||||
direwolf20=thermalily
|
||||
#wayofflowingtime=fallenKanade
|
||||
wtfgeeks=daybloom
|
||||
spitefulfox=tainthistle
|
||||
gideonseymour=arcaneRose
|
||||
#pahimar=medumone
|
||||
|
||||
# Flower Designers
|
||||
jadedcat=jadedAmaranthus
|
||||
pokefenn=hydroangeas
|
||||
finvaara=bubbell
|
||||
flaxbeard=kekimurus
|
||||
|
||||
# Patrons
|
||||
devinpath=9
|
||||
cheriekeks=6
|
||||
orangeninja1=1
|
||||
disbedan015=14
|
||||
djcosmic2=3
|
||||
utoxin=2
|
||||
evrlost=10
|
||||
belathus=1
|
||||
vicceyr=0
|
||||
superfortress=3
|
||||
nematrec=15
|
||||
pika_craft=3
|
||||
lanman14444=13
|
||||
noclassdeffound=9
|
||||
emba=0
|
||||
jordsta95=6
|
||||
kei_kouma=15
|
||||
megatronp=15
|
||||
thorantin=6
|
||||
fletchstudios=6
|
||||
donaber=4
|
||||
agamemnom=15
|
||||
dqmhose=13
|
||||
fma_winry=2
|
||||
luckylucyf=14
|
||||
epiczeus=7
|
||||
fredfrog1234=15
|
||||
pjfranke=5
|
||||
_bloop=0
|
||||
kgevans=15
|
||||
l0nekitsune=14
|
||||
swiftlileagle=14
|
||||
gryphonn=11
|
||||
loraanicus=10
|
||||
samerater=8
|
||||
coolcabbage16=13
|
||||
eladkay=3
|
||||
@@ -0,0 +1,19 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:Baubles-Expanded:2.2.21-GTNH:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.11.35:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.63:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.7.11:dev') {transitive=false}
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.118-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.30:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.26-GTNH:api') {transitive=false}
|
||||
compileOnly('curse.maven:cofh-lib-220333:2388748')
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150')
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:StructureLib:1.4.42:dev")
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
sh gradlew deployWeb
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="2">
|
||||
<profile kind="CleanUpProfile" name="BotaniaCleanup" version="2">
|
||||
<setting id="cleanup.remove_unused_private_fields" value="true"/>
|
||||
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
|
||||
<setting id="cleanup.never_use_blocks" value="false"/>
|
||||
<setting id="cleanup.remove_unused_private_methods" value="true"/>
|
||||
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
|
||||
<setting id="cleanup.convert_to_enhanced_for_loop" value="true"/>
|
||||
<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
|
||||
<setting id="cleanup.sort_members" value="false"/>
|
||||
<setting id="cleanup.remove_unused_local_variables" value="true"/>
|
||||
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
|
||||
<setting id="cleanup.remove_unused_private_members" value="true"/>
|
||||
<setting id="cleanup.remove_unnecessary_casts" value="true"/>
|
||||
<setting id="cleanup.make_parameters_final" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_field_access" value="true"/>
|
||||
<setting id="cleanup.remove_private_constructors" value="true"/>
|
||||
<setting id="cleanup.use_blocks" value="false"/>
|
||||
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
|
||||
<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
|
||||
<setting id="cleanup.add_default_serial_version_id" value="false"/>
|
||||
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.make_variable_declarations_final" value="false"/>
|
||||
<setting id="cleanup.add_missing_nls_tags" value="false"/>
|
||||
<setting id="cleanup.format_source_code" value="false"/>
|
||||
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
|
||||
<setting id="cleanup.add_missing_override_annotations" value="true"/>
|
||||
<setting id="cleanup.remove_unused_private_types" value="true"/>
|
||||
<setting id="cleanup.add_missing_methods" value="false"/>
|
||||
<setting id="cleanup.make_local_variable_final" value="true"/>
|
||||
<setting id="cleanup.correct_indentation" value="true"/>
|
||||
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
|
||||
<setting id="cleanup.remove_unused_imports" value="true"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
|
||||
<setting id="cleanup.make_private_fields_final" value="true"/>
|
||||
<setting id="cleanup.add_generated_serial_version_id" value="true"/>
|
||||
<setting id="cleanup.organize_imports" value="true"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
|
||||
<setting id="cleanup.sort_members_all" value="false"/>
|
||||
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
|
||||
<setting id="cleanup.add_missing_annotations" value="true"/>
|
||||
<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
|
||||
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
|
||||
<setting id="cleanup.use_this_for_non_static_method_access" value="true"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.add_serial_version_id" value="false"/>
|
||||
<setting id="cleanup.format_source_code_changes_only" value="false"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.always_use_blocks" value="true"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="false" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment"/><template autoinsert="false" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment"/><template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment"/><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ${project_name} Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/${project_name}
|
||||
*
|
||||
* ${project_name} is Open Source and distributed under the
|
||||
* ${project_name} License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [${date}, ${time} (GMT)]
|
||||
*/</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment"/><template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment"/><template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment"/><template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment"/><template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment"/><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
|
||||
${package_declaration}
|
||||
|
||||
${typecomment}
|
||||
${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
|
||||
</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
|
||||
</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
|
||||
</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
|
||||
</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
|
||||
${exception_var}.printStackTrace();</template><template autoinsert="false" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody"/><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
|
||||
// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
|
||||
@@ -0,0 +1,229 @@
|
||||
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
|
||||
# LOCAL to test local config updates.
|
||||
gtnh.settings.blowdryerTag = 0.2.0
|
||||
|
||||
# Human-readable mod name, available for mcmod.info population.
|
||||
modName = Botania
|
||||
|
||||
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||
# Conventionally lowercase.
|
||||
modId = Botania
|
||||
|
||||
# Root package of the mod, used to find various classes in other properties,
|
||||
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||
modGroup = vazkii.botania
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
autoUpdateBuildScript = false
|
||||
|
||||
# Version of Minecraft to target
|
||||
minecraftVersion = 1.7.10
|
||||
|
||||
# Version of Minecraft Forge to target
|
||||
forgeVersion = 10.13.4.1614
|
||||
|
||||
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
|
||||
channel = stable
|
||||
|
||||
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
|
||||
mappingsVersion = 12
|
||||
|
||||
# Defines other MCP mappings for dependency deobfuscation.
|
||||
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||
|
||||
# Select a default username for testing your mod. You can always override this per-run by running
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables modern Java syntax support. Valid values:
|
||||
# - false: No modern syntax, Java 8 only
|
||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||
# - modern: Native modern Java bytecode, no downgrading
|
||||
enableModernJavaSyntax = jvmDowngrader
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||
# downgradeTargetVersion = 8
|
||||
|
||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||
|
||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||
# - shade: Shade minimized stubs into the jar
|
||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||
# - (empty): Warning reminding you to configure stubs
|
||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||
jvmDowngraderStubsProvider = gtnhlib
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = true
|
||||
|
||||
# Generate a class with a String field for the mod version named as defined below.
|
||||
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||
generateGradleTokenClass = vazkii.botania.common.Tags
|
||||
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||
# 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 =
|
||||
|
||||
# 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. It must be placed into /src/main/resources/META-INF/
|
||||
# There can be multiple files in a space-separated list.
|
||||
# Example value: mymodid_at.cfg nei_at.cfg
|
||||
accessTransformersFile = botania_at.cfg
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
|
||||
# Specify the package that contains all of your Mixins. The package must exist or
|
||||
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||
# it must match with this 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
|
||||
|
||||
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||
forceEnableMixins = false
|
||||
|
||||
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
|
||||
# responsibility to check the license and request permission for distribution if required.
|
||||
usesShadowedDependencies = false
|
||||
|
||||
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
|
||||
# their own classes, making the minimization unreliable.
|
||||
minimizeShadowedDependencies = true
|
||||
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
usesMavenPublishing = true
|
||||
|
||||
# Maven repository to publish the mod to.
|
||||
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
|
||||
|
||||
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
|
||||
#
|
||||
# The project's ID on Modrinth. Can be either the slug or the ID.
|
||||
# Leave this empty if you don't want to publish to Modrinth.
|
||||
modrinthProjectId =
|
||||
|
||||
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||
# Syntax: scope1-type1:name1;scope2-type2:name2;...
|
||||
# Where scope can be one of [required, optional, incompatible, embedded],
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
#
|
||||
# The project's numeric ID on CurseForge. You can find this in the About Project box.
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId =
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
# and the name is the CurseForge project slug of the other mod.
|
||||
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
curseForgeRelations =
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
# customArchiveBaseName =
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||
# runClientWorkingDirectory = run/client
|
||||
|
||||
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||
# runServerWorkingDirectory = run/server
|
||||
|
||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||
# The check is ONLY performed if the version is a git tag.
|
||||
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
|
||||
# versionPattern =
|
||||
|
||||
# Uncomment to prevent the source code from being published.
|
||||
# noPublishedSources = true
|
||||
|
||||
# Uncomment this to disable Spotless checks.
|
||||
# This should only be uncommented to keep it easier to sync with upstream/other forks.
|
||||
# That is, if there is no other active fork/upstream, NEVER change this.
|
||||
disableSpotless = true
|
||||
|
||||
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
|
||||
# disableCheckstyle = true
|
||||
|
||||
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
|
||||
# (force use delegated build).
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
|
||||
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
|
||||
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
|
||||
# ideaOverrideBuildType = idea
|
||||
|
||||
# Whether IDEA should run spotless checks when pressing the Build button.
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
org.gradle.configuration-cache = true
|
||||
org.gradle.parallel = true
|
||||
@@ -0,0 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1df82b76031285ef2e6a4f59ffe9299d/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7d5be6a02945ac2e045048ee54a7d32/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/643f404f769811f5f265fd66f7af5d89/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/38256085a73e137cb4937ea9c4807fec/redirect
|
||||
toolchainVersion=25
|
||||
@@ -1,6 +1,7 @@
|
||||
#Mon Sep 14 12:28:28 PDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
|
||||
@@ -1,162 +1,248 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 the original 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.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn ( ) {
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die ( ) {
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# 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
|
||||
;;
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=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"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
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=("$@")
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# 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"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
@@ -1,90 +1,93 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@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 Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz 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.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
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
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@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
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,2 @@
|
||||
before_install:
|
||||
- ./gradlew setupCIWorkspace
|
||||
@@ -1,4 +0,0 @@
|
||||
scp_dir=
|
||||
scp_pass=
|
||||
cfkey=
|
||||
dir_forgecraft=../Build Output/Botania/
|
||||
@@ -0,0 +1,2 @@
|
||||
repositories {
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven {
|
||||
// RetroFuturaGradle
|
||||
name "GTNH Maven"
|
||||
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||
mavenContent {
|
||||
includeGroup("com.gtnewhorizons")
|
||||
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.27'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public final class BCLog {
|
||||
public static final Logger logger = LogManager.getLogger("BuildCraft");
|
||||
|
||||
/** Deactivate constructor */
|
||||
private BCLog() {}
|
||||
|
||||
@Deprecated
|
||||
public static void logErrorAPI(String mod, Throwable error, Class<?> classFile) {
|
||||
logErrorAPI(error, classFile);
|
||||
}
|
||||
|
||||
public static void logErrorAPI(Throwable error, Class<?> classFile) {
|
||||
StringBuilder msg = new StringBuilder("API error! Please update your mods. Error: ");
|
||||
msg.append(error);
|
||||
StackTraceElement[] stackTrace = error.getStackTrace();
|
||||
if (stackTrace.length > 0) {
|
||||
msg.append(", ").append(stackTrace[0]);
|
||||
}
|
||||
|
||||
logger.log(Level.ERROR, msg.toString());
|
||||
|
||||
if (classFile != null) {
|
||||
msg.append("API error: ").append(classFile.getSimpleName()).append(" is loaded from ").append(classFile.getProtectionDomain().getCodeSource().getLocation());
|
||||
logger.log(Level.ERROR, msg.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String getVersion() {
|
||||
return BuildCraftAPI.getVersion();
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public final class BuildCraftAPI {
|
||||
|
||||
public static ICoreProxy proxy;
|
||||
|
||||
public static final Set<Block> softBlocks = Sets.newHashSet();
|
||||
public static final HashMap<String, IWorldProperty> worldProperties = Maps.newHashMap();
|
||||
|
||||
/** Deactivate constructor */
|
||||
private BuildCraftAPI() {}
|
||||
|
||||
public static String getVersion() {
|
||||
try {
|
||||
Class<?> clazz = Class.forName("buildcraft.core.Version");
|
||||
Method method = clazz.getDeclaredMethod("getVersion");
|
||||
return String.valueOf(method.invoke(null));
|
||||
} catch (Exception e) {
|
||||
return "UNKNOWN VERSION";
|
||||
}
|
||||
}
|
||||
|
||||
public static IWorldProperty getWorldProperty(String name) {
|
||||
return worldProperties.get(name);
|
||||
}
|
||||
|
||||
public static void registerWorldProperty(String name, IWorldProperty property) {
|
||||
if (worldProperties.containsKey(name)) {
|
||||
BCLog.logger.warn("The WorldProperty key '" + name + "' is being overidden with " + property.getClass().getSimpleName() + "!");
|
||||
}
|
||||
worldProperties.put(name, property);
|
||||
}
|
||||
|
||||
public static boolean isSoftBlock(World world, BlockPos pos) {
|
||||
return worldProperties.get("soft").get(world, pos);
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
/** Use this to access the various config options. It is recommended that you use this as opposed to the variables in
|
||||
* the mod, as users may only install the modules that they want, and not the one you may have refereed to. */
|
||||
@Deprecated
|
||||
public final class ConfigAccessor {
|
||||
public enum EMod {
|
||||
CORE,
|
||||
BUILDERS,
|
||||
ENERGY,
|
||||
FACTORY,
|
||||
ROBITICS,
|
||||
SILICON,
|
||||
TRANSPORT
|
||||
}
|
||||
|
||||
private static Map<EMod, IBuildCraftMod> mods = Maps.newHashMap();
|
||||
|
||||
private ConfigAccessor() {}
|
||||
|
||||
public static Property getOption(EMod mod, String name) {
|
||||
if (mods.containsKey(mod)) {
|
||||
return mods.get(mod).getOption(name);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean getBoolean(EMod mod, String name, boolean defaultBoolean) {
|
||||
Property prop = getOption(mod, name);
|
||||
if (prop == null) {
|
||||
return defaultBoolean;
|
||||
} else {
|
||||
return prop.getBoolean(defaultBoolean);
|
||||
}
|
||||
}
|
||||
|
||||
/** WARNING: INTERNAL USE ONLY! */
|
||||
public static void addMod(EMod mod, IBuildCraftMod actual) {
|
||||
mods.put(mod, actual);
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
/** Use minecraft's EnumDyeColor in as many places as possible. */
|
||||
@Deprecated
|
||||
public enum EnumColor implements IStringSerializable {
|
||||
|
||||
BLACK,
|
||||
RED,
|
||||
GREEN,
|
||||
BROWN,
|
||||
BLUE,
|
||||
PURPLE,
|
||||
CYAN,
|
||||
LIGHT_GRAY,
|
||||
GRAY,
|
||||
PINK,
|
||||
LIME,
|
||||
YELLOW,
|
||||
LIGHT_BLUE,
|
||||
MAGENTA,
|
||||
ORANGE,
|
||||
WHITE;
|
||||
|
||||
public static final EnumColor[] VALUES = values();
|
||||
public static final String[] DYES = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray",
|
||||
"dyePink", "dyeLime", "dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite" };
|
||||
public static final String[] NAMES = { "Black", "Red", "Green", "Brown", "Blue", "Purple", "Cyan", "LightGray", "Gray", "Pink", "Lime", "Yellow",
|
||||
"LightBlue", "Magenta", "Orange", "White" };
|
||||
public static final int[] DARK_HEX = { 0x2D2D2D, 0xA33835, 0x394C1E, 0x5C3A24, 0x3441A2, 0x843FBF, 0x36809E, 0x888888, 0x444444, 0xE585A0,
|
||||
0x3FAA36, 0xCFC231, 0x7F9AD1, 0xFF64FF, 0xFF6A00, 0xFFFFFF };
|
||||
public static final int[] LIGHT_HEX = { 0x181414, 0xBE2B27, 0x007F0E, 0x89502D, 0x253193, 0x7e34bf, 0x299799, 0xa0a7a7, 0x7A7A7A, 0xD97199,
|
||||
0x39D52E, 0xFFD91C, 0x66AAFF, 0xD943C6, 0xEA7835, 0xe4e4e4 };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ResourceLocation iconSheet;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static TextureAtlasSprite[] brushSprites;
|
||||
|
||||
public int getDarkHex() {
|
||||
return DARK_HEX[ordinal()];
|
||||
}
|
||||
|
||||
public int getLightHex() {
|
||||
return LIGHT_HEX[ordinal()];
|
||||
}
|
||||
|
||||
public static EnumColor fromId(int id) {
|
||||
if (id < 0 || id >= VALUES.length) {
|
||||
return WHITE;
|
||||
}
|
||||
return VALUES[id];
|
||||
}
|
||||
|
||||
public static EnumColor fromDye(String dyeTag) {
|
||||
for (int id = 0; id < DYES.length; id++) {
|
||||
if (DYES[id].equals(dyeTag)) {
|
||||
return VALUES[id];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EnumColor fromName(String name) {
|
||||
for (int id = 0; id < NAMES.length; id++) {
|
||||
if (NAMES[id].equals(name)) {
|
||||
return VALUES[id];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EnumColor getRand() {
|
||||
return VALUES[new Random().nextInt(VALUES.length)];
|
||||
}
|
||||
|
||||
public EnumColor getNext() {
|
||||
EnumColor next = VALUES[(ordinal() + 1) % VALUES.length];
|
||||
return next;
|
||||
}
|
||||
|
||||
public EnumColor getPrevious() {
|
||||
EnumColor previous = VALUES[(ordinal() + VALUES.length - 1) % VALUES.length];
|
||||
return previous;
|
||||
}
|
||||
|
||||
public EnumColor inverse() {
|
||||
return EnumColor.VALUES[15 - ordinal()];
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return "color." + name().replace("_", ".").toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public String getBasicTag() {
|
||||
return name().replace("_", ".").toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAMES[ordinal()];
|
||||
}
|
||||
|
||||
public String getLocalizedName() {
|
||||
return I18n.translateToLocal(getTag());
|
||||
}
|
||||
|
||||
public String getDye() {
|
||||
return DYES[ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String s = name().replace("_", " ");
|
||||
String[] words = s.split(" ");
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (String word : words) {
|
||||
b.append(word.charAt(0)).append(word.substring(1).toLowerCase(Locale.ENGLISH)).append(" ");
|
||||
}
|
||||
return b.toString().trim();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void registerSprites(TextureAtlasSprite[] sprites) {
|
||||
brushSprites = sprites;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public TextureAtlasSprite getSprite() {
|
||||
return brushSprites[ordinal()];
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTBase.NBTPrimitive;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public enum EnumPipePart implements IStringSerializable,INetworkLoadable_BC8<EnumPipePart> {
|
||||
DOWN(EnumFacing.DOWN),
|
||||
UP(EnumFacing.UP),
|
||||
NORTH(EnumFacing.NORTH),
|
||||
SOUTH(EnumFacing.SOUTH),
|
||||
WEST(EnumFacing.WEST),
|
||||
EAST(EnumFacing.EAST),
|
||||
/** CENTER, UNKNOWN and ALL are all valid uses of this constant. */
|
||||
CENTER(null);
|
||||
|
||||
private static final Map<EnumFacing, EnumPipePart> facingMap = Maps.newEnumMap(EnumFacing.class);
|
||||
private static final Map<String, EnumPipePart> nameMap = Maps.newHashMap();
|
||||
private static final int MAX_VALUES = values().length;
|
||||
|
||||
public final EnumFacing face;
|
||||
|
||||
static {
|
||||
for (EnumPipePart part : values()) {
|
||||
nameMap.put(part.name(), part);
|
||||
if (part.face != null) facingMap.put(part.face, part);
|
||||
}
|
||||
}
|
||||
|
||||
public static EnumPipePart fromFacing(EnumFacing face) {
|
||||
if (face == null) return EnumPipePart.CENTER;
|
||||
return facingMap.get(face);
|
||||
}
|
||||
|
||||
public static EnumPipePart[] validFaces() {
|
||||
return new EnumPipePart[] { DOWN, UP, NORTH, SOUTH, WEST, EAST };
|
||||
}
|
||||
|
||||
public static EnumPipePart fromMeta(int meta) {
|
||||
if (meta < 0 || meta >= MAX_VALUES) return EnumPipePart.CENTER;
|
||||
return values()[meta];
|
||||
}
|
||||
|
||||
private EnumPipePart(EnumFacing face) {
|
||||
this.face = face;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
if (face == null) return 6;
|
||||
return face.getIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
public EnumPipePart next() {
|
||||
switch (this) {
|
||||
case DOWN:
|
||||
return EAST;
|
||||
case EAST:
|
||||
return NORTH;
|
||||
case NORTH:
|
||||
return SOUTH;
|
||||
case SOUTH:
|
||||
return UP;
|
||||
case UP:
|
||||
return WEST;
|
||||
case WEST:
|
||||
return DOWN;
|
||||
default:
|
||||
return DOWN;
|
||||
}
|
||||
}
|
||||
|
||||
public EnumPipePart opposite() {
|
||||
if (this == CENTER) return CENTER;
|
||||
return fromFacing(face.getOpposite());
|
||||
}
|
||||
|
||||
public static EnumPipePart readFromNBT(NBTBase base) {
|
||||
if (base == null) return CENTER;
|
||||
if (base instanceof NBTTagString) {
|
||||
NBTTagString nbtString = (NBTTagString) base;
|
||||
String string = nbtString.getString();
|
||||
return nameMap.containsKey(string) ? nameMap.get(string) : CENTER;
|
||||
} else {
|
||||
byte ord = ((NBTPrimitive) base).getByte();
|
||||
if (ord < 0 || ord > 6) return CENTER;
|
||||
return values()[ord];
|
||||
}
|
||||
}
|
||||
|
||||
public NBTBase writeToNBT() {
|
||||
return new NBTTagString(name());
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPipePart readFromByteBuf(ByteBuf buf) {
|
||||
byte ord = buf.readByte();
|
||||
return fromMeta(ord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToByteBuf(ByteBuf buf) {
|
||||
buf.writeByte(ordinal());
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/** To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers. */
|
||||
public interface IAreaProvider {
|
||||
BlockPos min();
|
||||
|
||||
BlockPos max();
|
||||
|
||||
/** Remove from the world all objects used to define the area. */
|
||||
void removeFromWorld();
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IBox extends IZone {
|
||||
IBox expand(int amount);
|
||||
|
||||
IBox contract(int amount);
|
||||
|
||||
BlockPos min();
|
||||
|
||||
BlockPos max();
|
||||
|
||||
void createLaserData();
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
public interface IBuildCraftMod {
|
||||
Property getOption(String name);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
public interface ICoreProxy {
|
||||
WeakReference<EntityPlayer> getBuildCraftPlayer(WorldServer world);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IIconProvider {
|
||||
public TextureAtlasSprite getIcon(int iconIndex);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(TextureMap iconRegister);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IInvSlot {
|
||||
/** Returns the slot number of the underlying Inventory.
|
||||
*
|
||||
* @return the slot number */
|
||||
int getIndex();
|
||||
|
||||
boolean canPutStackInSlot(ItemStack stack);
|
||||
|
||||
boolean canTakeStackFromSlot(ItemStack stack);
|
||||
|
||||
boolean isItemValidForSlot(ItemStack stack);
|
||||
|
||||
ItemStack decreaseStackInSlot(int amount);
|
||||
|
||||
ItemStack getStackInSlot();
|
||||
|
||||
void setStackInSlot(ItemStack stack);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
|
||||
/** @param <T> The type that will be loaded from and saved too. This essentially allows Immutable objects to be safely
|
||||
* loaded without helper methods everywhere. However you are allowed to return this if you are a mutable
|
||||
* object */
|
||||
public interface INBTLoadable_BC8<T> {
|
||||
/** @return An object that has the properties loaded. WARNIG! This might be the same object as the one this method
|
||||
* was called on! (You should always replace the object you have stored with whatever this returns) */
|
||||
T readFromNBT(NBTBase nbt);
|
||||
|
||||
NBTBase writeToNBT();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/** Use {@link INBTLoadable_BC8} instead of this, as this gives you more control over what NBT goes where, and what
|
||||
* objects are allowed to do. */
|
||||
@Deprecated
|
||||
public interface INBTStoreable {
|
||||
void readFromNBT(NBTTagCompound tag);
|
||||
|
||||
void writeToNBT(NBTTagCompound tag);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public interface INetworkLoadable_BC8<T> {
|
||||
T readFromByteBuf(ByteBuf buf);
|
||||
|
||||
void writeToByteBuf(ByteBuf buf);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
/** To be implemented by TileEntities able to provide a path on the world, typically BuildCraft path markers. */
|
||||
public interface IPathProvider {
|
||||
List<BlockPos> getPath();
|
||||
|
||||
/**
|
||||
* Remove from the world all objects used to define the path.
|
||||
*/
|
||||
void removeFromWorld();
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
|
||||
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/** Use {@link INetworkLoadable_BC8} instead, as that gives you more control over how you use objects */
|
||||
@Deprecated
|
||||
public interface ISerializable {
|
||||
/** Serializes the state to the stream
|
||||
*
|
||||
* @param data */
|
||||
void writeData(ByteBuf data);
|
||||
|
||||
/** Deserializes the state from the stream
|
||||
*
|
||||
* @param data */
|
||||
void readData(ByteBuf data);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IWorldProperty {
|
||||
boolean get(World world, BlockPos pos);
|
||||
|
||||
void clear();
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public interface IZone {
|
||||
/** Returns the smallest possible distance that the index would have to be changed by in order for
|
||||
* {@link #contains(Vec3d)} to return true. If the position is already inside then this will return 0 */
|
||||
double distanceTo(BlockPos index);
|
||||
|
||||
/** Returns {@link #distanceTo(BlockPos)} but squared. Usually this will be quicker to calculate. */
|
||||
double distanceToSquared(BlockPos index);
|
||||
|
||||
/** Returns true if the point is enclosed by this zone, such that none of the coordinates lie outside the range
|
||||
* specified by this zone. */
|
||||
boolean contains(Vec3d point);
|
||||
|
||||
/** Gets a random position that {@link #contains(Vec3d)} will return true. */
|
||||
BlockPos getRandomBlockPos(Random rand);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public final class JavaTools {
|
||||
private JavaTools() {
|
||||
|
||||
}
|
||||
|
||||
public static <T> T[] concat(T[] first, T[] second) {
|
||||
T[] result = Arrays.copyOf(first, first.length + second.length);
|
||||
System.arraycopy(second, 0, result, first.length, second.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int[] concat(int[] first, int[] second) {
|
||||
int[] result = Arrays.copyOf(first, first.length + second.length);
|
||||
System.arraycopy(second, 0, result, first.length, second.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static float[] concat(float[] first, float[] second) {
|
||||
float[] result = Arrays.copyOf(first, first.length + second.length);
|
||||
System.arraycopy(second, 0, result, first.length, second.length);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String surroundWithQuotes(String stringToSurroundWithQuotes) {
|
||||
return String.format("\"%s\"", stringToSurroundWithQuotes);
|
||||
}
|
||||
|
||||
public static String stripSurroundingQuotes(String stringToStripQuotes) {
|
||||
return stringToStripQuotes.replaceAll("^\"|\"$", "");
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class SafeTimeTracker {
|
||||
|
||||
private long lastMark = Long.MIN_VALUE;
|
||||
private long duration = -1;
|
||||
private long randomRange = 0;
|
||||
private long lastRandomDelay = 0;
|
||||
private long internalDelay = 1;
|
||||
|
||||
/** Only use this if the delay time changes (say, if you use this to determine when a refining should be complete */
|
||||
public SafeTimeTracker() {
|
||||
|
||||
}
|
||||
|
||||
public SafeTimeTracker(long delay) {
|
||||
internalDelay = delay;
|
||||
}
|
||||
|
||||
/** In many situations, it is a bad idea to have all objects of the same kind to be waiting for the exact same
|
||||
* amount of time, as that can lead to some situation where they're all synchronized and got to work all at the same
|
||||
* time. When created with a random range, the mark that is set when reaching the expect delay will be added with a
|
||||
* random number between [0, range[, meaning that the event will take between 0 and range more tick to run. */
|
||||
public SafeTimeTracker(long delay, long random) {
|
||||
internalDelay = delay;
|
||||
randomRange = random;
|
||||
}
|
||||
|
||||
public boolean markTimeIfDelay(World world) {
|
||||
return markTimeIfDelay(world, internalDelay);
|
||||
}
|
||||
|
||||
/** Return true if a given delay has passed since last time marked was called successfully. */
|
||||
public boolean markTimeIfDelay(World world, long delay) {
|
||||
if (world == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
long currentTime = world.getTotalWorldTime();
|
||||
|
||||
if (currentTime < lastMark) {
|
||||
lastMark = currentTime;
|
||||
return false;
|
||||
} else if (lastMark + delay + lastRandomDelay <= currentTime) {
|
||||
duration = currentTime - lastMark;
|
||||
lastMark = currentTime;
|
||||
lastRandomDelay = (int) (Math.random() * randomRange);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public long durationOfLastDelay() {
|
||||
return duration > 0 ? duration : 0;
|
||||
}
|
||||
|
||||
public void markTime(World world) {
|
||||
lastMark = world.getTotalWorldTime();
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
/** This class is used whenever stacks needs to be stored as keys. */
|
||||
public final class StackKey {
|
||||
public final ItemStack stack;
|
||||
public final FluidStack fluidStack;
|
||||
|
||||
public StackKey(FluidStack fluidStack) {
|
||||
this(null, fluidStack);
|
||||
}
|
||||
|
||||
public StackKey(ItemStack stack) {
|
||||
this(stack, null);
|
||||
}
|
||||
|
||||
public StackKey(ItemStack stack, FluidStack fluidStack) {
|
||||
this.stack = stack;
|
||||
this.fluidStack = fluidStack;
|
||||
}
|
||||
|
||||
public static StackKey stack(Item item, int amount, int damage) {
|
||||
return new StackKey(new ItemStack(item, amount, damage));
|
||||
}
|
||||
|
||||
public static StackKey stack(Block block, int amount, int damage) {
|
||||
return new StackKey(new ItemStack(block, amount, damage));
|
||||
}
|
||||
|
||||
public static StackKey stack(Item item) {
|
||||
return new StackKey(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
public static StackKey stack(Block block) {
|
||||
return new StackKey(new ItemStack(block, 1, 0));
|
||||
}
|
||||
|
||||
public static StackKey stack(ItemStack itemStack) {
|
||||
return new StackKey(itemStack);
|
||||
}
|
||||
|
||||
public static StackKey fluid(Fluid fluid, int amount) {
|
||||
return new StackKey(new FluidStack(fluid, amount));
|
||||
}
|
||||
|
||||
public static StackKey fluid(Fluid fluid) {
|
||||
return new StackKey(new FluidStack(fluid, FluidContainerRegistry.BUCKET_VOLUME));
|
||||
}
|
||||
|
||||
public static StackKey fluid(FluidStack fluidStack) {
|
||||
return new StackKey(fluidStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || o.getClass() != StackKey.class) {
|
||||
return false;
|
||||
}
|
||||
StackKey k = (StackKey) o;
|
||||
if ((stack == null ^ k.stack == null) || (fluidStack == null ^ k.fluidStack == null)) {
|
||||
return false;
|
||||
}
|
||||
if (stack != null) {
|
||||
if (stack.getItem() != k.stack.getItem() || stack.getHasSubtypes() && stack.getItemDamage() != k.stack.getItemDamage() || !objectsEqual(
|
||||
stack.getTagCompound(), k.stack.getTagCompound())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (fluidStack != null) {
|
||||
if (fluidStack.getFluid() != k.fluidStack.getFluid() || fluidStack.amount != k.fluidStack.amount || !objectsEqual(
|
||||
fluidStack.tag, k.fluidStack.tag)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 7;
|
||||
if (stack != null) {
|
||||
result = 31 * result + stack.getItem().hashCode();
|
||||
result = 31 * result + stack.getItemDamage();
|
||||
result = 31 * result + objectHashCode(stack.getTagCompound());
|
||||
}
|
||||
result = 31 * result + 7;
|
||||
if (fluidStack != null) {
|
||||
result = 31 * result + FluidRegistry.getFluidID(fluidStack.getFluid());
|
||||
result = 31 * result + fluidStack.amount;
|
||||
result = 31 * result + objectHashCode(fluidStack.tag);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean objectsEqual(Object o1, Object o2) {
|
||||
if (o1 == null && o2 == null) {
|
||||
return true;
|
||||
} else if (o1 == null || o2 == null) {
|
||||
return false;
|
||||
} else {
|
||||
return o1.equals(o2);
|
||||
}
|
||||
}
|
||||
|
||||
private int objectHashCode(Object o) {
|
||||
return o != null ? o.hashCode() : 0;
|
||||
}
|
||||
|
||||
public StackKey copy() {
|
||||
return new StackKey(stack != null ? stack.copy() : null, fluidStack != null ? fluidStack.copy() : null);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License.
|
||||
* Please check the contents of the license, which should be located
|
||||
* as "LICENSE.API" in the BuildCraft source code distribution.
|
||||
*/
|
||||
@API(apiVersion = "2.0", owner = "BuildCraft|Core", provides = "BuildCraftAPI|core")
|
||||
package buildcraft.api.core;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -1,27 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
|
||||
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
|
||||
package buildcraft.api.core.render;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/* This interface designates a block as a state machine responsible for culling For implementation details look into
|
||||
* FakeBlock implementation */
|
||||
public interface ICullable {
|
||||
|
||||
// Side Rendering States
|
||||
// They are used to effectively cull obstructed sides while processing facades.
|
||||
// Make sure your implementation is correct otherwise expect FPS drop
|
||||
|
||||
void setRenderSide(EnumFacing side, boolean render);
|
||||
|
||||
void setRenderAllSides();
|
||||
|
||||
boolean shouldSideBeRendered(IBlockAccess blockAccess, BlockPos pos, int side);
|
||||
|
||||
void setRenderMask(int mask);
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package buildcraft.api.core.render;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
public interface ITextureStateManager {
|
||||
void set(TextureAtlasSprite icon);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
|
||||
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
|
||||
package buildcraft.api.core.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
public interface ITextureStates extends ICullable {
|
||||
|
||||
ITextureStateManager getTextureState();
|
||||
|
||||
TextureAtlasSprite getIcon(int side, int meta);
|
||||
|
||||
Block getBlock();
|
||||
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import buildcraft.api.statements.IActionInternal;
|
||||
import buildcraft.api.statements.IStatement;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import buildcraft.api.statements.ITriggerInternal;
|
||||
|
||||
public abstract class GateExpansionController {
|
||||
|
||||
public final IGateExpansion type;
|
||||
public final TileEntity pipeTile;
|
||||
|
||||
public GateExpansionController(IGateExpansion type, TileEntity pipeTile) {
|
||||
this.pipeTile = pipeTile;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public IGateExpansion getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void tick(IGate gate) {}
|
||||
|
||||
public void startResolution() {}
|
||||
|
||||
public boolean resolveAction(IStatement action, int count) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isTriggerActive(IStatement trigger, IStatementParameter[] parameters) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void addTriggers(List<ITriggerInternal> list) {}
|
||||
|
||||
public void addActions(List<IActionInternal> list) {}
|
||||
|
||||
public void writeToNBT(NBTTagCompound nbt) {}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbt) {}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.HashBiMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public final class GateExpansions {
|
||||
private static final Map<String, IGateExpansion> expansions = new HashMap<String, IGateExpansion>();
|
||||
private static final ArrayList<IGateExpansion> expansionIDs = new ArrayList<IGateExpansion>();
|
||||
private static final Map<IGateExpansion, ItemStack> recipes = HashBiMap.create();
|
||||
|
||||
private GateExpansions() {}
|
||||
|
||||
public static void registerExpansion(IGateExpansion expansion) {
|
||||
registerExpansion(expansion.getUniqueIdentifier(), expansion);
|
||||
}
|
||||
|
||||
public static void registerExpansion(String identifier, IGateExpansion expansion) {
|
||||
expansions.put(identifier, expansion);
|
||||
expansionIDs.add(expansion);
|
||||
}
|
||||
|
||||
public static void registerExpansion(IGateExpansion expansion, ItemStack addedRecipe) {
|
||||
registerExpansion(expansion.getUniqueIdentifier(), expansion);
|
||||
recipes.put(expansion, addedRecipe);
|
||||
}
|
||||
|
||||
public static IGateExpansion getExpansion(String identifier) {
|
||||
return expansions.get(identifier);
|
||||
}
|
||||
|
||||
public static Set<IGateExpansion> getExpansions() {
|
||||
Set<IGateExpansion> set = new HashSet<IGateExpansion>();
|
||||
set.addAll(expansionIDs);
|
||||
return set;
|
||||
}
|
||||
|
||||
public static Map<IGateExpansion, ItemStack> getRecipesForPostInit() {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
// The code below is used by networking.
|
||||
|
||||
public static IGateExpansion getExpansionByID(int id) {
|
||||
return expansionIDs.get(id);
|
||||
}
|
||||
|
||||
public static int getExpansionID(IGateExpansion expansion) {
|
||||
return expansionIDs.indexOf(expansion);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import buildcraft.api.statements.IStatement;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import buildcraft.api.statements.StatementSlot;
|
||||
import buildcraft.api.statements.containers.ISidedStatementContainer;
|
||||
import buildcraft.api.transport.IPipe;
|
||||
|
||||
public interface IGate extends ISidedStatementContainer {
|
||||
@Deprecated
|
||||
void setPulsing(boolean pulse);
|
||||
|
||||
IPipe getPipe();
|
||||
|
||||
List<IStatement> getTriggers();
|
||||
|
||||
List<IStatement> getActions();
|
||||
|
||||
List<StatementSlot> getActiveActions();
|
||||
|
||||
List<IStatementParameter> getTriggerParameters(int index);
|
||||
|
||||
List<IStatementParameter> getActionParameters(int index);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IGateExpansion {
|
||||
|
||||
String getUniqueIdentifier();
|
||||
|
||||
String getDisplayName();
|
||||
|
||||
GateExpansionController makeController(TileEntity pipeTile);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void textureStitch(TextureMap map);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IGateStaticRenderState getRenderState();
|
||||
|
||||
public interface IGateStaticRenderState {
|
||||
List<BakedQuad> bake(VertexFormat format);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
@API(apiVersion = "4.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|gates")
|
||||
package buildcraft.api.gates;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -1,9 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public class ActionState {
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IActionExternal extends IStatement {
|
||||
void actionActivate(TileEntity target, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public interface IActionInternal extends IStatement {
|
||||
|
||||
void actionActivate(IStatementContainer source, IStatementParameter[] parameters);
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IActionProvider {
|
||||
|
||||
/** Returns the list of actions that are available from the statement container holding the gate. */
|
||||
Collection<IActionInternal> getInternalActions(IStatementContainer container);
|
||||
|
||||
/** Returns the list of actions available to a gate next to the given block. */
|
||||
Collection<IActionExternal> getExternalActions(EnumFacing side, TileEntity tile);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public interface IActionReceptor {
|
||||
void actionActivated(IStatement statement, IStatementParameter[] parameters);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IOverrideDefaultStatements {
|
||||
List<ITriggerExternal> overrideTriggers();
|
||||
|
||||
List<IActionExternal> overrideActions();
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IStatement {
|
||||
/** Every statement needs a unique tag, it should be in the format of "<modid>:<name>.
|
||||
*
|
||||
* @return the unique id */
|
||||
String getUniqueTag();
|
||||
|
||||
/** Return the maximum number of parameter this statement can have, 0 if none. */
|
||||
int maxParameters();
|
||||
|
||||
/** Return the minimum number of parameter this statement can have, 0 if none. */
|
||||
int minParameters();
|
||||
|
||||
/** Return the statement description in the UI */
|
||||
String getDescription();
|
||||
|
||||
/** Create parameters for the statement. */
|
||||
IStatementParameter createParameter(int index);
|
||||
|
||||
/** This returns the statement after a left rotation. Used in particular in blueprints orientation. */
|
||||
IStatement rotateLeft();
|
||||
|
||||
/** This should return the icon for this statement, suitable for rending directly into a GUI. This should refer to a
|
||||
* texture on the map block texture map. */
|
||||
@SideOnly(Side.CLIENT)
|
||||
TextureAtlasSprite getGuiSprite();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/** This is implemented by objects containing Statements, such as Gates and TileEntities. */
|
||||
public interface IStatementContainer {
|
||||
TileEntity getTile();
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IStatementParameter {
|
||||
|
||||
/** Every parameter needs a unique tag, it should be in the format of "<modid>:<name>".
|
||||
*
|
||||
* @return the unique id */
|
||||
String getUniqueTag();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
TextureAtlasSprite getIcon();
|
||||
|
||||
ItemStack getItemStack();
|
||||
|
||||
/** Return the parameter description in the UI */
|
||||
String getDescription();
|
||||
|
||||
void onClick(IStatementContainer source, IStatement stmt, ItemStack stack, StatementMouseClick mouse);
|
||||
|
||||
void readFromNBT(NBTTagCompound compound);
|
||||
|
||||
void writeToNBT(NBTTagCompound compound);
|
||||
|
||||
/** This returns the parameter after a left rotation. Used in particular in blueprints orientation. */
|
||||
IStatementParameter rotateLeft();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface ITriggerExternal extends IStatement {
|
||||
|
||||
boolean isTriggerActive(TileEntity target, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters);
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
/** This interface can be used by tiles to override external trigger behaviour.
|
||||
*
|
||||
* Please use wisely. */
|
||||
public interface ITriggerExternalOverride {
|
||||
public enum Result {
|
||||
TRUE,
|
||||
FALSE,
|
||||
IGNORE
|
||||
}
|
||||
|
||||
Result override(EnumFacing side, IStatementContainer source, IStatementParameter[] parameters);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public interface ITriggerInternal extends IStatement {
|
||||
|
||||
boolean isTriggerActive(IStatementContainer source, IStatementParameter[] parameters);
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface ITriggerProvider {
|
||||
|
||||
/** Returns the list of triggers that are available from the object holding the gate. */
|
||||
Collection<ITriggerInternal> getInternalTriggers(IStatementContainer container);
|
||||
|
||||
/** Returns the list of triggers available to a gate next to the given block. */
|
||||
Collection<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity tile);
|
||||
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import buildcraft.api.core.BCLog;
|
||||
|
||||
public final class StatementManager {
|
||||
|
||||
public static Map<String, IStatement> statements = new HashMap<String, IStatement>();
|
||||
public static Map<String, Class<? extends IStatementParameter>> parameters = new HashMap<String, Class<? extends IStatementParameter>>();
|
||||
private static List<ITriggerProvider> triggerProviders = new LinkedList<ITriggerProvider>();
|
||||
private static List<IActionProvider> actionProviders = new LinkedList<IActionProvider>();
|
||||
|
||||
/** Deactivate constructor */
|
||||
private StatementManager() {}
|
||||
|
||||
public static void registerTriggerProvider(ITriggerProvider provider) {
|
||||
if (provider != null && !triggerProviders.contains(provider)) {
|
||||
triggerProviders.add(provider);
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerActionProvider(IActionProvider provider) {
|
||||
if (provider != null && !actionProviders.contains(provider)) {
|
||||
actionProviders.add(provider);
|
||||
}
|
||||
}
|
||||
|
||||
public static void registerStatement(IStatement statement) {
|
||||
statements.put(statement.getUniqueTag(), statement);
|
||||
}
|
||||
|
||||
public static void registerParameterClass(Class<? extends IStatementParameter> param) {
|
||||
parameters.put(createParameter(param).getUniqueTag(), param);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void registerParameterClass(String name, Class<? extends IStatementParameter> param) {
|
||||
parameters.put(name, param);
|
||||
}
|
||||
|
||||
public static List<ITriggerExternal> getExternalTriggers(EnumFacing side, TileEntity entity) {
|
||||
List<ITriggerExternal> result;
|
||||
|
||||
if (entity instanceof IOverrideDefaultStatements) {
|
||||
result = ((IOverrideDefaultStatements) entity).overrideTriggers();
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
result = new LinkedList<ITriggerExternal>();
|
||||
|
||||
for (ITriggerProvider provider : triggerProviders) {
|
||||
Collection<ITriggerExternal> toAdd = provider.getExternalTriggers(side, entity);
|
||||
|
||||
if (toAdd != null) {
|
||||
for (ITriggerExternal t : toAdd) {
|
||||
if (!result.contains(t)) {
|
||||
result.add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<IActionExternal> getExternalActions(EnumFacing side, TileEntity entity) {
|
||||
List<IActionExternal> result = new LinkedList<IActionExternal>();
|
||||
|
||||
if (entity instanceof IOverrideDefaultStatements) {
|
||||
result = ((IOverrideDefaultStatements) entity).overrideActions();
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
result = new LinkedList<IActionExternal>();
|
||||
|
||||
for (IActionProvider provider : actionProviders) {
|
||||
Collection<IActionExternal> toAdd = provider.getExternalActions(side, entity);
|
||||
|
||||
if (toAdd != null) {
|
||||
for (IActionExternal t : toAdd) {
|
||||
if (!result.contains(t)) {
|
||||
result.add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<ITriggerInternal> getInternalTriggers(IStatementContainer container) {
|
||||
List<ITriggerInternal> result = new LinkedList<ITriggerInternal>();
|
||||
|
||||
for (ITriggerProvider provider : triggerProviders) {
|
||||
Collection<ITriggerInternal> toAdd = provider.getInternalTriggers(container);
|
||||
|
||||
if (toAdd != null) {
|
||||
for (ITriggerInternal t : toAdd) {
|
||||
if (!result.contains(t)) {
|
||||
result.add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<IActionInternal> getInternalActions(IStatementContainer container) {
|
||||
List<IActionInternal> result = new LinkedList<IActionInternal>();
|
||||
|
||||
for (IActionProvider provider : actionProviders) {
|
||||
Collection<IActionInternal> toAdd = provider.getInternalActions(container);
|
||||
|
||||
if (toAdd != null) {
|
||||
for (IActionInternal t : toAdd) {
|
||||
if (!result.contains(t)) {
|
||||
result.add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static IStatementParameter createParameter(String kind) {
|
||||
return createParameter(parameters.get(kind));
|
||||
}
|
||||
|
||||
private static IStatementParameter createParameter(Class<? extends IStatementParameter> param) {
|
||||
try {
|
||||
return param.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Error error) {
|
||||
BCLog.logErrorAPI(error, IStatementParameter.class);
|
||||
throw error;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Generally, this function should be called by every mod implementing
|
||||
// * the Statements API ***as a container*** (that is, adding its own gates)
|
||||
// * on the client side from a given Item of choice.
|
||||
// */
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public static void registerIcons(TextureAtlasSpriteRegister register) {
|
||||
// for (IStatement statement : statements.values()) {
|
||||
// statement.registerIcons(register);
|
||||
// }
|
||||
//
|
||||
// for (Class<? extends IStatementParameter> parameter : parameters.values()) {
|
||||
// createParameter(parameter).registerIcons(register);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public final class StatementMouseClick {
|
||||
private int button;
|
||||
private boolean shift;
|
||||
|
||||
public StatementMouseClick(int button, boolean shift) {
|
||||
this.button = button;
|
||||
this.shift = shift;
|
||||
}
|
||||
|
||||
public boolean isShift() {
|
||||
return shift;
|
||||
}
|
||||
|
||||
public int getButton() {
|
||||
return button;
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class StatementParameterItemStack implements IStatementParameter {
|
||||
|
||||
protected ItemStack stack;
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getIcon() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStack() {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(IStatementContainer source, IStatement stmt, ItemStack stack, StatementMouseClick mouse) {
|
||||
if (stack != null) {
|
||||
this.stack = stack.copy();
|
||||
this.stack.stackSize = 1;
|
||||
} else {
|
||||
this.stack = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound compound) {
|
||||
if (stack != null) {
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
stack.writeToNBT(tagCompound);
|
||||
compound.setTag("stack", tagCompound);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
stack = ItemStack.loadItemStackFromNBT(compound.getCompoundTag("stack"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (object instanceof StatementParameterItemStack) {
|
||||
StatementParameterItemStack param = (StatementParameterItemStack) object;
|
||||
|
||||
return ItemStack.areItemStacksEqual(stack, param.stack) && ItemStack.areItemStackTagsEqual(stack, param.stack);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
if (stack != null) {
|
||||
return stack.getDisplayName();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return "buildcraft:stack";
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void registerIcons(TextureAtlasSpriteRegister iconRegister) {
|
||||
//
|
||||
// }
|
||||
|
||||
@Override
|
||||
public IStatementParameter rotateLeft() {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
|
||||
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
|
||||
package buildcraft.api.statements;
|
||||
|
||||
public class StatementSlot {
|
||||
public IStatement statement;
|
||||
public IStatementParameter[] parameters;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || !(o instanceof StatementSlot)) {
|
||||
return false;
|
||||
}
|
||||
StatementSlot s = (StatementSlot) o;
|
||||
if (s.statement != statement || parameters.length != s.parameters.length) {
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < parameters.length; i++) {
|
||||
IStatementParameter p1 = parameters[i];
|
||||
IStatementParameter p2 = s.parameters[i];
|
||||
if (p1 == null && p2 != null) {
|
||||
return false;
|
||||
}
|
||||
if (!(p1.equals(p2))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package buildcraft.api.statements.containers;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IRedstoneStatementContainer {
|
||||
/** Get the redstone input from a given side.
|
||||
*
|
||||
* @param side The side - use "UNKNOWN" for maximum input.
|
||||
* @return The redstone input, from 0 to 15. */
|
||||
int getRedstoneInput(EnumFacing side);
|
||||
|
||||
/** Set the redstone input for a given side.
|
||||
*
|
||||
* @param side The side - use "UNKNOWN" for all sides.
|
||||
* @return Whether the set was successful. */
|
||||
boolean setRedstoneOutput(EnumFacing side, int value);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package buildcraft.api.statements.containers;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
|
||||
/** Created by asie on 3/14/15. */
|
||||
public interface ISidedStatementContainer extends IStatementContainer {
|
||||
EnumFacing getSide();
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
@API(apiVersion = "1.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|statements")
|
||||
package buildcraft.api.statements;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -1,12 +0,0 @@
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ICustomPipeConnection {
|
||||
/** @return How long the connecting pipe should extend for. Values less than -4/16 indicate that the pipe will not
|
||||
* connect at all, and will render as it it was not connected. */
|
||||
public float getExtension(World world, BlockPos pos, EnumFacing face, IBlockState state);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IInjectable {
|
||||
boolean canInjectItems(EnumFacing from);
|
||||
|
||||
/** Offers an ItemStack for 3addition to the pipe. Will be rejected if the pipe doesn't accept items from that side.
|
||||
*
|
||||
* @param stack ItemStack offered for addition. Do not manipulate this!
|
||||
* @param doAdd If false no actual addition should take place. Implementors should simulate.
|
||||
* @param from Orientation the ItemStack is offered from.
|
||||
* @param color The color of the item to be added to the pipe, or null for no color.
|
||||
* @return Amount of items used from the passed stack. */
|
||||
int injectItem(ItemStack stack, boolean doAdd, EnumFacing from, EnumDyeColor color);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License 1.0, or MMPL. Please check the contents
|
||||
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
/** To be implemented by the real item pipe in Transport mod, but leaves knowledge for classes that do not have direct
|
||||
* dependency on transport. */
|
||||
public interface IItemPipe {
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import buildcraft.api.gates.IGate;
|
||||
|
||||
public interface IPipe {
|
||||
IPipeTile getTile();
|
||||
|
||||
IGate getGate(EnumFacing side);
|
||||
|
||||
boolean hasGate(EnumFacing side);
|
||||
|
||||
boolean isWired(PipeWire wire);
|
||||
|
||||
boolean isWireActive(PipeWire wire);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IPipeConnection {
|
||||
|
||||
enum ConnectOverride {
|
||||
|
||||
CONNECT,
|
||||
DISCONNECT,
|
||||
DEFAULT
|
||||
}
|
||||
|
||||
/** Allows you to override pipe connection logic.
|
||||
*
|
||||
* @param type
|
||||
* @param with
|
||||
* @return CONNECT to force a connection, DISCONNECT to force no connection, and DEFAULT to let the pipe decide. */
|
||||
ConnectOverride overridePipeConnection(IPipeTile.PipeType type, EnumFacing with);
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import buildcraft.api.transport.pluggable.PipePluggable;
|
||||
|
||||
public interface IPipeTile extends IInjectable {
|
||||
enum PipeType {
|
||||
ITEM,
|
||||
FLUID,
|
||||
POWER,
|
||||
STRUCTURE
|
||||
}
|
||||
|
||||
PipeType getPipeType();
|
||||
|
||||
World getWorldBC();
|
||||
|
||||
/** True if the pipe is connected to the block/pipe in the specific direction
|
||||
*
|
||||
* @param with
|
||||
* @return true if connect */
|
||||
boolean isPipeConnected(EnumFacing with);
|
||||
|
||||
Block getNeighborBlock(EnumFacing dir);
|
||||
|
||||
TileEntity getNeighborTile(EnumFacing dir);
|
||||
|
||||
IPipe getNeighborPipe(EnumFacing dir);
|
||||
|
||||
IPipe getPipe();
|
||||
|
||||
int getPipeColor();
|
||||
|
||||
PipePluggable getPipePluggable(EnumFacing direction); // Now in IPluggableProvider
|
||||
|
||||
boolean hasPipePluggable(EnumFacing direction); // Now in IPluggableProvider
|
||||
|
||||
boolean hasBlockingPluggable(EnumFacing direction);
|
||||
|
||||
void scheduleNeighborChange();
|
||||
|
||||
void scheduleRenderUpdate();
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IStripesActivator {
|
||||
void sendItem(ItemStack itemStack, EnumFacing direction);
|
||||
|
||||
void dropItem(ItemStack itemStack, EnumFacing direction);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IStripesHandler {
|
||||
enum StripesHandlerType {
|
||||
ITEM_USE,
|
||||
BLOCK_BREAK
|
||||
}
|
||||
|
||||
StripesHandlerType getType();
|
||||
|
||||
boolean shouldHandle(ItemStack stack);
|
||||
|
||||
boolean handle(World world, BlockPos pos, EnumFacing direction, ItemStack stack, EntityPlayer player, IStripesActivator activator);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/** Copyright (c) 2011-2015, SpaceToad and the BuildCraft Team http://www.mod-buildcraft.com
|
||||
*
|
||||
* The BuildCraft API is distributed under the terms of the MIT License. Please check the contents of the license, which
|
||||
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
|
||||
package buildcraft.api.transport;
|
||||
|
||||
import cofh.api.energy.IEnergyHandler;
|
||||
|
||||
public interface IStripesPipe extends IPipe, IStripesActivator, IEnergyHandler {}
|
||||