Skip to content
Permalink
Browse files

Refactored crops to accommodate fruit trees and berry bushes

  • Loading branch information
DisasterMoo committed Jul 15, 2019
1 parent 81dcfe0 commit 08907b63852bd027b601fb3b1bc895eec85c954c
@@ -48,7 +48,7 @@
import net.dries007.tfc.objects.Gem;
import net.dries007.tfc.objects.blocks.BlockSlabTFC;
import net.dries007.tfc.objects.blocks.BlocksTFC;
import net.dries007.tfc.objects.blocks.fruittrees.BlockFruitTreeLeaves;
import net.dries007.tfc.objects.blocks.agriculture.BlockFruitTreeLeaves;
import net.dries007.tfc.objects.blocks.plants.BlockPlantTFC;
import net.dries007.tfc.objects.blocks.stone.BlockFarmlandTFC;
import net.dries007.tfc.objects.blocks.stone.BlockOreTFC;
@@ -67,7 +67,7 @@

import static net.dries007.tfc.api.util.TFCConstants.MOD_ID;
import static net.dries007.tfc.objects.blocks.BlockPlacedHide.SIZE;
import static net.dries007.tfc.objects.blocks.crops.BlockCropTFC.WILD;
import static net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC.WILD;

@SideOnly(Side.CLIENT)
@Mod.EventBusSubscriber(value = Side.CLIENT, modid = MOD_ID)
@@ -24,12 +24,8 @@

import net.dries007.tfc.api.registries.TFCRegistries;
import net.dries007.tfc.api.types.*;
import net.dries007.tfc.objects.blocks.crops.BlockCropTFC;
import net.dries007.tfc.objects.blocks.agriculture.*;
import net.dries007.tfc.objects.blocks.devices.*;
import net.dries007.tfc.objects.blocks.fruittrees.BlockFruitTreeBranch;
import net.dries007.tfc.objects.blocks.fruittrees.BlockFruitTreeLeaves;
import net.dries007.tfc.objects.blocks.fruittrees.BlockFruitTreeSapling;
import net.dries007.tfc.objects.blocks.fruittrees.BlockFruitTreeTrunk;
import net.dries007.tfc.objects.blocks.metal.BlockAnvilTFC;
import net.dries007.tfc.objects.blocks.metal.BlockIngotPile;
import net.dries007.tfc.objects.blocks.metal.BlockMetalSheet;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.crops;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.Random;
import javax.annotation.Nonnull;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.crops;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.Random;
import javax.annotation.Nonnull;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.crops;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.HashMap;
import java.util.Map;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.fruittrees;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.HashMap;
import java.util.Map;
@@ -55,13 +55,6 @@ public int getMetaFromState(IBlockState state)
return 0;
}

@Override
@Nonnull
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
return Item.getItemFromBlock(BlockFruitTreeSapling.get(tree));
}

@SuppressWarnings("deprecation")
@Override
@Nonnull
@@ -82,6 +75,13 @@ public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Bloc
}
}

@Override
@Nonnull
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
return Item.getItemFromBlock(BlockFruitTreeSapling.get(tree));
}

@Override
@Nonnull
public BlockStateContainer createBlockState()
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.fruittrees;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.*;
import javax.annotation.Nonnull;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.fruittrees;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.HashMap;
import java.util.Map;
@@ -3,7 +3,7 @@
* See the project README.md and LICENSE.txt for more information.
*/

package net.dries007.tfc.objects.blocks.fruittrees;
package net.dries007.tfc.objects.blocks.agriculture;

import java.util.HashMap;
import java.util.List;
@@ -31,14 +31,14 @@
import mcp.MethodsReturnNonnullByDefault;
import net.dries007.tfc.api.types.Rock;
import net.dries007.tfc.objects.blocks.BlocksTFC;
import net.dries007.tfc.objects.blocks.crops.BlockCropTFC;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC;
import net.dries007.tfc.objects.blocks.plants.BlockPlantTFC;
import net.dries007.tfc.objects.items.rock.ItemRock;
import net.dries007.tfc.util.Helpers;
import net.dries007.tfc.util.OreDictionaryHelper;
import net.dries007.tfc.util.TFCSoundEvents;

import static net.dries007.tfc.objects.blocks.crops.BlockCropTFC.WILD;
import static net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC.WILD;

@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
@@ -25,7 +25,7 @@
import net.minecraftforge.common.IPlantable;

import net.dries007.tfc.api.types.ICrop;
import net.dries007.tfc.objects.blocks.crops.BlockCropTFC;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC;
import net.dries007.tfc.objects.blocks.stone.BlockFarmlandTFC;

public class ItemSeedsTFC extends Item implements IPlantable
@@ -13,9 +13,9 @@
import net.minecraft.item.ItemStack;

import net.dries007.tfc.api.types.ICrop;
import net.dries007.tfc.objects.blocks.crops.BlockCropSimple;
import net.dries007.tfc.objects.blocks.crops.BlockCropSpreading;
import net.dries007.tfc.objects.blocks.crops.BlockCropTFC;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropSimple;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropSpreading;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC;
import net.dries007.tfc.objects.items.ItemsTFC;
import net.dries007.tfc.objects.items.food.ItemFoodTFC;
import net.dries007.tfc.util.calendar.CalendarTFC;
@@ -17,11 +17,11 @@
import net.dries007.tfc.TerraFirmaCraft;
import net.dries007.tfc.api.types.ICrop;
import net.dries007.tfc.objects.blocks.BlocksTFC;
import net.dries007.tfc.objects.blocks.crops.BlockCropTFC;
import net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC;
import net.dries007.tfc.world.classic.ClimateTFC;
import net.dries007.tfc.world.classic.chunkdata.ChunkDataTFC;

import static net.dries007.tfc.objects.blocks.crops.BlockCropTFC.WILD;
import static net.dries007.tfc.objects.blocks.agriculture.BlockCropTFC.WILD;

@ParametersAreNonnullByDefault
public class WorldGenWildCrops extends WorldGenerator

0 comments on commit 08907b6

Please sign in to comment.
You can’t perform that action at this time.