Move getPlayer from ProxyCommon to PlayerUtil

This commit is contained in:
mezz committed 2015-10-22 14:10:26 -07:00
1 parent 84968c6021
commit 02c25142cd
9 files changed
+41 -35

No files matched your search

@@ -68,6 +68,7 @@ import forestry.core.network.DataOutputStreamForestry;
import forestry.core.network.PacketGuiUpdate;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
import forestry.core.utils.PlayerUtil;
import forestry.core.utils.vect.Vect;
import forestry.core.utils.vect.VectUtil;
import forestry.farming.FarmHelper;
@@ -803,7 +804,7 @@ public class FarmController extends RectangularMultiblockControllerBase implemen
@Override
public boolean plantGermling(IFarmable germling, World world, int x, int y, int z) {
EntityPlayer player = Proxies.common.getPlayer(world, getAccessHandler().getOwner());
EntityPlayer player = PlayerUtil.getPlayer(world, getAccessHandler().getOwner());
return inventory.plantGermling(germling, player, x, y, z);
}
@@ -26,9 +26,9 @@ import forestry.core.fluids.FluidHelper;
import forestry.core.fluids.TankManager;
import forestry.core.inventory.InventoryAdapterRestricted;
import forestry.core.inventory.wrappers.InventoryMapper;
import forestry.core.proxy.Proxies;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.PlayerUtil;
import forestry.core.utils.SlotUtil;
import forestry.plugins.PluginFarming;
@@ -91,7 +91,7 @@ public class FarmInventory extends InventoryAdapterRestricted implements IFarmIn
@Override
public void removeResources(ItemStack[] resources) {
EntityPlayer player = Proxies.common.getPlayer(farmController.getWorld(), farmController.getAccessHandler().getOwner());
EntityPlayer player = PlayerUtil.getPlayer(farmController.getWorld(), farmController.getAccessHandler().getOwner());
InventoryUtil.removeSets(resourcesInventory, 1, resources, player, false, true);
}