mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-26 14:24:22 +00:00
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8da80454b | ||
|
|
272075dd51 | ||
|
|
56bd18670f | ||
|
|
29f0c6af40 | ||
|
|
5ed33dfa4f | ||
|
|
7a74dabcea | ||
|
|
68518a7858 | ||
|
|
f83cd1ab0b | ||
|
|
5595d0377c | ||
|
|
6c4d37a345 | ||
|
|
77e14f3c8a | ||
|
|
71e00772b7 | ||
|
|
cf60696c68 | ||
|
|
d24f3facfe | ||
|
|
5cdf19daac | ||
|
|
93e6a1f7ba |
No files matched your search
+226
-79
@@ -1,4 +1,4 @@
|
||||
//version: 1682616243
|
||||
//version: 1698936026
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
@@ -69,8 +69,11 @@ plugins {
|
||||
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
|
||||
id 'com.modrinth.minotaur' version '2.+' apply false
|
||||
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.7'
|
||||
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
|
||||
}
|
||||
|
||||
print("You might want to check out './gradlew :faq' if your build fails.\n")
|
||||
|
||||
boolean settingsupdated = verifySettingsGradle()
|
||||
settingsupdated = verifyGitAttributes() || settingsupdated
|
||||
if (settingsupdated)
|
||||
@@ -86,6 +89,23 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
|
||||
def projectJavaVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
|
||||
boolean disableCheckstyle = project.hasProperty("disableCheckstyle") ? project.disableCheckstyle.toBoolean() : false
|
||||
|
||||
final String CHECKSTYLE_CONFIG = """
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
<module name="Checker">
|
||||
<module name="TreeWalker">
|
||||
<!-- Use CHECKSTYLE:OFF and CHECKSTYLE:ON comments to suppress checkstyle lints in a block -->
|
||||
<module name="SuppressionCommentFilter"/>
|
||||
<module name="AvoidStarImport">
|
||||
<!-- Allow static wildcard imports for cases like Opcodes and LWJGL classes, these don't get created accidentally by the IDE -->
|
||||
<property name="allowStaticMemberImports" value="true"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
||||
"""
|
||||
|
||||
checkPropertyExists("modName")
|
||||
checkPropertyExists("modId")
|
||||
@@ -112,6 +132,8 @@ propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
|
||||
propertyDefaultIfUnset("forceEnableMixins", false)
|
||||
propertyDefaultIfUnset("channel", "stable")
|
||||
propertyDefaultIfUnset("mappingsVersion", "12")
|
||||
propertyDefaultIfUnset("usesMavenPublishing", true)
|
||||
propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases")
|
||||
propertyDefaultIfUnset("modrinthProjectId", "")
|
||||
propertyDefaultIfUnset("modrinthRelations", "")
|
||||
propertyDefaultIfUnset("curseForgeProjectId", "")
|
||||
@@ -135,6 +157,17 @@ if (!disableSpotless) {
|
||||
apply from: Blowdryer.file('spotless.gradle')
|
||||
}
|
||||
|
||||
if (!disableCheckstyle) {
|
||||
apply plugin: 'checkstyle'
|
||||
tasks.named("checkstylePatchedMc") { enabled = false }
|
||||
tasks.named("checkstyleMcLauncher") { enabled = false }
|
||||
tasks.named("checkstyleIdeVirtualMain") { enabled = false }
|
||||
tasks.named("checkstyleInjectedTags") { enabled = false }
|
||||
checkstyle {
|
||||
config = resources.text.fromString(CHECKSTYLE_CONFIG)
|
||||
}
|
||||
}
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
@@ -219,6 +252,8 @@ if (enableModernJavaSyntax.toBoolean()) {
|
||||
|
||||
dependencies {
|
||||
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
|
||||
// workaround for https://github.com/bsideup/jabel/issues/174
|
||||
annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0'
|
||||
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
|
||||
transitive = false // We only care about the 1 annotation class
|
||||
}
|
||||
@@ -352,7 +387,27 @@ catch (Exception ignored) {
|
||||
String identifiedVersion
|
||||
String versionOverride = System.getenv("VERSION") ?: null
|
||||
try {
|
||||
identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
|
||||
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
|
||||
if (versionOverride == null) {
|
||||
def gitDetails = versionDetails()
|
||||
def isDirty = gitVersion().endsWith(".dirty") // No public API for this, isCleanTag has a different meaning
|
||||
String branchName = gitDetails.branchName ?: (System.getenv('GIT_BRANCH') ?: 'git')
|
||||
if (branchName.startsWith('origin/')) {
|
||||
branchName = branchName.minus('origin/')
|
||||
}
|
||||
branchName = branchName.replaceAll("[^a-zA-Z0-9-]+", "-") // sanitize branch names for semver
|
||||
identifiedVersion = gitDetails.lastTag ?: '${gitDetails.gitHash}'
|
||||
if (gitDetails.commitDistance > 0) {
|
||||
identifiedVersion += "-${branchName}.${gitDetails.commitDistance}+${gitDetails.gitHash}"
|
||||
if (isDirty) {
|
||||
identifiedVersion += "-dirty"
|
||||
}
|
||||
} else if (isDirty) {
|
||||
identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty"
|
||||
}
|
||||
} else {
|
||||
identifiedVersion = versionOverride
|
||||
}
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
out.style(Style.Failure).text(
|
||||
@@ -374,9 +429,13 @@ if (identifiedVersion == versionOverride) {
|
||||
|
||||
group = "com.github.GTNewHorizons"
|
||||
if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
archivesBaseName = customArchiveBaseName
|
||||
base {
|
||||
archivesName = customArchiveBaseName
|
||||
}
|
||||
} else {
|
||||
archivesBaseName = modId
|
||||
base {
|
||||
archivesName = modId
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -460,10 +519,19 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
|
||||
if (file('addon.gradle').exists()) {
|
||||
if (file('addon.gradle.kts').exists()) {
|
||||
apply from: 'addon.gradle.kts'
|
||||
} else if (file('addon.gradle').exists()) {
|
||||
apply from: 'addon.gradle'
|
||||
}
|
||||
|
||||
// File for local tweaks not commited to Git
|
||||
if (file('addon.local.gradle.kts').exists()) {
|
||||
apply from: 'addon.local.gradle.kts'
|
||||
} else if (file('addon.local.gradle').exists()) {
|
||||
apply from: 'addon.local.gradle'
|
||||
}
|
||||
|
||||
// Allow unsafe repos but warn
|
||||
repositories.configureEach { repo ->
|
||||
if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) {
|
||||
@@ -474,7 +542,14 @@ repositories.configureEach { repo ->
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'repositories.gradle'
|
||||
if (file('repositories.gradle.kts').exists()) {
|
||||
apply from: 'repositories.gradle.kts'
|
||||
} else if (file('repositories.gradle').exists()) {
|
||||
apply from: 'repositories.gradle'
|
||||
} else {
|
||||
logger.error("Neither repositories.gradle.kts nor repositories.gradle was found, make sure you extracted the full ExampleMod template.")
|
||||
throw new RuntimeException("Missing repositories.gradle[.kts]")
|
||||
}
|
||||
|
||||
configurations {
|
||||
runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
|
||||
@@ -515,9 +590,6 @@ repositories {
|
||||
maven {
|
||||
name 'Overmind forge repo mirror'
|
||||
url 'https://gregtech.overminddl1.com/'
|
||||
mavenContent {
|
||||
excludeGroup("net.minecraftforge") // missing the `universal` artefact
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "GTNH Maven"
|
||||
@@ -532,24 +604,34 @@ repositories {
|
||||
}
|
||||
}
|
||||
if (includeWellKnownRepositories.toBoolean()) {
|
||||
maven {
|
||||
name "CurseMaven"
|
||||
url "https://cursemaven.com"
|
||||
content {
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name "CurseMaven"
|
||||
url "https://cursemaven.com"
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup "curse.maven"
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = "Modrinth"
|
||||
url = "https://api.modrinth.com/maven"
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup "maven.modrinth"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "ic2"
|
||||
url = "https://maven.ic2.player.to/"
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
|
||||
content {
|
||||
includeGroup "net.industrial-craft"
|
||||
}
|
||||
}
|
||||
maven {
|
||||
name = "ic2-mirror"
|
||||
url = "https://maven2.ic2.player.to/"
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
@@ -564,9 +646,12 @@ repositories {
|
||||
|
||||
def mixinProviderGroup = "io.github.legacymoddingmc"
|
||||
def mixinProviderModule = "unimixins"
|
||||
def mixinProviderVersion = "0.1.6"
|
||||
def mixinProviderVersion = "0.1.13"
|
||||
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
|
||||
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
|
||||
ext.mixinProviderSpec = mixinProviderSpec
|
||||
|
||||
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
|
||||
|
||||
dependencies {
|
||||
if (usesMixins.toBoolean()) {
|
||||
@@ -579,7 +664,7 @@ dependencies {
|
||||
}
|
||||
}
|
||||
if (usesMixins.toBoolean()) {
|
||||
implementation(mixinProviderSpec)
|
||||
implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap))
|
||||
} else if (forceEnableMixins.toBoolean()) {
|
||||
runtimeOnlyNonPublishable(mixinProviderSpec)
|
||||
}
|
||||
@@ -605,12 +690,32 @@ configurations.all {
|
||||
}
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
dependencies {
|
||||
constraints {
|
||||
def minGtnhLibVersion = "0.0.13"
|
||||
implementation("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
|
||||
because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
|
||||
}
|
||||
runtimeOnly("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
|
||||
because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
|
||||
}
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
|
||||
because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
|
||||
}
|
||||
runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
|
||||
because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
|
||||
def mixinTmpDir = buildDir.path + File.separator + 'tmp' + File.separator + 'mixins'
|
||||
def refMap = "${mixinTmpDir}" + File.separator + mixingConfigRefMap
|
||||
def mixinSrg = "${mixinTmpDir}" + File.separator + "mixins.srg"
|
||||
if (file('dependencies.gradle.kts').exists()) {
|
||||
apply from: 'dependencies.gradle.kts'
|
||||
} else if (file('dependencies.gradle').exists()) {
|
||||
apply from: 'dependencies.gradle'
|
||||
} else {
|
||||
logger.error("Neither dependencies.gradle.kts nor dependencies.gradle was found, make sure you extracted the full ExampleMod template.")
|
||||
throw new RuntimeException("Missing dependencies.gradle[.kts]")
|
||||
}
|
||||
|
||||
tasks.register('generateAssets') {
|
||||
group = "GTNH Buildscript"
|
||||
@@ -642,46 +747,17 @@ tasks.register('generateAssets') {
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
tasks.named("reobfJar", ReobfuscatedJar).configure {
|
||||
extraSrgFiles.from(mixinSrg)
|
||||
}
|
||||
|
||||
tasks.named("processResources").configure {
|
||||
dependsOn("generateAssets")
|
||||
}
|
||||
|
||||
tasks.named("compileJava", JavaCompile).configure {
|
||||
doFirst {
|
||||
new File(mixinTmpDir).mkdirs()
|
||||
}
|
||||
options.compilerArgs += [
|
||||
"-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}",
|
||||
"-AoutSrgFile=${mixinSrg}",
|
||||
"-AoutRefMapFile=${refMap}",
|
||||
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
|
||||
"-XDenableSunApiLintControl",
|
||||
"-XDignore.symbol.file"
|
||||
]
|
||||
}
|
||||
|
||||
pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
javacOptions {
|
||||
option("-AreobfSrgFile=${tasks.reobfJar.srg.get().asFile}")
|
||||
option("-AoutSrgFile=$mixinSrg")
|
||||
option("-AoutRefMapFile=$refMap")
|
||||
}
|
||||
}
|
||||
tasks.configureEach { task ->
|
||||
if (task.name == "kaptKotlin") {
|
||||
task.doFirst {
|
||||
new File(mixinTmpDir).mkdirs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tasks.named("processResources", ProcessResources).configure {
|
||||
@@ -699,7 +775,6 @@ tasks.named("processResources", ProcessResources).configure {
|
||||
}
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
dependsOn("compileJava", "compileScala")
|
||||
}
|
||||
}
|
||||
@@ -718,23 +793,14 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def lwjgl3ifyVersion = '1.3.5'
|
||||
def asmVersion = '9.4'
|
||||
def lwjgl3ifyVersion = '1.5.1'
|
||||
if (modId != 'lwjgl3ify') {
|
||||
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
|
||||
}
|
||||
if (modId != 'hodgepodge') {
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.8')
|
||||
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
|
||||
}
|
||||
|
||||
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
|
||||
java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
|
||||
java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
|
||||
java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
|
||||
java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
|
||||
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
|
||||
}
|
||||
|
||||
@@ -817,6 +883,18 @@ public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
|
||||
}
|
||||
this.classpath(project.java17DependenciesCfg)
|
||||
}
|
||||
|
||||
public void setup(Project project) {
|
||||
super.setup(project)
|
||||
if (project.usesMixins.toBoolean()) {
|
||||
this.extraJvmArgs.addAll(project.provider(() -> {
|
||||
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
|
||||
mixinCfg.canBeConsumed = false
|
||||
mixinCfg.transitive = false
|
||||
enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : []
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient")
|
||||
@@ -961,6 +1039,9 @@ idea {
|
||||
}
|
||||
}
|
||||
runConfigurations {
|
||||
"0. Build and Test"(Gradle) {
|
||||
taskNames = ["build"]
|
||||
}
|
||||
"1. Run Client"(Gradle) {
|
||||
taskNames = ["runClient"]
|
||||
}
|
||||
@@ -1080,6 +1161,14 @@ tasks.named("processIdeaSettings").configure {
|
||||
dependsOn("injectTags")
|
||||
}
|
||||
|
||||
tasks.named("ideVirtualMainClasses").configure {
|
||||
// Make IntelliJ "Build project" build the mod jars
|
||||
dependsOn("jar", "reobfJar")
|
||||
if (!disableSpotless) {
|
||||
dependsOn("spotlessCheck")
|
||||
}
|
||||
}
|
||||
|
||||
// workaround variable hiding in pom processing
|
||||
def projectConfigs = project.configurations
|
||||
|
||||
@@ -1100,12 +1189,14 @@ publishing {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases"
|
||||
allowInsecureProtocol = true
|
||||
credentials {
|
||||
username = System.getenv("MAVEN_USER") ?: "NONE"
|
||||
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
|
||||
if (usesMavenPublishing.toBoolean()) {
|
||||
maven {
|
||||
url = mavenPublishUrl
|
||||
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
|
||||
credentials {
|
||||
username = System.getenv("MAVEN_USER") ?: "NONE"
|
||||
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1220,7 +1311,7 @@ def addCurseForgeRelation(String type, String name) {
|
||||
|
||||
// Updating
|
||||
|
||||
def buildscriptGradleVersion = "8.1.1"
|
||||
def buildscriptGradleVersion = "8.2.1"
|
||||
|
||||
tasks.named('wrapper', Wrapper).configure {
|
||||
gradleVersion = buildscriptGradleVersion
|
||||
@@ -1252,6 +1343,23 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
|
||||
}
|
||||
}
|
||||
|
||||
// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large
|
||||
tasks.register('faq') {
|
||||
group = 'GTNH Buildscript'
|
||||
description = 'Prints frequently asked questions about building a project'
|
||||
|
||||
doLast {
|
||||
print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " +
|
||||
"Or you can manually check if the versions are still on the distributing sites - " +
|
||||
"the links can be found in repositories.gradle and build.gradle:repositories, " +
|
||||
"but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" +
|
||||
"If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
|
||||
"gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " +
|
||||
"However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " +
|
||||
"Java 9 or later.")
|
||||
}
|
||||
}
|
||||
|
||||
static URL availableBuildScriptUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
|
||||
}
|
||||
@@ -1309,8 +1417,14 @@ boolean isNewBuildScriptVersionAvailable() {
|
||||
|
||||
String currentBuildScript = getFile("build.gradle").getText()
|
||||
String currentBuildScriptHash = getVersionHash(currentBuildScript)
|
||||
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
|
||||
String availableBuildScriptHash = getVersionHash(availableBuildScript)
|
||||
String availableBuildScriptHash
|
||||
try {
|
||||
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
|
||||
availableBuildScriptHash = getVersionHash(availableBuildScript)
|
||||
} catch (IOException e) {
|
||||
logger.warn("Could not check for buildscript update availability: {}", e.message)
|
||||
return false
|
||||
}
|
||||
|
||||
boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
|
||||
return !isUpToDate
|
||||
@@ -1475,3 +1589,36 @@ def getSecondaryArtifacts() {
|
||||
if (apiPackage) secondaryArtifacts += [apiJar]
|
||||
return secondaryArtifacts
|
||||
}
|
||||
|
||||
def getURL(String main, String fallback) {
|
||||
return pingURL(main, 10000) ? main : fallback
|
||||
}
|
||||
|
||||
// credit: https://stackoverflow.com/a/3584332
|
||||
def pingURL(String url, int timeout) {
|
||||
url = url.replaceFirst("^https", "http") // Otherwise an exception may be thrown on invalid SSL certificates.
|
||||
try {
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection()
|
||||
connection.setConnectTimeout(timeout)
|
||||
connection.setReadTimeout(timeout)
|
||||
connection.setRequestMethod("HEAD")
|
||||
int responseCode = connection.getResponseCode()
|
||||
return 200 <= responseCode && responseCode <= 399
|
||||
} catch (IOException ignored) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// For easier scripting of things that require variables defined earlier in the buildscript
|
||||
if (file('addon.late.gradle.kts').exists()) {
|
||||
apply from: 'addon.late.gradle.kts'
|
||||
} else if (file('addon.late.gradle').exists()) {
|
||||
apply from: 'addon.late.gradle'
|
||||
}
|
||||
|
||||
// File for local tweaks not commited to Git
|
||||
if (file('addon.late.local.gradle.kts').exists()) {
|
||||
apply from: 'addon.late.local.gradle.kts'
|
||||
} else if (file('addon.late.local.gradle').exists()) {
|
||||
apply from: 'addon.late.local.gradle'
|
||||
}
|
||||
+6
-6
@@ -1,15 +1,15 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile('com.github.GTNewHorizons:Baubles:1.0.1.14:dev')
|
||||
compile('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')
|
||||
|
||||
compile('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.14.0:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.11.13-GTNH:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.2.7:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.3.45-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.27:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.15.0:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:1.12.1-GTNH:api') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:ForgeMultipart:1.3.4:dev') {transitive=false}
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.4.9-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.36:api') {transitive=false}
|
||||
compile('com.github.GTNewHorizons:GTNHLib:0.0.13:dev')
|
||||
|
||||
compileOnly('curse.maven:cofh-lib-220333:2388748')
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -43,11 +43,7 @@ public class RecipeElvenTrade {
|
||||
List<ItemStack> validStacks = OreDictionary.getOres((String) input);
|
||||
boolean found = false;
|
||||
for(ItemStack ostack : validStacks) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
cstack.setItemDamage(stack.getItemDamage());
|
||||
|
||||
if(stack.isItemEqual(cstack)) {
|
||||
if(OreDictionary.itemMatches(ostack, stack, false)) {
|
||||
if(!stacksToRemove.contains(stack))
|
||||
stacksToRemove.add(stack);
|
||||
oredictIndex = j;
|
||||
|
||||
@@ -2,6 +2,7 @@ package vazkii.botania.client.core.handler;
|
||||
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import vazkii.botania.common.network.PacketHandler;
|
||||
import vazkii.botania.common.network.PacketLokiClear;
|
||||
import vazkii.botania.common.network.PacketLokiToggle;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
@@ -13,10 +14,13 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class KeyHandler {
|
||||
private static final KeyBinding keyToggleRingOfLoki= new KeyBinding("botaniamisc.toggleLoki", 0, "botaniamisc.keyCategory");
|
||||
private static final KeyBinding keyRingOfLokiClear= new KeyBinding("botaniamisc.ringOfLokiClear", 0, "botaniamisc.keyCategory");
|
||||
|
||||
public KeyHandler() {
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
ClientRegistry.registerKeyBinding(keyToggleRingOfLoki);
|
||||
ClientRegistry.registerKeyBinding(keyToggleRingOfLoki);
|
||||
ClientRegistry.registerKeyBinding(keyRingOfLokiClear);
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
@@ -28,9 +32,16 @@ public class KeyHandler {
|
||||
if (keyToggleRingOfLoki.isPressed()){
|
||||
toggleRingLoki();
|
||||
}
|
||||
if(keyRingOfLokiClear.isPressed()){
|
||||
ringOfLokiClear();
|
||||
}
|
||||
}
|
||||
|
||||
private static void toggleRingLoki() {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketLokiToggle());
|
||||
}
|
||||
|
||||
private static void ringOfLokiClear() {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketLokiClear());
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Mar 16, 2015, 6:42:40 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.bag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.client.gui.SlotLocked;
|
||||
|
||||
public class ContainerFlowerBag extends Container {
|
||||
|
||||
InventoryFlowerBag flowerBagInv;
|
||||
|
||||
public ContainerFlowerBag(EntityPlayer player) {
|
||||
int i;
|
||||
int j;
|
||||
|
||||
int slot = player.inventory.currentItem;
|
||||
IInventory playerInv = player.inventory;
|
||||
flowerBagInv = new InventoryFlowerBag(player, slot);
|
||||
|
||||
for(i = 0; i < 2; ++i)
|
||||
for(j = 0; j < 8; ++j) {
|
||||
int k = j + i * 8;
|
||||
addSlotToContainer(new SlotFlower(flowerBagInv, k, 17 + j * 18, 26 + i * 18, k));
|
||||
}
|
||||
|
||||
for(i = 0; i < 3; ++i)
|
||||
for(j = 0; j < 9; ++j)
|
||||
addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
|
||||
for(i = 0; i < 9; ++i) {
|
||||
if(player.inventory.currentItem == i)
|
||||
addSlotToContainer(new SlotLocked(playerInv, i, 8 + i * 18, 142));
|
||||
else addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
boolean can = flowerBagInv.isUseableByPlayer(player);
|
||||
if(!can)
|
||||
onContainerClosed(player);
|
||||
|
||||
return can;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
flowerBagInv.pushInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot)inventorySlots.get(p_82846_2_);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if(p_82846_2_ < 16) {
|
||||
if(!mergeItemStack(itemstack1, 16, 52, true))
|
||||
return null;
|
||||
} else {
|
||||
int i = itemstack.getItemDamage();
|
||||
if(i < 16) {
|
||||
Slot slot1 = (Slot)inventorySlots.get(i);
|
||||
if(slot1.isItemValid(itemstack) && !mergeItemStack(itemstack1, i, i + 1, true))
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(itemstack1.stackSize == 0)
|
||||
slot.putStack((ItemStack)null);
|
||||
else slot.onSlotChanged();
|
||||
|
||||
if(itemstack1.stackSize == itemstack.stackSize)
|
||||
return null;
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Mar 16, 2015, 6:42:43 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.bag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class GuiFlowerBag extends GuiContainer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_FLOWER_BAG);
|
||||
|
||||
public GuiFlowerBag(EntityPlayer player) {
|
||||
super(new ContainerFlowerBag(player));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String s = StatCollector.translateToLocal("item.botania:flowerBag.name");
|
||||
fontRendererObj.drawString(s, xSize / 2 - fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
|
||||
fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
|
||||
|
||||
List<Slot> slotList = inventorySlots.inventorySlots;
|
||||
for(Slot slot : slotList)
|
||||
if(slot instanceof SlotFlower) {
|
||||
SlotFlower slotf = (SlotFlower) slot;
|
||||
if(!slotf.getHasStack()) {
|
||||
ItemStack stack = new ItemStack(ModBlocks.flower, 0, slotf.color);
|
||||
int x = guiLeft + slotf.xDisplayPosition;
|
||||
int y = guiTop + slotf.yDisplayPosition;
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, stack, x, y);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
mc.fontRenderer.drawStringWithShadow("0", x + 11, y + 9, 0xFF6666);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkHotbarKeys(int p_146983_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Mar 16, 2015, 6:42:56 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.bag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.item.ItemFlowerBag;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class InventoryFlowerBag implements IInventory {
|
||||
|
||||
private static final ItemStack[] FALLBACK_INVENTORY = new ItemStack[16];
|
||||
|
||||
EntityPlayer player;
|
||||
int slot;
|
||||
ItemStack[] stacks = null;
|
||||
|
||||
boolean invPushed = false;
|
||||
ItemStack storedInv = null;
|
||||
|
||||
public InventoryFlowerBag(EntityPlayer player, int slot) {
|
||||
this.player = player;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
public static boolean isFlowerBag(ItemStack stack) {
|
||||
return stack != null && stack.getItem() == ModItems.flowerBag;
|
||||
}
|
||||
|
||||
ItemStack getStack() {
|
||||
ItemStack stack = player.inventory.getStackInSlot(slot);
|
||||
if(stack != null)
|
||||
storedInv = stack;
|
||||
return stack;
|
||||
}
|
||||
|
||||
ItemStack[] getInventory() {
|
||||
if(stacks != null)
|
||||
return stacks;
|
||||
|
||||
ItemStack stack = getStack();
|
||||
if(isFlowerBag(getStack())) {
|
||||
stacks = ItemFlowerBag.loadStacks(stack);
|
||||
return stacks;
|
||||
}
|
||||
|
||||
return FALLBACK_INVENTORY;
|
||||
}
|
||||
|
||||
public void pushInventory() {
|
||||
if(invPushed)
|
||||
return;
|
||||
|
||||
ItemStack stack = getStack();
|
||||
if(stack == null)
|
||||
stack = storedInv;
|
||||
|
||||
if(stack != null) {
|
||||
ItemStack[] inv = getInventory();
|
||||
ItemFlowerBag.setStacks(stack, inv);
|
||||
}
|
||||
|
||||
invPushed = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return getInventory()[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
ItemStack[] inventorySlots = getInventory();
|
||||
if (inventorySlots[i] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[i].stackSize <= j) {
|
||||
stackAt = inventorySlots[i];
|
||||
inventorySlots[i] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[i].splitStack(j);
|
||||
|
||||
if (inventorySlots[i].stackSize == 0)
|
||||
inventorySlots[i] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
ItemStack[] inventorySlots = getInventory();
|
||||
inventorySlots[i] = itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return isFlowerBag(getStack()) ? 64 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return isFlowerBag(getStack());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
|
||||
return isFlowerBag(getStack());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return LibItemNames.FLOWER_BAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Mar 16, 2015, 7:20:05 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.bag;
|
||||
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class SlotFlower extends Slot {
|
||||
|
||||
InventoryFlowerBag inv;
|
||||
int color;
|
||||
|
||||
public SlotFlower(InventoryFlowerBag p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_, int color) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
|
||||
this.color = color;
|
||||
inv = p_i1824_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlotChange(ItemStack oldStack, ItemStack newStack) {
|
||||
inv.setInventorySlotContents(color, newStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack.getItem() == Item.getItemFromBlock(ModBlocks.flower) && stack.getItemDamage() == color;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package vazkii.botania.client.gui.bags;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.client.gui.SlotLocked;
|
||||
|
||||
public abstract class ContainerMagicPlantBag extends Container {
|
||||
|
||||
protected InventoryMagicPlantBag magicPlantInv;
|
||||
public ContainerMagicPlantBag(EntityPlayer player) {
|
||||
int i;
|
||||
int j;
|
||||
|
||||
IInventory playerInv = player.inventory;
|
||||
|
||||
addMagicPlantSlots(player);
|
||||
|
||||
for(i = 0; i < 3; ++i) {
|
||||
for(j = 0; j < 9; ++j) {
|
||||
addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(i = 0; i < 9; ++i) {
|
||||
if(player.inventory.currentItem == i) {
|
||||
addSlotToContainer(new SlotLocked(playerInv, i, 8 + i * 18, 142));
|
||||
}
|
||||
else addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 142));
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void addMagicPlantSlots(EntityPlayer player);
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
boolean can = magicPlantInv.isUseableByPlayer(player);
|
||||
if(!can)
|
||||
onContainerClosed(player);
|
||||
|
||||
return can;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer player) {
|
||||
super.onContainerClosed(player);
|
||||
magicPlantInv.pushInventory();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_) {
|
||||
ItemStack itemstack = null;
|
||||
Slot slot = (Slot)inventorySlots.get(p_82846_2_);
|
||||
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
ItemStack itemstack1 = slot.getStack();
|
||||
itemstack = itemstack1.copy();
|
||||
|
||||
if(p_82846_2_ < 16) {
|
||||
if(!mergeItemStack(itemstack1, 16, 52, true))
|
||||
return null;
|
||||
} else {
|
||||
int i = itemstack.getItemDamage();
|
||||
if(i < 16) {
|
||||
Slot slot1 = (Slot)inventorySlots.get(i);
|
||||
if(slot1.isItemValid(itemstack) && !mergeItemStack(itemstack1, i, i + 1, true))
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if(itemstack1.stackSize == 0)
|
||||
slot.putStack((ItemStack)null);
|
||||
else slot.onSlotChanged();
|
||||
|
||||
if(itemstack1.stackSize == itemstack.stackSize)
|
||||
return null;
|
||||
|
||||
slot.onPickupFromSlot(p_82846_1_, itemstack1);
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
package vazkii.botania.client.gui.bags;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class GuiMagicPlantBag extends GuiContainer {
|
||||
|
||||
private final ResourceLocation texture;
|
||||
public GuiMagicPlantBag(ContainerMagicPlantBag container, ResourceLocation texture) {
|
||||
super(container);
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String s = StatCollector.translateToLocal(getLocalizedNameKey());
|
||||
fontRendererObj.drawString(s, xSize / 2 - fontRendererObj.getStringWidth(s) / 2, 6, 4210752);
|
||||
fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
|
||||
|
||||
List<Slot> slotList = inventorySlots.inventorySlots;
|
||||
for(Slot slot : slotList)
|
||||
if(slot instanceof SlotMagicPlant) {
|
||||
SlotMagicPlant slotf = (SlotMagicPlant) slot;
|
||||
if(!slotf.getHasStack()) {
|
||||
ItemStack stack = new ItemStack(itemTypeAllowed(), 0, slotf.color);
|
||||
int x = guiLeft + slotf.xDisplayPosition;
|
||||
int y = guiTop + slotf.yDisplayPosition;
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, stack, x, y);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
mc.fontRenderer.drawStringWithShadow("0", x + 11, y + 9, 0xFF6666);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkHotbarKeys(int p_146983_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected abstract Block itemTypeAllowed();
|
||||
|
||||
protected abstract String getLocalizedNameKey();
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package vazkii.botania.client.gui.bags;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.item.bag.ItemBagBase;
|
||||
|
||||
public abstract class InventoryMagicPlantBag implements IInventory {
|
||||
|
||||
private static final ItemStack[] FALLBACK_INVENTORY = new ItemStack[16];
|
||||
|
||||
EntityPlayer player;
|
||||
int slot;
|
||||
ItemStack[] stacks = null;
|
||||
|
||||
boolean invPushed = false;
|
||||
ItemStack storedInv = null;
|
||||
|
||||
public InventoryMagicPlantBag(EntityPlayer player, int slot) {
|
||||
this.player = player;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
ItemStack getStack() {
|
||||
ItemStack stack = player.inventory.getStackInSlot(slot);
|
||||
if(stack != null)
|
||||
storedInv = stack;
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
public void pushInventory() {
|
||||
if(invPushed)
|
||||
return;
|
||||
|
||||
ItemStack stack = getStack();
|
||||
if(stack == null)
|
||||
stack = storedInv;
|
||||
|
||||
if(stack != null) {
|
||||
ItemStack[] inv = getInventory();
|
||||
ItemBagBase.setStacks(stack, inv);
|
||||
}
|
||||
|
||||
invPushed = true;
|
||||
}
|
||||
|
||||
ItemStack[] getInventory() {
|
||||
if(stacks != null)
|
||||
return stacks;
|
||||
|
||||
ItemStack stack = getStack();
|
||||
if(isMagicPlantBag(getStack())) {
|
||||
stacks = ItemBagBase.loadStacks(stack);
|
||||
return stacks;
|
||||
}
|
||||
|
||||
return FALLBACK_INVENTORY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotIn) {
|
||||
return getInventory()[slotIn];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int index, int count) {
|
||||
ItemStack[] inventorySlots = getInventory();
|
||||
if (inventorySlots[index] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[index].stackSize <= count) {
|
||||
stackAt = inventorySlots[index];
|
||||
inventorySlots[index] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[index].splitStack(count);
|
||||
|
||||
if (inventorySlots[index].stackSize == 0)
|
||||
inventorySlots[index] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int index) {
|
||||
return getStackInSlot(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int index, ItemStack stack) {
|
||||
ItemStack[] inventorySlots = getInventory();
|
||||
inventorySlots[index] = stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return getBagName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return isMagicPlantBag(getStack()) ? 64 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer player) {
|
||||
return isMagicPlantBag(getStack());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int index, ItemStack stack) {
|
||||
return isMagicPlantBag(getStack());
|
||||
}
|
||||
|
||||
protected abstract String getBagName();
|
||||
|
||||
public abstract boolean isMagicPlantBag(ItemStack stack);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
package vazkii.botania.client.gui.bags;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public abstract class SlotMagicPlant extends Slot {
|
||||
|
||||
InventoryMagicPlantBag inv;
|
||||
int color;
|
||||
|
||||
public SlotMagicPlant(InventoryMagicPlantBag p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_, int color) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
|
||||
this.color = color;
|
||||
inv = p_i1824_1_;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSlotChange(ItemStack oldStack, ItemStack newStack) {
|
||||
inv.setInventorySlotContents(color, newStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack stack) {
|
||||
return stack.getItem() == Item.getItemFromBlock(getValidBlock()) && stack.getItemDamage() == color;
|
||||
}
|
||||
|
||||
protected abstract Block getValidBlock();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.client.gui.bags.flowerBag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import vazkii.botania.client.gui.bags.ContainerMagicPlantBag;
|
||||
|
||||
public class ContainerFlowerBag extends ContainerMagicPlantBag {
|
||||
public ContainerFlowerBag(EntityPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMagicPlantSlots(EntityPlayer player) {
|
||||
int slot = player.inventory.currentItem;
|
||||
magicPlantInv = new InventoryFlowerBag(player, slot);
|
||||
|
||||
for(int i = 0; i < 2; ++i) {
|
||||
for (int j = 0; j < 8; ++j) {
|
||||
int k = j + i * 8;
|
||||
addSlotToContainer(new SlotFlower(magicPlantInv, k, 17 + j * 18, 26 + i * 18, k));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package vazkii.botania.client.gui.bags.flowerBag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.gui.bags.GuiMagicPlantBag;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class GuiFlowerBag extends GuiMagicPlantBag {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_FLOWER_BAG);
|
||||
|
||||
public GuiFlowerBag(EntityPlayer player) {
|
||||
super(new ContainerFlowerBag(player), texture);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block itemTypeAllowed() {
|
||||
return ModBlocks.flower;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLocalizedNameKey() {
|
||||
return "item.botania:flowerBag.name";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.client.gui.bags.flowerBag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.client.gui.bags.InventoryMagicPlantBag;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class InventoryFlowerBag extends InventoryMagicPlantBag {
|
||||
public InventoryFlowerBag(EntityPlayer player, int slot) {
|
||||
super(player, slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMagicPlantBag(ItemStack stack) {
|
||||
return stack != null && stack.getItem() == ModItems.flowerBag;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBagName() {
|
||||
return LibItemNames.FLOWER_BAG;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package vazkii.botania.client.gui.bags.flowerBag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.client.gui.bags.InventoryMagicPlantBag;
|
||||
import vazkii.botania.client.gui.bags.SlotMagicPlant;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class SlotFlower extends SlotMagicPlant {
|
||||
public SlotFlower(InventoryMagicPlantBag p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_, int color) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block getValidBlock() {
|
||||
return ModBlocks.flower;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.client.gui.bags.shroomBag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import vazkii.botania.client.gui.bags.ContainerMagicPlantBag;
|
||||
|
||||
public class ContainerShroomBag extends ContainerMagicPlantBag {
|
||||
public ContainerShroomBag(EntityPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMagicPlantSlots(EntityPlayer player) {
|
||||
int slot = player.inventory.currentItem;
|
||||
magicPlantInv = new InventoryShroomBag(player, slot);
|
||||
|
||||
for(int i = 0; i < 2; ++i) {
|
||||
for (int j = 0; j < 8; ++j) {
|
||||
int k = j + i * 8;
|
||||
addSlotToContainer(new SlotShroom(magicPlantInv, k, 17 + j * 18, 26 + i * 18, k));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package vazkii.botania.client.gui.bags.shroomBag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.gui.bags.GuiMagicPlantBag;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class GuiShroomBag extends GuiMagicPlantBag {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_SHROOM_BAG);
|
||||
|
||||
public GuiShroomBag(EntityPlayer player) {
|
||||
super(new ContainerShroomBag(player), texture);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block itemTypeAllowed() {
|
||||
return ModBlocks.mushroom;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getLocalizedNameKey() {
|
||||
return "item.botania:shroomBag.name";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.client.gui.bags.shroomBag;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.client.gui.bags.InventoryMagicPlantBag;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class InventoryShroomBag extends InventoryMagicPlantBag {
|
||||
public InventoryShroomBag(EntityPlayer player, int slot) {
|
||||
super(player, slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMagicPlantBag(ItemStack stack) {
|
||||
return stack != null && stack.getItem() == ModItems.shroomBag;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBagName() {
|
||||
return LibItemNames.SHROOM_BAG;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package vazkii.botania.client.gui.bags.shroomBag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.client.gui.bags.InventoryMagicPlantBag;
|
||||
import vazkii.botania.client.gui.bags.SlotMagicPlant;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
public class SlotShroom extends SlotMagicPlant {
|
||||
public SlotShroom(InventoryMagicPlantBag p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_, int color) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_, color);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block getValidBlock() {
|
||||
return ModBlocks.mushroom;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,6 +44,7 @@ public final class LibResources {
|
||||
public static final String GUI_NEI_BLANK = PREFIX_GUI + "neiBlank.png";
|
||||
public static final String GUI_NEI_BREWERY = PREFIX_GUI + "neiBrewery.png";
|
||||
public static final String GUI_FLOWER_BAG = PREFIX_GUI + "flowerBag.png";
|
||||
public static final String GUI_SHROOM_BAG = PREFIX_GUI + "shroomBag.png";
|
||||
public static final String GUI_BAUBLE_BOX = PREFIX_GUI + "baubleBox.png";
|
||||
public static final String GUI_HUD_ICONS = PREFIX_GUI + "hudIcons.png";
|
||||
public static final String GUI_STENCIL = PREFIX_GUI + "stencil.png";
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.tile;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -16,11 +16,13 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.ILexicon;
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
@@ -71,6 +73,7 @@ public class TileAlfPortal extends TileMod {
|
||||
int ticksSinceLastItem = 0;
|
||||
private boolean closeNow = false;
|
||||
private boolean hasUnloadedParts = false;
|
||||
private boolean explode = false;
|
||||
|
||||
private static final Function<int[], int[]> CONVERTER_X_Z = new Function<int[], int[]>() {
|
||||
@Override
|
||||
@@ -142,7 +145,9 @@ public class TileAlfPortal extends TileMod {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack != null && (!(stack.getItem() instanceof IElvenItem) || !((IElvenItem) stack.getItem()).isElvenItem(stack)) && !item.getEntityData().hasKey(TAG_PORTAL_FLAG)) {
|
||||
item.setDead();
|
||||
addItem(stack);
|
||||
if (validateItemUsage(stack)) {
|
||||
addItem(stack);
|
||||
}
|
||||
ticksSinceLastItem = 0;
|
||||
}
|
||||
}
|
||||
@@ -164,11 +169,35 @@ public class TileAlfPortal extends TileMod {
|
||||
for(int i = 0; i < 36; i++)
|
||||
blockParticle(meta);
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, newMeta, 1 | 2);
|
||||
} else if(explode) {
|
||||
worldObj.createExplosion(null, xCoord + .5, yCoord + 2.0, zCoord + .5, 3f, true);
|
||||
explode = false;
|
||||
}
|
||||
|
||||
hasUnloadedParts = false;
|
||||
}
|
||||
|
||||
private boolean validateItemUsage(ItemStack inputStack) {
|
||||
for(RecipeElvenTrade recipe : BotaniaAPI.elvenTradeRecipes) {
|
||||
for(Object o : recipe.getInputs()) {
|
||||
if(o instanceof String) {
|
||||
for(ItemStack target : OreDictionary.getOres((String) o)) {
|
||||
if(OreDictionary.itemMatches(target, inputStack, false))
|
||||
return true;
|
||||
}
|
||||
} else if(o instanceof ItemStack) {
|
||||
ItemStack target = (ItemStack) o;
|
||||
if(inputStack.getItem() == target.getItem() && inputStack.getItemDamage() == target.getItemDamage())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(inputStack.getItem() == Items.bread) //Don't teleport bread. (See also: #2403)
|
||||
explode = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void blockParticle(int meta) {
|
||||
int i = worldObj.rand.nextInt(AIR_POSITIONS.length);
|
||||
double[] pos = new double[] {
|
||||
|
||||
@@ -257,6 +257,7 @@ public final class ModCraftingRecipes {
|
||||
public static IRecipe recipeSwapRing;
|
||||
public static IRecipe recipeSnowHorn;
|
||||
public static IRecipe recipeFlowerBag;
|
||||
public static IRecipe recipeShroomBag;
|
||||
public static IRecipe recipePhantomInk;
|
||||
public static IRecipe recipePoolCart;
|
||||
public static IRecipe recipePump;
|
||||
@@ -1768,6 +1769,13 @@ public final class ModCraftingRecipes {
|
||||
'W', new ItemStack(Blocks.wool, 1, Short.MAX_VALUE));
|
||||
recipeFlowerBag = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Mushroom Pouch Recipe
|
||||
GameRegistry.addShapedRecipe(new ItemStack(ModItems.shroomBag),
|
||||
"WPW", "W W", " W ",
|
||||
'P', new ItemStack(ModBlocks.mushroom, 1, Short.MAX_VALUE),
|
||||
'W', new ItemStack(Blocks.wool, 1, Short.MAX_VALUE));
|
||||
recipeShroomBag = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Phantom Ink Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.phantomInk, 4), LibOreDict.MANA_PEARL, "dye", "blockGlass", new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle), new ItemStack(Items.glass_bottle));
|
||||
recipePhantomInk = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Mar 16, 2015, 6:43:33 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ItemFlowerBag extends ItemMod {
|
||||
|
||||
private static final String TAG_ITEMS = "InvItems";
|
||||
private static final String TAG_SLOT = "Slot";
|
||||
|
||||
public ItemFlowerBag() {
|
||||
setUnlocalizedName(LibItemNames.FLOWER_BAG);
|
||||
setMaxStackSize(1);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPickupItem(EntityItemPickupEvent event) {
|
||||
ItemStack stack = event.item.getEntityItem();
|
||||
if(stack.getItem() == Item.getItemFromBlock(ModBlocks.flower) && stack.stackSize > 0) {
|
||||
int color = stack.getItemDamage();
|
||||
if(color > 15)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < event.entityPlayer.inventory.getSizeInventory(); i++) {
|
||||
if(i == event.entityPlayer.inventory.currentItem)
|
||||
continue; // prevent item deletion
|
||||
|
||||
ItemStack invStack = event.entityPlayer.inventory.getStackInSlot(i);
|
||||
if(invStack != null && invStack.getItem() == this) {
|
||||
ItemStack[] bagInv = loadStacks(invStack);
|
||||
ItemStack stackAt = bagInv[color];
|
||||
boolean didChange = false;
|
||||
if(stackAt == null) {
|
||||
bagInv[color] = stack.copy();
|
||||
stack.stackSize = 0;
|
||||
didChange = true;
|
||||
} else {
|
||||
int stackAtSize = stackAt.stackSize;
|
||||
int stackSize = stack.stackSize;
|
||||
int spare = 64 - stackAtSize;
|
||||
int pass = Math.min(spare, stackSize);
|
||||
if(pass > 0) {
|
||||
stackAt.stackSize += pass;
|
||||
stack.stackSize -= pass;
|
||||
didChange = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(didChange)
|
||||
setStacks(invStack, bagInv);
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
player.openGui(Botania.instance, LibGuiIDs.FLOWER_BAG, world, 0, 0, 0);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int s, float xs, float ys, float zs) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof IInventory) {
|
||||
if(!world.isRemote) {
|
||||
ForgeDirection side = ForgeDirection.getOrientation(s);
|
||||
IInventory inv = (IInventory) tile;
|
||||
ItemStack[] stacks = loadStacks(stack);
|
||||
ItemStack[] newStacks = new ItemStack[stacks.length];
|
||||
boolean putAny = false;
|
||||
|
||||
int i = 0;
|
||||
for(ItemStack petal : stacks) {
|
||||
if(petal != null) {
|
||||
int count = InventoryHelper.testInventoryInsertion(inv, petal, side);
|
||||
InventoryHelper.insertItemIntoInventory(inv, petal, side, -1);
|
||||
|
||||
ItemStack newPetal = petal.copy();
|
||||
if(newPetal.stackSize == 0)
|
||||
newPetal = null;
|
||||
|
||||
newStacks[i] = newPetal;
|
||||
putAny |= count > 0;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
setStacks(stack, newStacks);
|
||||
if(putAny && inv instanceof TileEntityChest) {
|
||||
inv = InventoryHelper.getInventory(inv);
|
||||
player.displayGUIChest(inv);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack[] loadStacks(ItemStack stack) {
|
||||
NBTTagList var2 = ItemNBTHelper.getList(stack, TAG_ITEMS, 10, false);
|
||||
ItemStack[] inventorySlots = new ItemStack[16];
|
||||
for(int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = var2.getCompoundTagAt(var3);
|
||||
byte var5 = var4.getByte(TAG_SLOT);
|
||||
if(var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
|
||||
return inventorySlots;
|
||||
}
|
||||
|
||||
public static void setStacks(ItemStack stack, ItemStack[] inventorySlots) {
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for(int var3 = 0; var3 < inventorySlots.length; ++var3)
|
||||
if(inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte(TAG_SLOT, (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
|
||||
ItemNBTHelper.setList(stack, TAG_ITEMS, var2);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,8 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.item.bag.ItemFlowerBag;
|
||||
import vazkii.botania.common.item.bag.ItemShroomBag;
|
||||
import vazkii.botania.common.item.brew.ItemBrewFlask;
|
||||
import vazkii.botania.common.item.brew.ItemBrewVial;
|
||||
import vazkii.botania.common.item.brew.ItemIncenseStick;
|
||||
@@ -232,6 +234,7 @@ public final class ModItems {
|
||||
public static Item cosmetic;
|
||||
public static Item swapRing;
|
||||
public static Item flowerBag;
|
||||
public static Item shroomBag;
|
||||
public static Item phantomInk;
|
||||
public static Item poolMinecart;
|
||||
public static Item pinkinator;
|
||||
@@ -381,6 +384,7 @@ public final class ModItems {
|
||||
cosmetic = new ItemBaubleCosmetic();
|
||||
swapRing = new ItemSwapRing();
|
||||
flowerBag = new ItemFlowerBag();
|
||||
shroomBag = new ItemShroomBag();
|
||||
phantomInk = new ItemPhantomInk();
|
||||
poolMinecart = new ItemPoolMinecart();
|
||||
pinkinator = new ItemPinkinator();
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package vazkii.botania.common.item.bag;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public abstract class ItemBagBase extends ItemMod {
|
||||
|
||||
private static final String TAG_ITEMS = "InvItems";
|
||||
private static final String TAG_SLOT = "Slot";
|
||||
|
||||
public ItemBagBase(String name) {
|
||||
setUnlocalizedName(name);
|
||||
setMaxStackSize(1);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPickupItem(EntityItemPickupEvent event) {
|
||||
ItemStack stack = event.item.getEntityItem();
|
||||
if(stack.getItem() == Item.getItemFromBlock(getValidPickUp()) && stack.stackSize > 0) {
|
||||
int color = stack.getItemDamage();
|
||||
if(color > 15)
|
||||
return;
|
||||
|
||||
for(int i = 0; i < event.entityPlayer.inventory.getSizeInventory(); i++) {
|
||||
if(i == event.entityPlayer.inventory.currentItem)
|
||||
continue; // prevent item deletion
|
||||
|
||||
ItemStack invStack = event.entityPlayer.inventory.getStackInSlot(i);
|
||||
if(invStack != null && invStack.getItem() == this) {
|
||||
ItemStack[] bagInv = loadStacks(invStack);
|
||||
ItemStack stackAt = bagInv[color];
|
||||
boolean didChange = false;
|
||||
if(stackAt == null) {
|
||||
bagInv[color] = stack.copy();
|
||||
stack.stackSize = 0;
|
||||
didChange = true;
|
||||
} else {
|
||||
int stackAtSize = stackAt.stackSize;
|
||||
int stackSize = stack.stackSize;
|
||||
int spare = 64 - stackAtSize;
|
||||
int pass = Math.min(spare, stackSize);
|
||||
if(pass > 0) {
|
||||
stackAt.stackSize += pass;
|
||||
stack.stackSize -= pass;
|
||||
didChange = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(didChange)
|
||||
setStacks(invStack, bagInv);
|
||||
}
|
||||
|
||||
if(stack.stackSize == 0)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
player.openGui(Botania.instance, getGuiID(), world, 0, 0, 0);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int s, float xs, float ys, float zs) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof IInventory) {
|
||||
if(!world.isRemote) {
|
||||
ForgeDirection side = ForgeDirection.getOrientation(s);
|
||||
IInventory inv = (IInventory) tile;
|
||||
ItemStack[] stacks = loadStacks(stack);
|
||||
ItemStack[] newStacks = new ItemStack[stacks.length];
|
||||
boolean putAny = false;
|
||||
|
||||
int i = 0;
|
||||
for(ItemStack petal : stacks) {
|
||||
if(petal != null) {
|
||||
int count = InventoryHelper.testInventoryInsertion(inv, petal, side);
|
||||
InventoryHelper.insertItemIntoInventory(inv, petal, side, -1);
|
||||
|
||||
ItemStack newPetal = petal.copy();
|
||||
if(newPetal.stackSize == 0)
|
||||
newPetal = null;
|
||||
|
||||
newStacks[i] = newPetal;
|
||||
putAny |= count > 0;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
setStacks(stack, newStacks);
|
||||
if(putAny && inv instanceof TileEntityChest) {
|
||||
inv = InventoryHelper.getInventory(inv);
|
||||
player.displayGUIChest(inv);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack[] loadStacks(ItemStack stack) {
|
||||
NBTTagList var2 = ItemNBTHelper.getList(stack, TAG_ITEMS, 10, false);
|
||||
ItemStack[] inventorySlots = new ItemStack[16];
|
||||
for(int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = var2.getCompoundTagAt(var3);
|
||||
byte var5 = var4.getByte(TAG_SLOT);
|
||||
if(var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
|
||||
return inventorySlots;
|
||||
}
|
||||
|
||||
public static void setStacks(ItemStack stack, ItemStack[] inventorySlots) {
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for(int var3 = 0; var3 < inventorySlots.length; ++var3)
|
||||
if(inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte(TAG_SLOT, (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
|
||||
ItemNBTHelper.setList(stack, TAG_ITEMS, var2);
|
||||
}
|
||||
|
||||
protected abstract Block getValidPickUp();
|
||||
|
||||
protected abstract int getGuiID();
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.common.item.bag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemFlowerBag extends ItemBagBase {
|
||||
|
||||
public ItemFlowerBag() {
|
||||
super(LibItemNames.FLOWER_BAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block getValidPickUp() {
|
||||
return ModBlocks.flower;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getGuiID() {
|
||||
return LibGuiIDs.FLOWER_BAG;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package vazkii.botania.common.item.bag;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemShroomBag extends ItemBagBase{
|
||||
|
||||
public ItemShroomBag() {
|
||||
super(LibItemNames.SHROOM_BAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Block getValidPickUp() {
|
||||
return ModBlocks.mushroom;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getGuiID() {
|
||||
return LibGuiIDs.SHROOM_BAG;
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.hasPhantomInk"), par3List);
|
||||
}
|
||||
|
||||
void addStringToTooltip(String s, List<String> tooltip) {
|
||||
public void addStringToTooltip(String s, List<String> tooltip) {
|
||||
tooltip.add(s.replaceAll("&", "\u00a7"));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,13 +30,17 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import vazkii.botania.api.item.IExtendedWireframeCoordinateListProvider;
|
||||
import vazkii.botania.api.item.ISequentialBreaker;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemTemperanceStone;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
@@ -49,6 +53,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeCoordinateListProvider, IManaUsingItem {
|
||||
|
||||
private static final String TAG_CURSOR_LIST = "cursorList";
|
||||
@@ -61,13 +66,32 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
private static final String TAG_Y_ORIGIN = "yOrigin";
|
||||
private static final String TAG_Z_ORIGIN = "zOrigin";
|
||||
private static final String TAG_MODE = "mode";
|
||||
private static final String TAG_BREAKING_MODE = "breaking";
|
||||
private boolean recursion = false;
|
||||
|
||||
public static enum HUD_MESSAGE {
|
||||
MODE, BREAKING, CLEAR
|
||||
}
|
||||
|
||||
public ItemLokiRing() {
|
||||
super(LibItemNames.LOKI_RING);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlockBreak(BlockEvent.BreakEvent event) {
|
||||
EntityPlayer player = event.getPlayer();
|
||||
int x = event.x;
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
int side = event.blockMetadata;
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if(stack == null) return;
|
||||
Item item = player.getCurrentEquippedItem().getItem();
|
||||
breakOnAllCursors(player, item, stack, x, y, z, side);
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if(recursion) return;
|
||||
@@ -98,12 +122,12 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
if (heldItemStack == null && event.action == Action.RIGHT_CLICK_BLOCK && player.isSneaking() && isRingEnabled(lokiRing)) {
|
||||
if(originCoords.posY == -1 && lookPos != null) {
|
||||
setOriginPos(lokiRing, lookPos.blockX, lookPos.blockY, lookPos.blockZ);
|
||||
setCursorList(lokiRing, null);
|
||||
clearCursors(lokiRing);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
} else if(lookPos != null) {
|
||||
if(originCoords.posX == lookPos.blockX && originCoords.posY == lookPos.blockY && originCoords.posZ == lookPos.blockZ) {
|
||||
setOriginPos(lokiRing, 0, -1, 0);
|
||||
clearMasterCursor(lokiRing);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
} else {
|
||||
@@ -170,34 +194,84 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
player.posZ = oldPosZ;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setMode(ItemStack stack, boolean state) {
|
||||
stack.stackTagCompound.setBoolean(TAG_MODE, state);
|
||||
}
|
||||
|
||||
public static void setBreakingMode(ItemStack stack, boolean state) {
|
||||
stack.stackTagCompound.setBoolean(TAG_BREAKING_MODE, state);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUDNotification(){
|
||||
public static void renderHUDNotification(HUD_MESSAGE type){
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
String text = getLokiModeText(getLokiRing(mc.thePlayer));
|
||||
String text;
|
||||
switch (type) {
|
||||
case MODE:
|
||||
text = getLokiModeText(getLokiRing(mc.thePlayer));
|
||||
break;
|
||||
case BREAKING:
|
||||
text = getLokiBreakingModeText(getLokiRing(mc.thePlayer));
|
||||
break;
|
||||
case CLEAR:
|
||||
text = getLokiCearText(getLokiRing(mc.thePlayer));
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
GTNHLib.proxy.printMessageAboveHotbar(text, 60, true, true);
|
||||
}
|
||||
|
||||
public static String getOnOffString(boolean state){
|
||||
return state ? EnumChatFormatting.GREEN + StatCollector.translateToLocal("botaniamisc.lokiOn") :
|
||||
EnumChatFormatting.RED + StatCollector.translateToLocal("botaniamisc.lokiOff");
|
||||
}
|
||||
|
||||
public static String getLokiModeText(ItemStack stack){
|
||||
return EnumChatFormatting.GOLD + StatCollector.translateToLocal("item.botania:lokiRing.name") + " " + (isRingEnabled(stack) ?
|
||||
EnumChatFormatting.GREEN + StatCollector.translateToLocal("botaniamisc.lokiOn") :
|
||||
EnumChatFormatting.RED + StatCollector.translateToLocal("botaniamisc.lokiOff"));
|
||||
return EnumChatFormatting.GOLD + StatCollector.translateToLocal("item.botania:lokiRing.name") + " " + getOnOffString(isRingEnabled(stack));
|
||||
}
|
||||
|
||||
public static String getLokiBreakingModeText(ItemStack stack){
|
||||
return EnumChatFormatting.GOLD + StatCollector.translateToLocal("item.botania:lokiRing.name") + " "+
|
||||
StatCollector.translateToLocal("botaniamisc.breaking") + " " + getOnOffString(isRingBreakingEnabled(stack));
|
||||
}
|
||||
|
||||
public static String getLokiCearText(ItemStack stack){
|
||||
return EnumChatFormatting.GOLD + StatCollector.translateToLocal("botaniamisc.lokiClear");
|
||||
}
|
||||
|
||||
public static boolean isRingEnabled (final ItemStack stack){
|
||||
return stack.stackTagCompound.getBoolean(TAG_MODE);
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
return stack.stackTagCompound.getBoolean(TAG_MODE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isRingBreakingEnabled (final ItemStack stack){
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
return stack.stackTagCompound.getBoolean(TAG_BREAKING_MODE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, int x, int y, int z, int side) {
|
||||
ItemStack lokiRing = getLokiRing(player);
|
||||
if(lokiRing == null || player.worldObj.isRemote || !(item instanceof ISequentialBreaker))
|
||||
if(lokiRing == null || player.worldObj.isRemote || !isRingEnabled(lokiRing) || !isRingBreakingEnabled(lokiRing))
|
||||
return;
|
||||
|
||||
List<ChunkCoordinates> cursors = getCursorList(lokiRing);
|
||||
ISequentialBreaker breaker = (ISequentialBreaker) item;
|
||||
ISequentialBreaker breaker = null;
|
||||
if(item instanceof ISequentialBreaker)
|
||||
breaker = (ISequentialBreaker) item;
|
||||
World world = player.worldObj;
|
||||
boolean silk = EnchantmentHelper.getEnchantmentLevel(Enchantment.silkTouch.effectId, stack) > 0;
|
||||
int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, stack);
|
||||
boolean dispose = breaker.disposeOfTrashBlocks(stack);
|
||||
boolean dispose = breaker == null? true : breaker.disposeOfTrashBlocks(stack);
|
||||
|
||||
for(int i = 0; i < cursors.size(); i++) {
|
||||
ChunkCoordinates coords = cursors.get(i);
|
||||
@@ -205,8 +279,9 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
int yp = y + coords.posY;
|
||||
int zp = z + coords.posZ;
|
||||
Block block = world.getBlock(xp, yp, zp);
|
||||
breaker.breakOtherBlock(player, stack, xp, yp, zp, x, y, z, side);
|
||||
ToolCommons.removeBlockWithDrops(player, stack, player.worldObj, xp, yp, zp, x, y, z, block, new Material[] { block.getMaterial() }, silk, fortune, block.getBlockHardness(world, xp, yp, zp), dispose);
|
||||
if(breaker != null)
|
||||
breaker.breakOtherBlock(player, stack, xp, yp, zp, x, y, z, side);
|
||||
ToolCommons.removeBlockWithDrops(player, stack, player.worldObj, xp, yp, zp, x, y, z, block, new Material[] { block.getMaterial() }, silk, fortune, block.getBlockHardness(world, xp, yp, zp), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,13 +292,28 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
setCursorList(stack, null);
|
||||
clearCursors(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiDescription"), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiDescription2"), list);
|
||||
addStringToTooltip("", list);
|
||||
addStringToTooltip(EnumChatFormatting.WHITE +StatCollector.translateToLocal("botaniamisc.lokiCurrent"), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiState") + ": " + getOnOffString(isRingEnabled(stack)), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.breaking") + ": " + getOnOffString(isRingBreakingEnabled(stack)), list);
|
||||
addStringToTooltip("", list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiToggleDescription") + " " + getOnOffString(true) + EnumChatFormatting.RESET + "/"+ getOnOffString(false), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiBreakingDescription") + " " + getOnOffString(true) + EnumChatFormatting.RESET+"/" + getOnOffString(false), list);
|
||||
super.addInformation(stack, player, list, adv);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public List<ChunkCoordinates> getWireframesToDraw(EntityPlayer player, ItemStack stack) {
|
||||
if(getLokiRing(player) != stack)
|
||||
ItemStack lokiRing = getLokiRing(player);
|
||||
if(lokiRing != stack || !isRingEnabled(lokiRing) )
|
||||
return null;
|
||||
|
||||
MovingObjectPosition lookPos = Minecraft.getMinecraft().objectMouseOver;
|
||||
@@ -252,7 +342,15 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
|
||||
@Override
|
||||
public ChunkCoordinates getSourceWireframe(EntityPlayer player, ItemStack stack) {
|
||||
return getLokiRing(player) == stack ? getOriginPos(stack) : null;
|
||||
return getLokiRing(player) == stack && isRingEnabled(stack) ? getOriginPos(stack) : null;
|
||||
}
|
||||
|
||||
public static void clearCursors(ItemStack stack){
|
||||
setCursorList(stack, null);
|
||||
}
|
||||
|
||||
public static void clearMasterCursor(ItemStack stack){
|
||||
setOriginPos(stack, 0, -1, 0);
|
||||
}
|
||||
|
||||
public static ItemStack getLokiRing(EntityPlayer player) {
|
||||
|
||||
@@ -69,6 +69,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry terrasteel;
|
||||
public static LexiconEntry blackLotus;
|
||||
public static LexiconEntry flowerBag;
|
||||
public static LexiconEntry shroomBag;
|
||||
public static LexiconEntry gardenOfGlass;
|
||||
|
||||
public static LexiconEntry manaIntro;
|
||||
@@ -395,6 +396,10 @@ public final class LexiconData {
|
||||
flowerBag.setLexiconPages(new PageText("0"), new PageText("2"),
|
||||
new PageCraftingRecipe("1", ModCraftingRecipes.recipeFlowerBag));
|
||||
|
||||
shroomBag = new BLexiconEntry(LibLexicon.BASICS_SHROOM_BAG, categoryBasics);
|
||||
shroomBag.setLexiconPages(new PageText("0"),
|
||||
new PageCraftingRecipe("1", ModCraftingRecipes.recipeShroomBag));
|
||||
|
||||
if (Botania.gardenOfGlassLoaded) {
|
||||
gardenOfGlass = new BLexiconEntry(LibLexicon.BASICS_GARDEN_OF_GLASS, categoryBasics);
|
||||
gardenOfGlass.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"),
|
||||
|
||||
@@ -17,4 +17,6 @@ public final class LibGuiIDs {
|
||||
public static final int FLOWER_BAG = 2;
|
||||
public static final int BAUBLE_BOX = 3;
|
||||
|
||||
public static final int SHROOM_BAG = 4;
|
||||
|
||||
}
|
||||
@@ -126,6 +126,7 @@ public final class LibItemNames {
|
||||
public static final String COSMETIC = "cosmetic";
|
||||
public static final String SWAP_RING = "swapRing";
|
||||
public static final String FLOWER_BAG = "flowerBag";
|
||||
public static final String SHROOM_BAG = "shroomBag";
|
||||
public static final String PHANTOM_INK = "phantomInk";
|
||||
public static final String POOL_MINECART = "poolMinecart";
|
||||
public static final String PINKINATOR = "pinkinator";
|
||||
|
||||
@@ -38,6 +38,7 @@ public final class LibLexicon {
|
||||
public static final String BASICS_TERRASTEEL = "terrasteel";
|
||||
public static final String BASICS_BLACK_LOTUS = "blackLotus";
|
||||
public static final String BASICS_FLOWER_BAG = "flowerBag";
|
||||
public static final String BASICS_SHROOM_BAG = "shroomBag";
|
||||
public static final String BASICS_GARDEN_OF_GLASS = "gardenOfGlass";
|
||||
|
||||
public static final String MANA_INTRO = "mIntro";
|
||||
|
||||
@@ -12,8 +12,10 @@ package vazkii.botania.common.network;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.gui.bag.ContainerFlowerBag;
|
||||
import vazkii.botania.client.gui.bag.GuiFlowerBag;
|
||||
import vazkii.botania.client.gui.bags.flowerBag.ContainerFlowerBag;
|
||||
import vazkii.botania.client.gui.bags.flowerBag.GuiFlowerBag;
|
||||
import vazkii.botania.client.gui.bags.shroomBag.ContainerShroomBag;
|
||||
import vazkii.botania.client.gui.bags.shroomBag.GuiShroomBag;
|
||||
import vazkii.botania.client.gui.box.ContainerBaubleBox;
|
||||
import vazkii.botania.client.gui.box.GuiBaubleBox;
|
||||
import vazkii.botania.client.gui.crafting.ContainerCraftingHalo;
|
||||
@@ -31,6 +33,8 @@ public class GuiHandler implements IGuiHandler {
|
||||
return new ContainerCraftingHalo(player.inventory, world);
|
||||
case LibGuiIDs.FLOWER_BAG :
|
||||
return new ContainerFlowerBag(player);
|
||||
case LibGuiIDs.SHROOM_BAG:
|
||||
return new ContainerShroomBag(player);
|
||||
case LibGuiIDs.BAUBLE_BOX :
|
||||
return new ContainerBaubleBox(player);
|
||||
}
|
||||
@@ -48,6 +52,8 @@ public class GuiHandler implements IGuiHandler {
|
||||
return new GuiCraftingHalo(player.inventory, world);
|
||||
case LibGuiIDs.FLOWER_BAG :
|
||||
return new GuiFlowerBag(player);
|
||||
case LibGuiIDs.SHROOM_BAG:
|
||||
return new GuiShroomBag(player);
|
||||
case LibGuiIDs.BAUBLE_BOX :
|
||||
return new GuiBaubleBox(player);
|
||||
}
|
||||
|
||||
@@ -15,5 +15,8 @@ public class PacketHandler {
|
||||
public static void initPackets() {
|
||||
INSTANCE.registerMessage(PacketLokiToggle.class, PacketLokiToggle.class, 1, Side.SERVER);
|
||||
INSTANCE.registerMessage(PacketLokiToggleAck.class, PacketLokiToggleAck.class, 2, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketLokiToggleBreakingAck.class, PacketLokiToggleBreakingAck.class, 3, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketLokiClear.class, PacketLokiClear.class, 4, Side.SERVER);
|
||||
INSTANCE.registerMessage(PacketLokiClearAck.class, PacketLokiClearAck.class, 5, Side.CLIENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.item.relic.ItemLokiRing;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
|
||||
public class PacketLokiClear implements IMessage, IMessageHandler<PacketLokiClear, IMessage> {
|
||||
@Override
|
||||
public void fromBytes(ByteBuf byteBuf) {
|
||||
// not needed
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf byteBuf) {
|
||||
// not needed
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketLokiClear message, MessageContext ctx) {
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
final ItemStack aRing = ItemLokiRing.getLokiRing(player);
|
||||
if (aRing != null) {
|
||||
ItemLokiRing.clearCursors(aRing);
|
||||
ItemLokiRing.clearMasterCursor(aRing);
|
||||
PacketLokiClearAck ackMessage = new PacketLokiClearAck();
|
||||
PacketHandler.INSTANCE.sendTo(ackMessage, player);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.item.relic.ItemLokiRing;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PacketLokiClearAck implements IMessage, IMessageHandler<PacketLokiClearAck, IMessage> {
|
||||
|
||||
public boolean state;
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf byteBuf) {
|
||||
state = byteBuf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf byteBuf) {
|
||||
byteBuf.writeBoolean(state);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IMessage onMessage(PacketLokiClearAck message, MessageContext ctx) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
final ItemStack aRing = ItemLokiRing.getLokiRing(mc.thePlayer) ;
|
||||
if (aRing != null) {
|
||||
ItemLokiRing.renderHUDNotification(ItemLokiRing.HUD_MESSAGE.CLEAR);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -25,12 +25,22 @@ public class PacketLokiToggle implements IMessage, IMessageHandler<PacketLokiTog
|
||||
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
|
||||
final ItemStack aRing = ItemLokiRing.getLokiRing(player);
|
||||
if (aRing != null) {
|
||||
boolean ringState = !ItemLokiRing.isRingEnabled(aRing);
|
||||
ItemLokiRing.setMode(aRing, ringState);
|
||||
PacketLokiToggleAck ackMessage = new PacketLokiToggleAck();
|
||||
ackMessage.state = ringState;
|
||||
PacketHandler.INSTANCE.sendTo(ackMessage, player);
|
||||
if(player.isSneaking()){
|
||||
boolean ringState = !ItemLokiRing.isRingBreakingEnabled(aRing);
|
||||
ItemLokiRing.setBreakingMode(aRing, ringState);
|
||||
PacketLokiToggleBreakingAck ackMessage = new PacketLokiToggleBreakingAck();
|
||||
ackMessage.state = ringState;
|
||||
PacketHandler.INSTANCE.sendTo(ackMessage, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean ringState = !ItemLokiRing.isRingEnabled(aRing);
|
||||
ItemLokiRing.setMode(aRing, ringState);
|
||||
PacketLokiToggleAck ackMessage = new PacketLokiToggleAck();
|
||||
ackMessage.state = ringState;
|
||||
PacketHandler.INSTANCE.sendTo(ackMessage, player);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -33,7 +32,7 @@ public class PacketLokiToggleAck implements IMessage, IMessageHandler<PacketLoki
|
||||
final ItemStack aRing = ItemLokiRing.getLokiRing(mc.thePlayer) ;
|
||||
if (aRing != null) {
|
||||
ItemLokiRing.setMode(aRing, message.state);
|
||||
ItemLokiRing.renderHUDNotification();
|
||||
ItemLokiRing.renderHUDNotification(ItemLokiRing.HUD_MESSAGE.MODE);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package vazkii.botania.common.network;
|
||||
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.item.relic.ItemLokiRing;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PacketLokiToggleBreakingAck implements IMessage, IMessageHandler<PacketLokiToggleBreakingAck, IMessage> {
|
||||
|
||||
public boolean state;
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf byteBuf) {
|
||||
state = byteBuf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf byteBuf) {
|
||||
byteBuf.writeBoolean(state);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IMessage onMessage(PacketLokiToggleBreakingAck message, MessageContext ctx) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
final ItemStack aRing = ItemLokiRing.getLokiRing(mc.thePlayer) ;
|
||||
if (aRing != null) {
|
||||
ItemLokiRing.setBreakingMode(aRing, message.state);
|
||||
ItemLokiRing.renderHUDNotification(ItemLokiRing.HUD_MESSAGE.BREAKING);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -155,9 +155,20 @@ botaniamisc.altarRefill1=add back the last recipe
|
||||
botaniamisc.santaweaveInfo=Manaweave, changed up for the &cs&fe&ca&fs&co&fn
|
||||
botaniamisc.enterToView=^ Press ENTER to view ^
|
||||
botaniamisc.keyCategory=Botania
|
||||
botaniamisc.toggleLoki=Toggle Ring of Loki
|
||||
|
||||
#LOKI
|
||||
botaniamisc.toggleLoki=Ring of Loki Switch Key
|
||||
botaniamisc.ringOfLokiClear=Clear Ring of Loki Selection
|
||||
botaniamisc.lokiOn=On
|
||||
botaniamisc.lokiOff=Off
|
||||
botaniamisc.breaking=Breaking
|
||||
botaniamisc.lokiClear=Successfully cleared all selection
|
||||
botaniamisc.lokiDescription=Builder's wand but §c§oC§6§oo§e§oo§a§ol§9§oe§5§or
|
||||
botaniamisc.lokiDescription2=Can Place/Interact/Break with multiple blocks at once!
|
||||
botaniamisc.lokiToggleDescription=Mode Switch Key to turn ring
|
||||
botaniamisc.lokiBreakingDescription=Mode Switch Key + Shift to toggle breaking
|
||||
botaniamisc.lokiCurrent=Current
|
||||
botaniamisc.lokiState=Ring
|
||||
|
||||
# NEI INTEGRATION
|
||||
botania.nei.brewery=Botanical Brewery
|
||||
@@ -1619,6 +1630,7 @@ item.botania:cosmetic31.name=Questgiver Mark
|
||||
item.botania:manaString.name=Mana Infused String
|
||||
item.botania:swapRing.name=Ring of Correction
|
||||
item.botania:flowerBag.name=Flower Pouch
|
||||
item.botania:shroomBag.name=Mushroom Pouch
|
||||
item.botania:phantomInk.name=Phantom Ink
|
||||
item.botania:poolMinecart.name=Minecart with Mana Pool
|
||||
item.botania:pinkinator.name=The Pinkinator
|
||||
@@ -2110,6 +2122,12 @@ botania.page.flowerBag0=The laws of physics regarding one's &4Inventory&0 are so
|
||||
botania.page.flowerBag2=Items won't be added automatically to the pouch if that's the item being held.<br>Furthermore, shift-right clicking the pouch into a &1Chest&0 or other inventory will store the flowers it contains into said inventory.
|
||||
botania.page.flowerBag1=Pull a copter out of it (any colors work)
|
||||
|
||||
# -- MUSHROOM POUCH
|
||||
botania.entry.shroomBag=Mushroom Pouch
|
||||
botania.tagline.shroomBag=A trusty pouch to hold your mushroom goodness
|
||||
botania.page.shroomBag0=Similar to the &1Flower Pouch&0, the mushroom pouch will hold all of those pesky &1Mystical Mushrooms&0 that have been clogging up your inventory.<br>Remember the bag will not pick up items if you are holding it in your hand.<br>Furthermore, shift-right clicking the pouch into a &1Chest&0 or other inventory will store the flowers it contains into said inventory.
|
||||
botania.page.shroomBag1=Any colors work
|
||||
|
||||
# -- WRAP
|
||||
botania.entry.wrap=Wrap
|
||||
botania.tagline.wrap=It's a wrap
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 506 B |
Reference in new issue
Block a user