mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 17:44:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa03d733a3 | ||
|
|
8726d0ffab |
No files matched your search
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
dependencies {
|
||||
api('curse.maven:cofh-lib-220333:2388748')
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta4:api')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.33-GTNH:dev')
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-alpha51:api')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:inventory-tweaks:1.6.2:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.39:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
|
||||
+1
-12
@@ -85,11 +85,6 @@ accessTransformersFile =
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
@@ -122,15 +117,9 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -57,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -86,8 +84,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
Vendored
-2
@@ -13,8 +13,6 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.26'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.ModAPIManager;
|
||||
@@ -80,15 +79,11 @@ public class Forestry {
|
||||
|
||||
public static PacketHandler packetHandler;
|
||||
|
||||
public static boolean isDreamcraftLoaded;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
checkForCoFHLib();
|
||||
packetHandler = new PacketHandler();
|
||||
|
||||
isDreamcraftLoaded = Loader.isModLoaded("dreamcraft");
|
||||
|
||||
// Register event handler
|
||||
EventHandlerCore eventHandlerCore = new EventHandlerCore();
|
||||
MinecraftForge.EVENT_BUS.register(eventHandlerCore);
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.genetics;
|
||||
|
||||
import static forestry.core.utils.MathUtil.safeAdd;
|
||||
import static forestry.core.utils.MathUtil.safeMultiply;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -702,9 +699,9 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
|
||||
// boost chance for researched mutations
|
||||
if (breedingTracker.isResearched(beeMutation)) {
|
||||
float mutationBoost = safeMultiply(chance, Config.researchMutationBoostMultiplier - 1.0f);
|
||||
float mutationBoost = chance * (Config.researchMutationBoostMultiplier - 1.0f);
|
||||
mutationBoost = Math.min(Config.maxResearchMutationBoostPercent, mutationBoost);
|
||||
chance = safeAdd(chance, mutationBoost);
|
||||
chance += mutationBoost;
|
||||
}
|
||||
|
||||
if (chance > world.rand.nextFloat() * 100) {
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.genetics;
|
||||
|
||||
import static forestry.core.utils.MathUtil.safeMultiply;
|
||||
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -51,8 +49,8 @@ public class BeeMutation extends Mutation implements IBeeMutationCustom {
|
||||
IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||
IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world).getBeeModifier();
|
||||
|
||||
processedChance = safeMultiply(processedChance, beeHousingModifier.getMutationModifier(genome0, genome1, 1.0F));
|
||||
processedChance = safeMultiply(processedChance, beeModeModifier.getMutationModifier(genome0, genome1, 1.0F));
|
||||
processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance);
|
||||
processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance);
|
||||
|
||||
return processedChance;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.apiculture.multiblock.AlvearyController;
|
||||
import forestry.apiculture.blocks.BlockAlveary;
|
||||
import forestry.core.utils.DamageSourceForestry;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
|
||||
@@ -36,13 +36,8 @@ public class AlleleEffectRadioactive extends AlleleEffectThrottled {
|
||||
@Override
|
||||
public IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||
harmEntities(genome, housing);
|
||||
if (isMobGriefingEnabled(housing)) destroyEnvironment(genome, housing);
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
private boolean isMobGriefingEnabled(IBeeHousing housing) {
|
||||
return housing.getWorld().getGameRules().getGameRuleBooleanValue("mobGriefing");
|
||||
return destroyEnvironment(genome, storedData, housing);
|
||||
}
|
||||
|
||||
private void harmEntities(IBeeGenome genome, IBeeHousing housing) {
|
||||
@@ -61,7 +56,7 @@ public class AlleleEffectRadioactive extends AlleleEffectThrottled {
|
||||
}
|
||||
}
|
||||
|
||||
private static void destroyEnvironment(IBeeGenome genome, IBeeHousing housing) {
|
||||
private static IEffectData destroyEnvironment(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||
World world = housing.getWorld();
|
||||
Random rand = world.rand;
|
||||
|
||||
@@ -70,69 +65,43 @@ public class AlleleEffectRadioactive extends AlleleEffectThrottled {
|
||||
Vect offset = area.multiply(-1 / 2.0f);
|
||||
Vect posHousing = new Vect(housing.getCoordinates());
|
||||
|
||||
boolean isAlveary = housing instanceof AlvearyController;
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
Vect randomPos = Vect.getRandomPositionInArea(rand, area);
|
||||
Vect posBlock = randomPos.add(posHousing).add(offset);
|
||||
Vect posBlock = randomPos.add(posHousing);
|
||||
posBlock = posBlock.add(offset);
|
||||
|
||||
// Don't destroy blocks in the protected 3x3x4 area if housing is an Alveary.
|
||||
// Stops the bee destroying itself. Silly behaviour.
|
||||
if (isInAlvearyProtectedArea(posHousing, posBlock)) {
|
||||
if (posBlock.y <= 1 || posBlock.y >= housing.getWorld().getActualHeight()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't destroy the block directly below the bee.
|
||||
if (isAlveary) {
|
||||
if (posBlock.y == posHousing.y - 3) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
if (posBlock.y == posHousing.y - 1) {
|
||||
continue;
|
||||
}
|
||||
// Don't destroy ourselves or blocks below us.
|
||||
if (posBlock.x == posHousing.x && posBlock.z == posHousing.z && posBlock.y <= posHousing.y) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (world.isAirBlock(posBlock.x, posBlock.y, posBlock.z)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = world.getBlock(posBlock.x, posBlock.y, posBlock.z);
|
||||
|
||||
// Never delete a tile entity. Allows far too much griefing and abuse otherwise.
|
||||
if (block instanceof BlockAlveary) {
|
||||
continue;
|
||||
}
|
||||
|
||||
TileEntity tile = world.getTileEntity(posBlock.x, posBlock.y, posBlock.z);
|
||||
if (tile != null) {
|
||||
if (tile instanceof IBeeHousing) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't let us delete blocks that are not supposed to be breakable by players.
|
||||
if (block.getBlockHardness(world, posBlock.x, posBlock.y, posBlock.z) < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Some mods might use this logic? Idk, just a safety check. Might stop griefing.
|
||||
if (!world.canMineBlock(
|
||||
housing.getWorld().func_152378_a(housing.getOwner().getId()),
|
||||
posHousing.x,
|
||||
posHousing.y,
|
||||
posHousing.z)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
world.setBlockToAir(posBlock.x, posBlock.y, posBlock.z);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isInAlvearyProtectedArea(Vect posHousing, Vect posBlock) {
|
||||
// Alveary protection area is a 3x3x4 area centered on the top middle, down one block.
|
||||
int startX = posHousing.x - 1;
|
||||
int endX = posHousing.x + 1;
|
||||
int startZ = posHousing.z - 1;
|
||||
int endZ = posHousing.z + 1;
|
||||
int startY = posHousing.y - 2;
|
||||
int endY = posHousing.y + 1;
|
||||
|
||||
return posBlock.x >= startX && posBlock.x <= endX
|
||||
&& posBlock.z >= startZ
|
||||
&& posBlock.z <= endZ
|
||||
&& posBlock.y >= startY
|
||||
&& posBlock.y <= endY;
|
||||
return storedData;
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.genetics.mutations;
|
||||
|
||||
import static forestry.core.utils.MathUtil.safeMultiply;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -128,9 +126,7 @@ public abstract class Mutation implements IMutationCustom {
|
||||
IGenome genome1, IClimateProvider climate) {
|
||||
float mutationChance = chance;
|
||||
for (IMutationCondition mutationCondition : mutationConditions) {
|
||||
mutationChance = safeMultiply(
|
||||
mutationChance,
|
||||
mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate));
|
||||
mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate);
|
||||
if (mutationChance == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.items;
|
||||
|
||||
import static forestry.Forestry.isDreamcraftLoaded;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
@@ -89,26 +87,19 @@ public class ItemRegistryCore extends ItemRegistry {
|
||||
fertilizerBio = registerItem(new ItemForestry(), "fertilizerBio");
|
||||
fertilizerCompound = registerItem(new ItemForestryBonemeal(), "fertilizerCompound");
|
||||
|
||||
apatite = registerItem(new ItemForestry(), "apatite");
|
||||
OreDictionary.registerOre("gemApatite", apatite);
|
||||
|
||||
researchNote = registerItem(new ItemResearchNote(), "researchNote");
|
||||
|
||||
if (!isDreamcraftLoaded) {
|
||||
apatite = registerItem(new ItemForestry(), "apatite");
|
||||
OreDictionary.registerOre("gemApatite", apatite);
|
||||
ingotCopper = registerItem(new ItemForestry(), "ingotCopper");
|
||||
OreDictionary.registerOre("ingotCopper", ingotCopper);
|
||||
|
||||
ingotCopper = registerItem(new ItemForestry(), "ingotCopper");
|
||||
OreDictionary.registerOre("ingotCopper", ingotCopper);
|
||||
ingotTin = registerItem(new ItemForestry(), "ingotTin");
|
||||
OreDictionary.registerOre("ingotTin", ingotTin);
|
||||
|
||||
ingotTin = registerItem(new ItemForestry(), "ingotTin");
|
||||
OreDictionary.registerOre("ingotTin", ingotTin);
|
||||
|
||||
ingotBronze = registerItem(new ItemForestry(), "ingotBronze");
|
||||
OreDictionary.registerOre("ingotBronze", ingotBronze);
|
||||
} else {
|
||||
apatite = null;
|
||||
ingotCopper = null;
|
||||
ingotTin = null;
|
||||
ingotBronze = null;
|
||||
}
|
||||
ingotBronze = registerItem(new ItemForestry(), "ingotBronze");
|
||||
OreDictionary.registerOre("ingotBronze", ingotBronze);
|
||||
|
||||
wrench = registerItem(new ItemWrench(), "wrench");
|
||||
pipette = registerItem(new ItemPipette(), "pipette");
|
||||
|
||||
@@ -241,16 +241,16 @@ public abstract class BlockUtil {
|
||||
if (bw) try {
|
||||
// noinspection unchecked
|
||||
BW_MetaGenerated_WerkstoffBlocksClass = (Class<? extends Block>) Class
|
||||
.forName("bartworks.system.material.BWMetaGeneratedWerkstoffBlocks");
|
||||
BWBlocks = (Block) Class.forName("bartworks.system.material.WerkstoffLoader").getField("BWBlocks")
|
||||
.get(null);
|
||||
.forName("com.github.bartimaeusnek.bartworks.system.material.BW_MetaGenerated_WerkstoffBlocks");
|
||||
BWBlocks = (Block) Class.forName("com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader")
|
||||
.getField("BWBlocks").get(null);
|
||||
} catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (gt) try {
|
||||
// noinspection unchecked
|
||||
GTBlockMachines_Class = (Class<? extends Block>) Class.forName("gregtech.common.blocks.BlockMachines");
|
||||
GTBlockMachines = (Block) Class.forName("gregtech.api.GregTechAPI").getField("sBlockMachines").get(null);
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package forestry.core.utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class MathUtil {
|
||||
|
||||
private static final BigDecimal MAX_FLOAT = BigDecimal.valueOf(Float.MAX_VALUE);
|
||||
private static final BigDecimal MIN_FLOAT = BigDecimal.valueOf(-Float.MAX_VALUE);
|
||||
|
||||
private static float clampToFloatRange(BigDecimal result) {
|
||||
if (result.compareTo(MAX_FLOAT) > 0) {
|
||||
return Float.MAX_VALUE;
|
||||
} else if (result.compareTo(MIN_FLOAT) < 0) {
|
||||
return -Float.MAX_VALUE;
|
||||
}
|
||||
return result.floatValue();
|
||||
}
|
||||
|
||||
public static float safeMultiply(float a, float b) {
|
||||
BigDecimal bigA = BigDecimal.valueOf(a);
|
||||
BigDecimal bigB = BigDecimal.valueOf(b);
|
||||
return clampToFloatRange(bigA.multiply(bigB));
|
||||
}
|
||||
|
||||
public static float safeAdd(float a, float b) {
|
||||
BigDecimal bigA = BigDecimal.valueOf(a);
|
||||
BigDecimal bigB = BigDecimal.valueOf(b);
|
||||
return clampToFloatRange(bigA.add(bigB));
|
||||
}
|
||||
}
|
||||
@@ -73,9 +73,9 @@ public class Vect implements IVect {
|
||||
}
|
||||
|
||||
public static Vect getRandomPositionInArea(Random random, IVect area) {
|
||||
int x = random.nextInt(area.getX() + 1);
|
||||
int y = random.nextInt(area.getY() + 1);
|
||||
int z = random.nextInt(area.getZ() + 1);
|
||||
int x = random.nextInt(area.getX());
|
||||
int y = random.nextInt(area.getY());
|
||||
int z = random.nextInt(area.getZ());
|
||||
return new Vect(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import static forestry.Forestry.isDreamcraftLoaded;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.command.ICommand;
|
||||
@@ -134,16 +132,14 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
// forestry items
|
||||
crateRegistry.registerCrate(items.peat, "cratedPeat");
|
||||
crateRegistry.registerCrate(items.apatite, "cratedApatite");
|
||||
crateRegistry.registerCrate(items.fertilizerCompound, "cratedFertilizer");
|
||||
crateRegistry.registerCrate(items.mulch, "cratedMulch");
|
||||
crateRegistry.registerCrate(items.phosphor, "cratedPhosphor");
|
||||
crateRegistry.registerCrate(items.ash, "cratedAsh");
|
||||
if (!isDreamcraftLoaded) {
|
||||
crateRegistry.registerCrate(items.apatite, "cratedApatite");
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotTin, "cratedTin");
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotCopper, "cratedCopper");
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotBronze, "cratedBronze");
|
||||
}
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotTin, "cratedTin");
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotCopper, "cratedCopper");
|
||||
crateRegistry.registerCrateUsingOreDict(items.ingotBronze, "cratedBronze");
|
||||
|
||||
// forestry blocks
|
||||
crateRegistry.registerCrate(blocks.soil.get(BlockSoil.SoilType.HUMUS, 1), "cratedHumus");
|
||||
@@ -199,14 +195,9 @@ public class PluginCore extends ForestryPlugin {
|
||||
protected void registerRecipes() {
|
||||
|
||||
/* SMELTING RECIPES */
|
||||
if (!isDreamcraftLoaded) {
|
||||
RecipeUtil.addSmelting(blocks.resources.get(BlockResourceOre.ResourceType.APATITE, 1), items.apatite, 0.5f);
|
||||
RecipeUtil.addSmelting(
|
||||
blocks.resources.get(BlockResourceOre.ResourceType.COPPER, 1),
|
||||
items.ingotCopper,
|
||||
0.5f);
|
||||
RecipeUtil.addSmelting(blocks.resources.get(BlockResourceOre.ResourceType.TIN, 1), items.ingotTin, 0.5f);
|
||||
}
|
||||
RecipeUtil.addSmelting(blocks.resources.get(BlockResourceOre.ResourceType.APATITE, 1), items.apatite, 0.5f);
|
||||
RecipeUtil.addSmelting(blocks.resources.get(BlockResourceOre.ResourceType.COPPER, 1), items.ingotCopper, 0.5f);
|
||||
RecipeUtil.addSmelting(blocks.resources.get(BlockResourceOre.ResourceType.TIN, 1), items.ingotTin, 0.5f);
|
||||
RecipeUtil.addSmelting(new ItemStack(items.peat), items.ash, 0.0f);
|
||||
|
||||
/* BRONZE INGOTS */
|
||||
@@ -391,43 +382,41 @@ public class PluginCore extends ForestryPlugin {
|
||||
new ItemStack(Blocks.wool, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
// Storage Blocks
|
||||
if (!isDreamcraftLoaded) {
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.APATITE),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"gemApatite");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.apatite, 9), "blockApatite");
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.APATITE),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"gemApatite");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.apatite, 9), "blockApatite");
|
||||
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.COPPER),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotCopper");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotCopper, 9), "blockCopper");
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.COPPER),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotCopper");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotCopper, 9), "blockCopper");
|
||||
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.TIN),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotTin");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotTin, 9), "blockTin");
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.TIN),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotTin");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotTin, 9), "blockTin");
|
||||
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotBronze");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotBronze, 9), "blockBronze");
|
||||
}
|
||||
RecipeUtil.addRecipe(
|
||||
blocks.resourceStorage.get(BlockResourceStorage.ResourceType.BRONZE),
|
||||
"###",
|
||||
"###",
|
||||
"###",
|
||||
'#',
|
||||
"ingotBronze");
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(items.ingotBronze, 9), "blockBronze");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import static forestry.Forestry.isDreamcraftLoaded;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -646,20 +644,18 @@ public class PluginFactory extends ForestryPlugin {
|
||||
new Object[] { " # ", " X ", " X ", '#', "ingotBronze", 'X', "stickWood" });
|
||||
|
||||
// Reclamation
|
||||
if (!isDreamcraftLoaded) {
|
||||
RecipeManagers.carpenterManager.addRecipe(
|
||||
null,
|
||||
PluginCore.items.ingotBronze.getItemStack(2),
|
||||
"#",
|
||||
'#',
|
||||
PluginCore.items.brokenBronzePickaxe);
|
||||
RecipeManagers.carpenterManager.addRecipe(
|
||||
null,
|
||||
PluginCore.items.ingotBronze.getItemStack(),
|
||||
"#",
|
||||
'#',
|
||||
PluginCore.items.brokenBronzeShovel);
|
||||
}
|
||||
RecipeManagers.carpenterManager.addRecipe(
|
||||
null,
|
||||
PluginCore.items.ingotBronze.getItemStack(2),
|
||||
"#",
|
||||
'#',
|
||||
PluginCore.items.brokenBronzePickaxe);
|
||||
RecipeManagers.carpenterManager.addRecipe(
|
||||
null,
|
||||
PluginCore.items.ingotBronze.getItemStack(),
|
||||
"#",
|
||||
'#',
|
||||
PluginCore.items.brokenBronzeShovel);
|
||||
|
||||
// Crating and uncrating
|
||||
if (PluginManager.Module.STORAGE.isEnabled()) {
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import static forestry.Forestry.isDreamcraftLoaded;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -132,13 +130,11 @@ public class PluginFluids extends ForestryPlugin {
|
||||
}
|
||||
|
||||
if (RecipeManagers.squeezerManager != null) {
|
||||
if (!isDreamcraftLoaded) {
|
||||
RecipeManagers.squeezerManager.addContainerRecipe(
|
||||
10,
|
||||
items.canEmpty.getItemStack(),
|
||||
PluginCore.items.ingotTin.getItemStack(),
|
||||
0.05f);
|
||||
}
|
||||
RecipeManagers.squeezerManager.addContainerRecipe(
|
||||
10,
|
||||
items.canEmpty.getItemStack(),
|
||||
PluginCore.items.ingotTin.getItemStack(),
|
||||
0.05f);
|
||||
RecipeManagers.squeezerManager.addContainerRecipe(
|
||||
10,
|
||||
items.waxCapsuleEmpty.getItemStack(),
|
||||
|
||||
@@ -192,24 +192,14 @@ public class BackpackDefinition implements IBackpackDefinition {
|
||||
int[] oreIds = OreDictionary.getOreIDs(itemStack);
|
||||
for (int oreId : oreIds) {
|
||||
if (validOreIds.contains(oreId)) {
|
||||
if (meta != OreDictionary.WILDCARD_VALUE) {
|
||||
String itemStackString = itemStackStringWild + ':' + meta;
|
||||
validItemStacks.add(itemStackString);
|
||||
} else {
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
}
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (Class<?> itemClass : validItemClasses) {
|
||||
if (itemClass.isInstance(item)) {
|
||||
if (meta != OreDictionary.WILDCARD_VALUE) {
|
||||
String itemStackString = itemStackStringWild + ':' + meta;
|
||||
validItemStacks.add(itemStackString);
|
||||
} else {
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
}
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -218,12 +208,7 @@ public class BackpackDefinition implements IBackpackDefinition {
|
||||
if (block != null) {
|
||||
for (Class<?> blockClass : validBlockClasses) {
|
||||
if (blockClass.isInstance(block)) {
|
||||
if (meta != OreDictionary.WILDCARD_VALUE) {
|
||||
String itemStackString = itemStackStringWild + ':' + meta;
|
||||
validItemStacks.add(itemStackString);
|
||||
} else {
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
}
|
||||
validItemStacks.add(itemStackStringWild);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user