mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 17:24:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef468097d0 | ||
|
|
22f2eebbd3 | ||
|
|
f658e9ec57 | ||
|
|
ddf93bc425 | ||
|
|
503361d6d1 |
No files matched your search
+116
-21
@@ -1,4 +1,4 @@
|
||||
//version: 1684218858
|
||||
//version: 1689409577
|
||||
/*
|
||||
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.19'
|
||||
}
|
||||
|
||||
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(
|
||||
@@ -465,10 +487,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 +510,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)
|
||||
@@ -611,7 +649,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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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]")
|
||||
}
|
||||
|
||||
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
|
||||
def mixinTmpDir = buildDir.path + File.separator + 'tmp' + File.separator + 'mixins'
|
||||
@@ -724,13 +787,13 @@ 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.19')
|
||||
}
|
||||
|
||||
java17PatchDependencies('net.minecraft:launchwrapper:1.15') {transitive = false}
|
||||
@@ -979,6 +1042,9 @@ idea {
|
||||
}
|
||||
}
|
||||
runConfigurations {
|
||||
"0. Build and Test"(Gradle) {
|
||||
taskNames = ["build"]
|
||||
}
|
||||
"1. Run Client"(Gradle) {
|
||||
taskNames = ["runClient"]
|
||||
}
|
||||
@@ -1098,6 +1164,11 @@ tasks.named("processIdeaSettings").configure {
|
||||
dependsOn("injectTags")
|
||||
}
|
||||
|
||||
tasks.named("ideVirtualMainClasses").configure {
|
||||
// Make IntelliJ "Build project" build the mod jars
|
||||
dependsOn("jar", "reobfJar", "spotlessCheck")
|
||||
}
|
||||
|
||||
// workaround variable hiding in pom processing
|
||||
def projectConfigs = project.configurations
|
||||
|
||||
@@ -1118,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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1276,12 +1349,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 +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
|
||||
@@ -1508,3 +1589,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
-4
@@ -1,11 +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')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.0.13:dev')
|
||||
compile('com.github.GTNewHorizons:ForestryMC:4.6.13:dev')
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.76-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.28:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.34:api')
|
||||
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('curse.maven:cofh-lib-220333:2388748')
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,17 @@ 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 null;
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -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);
|
||||
|
||||
+3
-2
@@ -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;
|
||||
}
|
||||
|
||||
+18
@@ -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);
|
||||
}
|
||||
}
|
||||
+18
@@ -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"),
|
||||
|
||||
@@ -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=已发现分支
|
||||
|
||||
@@ -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 |
Reference in new issue
Block a user