Compare commits

..
11 Commits
19 changed files with 185 additions and 259 deletions

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
#!/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
+87 -92
View File
@@ -1,4 +1,4 @@
//version: 1702141377
//version: 1689409577
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -28,12 +28,27 @@ import java.util.concurrent.TimeUnit
buildscript {
repositories {
mavenCentral()
maven {
name 'forge'
url 'https://maven.minecraftforge.net'
}
maven {
// GTNH RetroFuturaGradle and ASM Fork
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
}
maven {
name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'Scala CI dependencies'
url 'https://repo1.maven.org/maven2/'
}
mavenLocal()
}
}
@@ -54,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.26'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.19'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -74,23 +89,6 @@ 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")
@@ -142,17 +140,6 @@ 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/"
@@ -287,7 +274,7 @@ if (apiPackage) {
}
if (accessTransformersFile) {
for (atFile in accessTransformersFile.split(" ")) {
for (atFile in accessTransformersFile.split(",")) {
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
if (!getFile(targetFile).exists()) {
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
@@ -414,13 +401,9 @@ if (identifiedVersion == versionOverride) {
group = "com.github.GTNewHorizons"
if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
base {
archivesName = customArchiveBaseName
}
archivesBaseName = customArchiveBaseName
} else {
base {
archivesName = modId
}
archivesBaseName = modId
}
@@ -575,6 +558,9 @@ repositories {
maven {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
mavenContent {
excludeGroup("net.minecraftforge") // missing the `universal` artefact
}
}
maven {
name = "GTNH Maven"
@@ -589,34 +575,24 @@ repositories {
}
}
if (includeWellKnownRepositories.toBoolean()) {
exclusiveContent {
forRepository {
maven {
name "CurseMaven"
url "https://cursemaven.com"
}
}
filter {
maven {
name "CurseMaven"
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
maven {
name = "ic2"
url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/")
content {
includeGroup "net.industrial-craft"
url = "https://maven.ic2.player.to/"
metadataSources {
mavenPom()
artifact()
}
}
maven {
name = "ic2-mirror"
url = "https://maven2.ic2.player.to/"
metadataSources {
mavenPom()
artifact()
@@ -631,13 +607,11 @@ repositories {
def mixinProviderGroup = "io.github.legacymoddingmc"
def mixinProviderModule = "unimixins"
def mixinProviderVersion = "0.1.13"
def mixinProviderVersion = "0.1.7.1"
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
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')
@@ -649,7 +623,7 @@ dependencies {
}
}
if (usesMixins.toBoolean()) {
implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap))
implementation(mixinProviderSpec)
} else if (forceEnableMixins.toBoolean()) {
runtimeOnlyNonPublishable(mixinProviderSpec)
}
@@ -672,8 +646,6 @@ configurations.all {
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
}
}
@@ -704,6 +676,11 @@ if (file('dependencies.gradle.kts').exists()) {
throw new RuntimeException("Missing dependencies.gradle[.kts]")
}
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"
tasks.register('generateAssets') {
group = "GTNH Buildscript"
description = "Generates a mixin config file at /src/main/resources/mixins.modid.json if needed"
@@ -734,17 +711,46 @@ 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 {
@@ -762,6 +768,7 @@ tasks.named("processResources", ProcessResources).configure {
}
if (usesMixins.toBoolean()) {
from refMap
dependsOn("compileJava", "compileScala")
}
}
@@ -780,14 +787,23 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
def lwjgl3ifyVersion = '1.5.7'
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.3.35')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.19')
}
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}
}
@@ -1150,10 +1166,7 @@ tasks.named("processIdeaSettings").configure {
tasks.named("ideVirtualMainClasses").configure {
// Make IntelliJ "Build project" build the mod jars
dependsOn("jar", "reobfJar")
if (!disableSpotless) {
dependsOn("spotlessCheck")
}
dependsOn("jar", "reobfJar", "spotlessCheck")
}
// workaround variable hiding in pom processing
@@ -1174,8 +1187,9 @@ publishing {
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
}
}
repositories {
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
if (usesMavenPublishing.toBoolean()) {
maven {
url = mavenPublishUrl
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
@@ -1297,7 +1311,7 @@ def addCurseForgeRelation(String type, String name) {
// Updating
def buildscriptGradleVersion = "8.5"
def buildscriptGradleVersion = "8.1.1"
tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
@@ -1576,25 +1590,6 @@ def getSecondaryArtifacts() {
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'
+7 -5
View File
@@ -1,10 +1,12 @@
// Add your dependencies here
dependencies {
api('curse.maven:cofh-lib-220333:2388748')
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.4.13-GTNH:dev')
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.6.1:api')
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.38:api')
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compile('com.github.GTNewHorizons:NotEnoughItems:2.3.73-GTNH:dev')
compile('com.github.GTNewHorizons:inventory-tweaks:1.5.16:api')
compile('com.github.GTNewHorizons:BuildCraft:7.1.34:api')
compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
compile('curse.maven:cofh-lib-220333:2388748')
compileOnly('curse.maven:craftguide-75557:2459320')
}
Binary file not shown.
+1 -2
View File
@@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+4 -8
View File
@@ -85,6 +85,9 @@ 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
@@ -130,13 +133,10 @@ location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -197,10 +197,6 @@ 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,4 +1,26 @@
// Add any additional repositiroes 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'
}
}
-3
View File
@@ -112,9 +112,6 @@ public class Forestry {
public void postInit(FMLPostInitializationEvent event) {
PluginManager.runPostInit();
// Parse Mail Blacklist
Config.parseMailBlacklist();
// Register world generator
WorldGenerator worldGenerator = new WorldGenerator();
GameRegistry.registerWorldGenerator(worldGenerator, 0);
@@ -49,8 +49,8 @@ public class BeeHousingModifier implements IBeeModifier {
@Override
public float getProductionModifier(IBeeGenome genome, final float currentModifier) {
float modifierValue = 0.0f; // part of the additive production nerf, but don't worry at least you effectively
// get +1 from `t` in `Bee.java:produceStacks`
float modifierValue = 0.0f;// the "base" value of 1.0 should come from Bee.java or BeeKeepingMode.jave, that is,
// it should be set at the call site
for (IBeeModifier modifier : beeHousing.getBeeModifiers()) {
modifierValue += modifier.getProductionModifier(genome, modifierValue + currentModifier);
}
@@ -34,31 +34,19 @@ public class EventHandlerApiculture {
tooltip.add(StringUtil.localize("frame.tooltip.durability") + getDurabilityFormatted(durability));
float territory = modifier.getTerritoryModifier(null, 1.0F);
tooltip.add(
StringUtil.localize("frame.tooltip.territory")
+ getModifierFormatted(territory, false, false));
tooltip.add(StringUtil.localize("frame.tooltip.territory") + getColorFormatted(territory));
float mutation = modifier.getMutationModifier(null, null, 1.0F);
tooltip.add(
StringUtil.localize("frame.tooltip.mutationRate")
+ getModifierFormatted(mutation, false, false));
tooltip.add(StringUtil.localize("frame.tooltip.mutationRate") + getColorFormatted(mutation));
float lifespan = modifier.getLifespanModifier(null, null, 1.0F);
// lower lifespan is better
tooltip.add(
StringUtil.localize("frame.tooltip.lifespan")
+ getModifierFormatted(lifespan, false, true));
float production = modifier.getProductionModifier(null, 0.0F);
tooltip.add(
StringUtil.localize("frame.tooltip.production")
+ getModifierFormatted(production, true, false));
float flowering = modifier.getFloweringModifier(null, 1.0F);
tooltip.add(
StringUtil.localize("frame.tooltip.flowering")
+ getModifierFormatted(flowering, false, false));
tooltip.add(StringUtil.localize("frame.tooltip.lifespan") + getColorFormatted(lifespan));
float production = modifier.getProductionModifier(null, 1.0F);
tooltip.add(StringUtil.localize("frame.tooltip.production") + getColorFormatted(production, true));
float decay = modifier.getGeneticDecay(null, 1.0F);
// lower genetic decay is better
tooltip.add(
StringUtil.localize("frame.tooltip.geneticDecay")
+ getModifierFormatted(decay, false, true));
tooltip.add(StringUtil.localize("frame.tooltip.geneticDecay") + getColorFormatted(decay));
}
}
}
@@ -80,27 +68,15 @@ public class EventHandlerApiculture {
return color + " " + durability;
}
private static String getModifierFormatted(float value, boolean additive, boolean undesireable) {
private static String getColorFormatted(float value, boolean additive) {
EnumChatFormatting color;
float lo_threshold = 0.5F, mid_threshold = 1.0F, hi_threshold = 2.0F;
float discriminant = value;
if (additive) {
lo_threshold = -1.0F;
mid_threshold = 0.0F;
hi_threshold = 2.0F; // this one is the same
if (undesireable) {
discriminant = -value;
}
} else if (undesireable) {
discriminant = 1.0F / value;
}
if (discriminant <= lo_threshold) {
if (value <= 0.5F) {
color = EnumChatFormatting.DARK_RED; // "bad" stat
} else if (discriminant < mid_threshold) {
} else if (value < 1.0F) {
color = EnumChatFormatting.RED; // "below average" stat
} else if (discriminant == mid_threshold) {
} else if (value == 1.0F) {
color = EnumChatFormatting.GOLD; // "average" stat
} else if (discriminant <= hi_threshold) {
} else if (value <= 2.0F) {
color = EnumChatFormatting.GREEN; // "above average" stat
} else {
color = EnumChatFormatting.AQUA; // "great" stat
@@ -122,4 +98,8 @@ public class EventHandlerApiculture {
}
return formatted + value;
}
private static String getColorFormatted(float value) {
return getColorFormatted(value, false);
}
}
@@ -26,20 +26,7 @@ import net.minecraft.world.biome.BiomeGenBase;
import com.mojang.authlib.GameProfile;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.FlowerManager;
import forestry.api.apiculture.IAlleleBeeEffect;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IAlleleBeeSpeciesCustom;
import forestry.api.apiculture.IApiaristTracker;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.apiculture.IBeeModifier;
import forestry.api.apiculture.IBeeMutation;
import forestry.api.apiculture.IBeekeepingMode;
import forestry.api.apiculture.IJubilanceProvider;
import forestry.api.apiculture.*;
import forestry.api.core.BiomeHelper;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
@@ -527,7 +514,7 @@ public class Bee extends IndividualLiving implements IBee {
// Bee genetic speed * beehousing * beekeeping mode
float speed = genome.getSpeed();
float prodModifier = beeHousingModifier.getProductionModifier(genome, 0f);
float prodModifier = beeHousingModifier.getProductionModifier(genome, 1f);
prodModifier += beeModeModifier.getProductionModifier(genome, prodModifier);
// / Primary Products
@@ -565,12 +552,12 @@ public class Bee extends IndividualLiving implements IBee {
public static float getFinalChance(float chance, float beeSpeed, float productionModifier, float t) {
if (productionModifier + t <= 0f) {
return 0f;
return 0;
}
chance *= 100f;
return (float) (2.8 * Math.pow(chance, 0.52)
* Math.pow((productionModifier + t), 0.52)
* Math.pow(beeSpeed, 0.37)) / 100f;
* Math.pow(beeSpeed, 0.37)) / 100.f;
}
/* REPRODUCTION */
@@ -101,7 +101,7 @@ public class BeekeepingMode implements IBeekeepingMode {
public boolean isOverworked(IBee queen, IBeeHousing housing) {
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
float productionModifier = beeModifier.getProductionModifier(queen.getGenome(), 0f);
float productionModifier = beeModifier.getProductionModifier(queen.getGenome(), 1f);
if (productionModifier > 16) {
if (housing.getWorld().rand.nextFloat() * 100 < 0.01 * ((productionModifier * productionModifier) - 100)) {
return true;
@@ -13,13 +13,7 @@ import java.util.ArrayList;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IAlleleBeeSpeciesCustom;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IJubilanceProvider;
import forestry.api.apiculture.*;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAlleleInteger;
import forestry.api.genetics.IAlleleTolerance;
@@ -56,7 +56,7 @@ public class ItemHiveFrame extends ItemForestry implements IHiveFrame {
@Override
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
return (currentModifier < 10.0f) ? 1.0f : 0.0f;
return (currentModifier < 10.0f) ? 2.0f : 0.0f;
}
@Override
@@ -18,13 +18,11 @@ import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import net.minecraft.item.Item;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.config.Property;
import com.google.common.collect.LinkedListMultimap;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.Forestry;
import forestry.core.fluids.Fluids;
import forestry.core.utils.Log;
@@ -99,37 +97,6 @@ public class Config {
public static GuiMailboxInfo.XPosition mailAlertXPosition = GuiMailboxInfo.XPosition.LEFT;
public static GuiMailboxInfo.YPosition mailAlertYPosition = GuiMailboxInfo.YPosition.TOP;
public static Set<Item> mailBlacklist = new HashSet<Item>();
public static String[] mailBlacklistString;
public static final String[] mailBlacklistDefault = new String[] { "arsmagica2:essenceBag", "arsmagica2:runeBag",
"betterstorage:backpack", "betterstorage:cardboardBox", "betterstorage:thaumcraftBackpack",
"Botania:baubleBox", "Botania:flowerBag", "cardboardboxes:cbCardboardBox", "dendrology:fullDrawers1",
"dendrology:fullDrawers2", "dendrology:fullDrawers4", "dendrology:halfDrawers2", "dendrology:halfDrawers4",
"DQMIIINext:ItemMahounoTutu11", "DQMIIINext:ItemOokinaFukuro", "DQMIIINext:ItemOokinaFukuroB",
"DQMIIINext:ItemOokinaFukuroG", "DQMIIINext:ItemOokinaFukuroR", "DQMIIINext:ItemOokinaFukuroY",
"ExtraUtilities:golden_bag", "HardcoreEnderExpansion:charm_pouch", "ImmersiveEngineering:toolbox",
"ironbackpacks:basicBackpack", "ironbackpacks:diamondBackpack", "ironbackpacks:goldBackpack",
"ironbackpacks:ironBackpack", "JABBA:mover", "JABBA:moverDiamond", "MagicBees:backpack.thaumaturgeT1",
"MagicBees:backpack.thaumaturgeT2", "Mekanism:CardboardBox", "MineFactoryReloaded:plastic.bag",
"OpenBlocks:devnull", "ProjectE:item.pe_alchemical_bag",
"ProjRed|Exploration:projectred.exploration.backpack", "sgs_treasure:dread_pirate_chest",
"sgs_treasure:iron_chest", "sgs_treasure:locked_wooden_chest", "sgs_treasure:obsidian_chest",
"sgs_treasure:pirate_chest", "sgs_treasure:wither_chest", "sgs_treasure:wooden_chest",
"StorageDrawers:compDrawers", "StorageDrawers:fullCustom1", "StorageDrawers:fullCustom2",
"StorageDrawers:fullCustom4", "StorageDrawers:fullDrawers1", "StorageDrawers:fullDrawers2",
"StorageDrawers:fullDrawers4", "StorageDrawers:halfCustom2", "StorageDrawers:halfCustom4",
"StorageDrawers:halfDrawers2", "StorageDrawers:halfDrawers4", "StorageDrawersBop:fullDrawers1",
"StorageDrawersBop:fullDrawers1", "StorageDrawersBop:fullDrawers2", "StorageDrawersBop:fullDrawers2",
"StorageDrawersBop:fullDrawers4", "StorageDrawersBop:fullDrawers4", "StorageDrawersBop:halfDrawers2",
"StorageDrawersBop:halfDrawers2", "StorageDrawersBop:halfDrawers4", "StorageDrawersBop:halfDrawers4",
"StorageDrawersForestry:fullDrawers1A", "StorageDrawersForestry:fullDrawers2A",
"StorageDrawersForestry:fullDrawers4A", "StorageDrawersForestry:halfDrawers2A",
"StorageDrawersForestry:halfDrawers4A", "StorageDrawersNatura:fullDrawers1",
"StorageDrawersNatura:fullDrawers2", "StorageDrawersNatura:fullDrawers4",
"StorageDrawersNatura:halfDrawers2", "StorageDrawersNatura:halfDrawers4", "Thaumcraft:FocusPouch",
"ThaumicTinkerer:ichorPouch", "thebetweenlands:lurkerSkinPouch", "ThermalExpansion:Strongbox",
"ThermalExpansion:satchel", "warpbook:warpbook", "witchery:brewbag", "WitchingGadgets:item.WG_Bag" };
// Gui tabs (Ledger)
public static int guiTabSpeed = 8;
@@ -312,11 +279,6 @@ public class Config {
"yPosition",
mailAlertYPosition,
GuiMailboxInfo.YPosition.values());
mailBlacklistString = configCommon.getStringList(
"mailBlacklist",
"restrictions",
mailBlacklistDefault,
"Items that cannot be shipped through a letter");
guiTabSpeed = configCommon.getIntLocalized("tweaks.gui.tabs", "speed", guiTabSpeed, 1, 50);
enableHints = configCommon.getBooleanLocalized("tweaks.gui.tabs", "hints", enableHints);
@@ -424,16 +386,4 @@ public class Config {
return list.split("[;]+");
}
}
public static void parseMailBlacklist() {
for (String itemName : mailBlacklistString) {
String[] nameAndID;
if (itemName.contains(":") && (nameAndID = itemName.split(":")).length == 2) {
Item item = GameRegistry.findItem(nameAndID[0], nameAndID[1]);
if (item != null) {
mailBlacklist.add(item);
}
}
}
}
}
@@ -28,12 +28,7 @@ import com.google.common.collect.ImmutableList;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.farming.FarmDirection;
import forestry.api.farming.Farmables;
import forestry.api.farming.ICrop;
import forestry.api.farming.IFarmHousing;
import forestry.api.farming.IFarmable;
import forestry.api.farming.IFarmableBasic;
import forestry.api.farming.*;
import forestry.api.genetics.IFruitBearer;
import forestry.core.utils.vect.Vect;
import forestry.core.utils.vect.VectUtil;
@@ -120,8 +120,7 @@ public class ItemInventoryLetter extends ItemInventory implements IErrorSource,
Item item = itemStack.getItem();
return item instanceof ItemStamps;
} else if (SlotUtil.isSlotInRange(slotIndex, Letter.SLOT_ATTACHMENT_1, Letter.SLOT_ATTACHMENT_COUNT)) {
if (itemStack.getItem() instanceof ItemWithGui) return false;
return !Config.mailBlacklist.contains(itemStack.getItem());
return !(itemStack.getItem() instanceof ItemWithGui);
}
return false;
}
@@ -39,27 +39,7 @@ import forestry.core.utils.Log;
import forestry.farming.blocks.BlockFarmType;
import forestry.farming.blocks.BlockRegistryFarming;
import forestry.farming.circuits.CircuitFarmLogic;
import forestry.farming.logic.FarmLogicArboreal;
import forestry.farming.logic.FarmLogicCereal;
import forestry.farming.logic.FarmLogicCocoa;
import forestry.farming.logic.FarmLogicGourd;
import forestry.farming.logic.FarmLogicIC2Crops;
import forestry.farming.logic.FarmLogicInfernal;
import forestry.farming.logic.FarmLogicOrchard;
import forestry.farming.logic.FarmLogicPeat;
import forestry.farming.logic.FarmLogicReeds;
import forestry.farming.logic.FarmLogicShroom;
import forestry.farming.logic.FarmLogicSucculent;
import forestry.farming.logic.FarmLogicVegetable;
import forestry.farming.logic.FarmableBasicFruit;
import forestry.farming.logic.FarmableGE;
import forestry.farming.logic.FarmableGenericCrop;
import forestry.farming.logic.FarmableGenericSapling;
import forestry.farming.logic.FarmableGourd;
import forestry.farming.logic.FarmableReference;
import forestry.farming.logic.FarmableStacked;
import forestry.farming.logic.FarmableVanillaMushroom;
import forestry.farming.logic.FarmableVanillaSapling;
import forestry.farming.logic.*;
import forestry.farming.proxy.ProxyFarming;
import forestry.farming.render.EnumFarmBlockTexture;
import forestry.farming.tiles.TileFarmControl;
@@ -573,7 +573,6 @@ for.frame.tooltip.territory=Territory:
for.frame.tooltip.mutationRate=Mutation Rate:
for.frame.tooltip.lifespan=Lifespan:
for.frame.tooltip.production=Production:
for.frame.tooltip.flowering=Flowering:
for.frame.tooltip.geneticDecay=Genetic Decay:
item.for.fruits.cherry.name=Cherry
@@ -1415,8 +1414,6 @@ tile.for.mushroom.1.name=Mushroom
# LEPIDOPTEROLOGY
####################
entity.Forestry.butterflyGE.name=Butterfly
for.chat.command.forestry.butterfly.desc=- %s : Butterfly Commands
for.chat.command.forestry.butterfly.help=Various commands related to butterflies
for.chat.command.forestry.butterfly.format=Format: /%s <sub-command>