import changes
This commit is contained in:
parent
f1c4f209ef
commit
3156cf08d8
7 changed files with 42 additions and 12 deletions
|
@ -3,7 +3,7 @@ package dark.api.farm;
|
|||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import dark.core.helpers.Pair;
|
||||
import dark.prefab.helpers.Pair;
|
||||
|
||||
/** Tracks a list of all crops that can be auto farmed. Does some guessing on block to avoid having
|
||||
* each mod register all its crops
|
||||
|
|
|
@ -3,7 +3,7 @@ package dark.api.farm;
|
|||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import dark.core.helpers.Pair;
|
||||
import dark.prefab.helpers.Pair;
|
||||
|
||||
public class DecayMatterList
|
||||
{
|
||||
|
|
|
@ -26,12 +26,12 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import dark.api.farm.DecayMatterList;
|
||||
import dark.api.farm.CropAutomationHandler;
|
||||
import dark.core.BlockRegistry;
|
||||
import dark.core.BlockRegistry.BlockData;
|
||||
import dark.core.DarkMain;
|
||||
import dark.core.items.ItemBlockHolder;
|
||||
import dark.common.BlockRegistry;
|
||||
import dark.common.DarkMain;
|
||||
import dark.common.BlockRegistry.BlockData;
|
||||
import dark.farmtech.blocks.BlockFarmSoil;
|
||||
import dark.prefab.ModPrefab;
|
||||
import dark.prefab.items.ItemBlockHolder;
|
||||
|
||||
@Mod(modid = FarmTech.MOD_ID, name = FarmTech.MOD_NAME, version = DarkMain.VERSION, dependencies = "after:DarkCore", useMetadata = true)
|
||||
@NetworkMod(channels = { FarmTech.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketManager.class)
|
||||
|
|
|
@ -6,10 +6,10 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import dark.core.IExtraObjectInfo;
|
||||
import dark.core.helpers.Pair;
|
||||
import dark.farmtech.FarmTech;
|
||||
import dark.prefab.BlockMachine;
|
||||
import dark.prefab.IExtraObjectInfo;
|
||||
import dark.prefab.helpers.Pair;
|
||||
|
||||
/** Prefab class for all farm blocks to remove the need for some configuration of the super class
|
||||
*
|
||||
|
|
|
@ -2,7 +2,7 @@ package dark.farmtech.machines;
|
|||
|
||||
import dark.api.farm.DecayMatterList;
|
||||
import dark.interfaces.IInvBox;
|
||||
import dark.prefab.InvChest;
|
||||
import dark.prefab.invgui.InvChest;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package dark.farmtech.machines.farmer;
|
||||
|
||||
import dark.core.helpers.ItemWorldHelper;
|
||||
import dark.prefab.helpers.ItemWorldHelper;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -88,7 +88,9 @@ public class EntityFarmDrone extends EntityLiving implements IElectricalStorage
|
|||
*
|
||||
* @param location - location were the item was so to drop it there if the drone can't pick it
|
||||
* up
|
||||
* @param stack - stack to store or drop */
|
||||
* @param stack - stack to store or drop
|
||||
*
|
||||
* @return the itemstack if any of it is left */
|
||||
public ItemStack pickUpItem(Vector3 location, ItemStack stack, boolean drop)
|
||||
{
|
||||
if (location == null)
|
||||
|
@ -126,7 +128,7 @@ public class EntityFarmDrone extends EntityLiving implements IElectricalStorage
|
|||
}
|
||||
if (drop && itemStack != null && itemStack.stackSize > 0)
|
||||
{
|
||||
return ItemWorldHelper.dropItemStack(this.worldObj, location, itemStack, true);
|
||||
return ItemWorldHelper.dropItemStack(this.worldObj, location, itemStack, true);
|
||||
}
|
||||
}
|
||||
return itemStack;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package dark.farmtech.machines.farmer;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import dark.farmtech.machines.TileEntityFT;
|
||||
import dark.farmtech.machines.farmer.EntityFarmDrone.DroneData;
|
||||
|
||||
|
@ -21,5 +22,32 @@ public class TileEntityFarmBox extends TileEntityFT
|
|||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
|
||||
//TODO generate field map
|
||||
//Calculate crop status
|
||||
//Set workers into motion
|
||||
}
|
||||
|
||||
public void spawnDrone(int droneID)
|
||||
{
|
||||
if (droneID < droneData.length && droneID < drones.length)
|
||||
{
|
||||
if (drones[droneID] == null && droneData[droneID] != null)
|
||||
{
|
||||
EntityFarmDrone drone = new EntityFarmDrone(this.worldObj, this);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 getClearSpot()
|
||||
{
|
||||
Vector3 loc = new Vector3(this);
|
||||
return loc;
|
||||
}
|
||||
|
||||
public void setTask(int droneID, DroneTask task)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue