Auto-Sync
This commit is contained in:
parent
eb1fecdcec
commit
f08bc529fd
10 changed files with 31 additions and 27 deletions
|
@ -6,6 +6,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import dark.core.common.RecipeLoader;
|
||||
import dark.core.prefab.ModPrefab;
|
||||
import dark.farmtech.item.ItemFarmFood;
|
||||
import dark.farmtech.item.ItemFarmFood.FarmFood;
|
||||
|
||||
|
@ -36,15 +37,15 @@ public class FTRecipeLoader extends RecipeLoader
|
|||
if (itemFood instanceof ItemFarmFood)
|
||||
{
|
||||
FurnaceRecipes.smelting().addSmelting(itemFood.itemID, FarmFood.TurkeyRaw.ordinal(), new ItemStack(itemFood.itemID, 1, FarmFood.TurkeyCooked.ordinal()), 0.3f);
|
||||
if (FarmTech.getDate().getA() == Calendar.OCTOBER)
|
||||
if (ModPrefab.getDate().getA() == Calendar.OCTOBER)
|
||||
{
|
||||
//TODO load up hollow eve foods
|
||||
}
|
||||
else if (FarmTech.getDate().getA() == Calendar.NOVEMBER)
|
||||
else if (ModPrefab.getDate().getA() == Calendar.NOVEMBER)
|
||||
{
|
||||
//TODO load up thanks giving foods
|
||||
}
|
||||
else if (FarmTech.getDate().getA() == Calendar.DECEMBER)
|
||||
else if (ModPrefab.getDate().getA() == Calendar.DECEMBER)
|
||||
{
|
||||
//TODO load up xmas and other holiday foods
|
||||
}
|
||||
|
|
|
@ -5,9 +5,7 @@ import java.util.Arrays;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import universalelectricity.prefab.TranslationHelper;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
@ -112,7 +110,7 @@ public class FarmTech extends ModPrefab
|
|||
|
||||
//String compostList = CONFIGURATION.get("DecayMatter", "List", "5::8000:1", "Items or blocks beyond the built in ones that can be turned into compost. Entries go BlockID:Meta:Time:Amount").getString();
|
||||
//DecayMatterList.parseConfigString(compostList);
|
||||
if (this.CONFIGURATION.get("Override", "Eggs", true).getBoolean(true))
|
||||
if (FarmTech.CONFIGURATION.get("Override", "Eggs", true).getBoolean(true))
|
||||
{
|
||||
Item.itemsList[Item.egg.itemID] = null;
|
||||
Item.egg = null;
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package dark.farmtech.blocks;
|
||||
|
||||
import dark.farmtech.FarmTech;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import dark.core.prefab.ModPrefab;
|
||||
import dark.farmtech.FarmTech;
|
||||
|
||||
public class BlockCrops extends Block
|
||||
{
|
||||
|
||||
public BlockCrops()
|
||||
{
|
||||
super(FarmTech.CONFIGURATION.getBlock("Crop", FarmTech.getNextID()).getInt(), Material.vine);
|
||||
super(FarmTech.CONFIGURATION.getBlock("Crop", ModPrefab.getNextID()).getInt(), Material.vine);
|
||||
this.setUnlocalizedName("FarmCrops");
|
||||
}
|
||||
|
||||
|
|
|
@ -17,15 +17,15 @@ import dark.core.prefab.ModPrefab;
|
|||
import dark.farmtech.FarmTech;
|
||||
|
||||
/** Generic block set containing farm blocks: mulch, fertilizer, fertile dirt, mud
|
||||
*
|
||||
*
|
||||
* mulch/fertilizer -> fertileDirt -> mud -> dirt
|
||||
*
|
||||
*
|
||||
* @mulch is a decor version of fertilizer made from wood. decays very slowly when actually used for
|
||||
* crops. Design is to be used with small plant for decor
|
||||
*
|
||||
*
|
||||
* @fertilizer enriches the soil and is used to grow crops faster fertilizer can be created from
|
||||
* anything using several means
|
||||
*
|
||||
*
|
||||
* @author darkguardsman */
|
||||
public class BlockFarmSoil extends Block
|
||||
{
|
||||
|
|
|
@ -31,6 +31,7 @@ public class EntityFarmEgg extends EntityThrowable
|
|||
}
|
||||
|
||||
/** Called when this EntityThrowable hits a block or entity. */
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition mop)
|
||||
{
|
||||
if (mop.entityHit != null)
|
||||
|
@ -41,9 +42,11 @@ public class EntityFarmEgg extends EntityThrowable
|
|||
if (!this.worldObj.isRemote && this.rand.nextInt(8) == 0)
|
||||
{
|
||||
EntityAnimal animal;
|
||||
switch(id)
|
||||
switch (id)
|
||||
{
|
||||
default: animal = new EntityChicken(this.worldObj); break;
|
||||
default:
|
||||
animal = new EntityChicken(this.worldObj);
|
||||
break;
|
||||
}
|
||||
if (animal != null)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package dark.farmtech.item;
|
||||
|
||||
import dark.farmtech.entities.EntityFarmEgg;
|
||||
import net.minecraft.block.BlockDispenser;
|
||||
import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
||||
import net.minecraft.dispenser.IBlockSource;
|
||||
|
@ -10,6 +9,7 @@ import net.minecraft.entity.IProjectile;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import dark.farmtech.entities.EntityFarmEgg;
|
||||
|
||||
public class BehaviorDispenseEgg extends BehaviorDefaultDispenseItem
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ public class BehaviorDispenseEgg extends BehaviorDefaultDispenseItem
|
|||
IPosition iposition = BlockDispenser.getIPositionFromBlockSource(par1IBlockSource);
|
||||
EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata());
|
||||
IProjectile iprojectile = this.getProjectileEntity(world, iposition, par2ItemStack.getItemDamage());
|
||||
iprojectile.setThrowableHeading((double) enumfacing.getFrontOffsetX(), (double) ((float) enumfacing.getFrontOffsetY() + 0.1F), (double) enumfacing.getFrontOffsetZ(), this.func_82500_b(), this.func_82498_a());
|
||||
iprojectile.setThrowableHeading(enumfacing.getFrontOffsetX(), (enumfacing.getFrontOffsetY() + 0.1F), enumfacing.getFrontOffsetZ(), this.func_82500_b(), this.func_82498_a());
|
||||
world.spawnEntityInWorld((Entity) iprojectile);
|
||||
par2ItemStack.splitStack(1);
|
||||
return par2ItemStack;
|
||||
|
|
|
@ -13,7 +13,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import dark.farmtech.FarmTech;
|
||||
|
||||
/** Bucket containing compost for farming
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ItemFarmBucket extends ItemBucket
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package dark.farmtech.item;
|
||||
|
||||
import dark.farmtech.entities.EntityFarmEgg;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import dark.farmtech.entities.EntityFarmEgg;
|
||||
|
||||
public class ItemFarmEgg extends Item
|
||||
{
|
||||
|
@ -21,6 +21,7 @@ public class ItemFarmEgg extends Item
|
|||
|
||||
/** Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack,
|
||||
* world, entityPlayer */
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
|
|
|
@ -2,8 +2,6 @@ package dark.farmtech.item;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -16,15 +14,17 @@ import net.minecraft.util.Icon;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import universalelectricity.core.vector.Vector3;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import dark.core.prefab.IExtraInfo.IExtraItemInfo;
|
||||
import dark.core.prefab.ModPrefab;
|
||||
import dark.core.prefab.helpers.ItemWorldHelper;
|
||||
import dark.farmtech.FarmTech;
|
||||
|
||||
/** Item for storing all kinds of food based items including meats, fruits, pies, cakes, breads, etc
|
||||
* we have 1000s of meta to work with :)
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public class ItemFarmFood extends Item implements IExtraItemInfo
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ public class ItemFarmFood extends Item implements IExtraItemInfo
|
|||
|
||||
public ItemFarmFood(int par1)
|
||||
{
|
||||
super(FarmTech.CONFIGURATION.getItem("Food", FarmTech.getNextID()).getInt());
|
||||
super(FarmTech.CONFIGURATION.getItem("Food", ModPrefab.getNextID()).getInt());
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(CreativeTabs.tabFood);
|
||||
this.setUnlocalizedName("FarmFood");
|
||||
|
@ -131,7 +131,7 @@ public class ItemFarmFood extends Item implements IExtraItemInfo
|
|||
{
|
||||
for (FarmFood food : FarmFood.values())
|
||||
{
|
||||
if (food.type != FoodType.ILLEGAL_DRUGS || this.loadIllegalDrugs)
|
||||
if (food.type != FoodType.ILLEGAL_DRUGS || ItemFarmFood.loadIllegalDrugs)
|
||||
{
|
||||
list.add(new ItemStack(this.itemID, 1, food.ordinal()));
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class ItemFarmFood extends Item implements IExtraItemInfo
|
|||
}
|
||||
|
||||
/** enum that stores data for each meta value that represents a food object for the item
|
||||
*
|
||||
*
|
||||
* @Source http://urbanext.illinois.edu/herbs/list.cfm
|
||||
* @author DarkGuardsman */
|
||||
public static enum FarmFood
|
||||
|
@ -248,7 +248,7 @@ public class ItemFarmFood extends Item implements IExtraItemInfo
|
|||
}
|
||||
|
||||
/** IDs what the item is and determines how its used
|
||||
*
|
||||
*
|
||||
* @author DarkGuardsman */
|
||||
public static enum FoodType
|
||||
{
|
||||
|
@ -285,6 +285,7 @@ public class ItemFarmFood extends Item implements IExtraItemInfo
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemStackLimit(ItemStack stack)
|
||||
{
|
||||
FarmFood food = FarmFood.get(stack);
|
||||
|
|
|
@ -4,10 +4,9 @@ import net.minecraft.block.material.Material;
|
|||
import dark.core.common.DMCreativeTab;
|
||||
import dark.core.prefab.machine.BlockMachine;
|
||||
import dark.core.registration.ModObjectRegistry.BlockBuildData;
|
||||
import dark.farmtech.FarmTech;
|
||||
|
||||
/** Prefab class for all farm blocks to remove the need for some configuration of the super class
|
||||
*
|
||||
*
|
||||
* @author Darkguardsman */
|
||||
public abstract class BlockFT extends BlockMachine
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue