Compare commits

...
8 Commits
Author SHA1 Message Date
Lyfts 6e6e806476 fix incubator for real this time (#37) 2023-09-06 19:48:53 +02:00
miozuneandMartin Robertz ef877e2f7d Fix NPE with Lumbermill (#35)
* Remove outdated script

* updateBuildScript

* Update dependencies

* Fix NPE with Lumbermill

---------

Co-authored-by: Martin Robertz <[email protected]>
2023-08-19 12:34:10 +02:00
miozune 669aee5ba6 Fix typo: cooper -> copper (#34) 2023-08-12 15:31:22 +02:00
Martin Robertz ef468097d0 update bs+deps 2023-07-18 20:37:11 +02:00
hacatu 22f2eebbd3 Fix Additive Production (#33)
* Fix production modifiers to be additive, fix circuit tooltips for mutation and boolean modifiers

* Chocolate frames have left the building

kuba told me to kill them

* Bruhhhhhhhhhhhh
2023-07-18 20:36:09 +02:00
Maxim f658e9ec57 Fixed the stimulator accepting stacks with a size higher than 1 (#32) 2023-06-16 16:24:18 +02:00
Maxim ddf93bc425 Fix localization of secret species count (#31) 2023-06-14 19:03:59 +02:00
Maxim 503361d6d1 Added alveary unlighting (#30) 2023-06-08 12:39:11 +02:00
32 changed files with 314 additions and 182 deletions

No files matched your search

-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env bash
RUNDIR="run"
CRASH="crash-reports"
SERVERLOG="server.log"
if [[ -d $RUNDIR/$CRASH ]]; then
echo "Crash reports detected:"
cat $RUNDIR/$CRASH/crash*.txt
exit 1
fi
if grep --quiet "Fatal errors were detected" $SERVERLOG; then
echo "Fatal errors detected:"
cat server.log
exit 1
fi
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" $SERVERLOG; then
echo "Server force stopped:"
cat server.log
exit 1
fi
if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then
echo "Server didn't finish startup:"
cat server.log
exit 1
fi
echo "No crash reports detected"
exit 0
+148 -64
View File
@@ -1,4 +1,4 @@
//version: 1684218858
//version: 1691351470
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -69,7 +69,7 @@ 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.14'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -115,6 +115,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", "")
@@ -357,7 +359,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(
@@ -379,9 +401,13 @@ if (identifiedVersion == versionOverride) {
group = "com.github.GTNewHorizons"
if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
archivesBaseName = customArchiveBaseName
base {
archivesName = customArchiveBaseName
}
} else {
archivesBaseName = modId
base {
archivesName = modId
}
}
@@ -465,10 +491,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) {
@@ -479,7 +514,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)
@@ -537,13 +579,28 @@ 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/"
@@ -574,6 +631,8 @@ def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
ext.mixinProviderSpec = mixinProviderSpec
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
dependencies {
if (usesMixins.toBoolean()) {
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
@@ -585,7 +644,7 @@ dependencies {
}
}
if (usesMixins.toBoolean()) {
implementation(mixinProviderSpec)
implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap))
} else if (forceEnableMixins.toBoolean()) {
runtimeOnlyNonPublishable(mixinProviderSpec)
}
@@ -611,12 +670,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"
@@ -648,46 +727,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 {
@@ -705,7 +755,6 @@ tasks.named("processResources", ProcessResources).configure {
}
if (usesMixins.toBoolean()) {
from refMap
dependsOn("compileJava", "compileScala")
}
}
@@ -724,16 +773,16 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
def lwjgl3ifyVersion = '1.3.5'
def lwjgl3ifyVersion = '1.4.0'
def asmVersion = '9.4'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.13')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
}
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
@@ -979,6 +1028,9 @@ idea {
}
}
runConfigurations {
"0. Build and Test"(Gradle) {
taskNames = ["build"]
}
"1. Run Client"(Gradle) {
taskNames = ["runClient"]
}
@@ -1098,6 +1150,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
@@ -1118,12 +1178,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"
}
}
}
}
@@ -1238,7 +1300,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
@@ -1276,12 +1338,14 @@ tasks.register('faq') {
description = 'Prints frequently asked questions about building a project'
doLast {
print("If your build fails to fetch dependencies, they might have been deleted and replaced by newer " +
"versions.\nCheck if the versions you try to fetch are still on the distributing sites.\n" +
"The links can be found in repositories.gradle and build.gradle:repositories, " +
"not build.gradle:buildscript.repositories - this one is for gradle plugin metadata.\n\n" +
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.")
"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.")
}
}
@@ -1342,8 +1406,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
@@ -1508,3 +1578,17 @@ def getSecondaryArtifacts() {
if (apiPackage) secondaryArtifacts += [apiJar]
return secondaryArtifacts
}
// 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'
}
+4 -5
View File
@@ -1,12 +1,11 @@
// Add your dependencies here
dependencies {
implementation('com.github.GTNewHorizons:GTNHLib:0.0.10:dev')
compile('com.github.GTNewHorizons:ForestryMC:4.5.6:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.21-GTNH:dev')
api('com.github.GTNewHorizons:ForestryMC:4.6.14:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.0.13:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.28:api')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.3.81-GTNH:dev')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.36:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compileOnly('curse.maven:cofh-lib-220333:2388748')
}
Binary file not shown.
+1 -1
View File
@@ -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
Vendored
+4 -3
View File
@@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
-22
View File
@@ -1,26 +1,4 @@
// Add any additional repositories for your dependencies here
repositories {
maven {
name 'GTNH Maven'
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol
}
maven {
name 'ic2'
url 'http://maven.ic2.player.to/'
metadataSources {
mavenPom()
artifact()
}
}
maven {
url 'https://cursemaven.com'
content {
includeGroup 'curse.maven'
}
}
maven {
url 'https://jitpack.io'
}
}
@@ -88,7 +88,7 @@ public class ItemInsulatedTube extends Item {
enum Material {
Copper(0xe3b78e, "cooper"),
Copper(0xe3b78e, "copper"),
Tin(0xe1eef4, "tin"),
Bronze(0xddc276, "bronze"),
Iron(0xd8d8d8, "iron");
@@ -54,7 +54,7 @@ public class PageBreeder extends ControlPage<DatabaseTab> {
this,
155.0f,
I18N.localise(
"binniecore.gui.database.species.secretCount",
"binniecore.gui.database.species.secretsCount",
system.discoveredSecretCount,
system.totalSecretCount));
}
@@ -16,24 +16,40 @@ public class BeeModifierLogic {
}
public float getModifier(EnumBeeModifier modifier, float currentModifier) {
if (!modifiers.containsKey(modifier)) {
return 1.0f;
}
Float[] values = modifiers.get(modifier);
float mult = values[0];
float max = values[1];
if (max >= 1.0f) {
if (max <= currentModifier) {
if (modifier == EnumBeeModifier.PRODUCTION) {
if (!modifiers.containsKey(modifier)) {
return 0.0f;
}
Float[] values = modifiers.get(modifier);
float offset = values[0], max = values[1];
if (offset < 0) {// negative modifiers should always apply
return offset;
}
if (currentModifier >= max) {// don't decrease modifiers already over the max, just skip increasing it
return 0.0f;
}
return Math.min(offset, max - currentModifier);
} else {
if (!modifiers.containsKey(modifier)) {
return 1.0f;
}
return Math.min(max / currentModifier, mult);
Float[] values = modifiers.get(modifier);
float mult = values[0];
float max = values[1];
if (max >= 1.0f) {
if (max <= currentModifier) {
return 1.0f;
}
return Math.min(max / currentModifier, mult);
}
if (max >= currentModifier) {
return 1.0f;
}
return Math.max(max / currentModifier, mult);
}
if (max >= currentModifier) {
return 1.0f;
}
return Math.max(max / currentModifier, mult);
}
public boolean getModifier(EnumBeeBooleanModifier modifier) {
@@ -1,8 +1,15 @@
package binnie.core.genetics;
import binnie.core.util.I18N;
public enum EnumBeeBooleanModifier {
SEALED,
SELF_LIGHTED,
SUNLIGHT_STIMULATED,
HELLISH
HELLISH;
public String getName() {
return I18N.localise("binniecore.beebooleanmodifier." + name().toLowerCase());
}
}
@@ -122,7 +122,7 @@ public class TransferRequest {
|| ((IInventorySlots) destination).getSlot(slot) == null
|| !((IInventorySlots) destination).getSlot(slot).isRecipe()) {
if (destination.getStackInSlot(slot) != null) {
if (item.isStackable()) {
if (item.isStackable() && destination.getInventoryStackLimit() > 1) {
ItemStack merged = destination.getStackInSlot(slot).copy();
ItemStack[] newStacks = mergeStacks(item.copy(), merged.copy());
item = newStacks[0];
@@ -149,7 +149,16 @@ public class TransferRequest {
if (destination.getStackInSlot(slot) == null) {
insertedSlots.add(new TransferSlot(slot, destination));
if (doAdd) {
destination.setInventorySlotContents(slot, item.copy());
ItemStack movedStack = item.copy();
if (movedStack.stackSize > destination.getInventoryStackLimit()) {
movedStack.stackSize = destination.getInventoryStackLimit();
}
item.stackSize -= movedStack.stackSize;
destination.setInventorySlotContents(slot, movedStack);
if (item.stackSize <= 0) {
item = null;
}
return item;
}
return null;
}
@@ -33,7 +33,7 @@ public class ComponentBeeModifier extends MachineComponent implements IBeeModifi
@Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
return 1.0f;
return 0.0f;
}
@Override
@@ -36,17 +36,17 @@ public enum EnumHiveFrame implements IHiveFrame, IBeeModifier {
public static void init() {
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.25f);
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f);
EnumHiveFrame.Cocoa.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 2.0f);// was 1.5x lim 5.0x
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.TERRITORY, 0.5f, 0.1f);
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f);
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.75f, 0.5f);
EnumHiveFrame.Cage.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.25f, 0.0f);// was 0.75x lim 0.5x
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f);
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.75f, 0.5f);
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.25f, 0.1f);
EnumHiveFrame.Soul.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.75f, 0.0f);// was 0.25x lim 0.1x
EnumHiveFrame.Soul.setMaxDamage(80);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.MUTATION, 0.5f, 0.2f);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.75f, 0.2f);
EnumHiveFrame.Clay.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.25f, 0.0f);// was 0.75x lim 0.2x
EnumHiveFrame.Debug.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.0E-4f, 1.0E-4f);
GameRegistry.addRecipe(
@@ -152,7 +152,7 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements IAlvearyCo
@Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
if (getBeeModifier() == null) {
return 1.0f;
return 0.0f;
}
return getBeeModifier().getProductionModifier(genome, currentModifier);
}
@@ -18,6 +18,7 @@ import binnie.extrabees.apiary.machine.mutator.MutatorAlvearyPackage;
import binnie.extrabees.apiary.machine.rainShield.RainShieldAlvearyPackage;
import binnie.extrabees.apiary.machine.stimulator.StimulatorAlvearyPackage;
import binnie.extrabees.apiary.machine.transmission.TransmissionAlvearyPackage;
import binnie.extrabees.apiary.machine.unlighting.UnlightingAlvearyPackage;
public enum AlvearyMachine implements IMachineType {
@@ -27,7 +28,8 @@ public enum AlvearyMachine implements IMachineType {
Lighting(LightingAlvearyPackage.class),
Stimulator(StimulatorAlvearyPackage.class),
Hatchery(HatcheryAlvearyPackage.class),
Transmission(TransmissionAlvearyPackage.class);
Transmission(TransmissionAlvearyPackage.class),
Unlighting(UnlightingAlvearyPackage.class);
protected Class<? extends MachinePackage> cls;
@@ -72,7 +72,7 @@ public class FrameComponentModifier extends ComponentBeeModifier implements IBee
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
IHiveFrame frame = getHiveFrame();
if (frame == null) {
return 1.0f;
return 0.0f;
}
return frame.getBeeModifier().getProductionModifier(genome, currentModifier);
}
@@ -20,15 +20,17 @@ public enum CircuitType implements IBeeModifier {
Territory(2, 10);
static {
CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 5.0f);
CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 2.5f, 10.0f);
CircuitType.LowVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.5f, 5.0f);
CircuitType.HighVoltage.logic.setModifier(EnumBeeModifier.PRODUCTION, 1.5f, 10.0f);
CircuitType.Plant.logic.setModifier(EnumBeeModifier.FLOWERING, 1.5f, 5.0f);
CircuitType.Death.logic.setModifier(EnumBeeModifier.LIFESPAN, 0.8f, 0.2f);
CircuitType.Life.logic.setModifier(EnumBeeModifier.LIFESPAN, 1.5f, 5.0f);
CircuitType.Nether.logic.setModifier(EnumBeeBooleanModifier.HELLISH);
CircuitType.Mutation.logic.setModifier(EnumBeeModifier.MUTATION, 1.5f, 5.0f);
CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.TERRITORY, 0.4f, 0.1f);
CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.PRODUCTION, 0.9f, 0.5f);
CircuitType.Inhibitor.logic.setModifier(EnumBeeModifier.PRODUCTION, -0.1f, 0.0f);// was 0.9x, now -0.1. limit
// was 0.5x, now it's 0, but
// currently ignored
CircuitType.Territory.logic.setModifier(EnumBeeModifier.TERRITORY, 1.5f, 5.0f);
for (CircuitType type : values()) {
type.logic.setModifier(EnumBeeModifier.GENETIC_DECAY, 1.5f, 10.0f);
@@ -48,18 +50,34 @@ public enum CircuitType implements IBeeModifier {
public void createCircuit(ICircuitLayout layout) {
StimulatorCircuit circuit = new StimulatorCircuit(this, layout);
for (EnumBeeModifier modifier : EnumBeeModifier.values()) {
float mod = logic.getModifier(modifier, 1.0f);
if (mod == 1.0f) {
continue;
for (EnumBeeBooleanModifier modifier : EnumBeeBooleanModifier.values()) {
if (logic.getModifier(modifier)) {
circuit.addTooltipString("Enables " + modifier.getName());
}
if (mod > 1.0f) {
int increase = (int) ((mod - 1.0f) * 100.0f);
circuit.addTooltipString("Increases " + modifier.getName() + " by " + increase + "%");
}
for (EnumBeeModifier modifier : EnumBeeModifier.values()) {
if (modifier == EnumBeeModifier.PRODUCTION) {
float mod = logic.getModifier(modifier, 0.0f);
if (mod == 0.0f) {
continue;
}
if (mod > 0.0f) {
circuit.addTooltipString("Increases " + modifier.getName() + " by +" + mod);
} else {
circuit.addTooltipString("Increases " + modifier.getName() + " by " + mod);
}
} else {
int decrease = (int) ((1.0f - mod) * 100.0f);
circuit.addTooltipString("Decreases " + modifier.getName() + " by " + decrease + "%");
float mod = logic.getModifier(modifier, 1.0f);
if (mod == 1.0f) {
continue;
}
if (mod > 1.0f) {
int increase = (int) ((mod - 1.0f) * 100.0f);
circuit.addTooltipString("Increases " + modifier.getName() + " by " + increase + "%");
} else {
int decrease = (int) ((1.0f - mod) * 100.0f);
circuit.addTooltipString("Decreases " + modifier.getName() + " by " + decrease + "%");
}
}
}
}
@@ -18,7 +18,13 @@ public class StimulatorAlvearyPackage extends AlvearyMachine.AlvearyPackage impl
@Override
public void createMachine(Machine machine) {
new ComponentExtraBeeGUI(machine, ExtraBeeGUID.AlvearyStimulator);
ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
ComponentInventorySlots inventory = new ComponentInventorySlots(machine) {
@Override
public int getInventoryStackLimit() {
return 1;
}
};
inventory.addSlot(AlvearyStimulator.SLOT_CIRCUIT, "circuit");
inventory.getSlot(AlvearyStimulator.SLOT_CIRCUIT).setValidator(new CircuitSlotValidator());
new ComponentPowerReceptor(machine);
@@ -100,13 +100,14 @@ public class StimulatorModifierComponent extends ComponentBeeModifier implements
@Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
float mod = 1.0f;
float mod = 0.0f;// production modifiers are now additive, and the "base" value of 1 comes in forestry's
// Bee.java and BeeKeepingMode.java
if (!powered) {
return mod;
}
for (IBeeModifier beeMod : modifiers) {
mod *= beeMod.getProductionModifier(genome, mod);
mod += beeMod.getProductionModifier(genome, mod);
}
return mod;
}
@@ -0,0 +1,18 @@
package binnie.extrabees.apiary.machine.unlighting;
import binnie.core.craftgui.minecraft.IMachineInformation;
import binnie.core.machines.Machine;
import binnie.extrabees.apiary.machine.AlvearyMachine;
import binnie.extrabees.core.ExtraBeeTexture;
public class UnlightingAlvearyPackage extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
public UnlightingAlvearyPackage() {
super("unlighting", ExtraBeeTexture.AlvearyUnlighting.getTexture(), false);
}
@Override
public void createMachine(Machine machine) {
new UnlightingComponentModifier(machine);
}
}
@@ -0,0 +1,18 @@
package binnie.extrabees.apiary.machine.unlighting;
import binnie.core.machines.Machine;
import binnie.extrabees.apiary.ComponentBeeModifier;
import forestry.api.apiculture.IBeeListener;
import forestry.api.apiculture.IBeeModifier;
public class UnlightingComponentModifier extends ComponentBeeModifier implements IBeeModifier, IBeeListener {
public UnlightingComponentModifier(Machine machine) {
super(machine);
}
@Override
public boolean isSelfUnlighted() {
return true;
}
}
@@ -12,6 +12,7 @@ public enum ExtraBeeTexture implements IBinnieTexture {
AlvearyNovaBlock(ResourceType.Tile, "alveary/AlvearyNovaBlock"),
AlvearyFrame(ResourceType.Tile, "alveary/AlvearyFrame"),
AlvearyLighting(ResourceType.Tile, "alveary/AlvearyLighting"),
AlvearyUnlighting(ResourceType.Tile, "alveary/AlvearyUnlighting"),
AlvearyRainShield(ResourceType.Tile, "alveary/AlvearyRainShield"),
AlvearyStimulator(ResourceType.Tile, "alveary/AlvearyStimulator"),
AlvearyHatchery(ResourceType.Tile, "alveary/AlvearyHatchery"),
@@ -29,19 +29,18 @@ public class Lumbermill {
public static Map<ItemStack, ItemStack> recipes = new HashMap<>();
public static ItemStack getPlankProduct(ItemStack item) {
ItemStack stack = null;
if (Lumbermill.recipes.isEmpty()) {
calculateLumbermillProducts();
}
for (Map.Entry<ItemStack, ItemStack> entry : Lumbermill.recipes.entrySet()) {
if (entry.getKey().isItemEqual(item)) {
stack = entry.getValue().copy();
break;
ItemStack stack = entry.getValue().copy();
stack.stackSize = 6;
return stack;
}
}
stack.stackSize = 6;
return stack;
return null;
}
public static void calculateLumbermillProducts() {
@@ -182,7 +182,12 @@ binniecore.beemodifier.mutation=Mutation
binniecore.beemodifier.lifespan=Lifespan
binniecore.beemodifier.production=Production
binniecore.beemodifier.flowering=Flowering
binniecore.beemodifier.geneticdecay=Genetic Decay
binniecore.beemodifier.genetic_decay=Genetic Decay
binniecore.beebooleanmodifier.sealed=Rain Protection
binniecore.beebooleanmodifier.self_lighted=Self Lighting
binniecore.beebooleanmodifier.sunlight_stimulated=Sunlight Stimulation
binniecore.beebooleanmodifier.hellish=Hellish Emulation
binniecore.gui.breedingmessage.species=Species Discovered
binniecore.gui.breedingmessage.branch=Branch Discovered
@@ -182,7 +182,7 @@ binniecore.beemodifier.mutation=Мутация
binniecore.beemodifier.lifespan=Время жизни
binniecore.beemodifier.production=Продукция
binniecore.beemodifier.flowering=Цветы
binniecore.beemodifier.geneticdecay=Склонность к вырождению
binniecore.beemodifier.genetic_decay=Склонность к вырождению
binniecore.gui.breedingmessage.species=Видов обнаружено
binniecore.gui.breedingmessage.branch=Семейств обнаружено
@@ -182,7 +182,7 @@ binniecore.beemodifier.mutation=变异
binniecore.beemodifier.lifespan=寿命
binniecore.beemodifier.production=产物
binniecore.beemodifier.flowering=授粉速度
binniecore.beemodifier.geneticdecay=基因衰变
binniecore.beemodifier.genetic_decay=基因衰变
binniecore.gui.breedingmessage.species=已发现品种
binniecore.gui.breedingmessage.branch=已发现分支
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Garden (Damp, Neutral)
for.binnie.circuit.garden.damp.alkaline=Garden (Damp, Alkaline)
botany.tube.name=Insulated Tube
botany.tube.cooper=Cooper
botany.tube.copper=Copper
botany.tube.tin=Tin
botany.tube.bronze=Bronze
botany.tube.iron=Iron
@@ -366,7 +366,7 @@ for.binnie.circuit.garden.damp.neutral=Сад (влажный, нейтраль
for.binnie.circuit.garden.damp.alkaline=Сад (влажный, щелочной)
botany.tube.name=изолирующая лампа
botany.tube.cooper=Медная
botany.tube.copper=Медная
botany.tube.tin=Оловяная
botany.tube.bronze=Бронзовая
botany.tube.iron=Железная
@@ -364,7 +364,7 @@ for.binnie.circuit.garden.damp.neutral=花土(潮湿,中性)
for.binnie.circuit.garden.damp.alkaline=花土(潮湿,碱性)
botany.tube.name=恒温管
botany.tube.cooper=铜
botany.tube.copper=铜
botany.tube.tin=锡
botany.tube.bronze=青铜
botany.tube.iron=铁
@@ -191,6 +191,9 @@ extrabees.machine.alveay.frame.tooltip=Hive Frames
extrabees.machine.alveay.lighting=Alveary Lighting
extrabees.machine.alveay.lighting.info=The Alveary Lighting tricks bees into thinking it is daylight at night time.
extrabees.machine.alveay.unlighting=Alveary Unlighting
extrabees.machine.alveay.unlighting.info=The Alveary Unlighting tricks bees into thinking it is night time during the day.
extrabees.machine.alveay.mutator=Mutator
extrabees.machine.alveay.mutator.info=The Mutator uses certain items in order to encourage bee mutation.
extrabees.machine.alveay.mutator.tooltip=Mutagenic Agents
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB