mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 12:59:44 +00:00
Use BlockPos and Vec3i, remove our Vect implementations
This commit is contained in:
1 parent
62ddd7bafc
commit
c30c3d7575
82 files changed
+597
-967
No files matched your search
@@ -14,29 +14,29 @@ import java.util.Collection;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
|
||||
public class CropBlock extends Crop {
|
||||
|
||||
protected final Block block;
|
||||
protected final int meta;
|
||||
|
||||
public CropBlock(World world, Block block, int meta, Vect position) {
|
||||
public CropBlock(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) {
|
||||
Collection<ItemStack> harvested = block.getDrops(world, pos, block.getStateFromMeta(meta), 0);
|
||||
Proxies.common.addBlockDestroyEffects(world, pos, block.getDefaultState());
|
||||
// Block.breakBlock() is called by vanilla itself, removing TEs.
|
||||
|
||||
Reference in new issue
Block a user