mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
First 1.8.9 Version
This commit is contained in:
1 parent
d35cc1df09
commit
5a3850c264
1657 files changed
+26844
-13269
No files matched your search
@@ -7,12 +7,13 @@ import forestry.plugins.compat.PluginIC2;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class FarmableBasicIC2Crop implements IFarmable {
|
||||
@Override
|
||||
public boolean isSaplingAt(World world, int x, int y, int z) {
|
||||
TileEntity crop = world.getTileEntity(x, y, z);
|
||||
public boolean isSaplingAt(World world, BlockPos pos) {
|
||||
TileEntity crop = world.getTileEntity(pos);
|
||||
if(PluginIC2.instance.isIC2Crop(crop)) {
|
||||
PluginIC2.instance.babysitCrop(crop);
|
||||
return true;
|
||||
@@ -21,8 +22,8 @@ public class FarmableBasicIC2Crop implements IFarmable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICrop getCropAt(World world, int x, int y, int z) {
|
||||
TileEntity crop = world.getTileEntity(x, y, z);
|
||||
public ICrop getCropAt(World world, BlockPos pos) {
|
||||
TileEntity crop = world.getTileEntity(pos);
|
||||
if (crop == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -32,7 +33,7 @@ public class FarmableBasicIC2Crop implements IFarmable {
|
||||
if (!PluginIC2.instance.canHarvestCrop(crop)) {
|
||||
return null;
|
||||
}
|
||||
return new CropBasicIC2Crop(world, crop, new Vect(x, y, z));
|
||||
return new CropBasicIC2Crop(world, crop, new Vect(pos));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +47,7 @@ public class FarmableBasicIC2Crop implements IFarmable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, int x, int y, int z) {
|
||||
public boolean plantSaplingAt(EntityPlayer player, ItemStack germling, World world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user