mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 09:34:57 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9941de0ad | ||
|
|
103cd87cbe | ||
|
|
1da67c79f3 | ||
|
|
3023b12d83 | ||
|
|
05c4914c79 | ||
|
|
bf6bf6846a | ||
|
|
ba6f1d6249 | ||
|
|
64e861af85 | ||
|
|
27a4d86108 | ||
|
|
afc859c6e9 | ||
|
|
6292b4569f | ||
|
|
99ebd8efe0 | ||
|
|
29df6ceb1b | ||
|
|
39c822df8a | ||
|
|
9e9ae6bcad | ||
|
|
661a5598ea | ||
|
|
d96669f5f7 | ||
|
|
ca9ebbc0ed |
No files matched your search
@@ -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
|
||||
|
||||
+548
-187
File diff suppressed because it is too large.
Load diff
+5
-7
@@ -1,12 +1,10 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.7-GTNH:dev')
|
||||
compile('com.github.GTNewHorizons:inventory-tweaks:1.5.14:api')
|
||||
compile('com.github.GTNewHorizons:BuildCraft:7.1.27:api')
|
||||
compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
|
||||
compile('curse.maven:cofh-lib-220333:2388748')
|
||||
|
||||
api('curse.maven:cofh-lib-220333:2388748')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.3.81-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.5.16:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.36:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly('curse.maven:craftguide-75557:2459320')
|
||||
}
|
||||
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-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -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
|
||||
|
||||
@@ -1,26 +1,4 @@
|
||||
// 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'
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,9 @@ 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);
|
||||
|
||||
@@ -24,7 +24,7 @@ public class DefaultBeeModifier implements IBeeModifier {
|
||||
}
|
||||
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
@@ -43,6 +43,10 @@ public class DefaultBeeModifier implements IBeeModifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSelfUnlighted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isSunlightSimulated() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,10 +54,17 @@ public interface IBeeModifier {
|
||||
boolean isSealed();
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore darkness/night
|
||||
* @return Boolean indicating if housing can ignore darkness/night. Cannot be used together with SelfUnlighted
|
||||
*/
|
||||
boolean isSelfLighted();
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore lightness/day. Cannot be used together with SelfLighted
|
||||
*/
|
||||
default boolean isSelfUnlighted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Boolean indicating if housing can ignore not seeing the sky
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
|
||||
public interface IHiveFrame {
|
||||
|
||||
@@ -22,4 +27,15 @@ public interface IHiveFrame {
|
||||
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
|
||||
|
||||
IBeeModifier getBeeModifier();
|
||||
|
||||
/**
|
||||
* Provides an override for the "Hold Shift" tooltip info for a frame.<br>
|
||||
* Called by {@link forestry.apiculture.EventHandlerApiculture#addFrameTooltip(ItemTooltipEvent)}.
|
||||
*
|
||||
* @return The info to display for this frame, or null if default generated info.
|
||||
*/
|
||||
@Nullable
|
||||
default List<String> getFrameTooltip() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Map;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package forestry.api.mail;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.core.INBTTagable;
|
||||
|
||||
public interface IMailAddress extends INBTTagable {
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
|
||||
public interface ITreeGenData {
|
||||
|
||||
@@ -15,6 +15,6 @@ public class ApiaryBeeModifier extends DefaultBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0.1f;
|
||||
return -0.9f; // results in 0.1 with no frames, see BeeHousingModifier,java
|
||||
}
|
||||
}
|
||||
@@ -49,9 +49,10 @@ public class BeeHousingModifier implements IBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, final float currentModifier) {
|
||||
float modifierValue = 1.0f;
|
||||
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`
|
||||
for (IBeeModifier modifier : beeHousing.getBeeModifiers()) {
|
||||
modifierValue *= modifier.getProductionModifier(genome, modifierValue * currentModifier);
|
||||
modifierValue += modifier.getProductionModifier(genome, modifierValue + currentModifier);
|
||||
}
|
||||
return modifierValue;
|
||||
}
|
||||
@@ -94,6 +95,16 @@ public class BeeHousingModifier implements IBeeModifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfUnlighted() {
|
||||
for (IBeeModifier modifier : beeHousing.getBeeModifiers()) {
|
||||
if (modifier.isSelfUnlighted()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated() {
|
||||
for (IBeeModifier modifier : beeHousing.getBeeModifiers()) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BeehouseBeeModifier extends DefaultBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 0.25f;
|
||||
return -0.75f;// results in 0.25 with no frames, see BeeHousingModifier,java
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
package forestry.apiculture;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.StringUtil;
|
||||
|
||||
public class EventHandlerApiculture {
|
||||
|
||||
@SubscribeEvent
|
||||
public void addFrameTooltip(ItemTooltipEvent event) {
|
||||
ItemStack itemStack = event.itemStack;
|
||||
if (itemStack != null && itemStack.getItem() instanceof IHiveFrame) {
|
||||
IHiveFrame frame = (IHiveFrame) itemStack.getItem();
|
||||
IBeeModifier modifier = frame.getBeeModifier();
|
||||
List<String> tooltip = event.toolTip;
|
||||
|
||||
if (!Proxies.common.isShiftDown()) {
|
||||
tooltip.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
} else {
|
||||
if (frame.getFrameTooltip() != null) {
|
||||
// use the override if it exists
|
||||
tooltip.addAll(frame.getFrameTooltip());
|
||||
} else {
|
||||
// otherwise use the auto-generated info
|
||||
int durability = itemStack.getMaxDamage();
|
||||
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));
|
||||
float mutation = modifier.getMutationModifier(null, null, 1.0F);
|
||||
tooltip.add(
|
||||
StringUtil.localize("frame.tooltip.mutationRate")
|
||||
+ getModifierFormatted(mutation, false, false));
|
||||
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));
|
||||
float decay = modifier.getGeneticDecay(null, 1.0F);
|
||||
// lower genetic decay is better
|
||||
tooltip.add(
|
||||
StringUtil.localize("frame.tooltip.geneticDecay")
|
||||
+ getModifierFormatted(decay, false, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getDurabilityFormatted(int durability) {
|
||||
EnumChatFormatting color;
|
||||
if (durability < 100) {
|
||||
color = EnumChatFormatting.DARK_RED;
|
||||
} else if (durability < 200) {
|
||||
color = EnumChatFormatting.RED;
|
||||
} else if (durability < 250) {
|
||||
color = EnumChatFormatting.GOLD;
|
||||
} else if (durability < 750) {
|
||||
color = EnumChatFormatting.GREEN;
|
||||
} else {
|
||||
color = EnumChatFormatting.AQUA;
|
||||
}
|
||||
return color + " " + durability;
|
||||
}
|
||||
|
||||
private static String getModifierFormatted(float value, boolean additive, boolean undesireable) {
|
||||
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) {
|
||||
color = EnumChatFormatting.DARK_RED; // "bad" stat
|
||||
} else if (discriminant < mid_threshold) {
|
||||
color = EnumChatFormatting.RED; // "below average" stat
|
||||
} else if (discriminant == mid_threshold) {
|
||||
color = EnumChatFormatting.GOLD; // "average" stat
|
||||
} else if (discriminant <= hi_threshold) {
|
||||
color = EnumChatFormatting.GREEN; // "above average" stat
|
||||
} else {
|
||||
color = EnumChatFormatting.AQUA; // "great" stat
|
||||
}
|
||||
String formatted = color.toString();
|
||||
|
||||
// Set symbol for if this value is additive or multiplicative
|
||||
if (!additive) {
|
||||
formatted += " x";
|
||||
} else if (value >= 0.0F) {
|
||||
formatted += " +";
|
||||
} else {
|
||||
formatted += " "; // the "-" will be applied, but we still need a space or minecraft will crash
|
||||
}
|
||||
|
||||
// trim trailing zeroes if no decimal-precision is needed
|
||||
if (value == (long) value) {
|
||||
return formatted + (long) value;
|
||||
}
|
||||
return formatted + value;
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import forestry.api.genetics.IFlower;
|
||||
|
||||
final class Flower implements IFlower {
|
||||
|
||||
@@ -26,7 +26,20 @@ import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
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.core.BiomeHelper;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
@@ -248,7 +261,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
|
||||
// / Night or darkness requires nocturnal species
|
||||
if (world.isDaytime()) {
|
||||
if (!canWorkDuringDay()) {
|
||||
if (!canWorkDuringDay(beeModifier)) {
|
||||
errorStates.add(EnumErrorCode.NOT_NIGHT);
|
||||
}
|
||||
} else {
|
||||
@@ -258,7 +271,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
|
||||
if (housing.getBlockLightValue() > Constants.APIARY_MIN_LEVEL_LIGHT) {
|
||||
if (!canWorkDuringDay()) {
|
||||
if (!canWorkDuringDay(beeModifier)) {
|
||||
errorStates.add(EnumErrorCode.NOT_GLOOMY);
|
||||
}
|
||||
} else {
|
||||
@@ -308,12 +321,16 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
return errorStates;
|
||||
}
|
||||
|
||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||
private boolean canWorkAtNight(IBeeModifier beeModifier) {
|
||||
return genome.getPrimary().isNocturnal() || genome.getNocturnal() || beeModifier.isSelfLighted();
|
||||
return (genome.getPrimary().isNocturnal() || genome.getNocturnal() || beeModifier.isSelfLighted())
|
||||
&& !(beeModifier.isSelfUnlighted() && beeModifier.isSelfLighted());
|
||||
}
|
||||
|
||||
private boolean canWorkDuringDay() {
|
||||
return !genome.getPrimary().isNocturnal() || genome.getNocturnal();
|
||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||
private boolean canWorkDuringDay(IBeeModifier beeModifier) {
|
||||
return (!genome.getPrimary().isNocturnal() || genome.getNocturnal() || beeModifier.isSelfUnlighted())
|
||||
&& !(beeModifier.isSelfUnlighted() && beeModifier.isSelfLighted());
|
||||
}
|
||||
|
||||
private boolean canWorkUnderground(IBeeModifier beeModifier) {
|
||||
@@ -451,12 +468,11 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
// / PRODUCTION
|
||||
@Override
|
||||
public ItemStack[] getProduceList() {
|
||||
ArrayList<ItemStack> products = new ArrayList<>();
|
||||
|
||||
IAlleleBeeSpecies primary = genome.getPrimary();
|
||||
IAlleleBeeSpecies secondary = genome.getSecondary();
|
||||
|
||||
products.addAll(primary.getProductChances().keySet());
|
||||
ArrayList<ItemStack> products = new ArrayList<>(primary.getProductChances().keySet());
|
||||
|
||||
Set<ItemStack> secondaryProducts = secondary.getProductChances().keySet();
|
||||
// Remove duplicates
|
||||
@@ -475,13 +491,13 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
}
|
||||
|
||||
return products.toArray(new ItemStack[products.size()]);
|
||||
return products.toArray(new ItemStack[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getSpecialtyList() {
|
||||
Set<ItemStack> specialties = genome.getPrimary().getSpecialtyChances().keySet();
|
||||
return specialties.toArray(new ItemStack[specialties.size()]);
|
||||
return specialties.toArray(new ItemStack[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -511,9 +527,8 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
|
||||
// Bee genetic speed * beehousing * beekeeping mode
|
||||
float speed = genome.getSpeed();
|
||||
float prodModifier = beeHousingModifier.getProductionModifier(genome, 1f)
|
||||
* beeModeModifier.getProductionModifier(genome, 1f);
|
||||
prodModifier /= 4f;
|
||||
float prodModifier = beeHousingModifier.getProductionModifier(genome, 0f);
|
||||
prodModifier += beeModeModifier.getProductionModifier(genome, prodModifier);
|
||||
|
||||
// / Primary Products
|
||||
for (Map.Entry<ItemStack, Float> entry : primary.getProductChances().entrySet()) {
|
||||
@@ -537,7 +552,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack[] productsArray = products.toArray(new ItemStack[products.size()]);
|
||||
ItemStack[] productsArray = products.toArray(new ItemStack[0]);
|
||||
ChunkCoordinates housingCoordinates = housing.getCoordinates();
|
||||
return genome.getFlowerProvider().affectProducts(
|
||||
housing.getWorld(),
|
||||
@@ -549,10 +564,13 @@ 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;
|
||||
}
|
||||
chance *= 100f;
|
||||
return (float) (((1f + t / 6f) * Math.sqrt(chance) * 2f * (1f + beeSpeed)
|
||||
+ Math.pow(productionModifier, Math.cbrt(chance))
|
||||
- 3f) / 100f);
|
||||
return (float) (2.8 * Math.pow(chance, 0.52)
|
||||
* Math.pow((productionModifier + t), 0.52)
|
||||
* Math.pow(beeSpeed, 0.37)) / 100f;
|
||||
}
|
||||
|
||||
/* REPRODUCTION */
|
||||
|
||||
@@ -24,11 +24,19 @@ import forestry.api.apiculture.IBeekeepingMode;
|
||||
|
||||
public class BeekeepingMode implements IBeekeepingMode {
|
||||
|
||||
public static final IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 1.0f, false, false);
|
||||
public static final IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 1.0f, false, true);
|
||||
public static final IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 1.0f, false, true);
|
||||
public static final IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, 0.8f, true, true);
|
||||
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, 0.6f, true, true);
|
||||
public static final IBeekeepingMode easy = new BeekeepingMode("EASY", 2.0f, 1.0f, 0.0f, false, false);// original
|
||||
// multiplicative
|
||||
// modifier is
|
||||
// 1x
|
||||
public static final IBeekeepingMode normal = new BeekeepingMode("NORMAL", 1.0f, 1.0f, 0.0f, false, true);// orig 1x
|
||||
public static final IBeekeepingMode hard = new BeekeepingMode("HARD", 0.75f, 1.5f, 0.0f, false, true);// orig 1x;
|
||||
// this is the
|
||||
// default in
|
||||
// gtnh
|
||||
public static final IBeekeepingMode hardcore = new BeekeepingMode("HARDCORE", 0.5f, 5.0f, -0.2f, true, true);// orig
|
||||
// 0.8x
|
||||
public static final IBeekeepingMode insane = new BeekeepingMode("INSANE", 0.2f, 10.0f, -0.4f, true, true);// orig
|
||||
// 0.6x
|
||||
|
||||
private final Random rand;
|
||||
private final String name;
|
||||
@@ -93,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(), 1f);
|
||||
float productionModifier = beeModifier.getProductionModifier(queen.getGenome(), 0f);
|
||||
if (productionModifier > 16) {
|
||||
if (housing.getWorld().rand.nextFloat() * 100 < 0.01 * ((productionModifier * productionModifier) - 100)) {
|
||||
return true;
|
||||
|
||||
@@ -13,7 +13,13 @@ import java.util.ArrayList;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
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.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 < 10f) ? 2f : 1f;
|
||||
return (currentModifier < 10.0f) ? 1.0f : 0.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -414,7 +414,6 @@ public class AlvearyController extends RectangularMultiblockControllerBase
|
||||
tempChange += change;
|
||||
tempChange = Math.max(boundaryDown - temperature, tempChange);
|
||||
tempChange = Math.min(boundaryUp - temperature, tempChange);
|
||||
tempChange = (change > 0 && tempChange < 0) || (change < 0 && tempChange > 0) ? 0 : tempChange;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -424,7 +423,6 @@ public class AlvearyController extends RectangularMultiblockControllerBase
|
||||
humidChange += change;
|
||||
humidChange = Math.max(boundaryDown - humidity, humidChange);
|
||||
humidChange = Math.min(boundaryUp - humidity, humidChange);
|
||||
humidChange = (change > 0 && humidChange < 0) || (change < 0 && humidChange > 0) ? 0 : humidChange;
|
||||
}
|
||||
|
||||
/* GUI */
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TileAlvearyFan extends TileAlvearyClimatiser {
|
||||
|
||||
@Override
|
||||
public float getBoundaryDown() {
|
||||
return 0.05f;
|
||||
return -1f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,12 +22,12 @@ public class TileAlvearyHeater extends TileAlvearyClimatiser {
|
||||
|
||||
@Override
|
||||
public float getChangePerTransfer() {
|
||||
return 0.01f;
|
||||
return 0.015f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBoundaryUp() {
|
||||
return 2.5f;
|
||||
return 3.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -56,9 +56,9 @@ public class TileAlvearyHygroregulator extends TileAlveary
|
||||
this.tankManager = new TankManager(this, liquidTank);
|
||||
|
||||
this.recipes = new HygroregulatorRecipe[] {
|
||||
new HygroregulatorRecipe(new FluidStack(water, 1), 1, 0.01f, -0.005f),
|
||||
new HygroregulatorRecipe(new FluidStack(lava, 1), 10, -0.01f, +0.005f),
|
||||
new HygroregulatorRecipe(new FluidStack(liquidIce, 1), 10, 0.02f, -0.01f) };
|
||||
new HygroregulatorRecipe(new FluidStack(water, 1), 1, +0.01f, -0.0005f),
|
||||
new HygroregulatorRecipe(new FluidStack(lava, 1), 10, -0.01f, +0.0005f),
|
||||
new HygroregulatorRecipe(new FluidStack(liquidIce, 1), 10, +0.02f, -0.001f) };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class TreeBlockTypeLeaf implements ITreeBlockType {
|
||||
|
||||
@@ -18,11 +18,13 @@ 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;
|
||||
@@ -31,6 +33,7 @@ import forestry.mail.gui.GuiMailboxInfo;
|
||||
|
||||
public class Config {
|
||||
|
||||
public static boolean disableButterfly;
|
||||
public static final String CATEGORY_COMMON = "common";
|
||||
public static final String CATEGORY_FLUIDS = "fluids";
|
||||
|
||||
@@ -96,6 +99,37 @@ 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;
|
||||
|
||||
@@ -146,6 +180,8 @@ public class Config {
|
||||
|
||||
configCommon = new LocalizedConfiguration(configFileCommon, "1.2.0");
|
||||
|
||||
disableButterfly = configCommon.getBooleanLocalized("mobs", "disable.butterfly", false);
|
||||
|
||||
gameMode = configCommon
|
||||
.getStringLocalized("difficulty", "game.mode", "EASY", new String[] { "OP, EASY, NORMAL, HARD" });
|
||||
|
||||
@@ -276,6 +312,11 @@ 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);
|
||||
@@ -383,4 +424,16 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public abstract class ItemInventory implements IInventory, IFilterSlotDelegate {
|
||||
|
||||
String baseUID = base.getTagCompound().getString(KEY_UID);
|
||||
String comparisonUID = comparison.getTagCompound().getString(KEY_UID);
|
||||
return baseUID != null && comparisonUID != null && baseUID.equals(comparisonUID);
|
||||
return baseUID != null && !baseUID.isEmpty() && baseUID.equals(comparisonUID);
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.init.Blocks;
|
||||
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
|
||||
import forestry.core.fluids.Fluids;
|
||||
|
||||
public class ItemRegistryFluids extends ItemRegistry {
|
||||
|
||||
@@ -12,13 +12,13 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
||||
import forestry.api.recipes.IDescriptiveRecipe;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.IDescriptiveRecipe;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
|
||||
public class CraftGuideCustomRecipes implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler implements
|
||||
public void loadUsageRecipes(FluidStack ingredient) {}
|
||||
|
||||
@Override
|
||||
public List<String> handleTooltip(GuiRecipe guiRecipe, List<String> currenttip, int recipe) {
|
||||
public List<String> handleTooltip(GuiRecipe<?> guiRecipe, List<String> currenttip, int recipe) {
|
||||
super.handleTooltip(guiRecipe, currenttip, recipe);
|
||||
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
|
||||
if (GuiContainerManager.shouldShowTooltip(guiRecipe)) {
|
||||
@@ -125,7 +125,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleItemTooltip(GuiRecipe guiRecipe, ItemStack itemStack, List<String> currenttip,
|
||||
public List<String> handleItemTooltip(GuiRecipe<?> guiRecipe, ItemStack itemStack, List<String> currenttip,
|
||||
int recipe) {
|
||||
super.handleItemTooltip(guiRecipe, itemStack, currenttip, recipe);
|
||||
CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe);
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Random;
|
||||
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
import com.google.common.collect.ListMultimap;
|
||||
|
||||
import forestry.core.utils.StringUtil;
|
||||
|
||||
public class EscritoireTextSource {
|
||||
|
||||
@@ -231,10 +231,14 @@ public abstract class BlockUtil {
|
||||
|
||||
private static Class<? extends Block> BW_MetaGenerated_WerkstoffBlocksClass;
|
||||
private static Block BWBlocks;
|
||||
private static boolean bw = Loader.isModLoaded("bartworks");
|
||||
private static Class<? extends Block> GTBlockMachines_Class;
|
||||
private static Block GTBlockMachines;
|
||||
private static final boolean bw = Loader.isModLoaded("bartworks");
|
||||
private static final boolean gt = Loader.isModLoaded("gregtech");
|
||||
|
||||
static {
|
||||
if (bw) try {
|
||||
// noinspection unchecked
|
||||
BW_MetaGenerated_WerkstoffBlocksClass = (Class<? extends Block>) Class
|
||||
.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_WerkstoffBlocks");
|
||||
BWBlocks = (Block) Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader")
|
||||
@@ -242,6 +246,13 @@ public abstract class BlockUtil {
|
||||
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (gt) try {
|
||||
// noinspection unchecked
|
||||
GTBlockMachines_Class = (Class<? extends Block>) Class.forName("gregtech.common.blocks.GT_Block_Machines");
|
||||
GTBlockMachines = (Block) Class.forName("gregtech.api.GregTech_API").getField("sBlockMachines").get(null);
|
||||
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack getItemStackFromBlockBelow(World world, int x, int y, int z,
|
||||
@@ -260,6 +271,10 @@ public abstract class BlockUtil {
|
||||
return new ItemStack(BWBlocks, 1, block.getDamageValue(world, x, y - depth, z));
|
||||
}
|
||||
|
||||
if (gt && GTBlockMachines_Class.isInstance(block)) {
|
||||
return new ItemStack(GTBlockMachines, 1, block.getDamageValue(world, x, y - depth, z));
|
||||
}
|
||||
|
||||
return new ItemStack(block, 1, world.getBlockMetadata(x, y - depth, z));
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.nbt.NBTTagShort;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
|
||||
import com.google.common.collect.ForwardingList;
|
||||
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.core.access.IOwnable;
|
||||
|
||||
public abstract class PlayerUtil {
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.Random;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
|
||||
public class CentrifugeRecipe implements ICentrifugeRecipe {
|
||||
|
||||
@@ -11,6 +11,9 @@ package forestry.factory.recipes.craftguide;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.factory.recipes.BottlerRecipe;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -18,9 +21,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.factory.recipes.BottlerRecipe;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideBottler implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -10,6 +10,11 @@ package forestry.factory.recipes.craftguide;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ICarpenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -17,11 +22,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.ICarpenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideCarpenter implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ChanceSlot;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -21,10 +25,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.ICentrifugeRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideCentrifuge implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ package forestry.factory.recipes.craftguide;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.IFabricatorRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryPlainType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -17,10 +21,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.IFabricatorRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryPlainType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideFabricator implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -14,6 +14,11 @@ import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.recipes.IFermenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -21,11 +26,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.recipes.IFermenterRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideFermenter implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ package forestry.factory.recipes.craftguide;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.ISqueezerRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ChanceSlot;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
@@ -18,10 +22,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.ISqueezerRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideSqueezer implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ package forestry.factory.recipes.craftguide;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.recipes.IStillRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
import uristqwerty.CraftGuide.api.ItemSlot;
|
||||
import uristqwerty.CraftGuide.api.LiquidSlot;
|
||||
import uristqwerty.CraftGuide.api.RecipeGenerator;
|
||||
@@ -17,10 +21,6 @@ import uristqwerty.CraftGuide.api.RecipeProvider;
|
||||
import uristqwerty.CraftGuide.api.RecipeTemplate;
|
||||
import uristqwerty.CraftGuide.api.Slot;
|
||||
import uristqwerty.CraftGuide.api.SlotType;
|
||||
import forestry.api.recipes.IStillRecipe;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.factory.blocks.BlockFactoryTesrType;
|
||||
import forestry.plugins.PluginFactory;
|
||||
|
||||
public class CraftGuideStill implements RecipeProvider {
|
||||
|
||||
|
||||
@@ -28,7 +28,12 @@ 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.*;
|
||||
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.genetics.IFruitBearer;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
import forestry.core.utils.vect.VectUtil;
|
||||
|
||||
@@ -14,6 +14,7 @@ import forestry.api.arboriculture.ILeafTickHandler;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.lepidopterology.ButterflyManager;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.lepidopterology.entities.EntityButterfly;
|
||||
import forestry.plugins.PluginLepidopterology;
|
||||
@@ -22,6 +23,9 @@ public class ButterflySpawner implements ILeafTickHandler {
|
||||
|
||||
@Override
|
||||
public boolean onRandomLeafTick(ITree tree, World world, int x, int y, int z, boolean isDestroyed) {
|
||||
if (Config.disableButterfly) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.rand.nextFloat() >= tree.getGenome().getSappiness() * tree.getGenome().getYield()) {
|
||||
return false;
|
||||
|
||||
@@ -48,6 +48,7 @@ import forestry.api.lepidopterology.IButterflyGenome;
|
||||
import forestry.api.lepidopterology.IButterflyRoot;
|
||||
import forestry.api.lepidopterology.IEntityButterfly;
|
||||
import forestry.api.lepidopterology.ILepidopteristTracker;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.lepidopterology.genetics.Butterfly;
|
||||
|
||||
@@ -369,6 +370,9 @@ public class EntityButterfly extends EntityCreature implements IEntityButterfly
|
||||
|
||||
@Override
|
||||
protected boolean canDespawn() {
|
||||
if (Config.disableButterfly) {
|
||||
this.setDead();
|
||||
}
|
||||
return ticksExisted > MAX_LIFESPAN;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -87,6 +89,12 @@ public class ItemButterflyGE extends ItemGE {
|
||||
return butterfly.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
super.addInformation(itemstack, player, list, flag);
|
||||
if (Config.disableButterfly && type == EnumFlutterType.BUTTERFLY) list.add(ChatFormatting.RED + "Disabled");
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
@@ -107,7 +115,7 @@ public class ItemButterflyGE extends ItemGE {
|
||||
|
||||
@Override
|
||||
public boolean onEntityItemUpdate(EntityItem entityItem) {
|
||||
if (type != EnumFlutterType.BUTTERFLY) {
|
||||
if (type != EnumFlutterType.BUTTERFLY || Config.disableButterfly) {
|
||||
return false;
|
||||
}
|
||||
if (entityItem.worldObj.isRemote || entityItem.ticksExisted < 80) {
|
||||
|
||||
@@ -120,7 +120,8 @@ 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)) {
|
||||
return !(itemStack.getItem() instanceof ItemWithGui);
|
||||
if (itemStack.getItem() instanceof ItemWithGui) return false;
|
||||
return !Config.mailBlacklist.contains(itemStack.getItem());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,10 +19,9 @@ import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.mail.ILetter;
|
||||
import forestry.api.mail.IMailAddress;
|
||||
|
||||
@@ -60,6 +60,7 @@ import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.api.storage.ICrateRegistry;
|
||||
import forestry.api.storage.StorageManager;
|
||||
import forestry.apiculture.ArmorApiaristHelper;
|
||||
import forestry.apiculture.EventHandlerApiculture;
|
||||
import forestry.apiculture.SaveEventHandlerApiculture;
|
||||
import forestry.apiculture.VillageHandlerApiculture;
|
||||
import forestry.apiculture.blocks.BlockAlveary;
|
||||
@@ -185,6 +186,7 @@ public class PluginApiculture extends ForestryPlugin {
|
||||
super.preInit();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandlerApiculture());
|
||||
|
||||
blocks.apiculture.addDefinitions(
|
||||
new MachineDefinition(BlockApicultureType.APIARY).setFaces(0, 1, 2, 2, 4, 4, 0, 7),
|
||||
|
||||
@@ -39,7 +39,27 @@ import forestry.core.utils.Log;
|
||||
import forestry.farming.blocks.BlockFarmType;
|
||||
import forestry.farming.blocks.BlockRegistryFarming;
|
||||
import forestry.farming.circuits.CircuitFarmLogic;
|
||||
import forestry.farming.logic.*;
|
||||
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.proxy.ProxyFarming;
|
||||
import forestry.farming.render.EnumFarmBlockTexture;
|
||||
import forestry.farming.tiles.TileFarmControl;
|
||||
|
||||
@@ -568,6 +568,14 @@ item.for.frameImpregnated.name=Impregnated Frame
|
||||
item.for.frameProven.name=Proven Frame
|
||||
item.for.frameUntreated.name=Untreated Frame
|
||||
|
||||
for.frame.tooltip.durability=Durability:
|
||||
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
|
||||
item.for.fruits.chestnut.name=Chestnut
|
||||
item.for.fruits.dates.name=Date
|
||||
@@ -1407,6 +1415,8 @@ 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>
|
||||
|
||||
Reference in new issue
Block a user