Use BlockPos and Vec3i, remove our Vect implementations

This commit is contained in:
mezz committed 2016-05-06 02:18:03 -07:00
1 parent 62ddd7bafc
commit c30c3d7575
82 files changed
+597 -967

No files matched your search

@@ -16,30 +16,30 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import forestry.core.utils.vect.Vect;
public class CropBasicAgriCraft extends Crop {
private final Block block;
private final int meta;
public CropBasicAgriCraft(World world, Block block, int meta, Vect position) {
public CropBasicAgriCraft(World world, Block block, int meta, BlockPos position) {
super(world, position);
this.block = block;
this.meta = meta;
}
@Override
protected boolean isCrop(Vect pos) {
protected boolean isCrop(BlockPos pos) {
return getBlock(pos) == block && getBlockMeta(pos) == meta;
}
@Override
protected Collection<ItemStack> harvestBlock(Vect pos) {
protected Collection<ItemStack> harvestBlock(BlockPos pos) {
List<ItemStack> harvest = block.getDrops(world, pos, block.getStateFromMeta(meta), 0);
if (harvest.size() > 1) {
harvest.remove(1); //AgriCraft returns cropsticks in 0, seeds in 1 in getDrops, removing since harvesting doesn't return them.