mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Merge branch 'mc-1.12' of https://github.com/ForestryMC/ForestryMC into mc-1.12
This commit is contained in:
commit
d37a52dcf4
39 files changed
+274
-199
No files matched your search
@@ -18,7 +18,6 @@ import java.io.File;
|
||||
import forestry.plugins.compat.PluginNatura;
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.List;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.api.genetics.ISpeciesRootPollinatable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -101,4 +102,6 @@ public interface ITreeRoot extends ISpeciesRootPollinatable {
|
||||
/* MUTATIONS */
|
||||
@Override
|
||||
List<ITreeMutation> getMutations(boolean shuffle);
|
||||
|
||||
Collection<IFruitProvider> getFruitProvidersForFruitFamily(IFruitFamily fruitFamily);
|
||||
}
|
||||
@@ -46,6 +46,8 @@ import net.minecraftforge.common.brewing.BrewingRecipeRegistry;
|
||||
import net.minecraftforge.common.capabilities.CapabilityManager;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -54,7 +56,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.VillagerRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.registries.IForgeRegistry;
|
||||
|
||||
import forestry.Forestry;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
@@ -495,13 +496,14 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
"C",
|
||||
'B', new ItemStack(blocks.apiary),
|
||||
'C', Items.MINECART);
|
||||
for(int i = 0;i < blocks.beeCombs.length;i++){
|
||||
BlockHoneyComb block = blocks.beeCombs[i];
|
||||
for(int m = 0;m < EnumHoneyComb.VALUES.length - i * 16;m++){
|
||||
RecipeUtil.addRecipe("comb." + m, new ItemStack(block, 1, m),
|
||||
for(int blockCount = 0;blockCount < blocks.beeCombs.length;blockCount++){
|
||||
BlockHoneyComb block = blocks.beeCombs[blockCount];
|
||||
for(int blockMeta = 0;blockMeta < EnumHoneyComb.VALUES.length - blockCount * 16;blockMeta++){
|
||||
int itemMeta = blockMeta + blockCount * 16;
|
||||
RecipeUtil.addRecipe("comb." + itemMeta, new ItemStack(block, 1, blockMeta),
|
||||
"###",
|
||||
"###",
|
||||
"###", '#', items.beeComb.get(EnumHoneyComb.get(i * 16 + m), 1));
|
||||
"###", '#', items.beeComb.get(EnumHoneyComb.get(itemMeta), 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ package forestry.apiculture.blocks;
|
||||
import java.util.Map;
|
||||
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.apiculture.items.ItemBlockHoneyComb;
|
||||
import forestry.apiculture.items.ItemBlockCandle;
|
||||
import forestry.apiculture.items.ItemBlockHoneyComb;
|
||||
import forestry.core.blocks.BlockBase;
|
||||
import forestry.core.blocks.BlockRegistry;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
@@ -33,23 +33,23 @@ public class BlockRegistryApiculture extends BlockRegistry {
|
||||
|
||||
public BlockRegistryApiculture() {
|
||||
apiary = new BlockApiculture(BlockTypeApiculture.APIARY);
|
||||
registerBlock(apiary, new ItemBlockForestry(apiary), "apiary");
|
||||
registerBlock(apiary, new ItemBlockForestry<>(apiary), "apiary");
|
||||
|
||||
beeHouse = new BlockApiculture(BlockTypeApiculture.BEE_HOUSE);
|
||||
registerBlock(beeHouse, new ItemBlockForestry(beeHouse), "bee_house");
|
||||
registerBlock(beeHouse, new ItemBlockForestry<>(beeHouse), "bee_house");
|
||||
|
||||
beeChest = new BlockBase<>(BlockTypeApicultureTesr.APIARIST_CHEST, Material.WOOD);
|
||||
registerBlock(beeChest, new ItemBlockForestry(beeChest), "bee_chest");
|
||||
registerBlock(beeChest, new ItemBlockForestry<>(beeChest), "bee_chest");
|
||||
beeChest.setCreativeTab(Tabs.tabApiculture);
|
||||
beeChest.setHarvestLevel("axe", 0);
|
||||
|
||||
beehives = new BlockBeeHives();
|
||||
registerBlock(beehives, new ItemBlockForestry(beehives), "beehives");
|
||||
registerBlock(beehives, new ItemBlockForestry<>(beehives), "beehives");
|
||||
|
||||
candle = new BlockCandle();
|
||||
registerBlock(candle, new ItemBlockCandle(candle), "candle");
|
||||
stump = new BlockStump();
|
||||
registerBlock(stump, new ItemBlockForestry(stump), "stump");
|
||||
registerBlock(stump, new ItemBlockForestry<>(stump), "stump");
|
||||
|
||||
beeCombs = BlockHoneyComb.create();
|
||||
for(int i = 0;i < beeCombs.length;i++){
|
||||
@@ -59,7 +59,7 @@ public class BlockRegistryApiculture extends BlockRegistry {
|
||||
|
||||
alvearyBlockMap = BlockAlveary.create();
|
||||
for (BlockAlveary block : alvearyBlockMap.values()) {
|
||||
registerBlock(block, new ItemBlockForestry(block), "alveary." + block.getAlvearyType());
|
||||
registerBlock(block, new ItemBlockForestry<>(block), "alveary." + block.getAlvearyType());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ApicultureJeiPlugin implements IModPlugin {
|
||||
|
||||
ISubtypeRegistry.ISubtypeInterpreter beeSubtypeInterpreter = itemStack -> {
|
||||
IAlleleSpecies species = Genome.getSpeciesDirectly(BeeManager.beeRoot, itemStack);
|
||||
return species == null ? null : species.getUID();
|
||||
return species == null ? ISubtypeRegistry.ISubtypeInterpreter.NONE : species.getUID();
|
||||
};
|
||||
|
||||
subtypeRegistry.registerSubtypeInterpreter(items.beeDroneGE, beeSubtypeInterpreter);
|
||||
|
||||
@@ -13,7 +13,6 @@ package forestry.apiculture.items;
|
||||
import forestry.apiculture.blocks.BlockCandle;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -21,7 +20,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockCandle extends ItemBlockForestry<BlockCandle> implements IColoredItem {
|
||||
|
||||
public ItemBlockCandle(Block block) {
|
||||
public ItemBlockCandle(BlockCandle block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,14 +3,13 @@ package forestry.apiculture.items;
|
||||
import forestry.apiculture.blocks.BlockHoneyComb;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockHoneyComb extends ItemBlockForestry<BlockHoneyComb> implements IColoredItem {
|
||||
|
||||
public ItemBlockHoneyComb(Block block) {
|
||||
public ItemBlockHoneyComb(BlockHoneyComb block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,37 +83,37 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
// Wood blocks
|
||||
logs = BlockArbLog.create(false);
|
||||
for (BlockArbLog block : logs) {
|
||||
registerBlock(block, new ItemBlockWood(block), "logs." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "logs." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.LOG_WOOD, block);
|
||||
}
|
||||
|
||||
logsFireproof = BlockArbLog.create(true);
|
||||
for (BlockArbLog block : logsFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "logs.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "logs.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.LOG_WOOD, block);
|
||||
}
|
||||
|
||||
logsVanillaFireproof = BlockFireproofVanillaLog.create();
|
||||
for (BlockFireproofVanillaLog block : logsVanillaFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "logs.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "logs.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.LOG_WOOD, block);
|
||||
}
|
||||
|
||||
planks = BlockArbPlanks.create(false);
|
||||
for (BlockArbPlanks block : planks) {
|
||||
registerBlock(block, new ItemBlockWood(block), "planks." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "planks." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block);
|
||||
}
|
||||
|
||||
planksFireproof = BlockArbPlanks.create(true);
|
||||
for (BlockArbPlanks block : planksFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "planks.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "planks.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block);
|
||||
}
|
||||
|
||||
planksVanillaFireproof = BlockFireproofVanillaPlanks.create();
|
||||
for (BlockFireproofVanillaPlanks block : planksVanillaFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "planks.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "planks.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block);
|
||||
}
|
||||
|
||||
@@ -149,19 +149,19 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
|
||||
fences = BlockArbFence.create(false);
|
||||
for (BlockArbFence block : fences) {
|
||||
registerBlock(block, new ItemBlockWood(block), "fences." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "fences." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block);
|
||||
}
|
||||
|
||||
fencesFireproof = BlockArbFence.create(true);
|
||||
for (BlockArbFence block : fencesFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "fences.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "fences.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block);
|
||||
}
|
||||
|
||||
fencesVanillaFireproof = BlockFireproofVanillaFence.create();
|
||||
for (BlockFireproofVanillaFence block : fencesVanillaFireproof) {
|
||||
registerBlock(block, new ItemBlockWood(block), "fences.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerBlock(block, new ItemBlockWood<>(block), "fences.vanilla.fireproof." + block.getBlockNumber());
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block);
|
||||
}
|
||||
|
||||
@@ -169,12 +169,12 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
fenceGatesFireproof = new ArrayList<>();
|
||||
for (EnumForestryWoodType woodType : EnumForestryWoodType.VALUES) {
|
||||
BlockForestryFenceGate fenceGate = new BlockForestryFenceGate<>(false, woodType);
|
||||
registerBlock(fenceGate, new ItemBlockWood(fenceGate), "fence.gates." + woodType);
|
||||
registerBlock(fenceGate, new ItemBlockWood<>(fenceGate), "fence.gates." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_GATE_WOOD, fenceGate);
|
||||
fenceGates.add(fenceGate);
|
||||
|
||||
BlockForestryFenceGate fenceGateFireproof = new BlockForestryFenceGate<>(true, woodType);
|
||||
registerBlock(fenceGateFireproof, new ItemBlockWood(fenceGateFireproof), "fence.gates.fireproof." + woodType);
|
||||
registerBlock(fenceGateFireproof, new ItemBlockWood<>(fenceGateFireproof), "fence.gates.fireproof." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_GATE_WOOD, fenceGateFireproof);
|
||||
fenceGatesFireproof.add(fenceGateFireproof);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
fenceGatesVanillaFireproof = new ArrayList<>();
|
||||
for (EnumVanillaWoodType woodType : EnumVanillaWoodType.VALUES) {
|
||||
BlockForestryFenceGate fenceGateFireproof = new BlockForestryFenceGate<>(true, woodType);
|
||||
registerBlock(fenceGateFireproof, new ItemBlockWood(fenceGateFireproof), "fence.gates.vanilla.fireproof." + woodType);
|
||||
registerBlock(fenceGateFireproof, new ItemBlockWood<>(fenceGateFireproof), "fence.gates.vanilla.fireproof." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_GATE_WOOD, fenceGateFireproof);
|
||||
fenceGatesFireproof.add(fenceGateFireproof);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
EnumForestryWoodType woodType = plank.getWoodType(meta);
|
||||
|
||||
BlockForestryStairs stair = new BlockForestryStairs<>(false, blockState, woodType);
|
||||
registerBlock(stair, new ItemBlockWood(stair), "stairs." + woodType);
|
||||
registerBlock(stair, new ItemBlockWood<>(stair), "stairs." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair);
|
||||
stairs.add(stair);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
EnumForestryWoodType woodType = plank.getWoodType(meta);
|
||||
|
||||
BlockForestryStairs stair = new BlockForestryStairs<>(true, blockState, woodType);
|
||||
registerBlock(stair, new ItemBlockWood(stair), "stairs.fireproof." + woodType);
|
||||
registerBlock(stair, new ItemBlockWood<>(stair), "stairs.fireproof." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair);
|
||||
stairsFireproof.add(stair);
|
||||
}
|
||||
@@ -220,7 +220,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
EnumVanillaWoodType woodType = plank.getWoodType(meta);
|
||||
|
||||
BlockForestryStairs stair = new BlockForestryStairs<>(true, blockState, woodType);
|
||||
registerBlock(stair, new ItemBlockWood(stair), "stairs.vanilla.fireproof." + woodType);
|
||||
registerBlock(stair, new ItemBlockWood<>(stair), "stairs.vanilla.fireproof." + woodType);
|
||||
registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair);
|
||||
stairsVanillaFireproof.add(stair);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
// Saplings
|
||||
TreeDefinition.preInit();
|
||||
saplingGE = new BlockSapling();
|
||||
registerBlock(saplingGE, new ItemBlockForestry(saplingGE), "sapling_ge");
|
||||
registerBlock(saplingGE, new ItemBlockForestry<>(saplingGE), "sapling_ge");
|
||||
registerOreDictWildcard(OreDictUtil.TREE_SAPLING, saplingGE);
|
||||
|
||||
// Leaves
|
||||
@@ -275,7 +275,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
}
|
||||
|
||||
charcoal = new BlockCharcoal();
|
||||
ItemBlockForestry itemBlockCharcoal = new ItemBlockForestry(charcoal) {
|
||||
ItemBlockForestry itemBlockCharcoal = new ItemBlockForestry<BlockCharcoal>(charcoal) {
|
||||
@Override
|
||||
public int getItemBurnTime(ItemStack itemStack) {
|
||||
return 16000;
|
||||
@@ -284,7 +284,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
registerBlock(charcoal, itemBlockCharcoal, "charcoal");
|
||||
|
||||
woodPile = new BlockWoodPile();
|
||||
ItemBlockForestry itemBlockWoodPile = new ItemBlockForestry(woodPile) {
|
||||
ItemBlockForestry itemBlockWoodPile = new ItemBlockForestry<BlockWoodPile>(woodPile) {
|
||||
@Override
|
||||
public int getItemBurnTime(ItemStack itemStack) {
|
||||
return 1200;
|
||||
@@ -305,11 +305,11 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
registerBlock(ash, new ItemBlockForestry(ash), "ash_block");
|
||||
|
||||
loam = new BlockLoam();
|
||||
registerBlock(loam, new ItemBlockForestry(loam), "loam");
|
||||
registerBlock(loam, new ItemBlockForestry<>(loam), "loam");
|
||||
|
||||
// Pods
|
||||
AlleleFruits.registerAlleles();
|
||||
MinecraftForge.EVENT_BUS.post(new AlleleRegisterEvent(IAlleleFruit.class));
|
||||
MinecraftForge.EVENT_BUS.post(new AlleleRegisterEvent<>(IAlleleFruit.class));
|
||||
podsMap = new HashMap<>();
|
||||
for (BlockFruitPod pod : BlockFruitPod.create()) {
|
||||
IAlleleFruit fruit = pod.getFruit();
|
||||
@@ -319,7 +319,7 @@ public class BlockRegistryArboriculture extends BlockRegistry {
|
||||
|
||||
// Machines
|
||||
treeChest = new BlockArboriculture(BlockTypeArboricultureTesr.ARB_CHEST);
|
||||
registerBlock(treeChest, new ItemBlockForestry(treeChest), "tree_chest");
|
||||
registerBlock(treeChest, new ItemBlockForestry<>(treeChest), "tree_chest");
|
||||
}
|
||||
|
||||
public ItemStack getDecorativeLeaves(String speciesUid) {
|
||||
|
||||
@@ -152,7 +152,10 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable, IStat
|
||||
/* REMOVING */
|
||||
@Override
|
||||
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
|
||||
ItemStack drop = getDrop(world, pos);
|
||||
if (!drop.isEmpty()) {
|
||||
drops.add(drop);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -179,13 +182,21 @@ public class BlockSapling extends BlockTreeContainer implements IGrowable, IStat
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
TileSapling sapling = TileUtil.getTile(world, pos, TileSapling.class);
|
||||
if (sapling != null && sapling.getTree() != null) {
|
||||
ItemStack saplingStack = TreeManager.treeRoot.getMemberStack(sapling.getTree(), EnumGermlingType.SAPLING);
|
||||
ItemStackUtil.dropItemStackAsEntity(saplingStack, world, pos);
|
||||
ItemStack drop = getDrop(world, pos);
|
||||
if (!drop.isEmpty()) {
|
||||
ItemStackUtil.dropItemStackAsEntity(drop, world, pos);
|
||||
}
|
||||
}
|
||||
|
||||
private static ItemStack getDrop(IBlockAccess world, BlockPos pos) {
|
||||
TileSapling sapling = TileUtil.getTile(world, pos, TileSapling.class);
|
||||
if (sapling != null) {
|
||||
ITree tree = sapling.getTree();
|
||||
if (tree != null) {
|
||||
return TreeManager.treeRoot.getMemberStack(tree, EnumGermlingType.SAPLING);
|
||||
}
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
/* GROWNING */
|
||||
|
||||
@@ -14,9 +14,11 @@ import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -26,6 +28,7 @@ import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import forestry.api.arboriculture.IArboristTracker;
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ILeafTickHandler;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
@@ -38,6 +41,7 @@ import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlyzerPlugin;
|
||||
import forestry.api.genetics.ICheckPollinatable;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.IPollinatable;
|
||||
@@ -75,6 +79,7 @@ public class TreeRoot extends SpeciesRoot implements ITreeRoot {
|
||||
private static ITreekeepingMode activeTreekeepingMode;
|
||||
public static final List<ITree> treeTemplates = new ArrayList<>();
|
||||
|
||||
private final Map<IFruitFamily, Collection<IFruitProvider>> providersForFamilies = new HashMap<>();
|
||||
private final List<ITreekeepingMode> treekeepingModes = new ArrayList<>();
|
||||
|
||||
public TreeRoot() {
|
||||
@@ -154,7 +159,6 @@ public class TreeRoot extends SpeciesRoot implements ITreeRoot {
|
||||
@Override
|
||||
@Nullable
|
||||
public ITree getMember(ItemStack itemstack) {
|
||||
itemstack = GeneticsUtil.convertToGeneticEquivalent(itemstack);
|
||||
if (!isMember(itemstack) || itemstack.getTagCompound() == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -440,4 +444,18 @@ public class TreeRoot extends SpeciesRoot implements ITreeRoot {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IFruitProvider> getFruitProvidersForFruitFamily(IFruitFamily fruitFamily) {
|
||||
if (providersForFamilies.isEmpty()) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Collection<IAlleleFruit> fruitAlleles = (Collection<IAlleleFruit>) (Object) AlleleManager.alleleRegistry.getRegisteredAlleles(EnumTreeChromosome.FRUITS);
|
||||
for (IAlleleFruit alleleFruit : fruitAlleles) {
|
||||
IFruitProvider fruitProvider = alleleFruit.getProvider();
|
||||
Collection<IFruitProvider> fruitProviders = providersForFamilies.computeIfAbsent(fruitProvider.getFamily(), k -> new ArrayList<>());
|
||||
fruitProviders.add(fruitProvider);
|
||||
}
|
||||
}
|
||||
|
||||
return providersForFamilies.computeIfAbsent(fruitFamily, k -> new ArrayList<>());
|
||||
}
|
||||
}
|
||||
@@ -11,12 +11,16 @@
|
||||
package forestry.arboriculture.genetics.alleles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpeciesBuilder;
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.IGermlingModelProvider;
|
||||
import forestry.api.arboriculture.IGrowthProvider;
|
||||
import forestry.api.arboriculture.ILeafProvider;
|
||||
@@ -27,6 +31,7 @@ import forestry.api.arboriculture.IWoodProvider;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.arboriculture.genetics.ClimateGrowthProvider;
|
||||
@@ -34,6 +39,7 @@ import forestry.arboriculture.genetics.LeafProvider;
|
||||
import forestry.core.genetics.alleles.AlleleSpecies;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -196,6 +202,34 @@ public class AlleleTreeSpecies extends AlleleSpecies implements IAlleleTreeSpeci
|
||||
return modID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getResearchSuitability(ItemStack itemstack) {
|
||||
if (itemstack.isEmpty()) {
|
||||
return 0f;
|
||||
}
|
||||
|
||||
List<IFruitFamily> suitableFruit = getSuitableFruit();
|
||||
for (IFruitFamily fruitFamily : suitableFruit) {
|
||||
Collection<IFruitProvider> fruitProviders = TreeManager.treeRoot.getFruitProvidersForFruitFamily(fruitFamily);
|
||||
for (IFruitProvider fruitProvider : fruitProviders) {
|
||||
Map<ItemStack, Float> products = fruitProvider.getProducts();
|
||||
for (ItemStack stack : products.keySet()) {
|
||||
if (stack.isItemEqual(itemstack)) {
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
Map<ItemStack, Float> specialtyChances = fruitProvider.getSpecialty();
|
||||
for (ItemStack stack : specialtyChances.keySet()) {
|
||||
if (stack.isItemEqual(itemstack)) {
|
||||
return 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.getResearchSuitability(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(IAlleleTreeSpecies o) {
|
||||
return 0;
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
package forestry.arboriculture.items;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.arboriculture.blocks.BlockDecorativeLeaves;
|
||||
import forestry.arboriculture.genetics.TreeDefinition;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockDecorativeLeaves extends ItemBlockForestry<BlockDecorativeLeaves> implements IColoredItem {
|
||||
public ItemBlockDecorativeLeaves(Block block) {
|
||||
public ItemBlockDecorativeLeaves(BlockDecorativeLeaves block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import forestry.arboriculture.tiles.TileLeaves;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import forestry.core.utils.Translator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -29,7 +28,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockLeaves extends ItemBlockForestry<BlockAbstractLeaves> implements IColoredItem {
|
||||
|
||||
public ItemBlockLeaves(Block block) {
|
||||
public ItemBlockLeaves(BlockAbstractLeaves block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,13 +13,12 @@ package forestry.arboriculture.items;
|
||||
import forestry.api.arboriculture.IWoodType;
|
||||
import forestry.arboriculture.IWoodTyped;
|
||||
import forestry.arboriculture.WoodHelper;
|
||||
import forestry.arboriculture.blocks.BlockArbSlab;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockWood<B extends Block & IWoodTyped> extends ItemBlockForestry<B> {
|
||||
public ItemBlockWood(Block block) {
|
||||
public ItemBlockWood(B block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.world.World;
|
||||
|
||||
public class ItemBlockWoodDoor extends ItemBlockWood<BlockArbDoor> {
|
||||
|
||||
public ItemBlockWoodDoor(Block block) {
|
||||
public ItemBlockWoodDoor(BlockArbDoor block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,15 +49,17 @@ public class WorldGenGreenheart extends WorldGenTree {
|
||||
WorldGenHelper.generateCylinderFromTreeStartPos(world, leaf, startPos.add(0, leafSpawn--, 0), girth, 1.5f + girth, 1, WorldGenHelper.EnumReplaceMode.SOFT);
|
||||
WorldGenHelper.generateCylinderFromTreeStartPos(world, leaf, startPos.add(0, leafSpawn, 0), girth, 0.5f + girth, 1, WorldGenHelper.EnumReplaceMode.SOFT);
|
||||
|
||||
// Add some smaller twigs below for flavour
|
||||
for (int times = 0; times < height / 4; times++) {
|
||||
int h = 10 + rand.nextInt(height - 10);
|
||||
if (rand.nextBoolean() && h < height / 2) {
|
||||
h = height / 2 + rand.nextInt(height / 2);
|
||||
if (height > 10) {
|
||||
// Add some smaller twigs below for flavour
|
||||
for (int times = 0; times < height / 4; times++) {
|
||||
int h = 10 + rand.nextInt(height - 10);
|
||||
if (rand.nextBoolean() && h < height / 2) {
|
||||
h = height / 2 + rand.nextInt(height / 2);
|
||||
}
|
||||
int x_off = -1 + rand.nextInt(3);
|
||||
int y_off = -1 + rand.nextInt(3);
|
||||
WorldGenHelper.generateSphere(world, startPos.add(x_off, h, y_off), 1 + rand.nextInt(1), leaf, WorldGenHelper.EnumReplaceMode.AIR);
|
||||
}
|
||||
int x_off = -1 + rand.nextInt(3);
|
||||
int y_off = -1 + rand.nextInt(3);
|
||||
WorldGenHelper.generateSphere(world, startPos.add(x_off, h, y_off), 1 + rand.nextInt(1), leaf, WorldGenHelper.EnumReplaceMode.AIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,16 @@ public class EventHandlerCore {
|
||||
@SubscribeEvent
|
||||
public void handlePlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
|
||||
EntityPlayer player = event.player;
|
||||
syncBreedingTrackers(player);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void handlePlayerChangedDimension(PlayerEvent.PlayerChangedDimensionEvent event) {
|
||||
EntityPlayer player = event.player;
|
||||
syncBreedingTrackers(player);
|
||||
}
|
||||
|
||||
private static void syncBreedingTrackers(EntityPlayer player) {
|
||||
IAlleleRegistry alleleRegistry = AlleleManager.alleleRegistry;
|
||||
Collection<ISpeciesRoot> speciesRoots = alleleRegistry.getSpeciesRoot().values();
|
||||
for (ISpeciesRoot speciesRoot : speciesRoots) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BlockRegistryCore extends BlockRegistry {
|
||||
|
||||
public BlockRegistryCore() {
|
||||
analyzer = new BlockCore(BlockTypeCoreTesr.ANALYZER);
|
||||
registerBlock(analyzer, new ItemBlockForestry(analyzer), "analyzer");
|
||||
registerBlock(analyzer, new ItemBlockForestry<>(analyzer), "analyzer");
|
||||
|
||||
escritoire = new BlockCore(BlockTypeCoreTesr.ESCRITOIRE);
|
||||
registerBlock(escritoire, new ItemBlockForestry<>(escritoire), "escritoire");
|
||||
@@ -49,14 +49,14 @@ public class BlockRegistryCore extends BlockRegistry {
|
||||
humus.setHarvestLevel("shovel", 0);
|
||||
|
||||
resources = new BlockResourceOre();
|
||||
registerBlock(resources, new ItemBlockForestry(resources), "resources");
|
||||
registerBlock(resources, new ItemBlockForestry<>(resources), "resources");
|
||||
resources.setHarvestLevel("pickaxe", 1);
|
||||
OreDictionary.registerOre(OreDictUtil.ORE_APATITE, resources.get(EnumResourceType.APATITE, 1));
|
||||
OreDictionary.registerOre(OreDictUtil.ORE_COPPER, resources.get(EnumResourceType.COPPER, 1));
|
||||
OreDictionary.registerOre(OreDictUtil.ORE_TIN, resources.get(EnumResourceType.TIN, 1));
|
||||
|
||||
BlockResourceStorage resourceStorage = new BlockResourceStorage();
|
||||
registerBlock(resourceStorage, new ItemBlockForestry(resourceStorage), "resource_storage");
|
||||
registerBlock(resourceStorage, new ItemBlockForestry<>(resourceStorage), "resource_storage");
|
||||
resourceStorage.setHarvestLevel("pickaxe", 0);
|
||||
|
||||
resourceStorageApatite = resourceStorage.get(EnumResourceType.APATITE);
|
||||
|
||||
@@ -12,11 +12,13 @@ package forestry.core.inventory;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.core.tiles.EscritoireGame;
|
||||
import forestry.core.tiles.TileEscritoire;
|
||||
import forestry.core.utils.GeneticsUtil;
|
||||
import forestry.core.utils.SlotUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class InventoryEscritoire extends InventoryAdapterTile<TileEscritoire> {
|
||||
public static final short SLOT_ANALYZE = 0;
|
||||
@@ -79,8 +81,10 @@ public class InventoryEscritoire extends InventoryAdapterTile<TileEscritoire> {
|
||||
super.setInventorySlotContents(SLOT_ANALYZE, ersatz);
|
||||
}
|
||||
}
|
||||
if (!tile.getWorld().isRemote) {
|
||||
tile.getGame().initialize(getStackInSlot(SLOT_ANALYZE));
|
||||
World world = tile.getWorld();
|
||||
if (world != null && !world.isRemote) {
|
||||
EscritoireGame game = tile.getGame();
|
||||
game.initialize(getStackInSlot(SLOT_ANALYZE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,11 @@ package forestry.core.items;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.core.blocks.IBlockRotatable;
|
||||
import forestry.core.blocks.IBlockWithMeta;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
import forestry.core.utils.ItemTooltipUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
@@ -22,19 +27,12 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.core.blocks.IBlockRotatable;
|
||||
import forestry.core.blocks.IBlockWithMeta;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
import forestry.core.utils.ItemTooltipUtil;
|
||||
|
||||
public class ItemBlockForestry<B extends Block> extends ItemBlock {
|
||||
|
||||
public ItemBlockForestry(Block block) {
|
||||
public ItemBlockForestry(B block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.models;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import java.util.ArrayList;
|
||||
@@ -39,11 +37,12 @@ import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import net.minecraftforge.client.model.PerspectiveMapWrapper;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.core.items.ItemCrated;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.core.utils.ModelUtil;
|
||||
import forestry.storage.PluginStorage;
|
||||
|
||||
@@ -107,8 +106,16 @@ public class ModelCrate extends BlankModel {
|
||||
@Override
|
||||
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, @Nullable World world, @Nullable EntityLivingBase entity) {
|
||||
ItemCrated crated = (ItemCrated) stack.getItem();
|
||||
ResourceLocation itemName = ItemStackUtil.getItemNameFromRegistry(crated);
|
||||
Preconditions.checkNotNull(itemName);
|
||||
ResourceLocation itemName = crated.getRegistryName();
|
||||
if(itemName == null){
|
||||
IBakedModel baseCrateModel = cache.get("base");
|
||||
if(baseCrateModel == null){
|
||||
baseCrateModel = ModelUtil.getModel(new ItemStack(PluginStorage.getItems().crate, 1, 1));
|
||||
baseCrateModel = ForgeHooksClient.handleCameraTransforms(baseCrateModel, TransformType.GROUND, false);
|
||||
}
|
||||
Log.error("Failed to load the model of the create item: {}, please report this to the authors of forestry.", itemName);
|
||||
return baseCrateModel;
|
||||
}
|
||||
String crateUID = itemName.getResourcePath();
|
||||
IBakedModel model = cache.get(crateUID);
|
||||
if (model == null) {
|
||||
|
||||
@@ -97,6 +97,7 @@ public class EscritoireGame implements INbtWritable, INbtReadable, IStreamable {
|
||||
|
||||
/* INTERACTION */
|
||||
public void initialize(ItemStack specimen) {
|
||||
reset();
|
||||
if (gameBoard.initialize(specimen)) {
|
||||
status = Status.PLAYING;
|
||||
bountyLevel = BOUNTY_MAX;
|
||||
|
||||
@@ -12,12 +12,6 @@ package forestry.core.utils;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.circuits.ISocketable;
|
||||
import forestry.core.inventory.ItemHandlerInventoryManipulator;
|
||||
import forestry.core.inventory.StandardStackFilters;
|
||||
import forestry.core.tiles.AdjacentTileCache;
|
||||
import forestry.plugins.ForestryPluginUids;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -28,10 +22,19 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.circuits.ISocketable;
|
||||
import forestry.core.inventory.ItemHandlerInventoryManipulator;
|
||||
import forestry.core.inventory.StandardStackFilters;
|
||||
import forestry.core.tiles.AdjacentTileCache;
|
||||
import forestry.plugins.ForestryPluginUids;
|
||||
|
||||
public abstract class InventoryUtil {
|
||||
/**
|
||||
* Attempts to move an ItemStack from one inventory to another.
|
||||
@@ -277,7 +280,7 @@ public abstract class InventoryUtil {
|
||||
for (int j = 0; j < inventory.getSizeInventory(); j++) {
|
||||
ItemStack stackInSlot = inventory.getStackInSlot(j);
|
||||
if (!stackInSlot.isEmpty()) {
|
||||
if (ItemStackUtil.isCraftingEquivalent(stackInSlot, stackToRemove, oreDictOfStack, craftingTools)) {
|
||||
if (ItemStackUtil.isCraftingEquivalent(stackToRemove, stackInSlot, oreDictOfStack, craftingTools)) {
|
||||
ItemStack removed = inventory.decrStackSize(j, stackToRemove.getCount());
|
||||
stackToRemove.shrink(removed.getCount());
|
||||
|
||||
|
||||
@@ -67,6 +67,26 @@ public abstract class PlayerUtil {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a fake player for a given World and GameProfile.
|
||||
* Do not store references to the return value, to prevent worlds staying in memory.
|
||||
*/
|
||||
@Nullable
|
||||
public static EntityPlayer getFakePlayer(World world, @Nullable GameProfile profile) {
|
||||
if (profile == null || profile.getName() == null) {
|
||||
if (world instanceof WorldServer) {
|
||||
return FakePlayerFactory.getMinecraft((WorldServer) world);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (world instanceof WorldServer) {
|
||||
return FakePlayerFactory.get((WorldServer) world, profile);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void writeGameProfile(NBTTagCompound tagCompound, GameProfile profile) {
|
||||
if (!StringUtils.isNullOrEmpty(profile.getName())) {
|
||||
tagCompound.setString("Name", profile.getName());
|
||||
|
||||
@@ -30,28 +30,28 @@ public class BlockRegistryFactory extends BlockRegistry {
|
||||
|
||||
public BlockRegistryFactory() {
|
||||
bottler = new BlockFactoryTESR(BlockTypeFactoryTesr.BOTTLER);
|
||||
registerBlock(bottler, new ItemBlockForestry(bottler), "bottler");
|
||||
registerBlock(bottler, new ItemBlockForestry<>(bottler), "bottler");
|
||||
|
||||
carpenter = new BlockFactoryTESR(BlockTypeFactoryTesr.CARPENTER);
|
||||
registerBlock(carpenter, new ItemBlockForestry(carpenter), "carpenter");
|
||||
registerBlock(carpenter, new ItemBlockForestry<>(carpenter), "carpenter");
|
||||
|
||||
centrifuge = new BlockFactoryTESR(BlockTypeFactoryTesr.CENTRIFUGE);
|
||||
registerBlock(centrifuge, new ItemBlockForestry(centrifuge), "centrifuge");
|
||||
registerBlock(centrifuge, new ItemBlockForestry<>(centrifuge), "centrifuge");
|
||||
|
||||
fermenter = new BlockFactoryTESR(BlockTypeFactoryTesr.FERMENTER);
|
||||
registerBlock(fermenter, new ItemBlockForestry(fermenter), "fermenter");
|
||||
registerBlock(fermenter, new ItemBlockForestry<>(fermenter), "fermenter");
|
||||
|
||||
moistener = new BlockFactoryTESR(BlockTypeFactoryTesr.MOISTENER);
|
||||
registerBlock(moistener, new ItemBlockForestry(moistener), "moistener");
|
||||
registerBlock(moistener, new ItemBlockForestry<>(moistener), "moistener");
|
||||
|
||||
squeezer = new BlockFactoryTESR(BlockTypeFactoryTesr.SQUEEZER);
|
||||
registerBlock(squeezer, new ItemBlockForestry(squeezer), "squeezer");
|
||||
registerBlock(squeezer, new ItemBlockForestry<>(squeezer), "squeezer");
|
||||
|
||||
still = new BlockFactoryTESR(BlockTypeFactoryTesr.STILL);
|
||||
registerBlock(still, new ItemBlockForestry(still), "still");
|
||||
registerBlock(still, new ItemBlockForestry<>(still), "still");
|
||||
|
||||
rainmaker = new BlockFactoryTESR(BlockTypeFactoryTesr.RAINMAKER);
|
||||
registerBlock(rainmaker, new ItemBlockForestry(rainmaker), "rainmaker");
|
||||
registerBlock(rainmaker, new ItemBlockForestry<>(rainmaker), "rainmaker");
|
||||
|
||||
fabricator = new BlockFactoryPlain(BlockTypeFactoryPlain.FABRICATOR);
|
||||
registerBlock(fabricator, new ItemBlockNBT(fabricator), "fabricator");
|
||||
|
||||
@@ -20,7 +20,7 @@ public class BlockRegistryFarming extends BlockRegistry {
|
||||
|
||||
public BlockRegistryFarming() {
|
||||
mushroom = new BlockMushroom();
|
||||
registerBlock(mushroom, new ItemBlockForestry(mushroom), "mushroom");
|
||||
registerBlock(mushroom, new ItemBlockForestry<>(mushroom), "mushroom");
|
||||
|
||||
farm = new BlockFarm();
|
||||
registerBlock(farm, new ItemBlockFarm(farm), "ffarm");
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package forestry.farming.compat;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
|
||||
@@ -53,18 +53,12 @@ public class FarmableGE implements IFarmable {
|
||||
public boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, BlockPos pos) {
|
||||
ITreeRoot treeRoot = TreeManager.treeRoot;
|
||||
|
||||
germling = GeneticsUtil.convertToGeneticEquivalent(germling);
|
||||
if (treeRoot.isMember(germling)) {
|
||||
ITree tree = treeRoot.getMember(germling);
|
||||
return treeRoot.plantSapling(world, tree, player.getGameProfile(), pos);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
ITree tree = treeRoot.getMember(germling);
|
||||
return tree != null && treeRoot.plantSapling(world, tree, player.getGameProfile(), pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGermling(ItemStack itemstack) {
|
||||
itemstack = GeneticsUtil.convertToGeneticEquivalent(itemstack);
|
||||
return TreeManager.treeRoot.isMember(itemstack);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,31 +10,21 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.farming.ICrop;
|
||||
import forestry.api.farming.IFarmable;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.core.blocks.BlockRegistry;
|
||||
import forestry.core.network.packets.PacketFXSignal;
|
||||
import forestry.core.utils.GeneticsUtil;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import forestry.core.utils.NetworkUtil;
|
||||
import forestry.plugins.ForestryPluginUids;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
public class FarmableSapling implements IFarmable {
|
||||
protected final ItemStack germling;
|
||||
@@ -55,12 +45,6 @@ public class FarmableSapling implements IFarmable {
|
||||
|
||||
@Override
|
||||
public boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, BlockPos pos) {
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.ARBORICULTURE)) {
|
||||
IIndividual tree = GeneticsUtil.getGeneticEquivalent(germling);
|
||||
if (tree instanceof ITree) {
|
||||
return TreeManager.treeRoot.plantSapling(world, (ITree) tree, player.getGameProfile(), pos);
|
||||
}
|
||||
}
|
||||
ItemStack copy = germling.copy();
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, copy);
|
||||
EnumActionResult actionResult = copy.onItemUse(player, world, pos.down(), EnumHand.MAIN_HAND, EnumFacing.UP, 0, 0, 0);
|
||||
|
||||
@@ -10,28 +10,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.farming.logic;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.farming.ICrop;
|
||||
import forestry.api.farming.IFarmable;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.core.network.packets.PacketFXSignal;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.GeneticsUtil;
|
||||
import forestry.plugins.ForestryPluginUids;
|
||||
|
||||
public class FarmableVanillaSapling extends FarmableSapling {
|
||||
|
||||
|
||||
@@ -769,7 +769,7 @@ public class FarmController extends RectangularMultiblockControllerBase implemen
|
||||
|
||||
@Override
|
||||
public boolean plantGermling(IFarmable germling, World world, BlockPos pos) {
|
||||
EntityPlayer player = PlayerUtil.getPlayer(world, getOwnerHandler().getOwner());
|
||||
EntityPlayer player = PlayerUtil.getFakePlayer(world, getOwnerHandler().getOwner());
|
||||
return player != null && inventory.plantGermling(germling, player, pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,8 +96,7 @@ public class InventoryFarm extends InventoryAdapterRestricted implements IFarmIn
|
||||
|
||||
@Override
|
||||
public void removeResources(NonNullList<ItemStack> resources) {
|
||||
EntityPlayer player = PlayerUtil.getPlayer(farmController.getWorldObj(), farmController.getOwnerHandler().getOwner());
|
||||
InventoryUtil.removeSets(resourcesInventory, 1, resources, player, false, true, false, true);
|
||||
InventoryUtil.removeSets(resourcesInventory, 1, resources, null, false, true, false, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -21,13 +21,13 @@ public class BlockRegistryLepidopterology extends BlockRegistry {
|
||||
|
||||
public BlockRegistryLepidopterology() {
|
||||
butterflyChest = new BlockLepidopterology(BlockTypeLepidopterologyTesr.LEPICHEST);
|
||||
registerBlock(butterflyChest, new ItemBlockForestry(butterflyChest), "butterfly_chest");
|
||||
registerBlock(butterflyChest, new ItemBlockForestry<>(butterflyChest), "butterfly_chest");
|
||||
|
||||
ButterflyAlleles.registerCocoonAlleles();
|
||||
cocoon = new BlockCocoon();
|
||||
registerBlock(cocoon, new ItemBlockForestry(cocoon), "cocoon");
|
||||
registerBlock(cocoon, new ItemBlockForestry<>(cocoon), "cocoon");
|
||||
|
||||
solidCocoon = new BlockSolidCocoon();
|
||||
registerBlock(solidCocoon, new ItemBlockForestry(solidCocoon), "cocoon.solid");
|
||||
registerBlock(solidCocoon, new ItemBlockForestry<>(solidCocoon), "cocoon.solid");
|
||||
}
|
||||
}
|
||||
@@ -20,12 +20,12 @@ public class BlockRegistryMail extends BlockRegistry {
|
||||
|
||||
public BlockRegistryMail() {
|
||||
mailbox = new BlockMail(BlockTypeMail.MAILBOX);
|
||||
registerBlock(mailbox, new ItemBlockForestry(mailbox), "mailbox");
|
||||
registerBlock(mailbox, new ItemBlockForestry<>(mailbox), "mailbox");
|
||||
|
||||
tradeStation = new BlockMail(BlockTypeMail.TRADE_STATION);
|
||||
registerBlock(tradeStation, new ItemBlockForestry(tradeStation), "trade_station");
|
||||
registerBlock(tradeStation, new ItemBlockForestry<>(tradeStation), "trade_station");
|
||||
|
||||
stampCollector = new BlockMail(BlockTypeMail.PHILATELIST);
|
||||
registerBlock(stampCollector, new ItemBlockForestry(stampCollector), "stamp_collector");
|
||||
registerBlock(stampCollector, new ItemBlockForestry<>(stampCollector), "stamp_collector");
|
||||
}
|
||||
}
|
||||
@@ -168,8 +168,8 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
genericCropsBuilder.add(
|
||||
"cotton",
|
||||
"rice",
|
||||
"tea",
|
||||
"coffee",
|
||||
"tealeaf",
|
||||
"coffeebean",
|
||||
"candleberry"
|
||||
);
|
||||
genericCropsBuilder.addAll(herbs);
|
||||
@@ -189,9 +189,9 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
|
||||
juiceAmount = Math.max(juiceAmount, 1); // Produce at least 1 mb of juice.
|
||||
for (String berryName : berries) {
|
||||
ItemStack berry = getItemStack(berryName + "Item");
|
||||
ItemStack berrySeed = getItemStack(berryName + "seedItem");
|
||||
Block berryBlock = getBlock("pam" + berryName + "Crop");
|
||||
ItemStack berry = getItemStack(berryName + "item");
|
||||
ItemStack berrySeed = getItemStack( berryName + "seeditem");
|
||||
Block berryBlock = getBlock("pam" + berryName + "crop");
|
||||
if (berry != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, berry, Fluids.JUICE.getFluid(juiceAmount));
|
||||
}
|
||||
@@ -207,9 +207,9 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
|
||||
juiceAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.apple");
|
||||
for (String fruitName : fruits) {
|
||||
ItemStack fruit = getItemStack(fruitName + "Item");
|
||||
ItemStack fruitSeed = getItemStack(fruitName + "seedItem");
|
||||
Block fruitBlock = getBlock("pam" + fruitName + "Crop");
|
||||
ItemStack fruit = getItemStack(fruitName + "item");
|
||||
ItemStack fruitSeed = getItemStack(fruitName + "seeditem");
|
||||
Block fruitBlock = getBlock("pam" + fruitName + "crop");
|
||||
if (fruit != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, fruit, Fluids.JUICE.getFluid(juiceAmount));
|
||||
}
|
||||
@@ -226,9 +226,9 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
juiceAmount = ForestryAPI.activeMode.getIntegerSetting("squeezer.liquid.apple") / 2; // vegetables produce less juice
|
||||
juiceAmount = Math.max(juiceAmount, 1); // Produce at least 1 mb of juice.
|
||||
for (String vegetableName : vegetables) {
|
||||
ItemStack vegetable = getItemStack(vegetableName + "Item");
|
||||
ItemStack vegetableSeed = getItemStack(vegetableName + "seedItem");
|
||||
Block vegetableBlock = getBlock("pam" + vegetableName + "Crop");
|
||||
ItemStack vegetable = getItemStack(vegetableName + "item");
|
||||
ItemStack vegetableSeed = getItemStack(vegetableName + "seeditem");
|
||||
Block vegetableBlock = getBlock("pam" + vegetableName + "crop");
|
||||
if (vegetable != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, vegetable, Fluids.JUICE.getFluid(juiceAmount));
|
||||
}
|
||||
@@ -244,9 +244,9 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
|
||||
ItemRegistryCore coreItems = PluginCore.getItems();
|
||||
for (String grainName : grains) {
|
||||
ItemStack grain = getItemStack(grainName + "Item");
|
||||
ItemStack grainSeed = getItemStack(grainName + "seedItem");
|
||||
Block grainBlock = getBlock("pam" + grainName + "Crop");
|
||||
ItemStack grain = getItemStack(grainName + "item");
|
||||
ItemStack grainSeed = getItemStack(grainName + "seeditem");
|
||||
Block grainBlock = getBlock("pam" + grainName + "crop");
|
||||
if (grain != null && wheatamount > 0) {
|
||||
RecipeUtil.addRecipe("pam_compost_" + grainName, coreItems.compost.getItemStack(wheatamount), " X ", "X#X", " X ", '#', Blocks.DIRT, 'X', grain);
|
||||
FuelManager.moistenerResource.put(grain, new MoistenerFuel(grain, coreItems.mouldyWheat.getItemStack(), 0, 300));
|
||||
@@ -263,8 +263,8 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
|
||||
for (String treeFruitName : treeFruits) {
|
||||
ItemStack treeFruit = getItemStack(treeFruitName + "Item");
|
||||
Block treeFruitBlock = getBlock("pam" + (Character.toUpperCase(treeFruitName.charAt(0)) + treeFruitName.substring(1)));
|
||||
ItemStack treeFruit = getItemStack(treeFruitName + "item");
|
||||
Block treeFruitBlock = getBlock("pam" + treeFruitName);
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FARMING) && treeFruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, treeFruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
@@ -275,7 +275,7 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
|
||||
for (String treeName : trees) {
|
||||
Block fruitBlock = getBlock("pam" + (Character.toUpperCase(treeName.charAt(0)) + treeName.substring(1)));
|
||||
Block fruitBlock = getBlock("pam" + treeName);
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FARMING) && fruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
@@ -283,15 +283,22 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
|
||||
for (String treeName : treesSpecial) {
|
||||
Block fruitBlock = getBlock("pam" + (Character.toUpperCase(treeName.charAt(0)) + treeName.substring(1)));
|
||||
Block fruitBlock = getBlock("pam" + treeName);
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FARMING) && fruitBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, fruitBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
for (String cropName : genericCrops) {
|
||||
ItemStack genericCropSeed = getItemStack(cropName + "seedItem");
|
||||
Block genericCropBlock = getBlock("pam" + cropName + "Crop");
|
||||
String seedPrefix = cropName;
|
||||
if (seedPrefix.equals("tealeaf")) {
|
||||
seedPrefix = "tea";
|
||||
}
|
||||
if (seedPrefix.equals("coffeebean")) {
|
||||
seedPrefix = "coffee";
|
||||
}
|
||||
ItemStack genericCropSeed = getItemStack(seedPrefix + "seeditem");
|
||||
Block genericCropBlock = getBlock("pam" + cropName + "crop");
|
||||
if (genericCropSeed != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, genericCropSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
@@ -301,9 +308,9 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
plants.add(cropName);
|
||||
}
|
||||
ItemStack mustardCropSeed = getItemStack("mustard" + "seedItem");
|
||||
Block mustardCropBlock = getBlock("pam" + "mustardseeds" + "Crop");
|
||||
ItemStack mustardFruit = getItemStack("mustard" + "seedsItem");
|
||||
ItemStack mustardCropSeed = getItemStack("mustard" + "seeditem");
|
||||
Block mustardCropBlock = getBlock("pam" + "mustardseeds" + "crop");
|
||||
ItemStack mustardFruit = getItemStack("mustard" + "seedsitem");
|
||||
if (mustardCropSeed != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, mustardCropSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
@@ -316,16 +323,16 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
|
||||
for (String plantName : plants.build()) {
|
||||
ItemStack plant = getItemStack(plantName + "Item");
|
||||
ItemStack plant = getItemStack(plantName + "item");
|
||||
if (plant != null) {
|
||||
RecipeUtil.addFermenterRecipes(plant, ForestryAPI.activeMode.getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
|
||||
}
|
||||
}
|
||||
|
||||
for (String cropnutName : cropNuts) {
|
||||
ItemStack cropnut = getItemStack(cropnutName + "Item");
|
||||
ItemStack cropnutSeed = getItemStack(cropnutName + "seedItem");
|
||||
Block cropnutBlock = getBlock("pam" + cropnutName + "Crop");
|
||||
ItemStack cropnut = getItemStack(cropnutName + "item");
|
||||
ItemStack cropnutSeed = getItemStack(cropnutName + "seeditem");
|
||||
Block cropnutBlock = getBlock("pam" + cropnutName + "crop");
|
||||
if (cropnutSeed != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, cropnutSeed, Fluids.SEED_OIL.getFluid(seedamount));
|
||||
}
|
||||
@@ -339,8 +346,8 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
|
||||
for (String nutName : nuts) {
|
||||
ItemStack nut = getItemStack(nutName + "Item");
|
||||
Block nutBlock = getBlock("pam" + (Character.toUpperCase(nutName.charAt(0)) + nutName.substring(1)));
|
||||
ItemStack nut = getItemStack(nutName + "item");
|
||||
Block nutBlock = getBlock("pam" + nutName);
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.FARMING) && nutBlock != null) {
|
||||
farmRegistry.registerFarmables("farmOrchard", new FarmableAgingCrop(ItemStack.EMPTY, nutBlock, fruitAGE, 2, 0));
|
||||
}
|
||||
@@ -349,12 +356,12 @@ public class PluginHarvestCraft extends CompatPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack hcHoneyItem = getItemStack("honeyItem");
|
||||
ItemStack hcHoneyItem = getItemStack("honeyitem");
|
||||
if (hcHoneyItem != null) {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, hcHoneyItem, Fluids.FOR_HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP));
|
||||
}
|
||||
|
||||
ItemStack hcBeeswaxItem = getItemStack("beeswaxItem");
|
||||
ItemStack hcBeeswaxItem = getItemStack("beeswaxitem");
|
||||
if (hcBeeswaxItem != null) {
|
||||
RecipeUtil.addRecipe("pam_wax_capsule", PluginFluids.getItems().waxCapsuleEmpty.getItemStack(ForestryAPI.activeMode.getIntegerSetting("recipe.output.capsule")), "XXX ", 'X', hcBeeswaxItem);
|
||||
}
|
||||
|
||||
@@ -212,9 +212,13 @@ public class PluginNatura extends BlankForestryPlugin {
|
||||
try {
|
||||
maxAge = (int)block.getClass().getDeclaredMethod("getMaxAge").invoke(block);
|
||||
seedItem = block.getPickBlock(block.getBlockState().getBaseState(), null, null, null, null);
|
||||
} catch (Exception _) {return;} // if this fails just ignore the error.
|
||||
} catch (Exception ignored) {
|
||||
return;
|
||||
}
|
||||
Log.info("[PluginNatura] Addding crop '{}'", itemStack);
|
||||
if(seedItem == null) return;
|
||||
if (seedItem.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
FarmRegistry.getInstance().registerFarmables("farmWheat",
|
||||
new FarmableAgingCrop(
|
||||
|
||||
Reference in new issue
Block a user