public class DummyFarmRegistry extends java.lang.Object implements IFarmRegistry
| Constructor and Description |
|---|
DummyFarmRegistry() |
| Modifier and Type | Method and Description |
|---|---|
IFarmLogic |
createCropLogic(IFarmProperties instance,
boolean isManual,
ISimpleFarmLogic simpleFarmLogic)
Can be used to create a simple version of a farm logic, like the vanilla vegetable or wheat farm logic.
|
IFarmProperties |
createFakeInstance(IFarmLogic logic)
Returns a fake
IFarmProperties that returns the given logic at IFarmProperties.getLogic(boolean). |
IFarmableInfo |
getFarmableInfo(java.lang.String identifier) |
java.util.Collection<IFarmable> |
getFarmables(java.lang.String identifier) |
int |
getFertilizeValue(net.minecraft.item.ItemStack itemStack) |
IFarmProperties |
getProperties(java.lang.String identifier) |
void |
registerFarmables(java.lang.String identifier,
IFarmable... farmable)
Can be used to add IFarmables to some of the vanilla farm logics.
|
void |
registerFertilizer(net.minecraft.item.ItemStack itemStack,
int value) |
IFarmProperties |
registerLogic(java.lang.String identifier,
java.util.function.BiFunction<IFarmProperties,java.lang.Boolean,IFarmLogic> logicFactory,
java.lang.String... farmablesIdentifiers)
Registers farming logic in registry under given identifier
|
void |
registerLogic(java.lang.String identifier,
IFarmLogic logic)
Registers farming logic in registry under given identifier
|
IFarmProperties |
registerLogic(java.lang.String identifier,
IFarmProperties farmInstance)
Registers farming logic in registry
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateLogicpublic void registerLogic(java.lang.String identifier,
IFarmLogic logic)
IFarmRegistryregisterLogic in interface IFarmRegistryidentifier - Valid identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroomlogic - corresponding instance of logicpublic void registerFarmables(java.lang.String identifier,
IFarmable... farmable)
IFarmRegistryIdentifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
registerFarmables in interface IFarmRegistrypublic java.util.Collection<IFarmable> getFarmables(java.lang.String identifier)
getFarmables in interface IFarmRegistrypublic IFarmableInfo getFarmableInfo(java.lang.String identifier)
getFarmableInfo in interface IFarmRegistrypublic IFarmProperties registerLogic(java.lang.String identifier, IFarmProperties farmInstance)
IFarmRegistryregisterLogic in interface IFarmRegistrypublic IFarmProperties registerLogic(java.lang.String identifier, java.util.function.BiFunction<IFarmProperties,java.lang.Boolean,IFarmLogic> logicFactory, java.lang.String... farmablesIdentifiers)
IFarmRegistryregisterLogic in interface IFarmRegistryidentifier - Valid identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroomlogicFactory - factory that creates the corresponding instance of logicfarmablesIdentifiers - Identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom@Nullable public IFarmLogic createCropLogic(IFarmProperties instance, boolean isManual, ISimpleFarmLogic simpleFarmLogic)
IFarmRegistrycreateCropLogic in interface IFarmRegistrypublic IFarmProperties createFakeInstance(IFarmLogic logic)
IFarmRegistryIFarmProperties that returns the given logic at IFarmProperties.getLogic(boolean).createFakeInstance in interface IFarmRegistrypublic void registerFertilizer(net.minecraft.item.ItemStack itemStack,
int value)
registerFertilizer in interface IFarmRegistryitemStack - the fertilizer itemstackvalue - The value of the fertilizer. The value of the forestry fertilizer is 500.public int getFertilizeValue(net.minecraft.item.ItemStack itemStack)
getFertilizeValue in interface IFarmRegistry@Nullable public IFarmProperties getProperties(java.lang.String identifier)
getProperties in interface IFarmRegistry