public final class FarmProperties extends java.lang.Object implements IFarmProperties
| Constructor and Description |
|---|
FarmProperties(java.util.function.BiFunction<IFarmProperties,java.lang.Boolean,IFarmLogic> logicFactory,
java.util.Set<java.lang.String> farmablesIdentifiers,
java.lang.String identifier) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGermlings(java.util.Collection<net.minecraft.item.ItemStack> germlings) |
void |
addGermlings(net.minecraft.item.ItemStack... germlings) |
void |
addProducts(java.util.Collection<net.minecraft.item.ItemStack> products) |
void |
addProducts(net.minecraft.item.ItemStack... products) |
java.util.Collection<IFarmableInfo> |
getFarmableInfo() |
java.util.Collection<IFarmable> |
getFarmables() |
IFarmLogic |
getLogic(boolean manuel)
Returns the instance of the manual or managed
IFarmLogic. |
java.util.Collection<ISoil> |
getSoils() |
boolean |
isAcceptedResource(net.minecraft.item.ItemStack itemstack) |
boolean |
isAcceptedSoil(net.minecraft.block.state.IBlockState ground) |
void |
registerFarmables(java.lang.String identifier)
Adds the
IFarmables that where registered with the given identifier. |
void |
registerSoil(net.minecraft.item.ItemStack resource,
net.minecraft.block.state.IBlockState soilState,
boolean hasMetaData)
Can be used to register a
IBlockState as a valid soil. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterSoilpublic FarmProperties(java.util.function.BiFunction<IFarmProperties,java.lang.Boolean,IFarmLogic> logicFactory, java.util.Set<java.lang.String> farmablesIdentifiers, java.lang.String identifier)
public void registerFarmables(java.lang.String identifier)
IFarmPropertiesIFarmables that where registered with the given identifier.registerFarmables in interface IFarmPropertiespublic java.util.Collection<IFarmable> getFarmables()
getFarmables in interface IFarmPropertiespublic java.util.Collection<IFarmableInfo> getFarmableInfo()
getFarmableInfo in interface IFarmPropertiespublic IFarmLogic getLogic(boolean manuel)
IFarmPropertiesIFarmLogic.getLogic in interface IFarmPropertiespublic void registerSoil(net.minecraft.item.ItemStack resource,
net.minecraft.block.state.IBlockState soilState,
boolean hasMetaData)
IFarmPropertiesIBlockState as a valid soil.registerSoil in interface IFarmPropertiespublic void addGermlings(net.minecraft.item.ItemStack... germlings)
addGermlings in interface IFarmPropertiespublic void addGermlings(java.util.Collection<net.minecraft.item.ItemStack> germlings)
addGermlings in interface IFarmPropertiespublic void addProducts(net.minecraft.item.ItemStack... products)
addProducts in interface IFarmPropertiespublic void addProducts(java.util.Collection<net.minecraft.item.ItemStack> products)
addProducts in interface IFarmPropertiespublic boolean isAcceptedSoil(net.minecraft.block.state.IBlockState ground)
isAcceptedSoil in interface IFarmPropertiespublic boolean isAcceptedResource(net.minecraft.item.ItemStack itemstack)
isAcceptedResource in interface IFarmPropertiesItemStack of a soil.public java.util.Collection<ISoil> getSoils()
getSoils in interface IFarmProperties