mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
1 parent
576afde7b7
commit
2e20b14e06
32 files changed
+329
-153
No files matched your search
@@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.vect.IVect;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
|
||||
public class CropBlock extends Crop {
|
||||
@@ -29,16 +30,16 @@ public class CropBlock extends Crop {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isCrop(Vect pos) {
|
||||
protected boolean isCrop(IVect pos) {
|
||||
return getBlock(pos) == block && getBlockMeta(pos) == meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<ItemStack> harvestBlock(Vect pos) {
|
||||
Collection<ItemStack> harvested = block.getDrops(world, pos.x, pos.y, pos.z, meta, 0);
|
||||
Proxies.common.addBlockDestroyEffects(world, pos.x, pos.y, pos.z, block, 0);
|
||||
protected Collection<ItemStack> harvestBlock(IVect pos) {
|
||||
Collection<ItemStack> harvested = block.getDrops(world, pos.getX(), pos.getY(), pos.getZ(), meta, 0);
|
||||
Proxies.common.addBlockDestroyEffects(world, pos.getX(), pos.getY(), pos.getZ(), block, 0);
|
||||
// Block.breakBlock() is called by vanilla itself, removing TEs.
|
||||
world.setBlockToAir(pos.x, pos.y, pos.z);
|
||||
world.setBlockToAir(pos.getX(), pos.getY(), pos.getZ());
|
||||
return harvested;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user