mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 15:36:18 +00:00
Improve fertilizer config and Clean Up
This commit is contained in:
1 parent
ce3dea42e3
commit
c00fa15f0e
34 files changed
+263
-236
No files matched your search
@@ -45,7 +45,7 @@ public interface IFarmLogic {
|
||||
Collection<ICrop> harvest(World world, BlockPos pos, FarmDirection direction, int extent);
|
||||
|
||||
/**
|
||||
* @deprecated Since Forestry 5.8 logic instances are created at the constructor of the {@link IFarmInstance} and
|
||||
* @deprecated Since Forestry 5.8 logic instances are created at the constructor of the {@link IFarmProperties} and
|
||||
* have a immutable manual state. TODO Remove this method in 1.13
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -56,16 +56,16 @@ public interface IFarmLogic {
|
||||
/**
|
||||
* @since Forestry 5.8
|
||||
*
|
||||
* @return Returns the {@link IFarmInstance} that created this logic. Returns a fake instance from
|
||||
* @return Returns the {@link IFarmProperties} that created this logic. Returns a fake instance from
|
||||
* {@link IFarmRegistry#createFakeInstance(IFarmLogic)} if the logic is older that Forestry 5.8.
|
||||
*/
|
||||
default IFarmInstance getInstance(){
|
||||
default IFarmProperties getInstance(){
|
||||
return ForestryAPI.farmRegistry.createFakeInstance(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use {@link IFarmRegistry#getFarm(String)} to get the soil container for the farm logic and register the soil
|
||||
* with {@link IFarmInstance#registerSoil(ItemStack, IBlockState, boolean)}.
|
||||
* with {@link IFarmProperties#registerSoil(ItemStack, IBlockState, boolean)}.
|
||||
*/
|
||||
@Deprecated
|
||||
default void addSoil(ItemStack resource, IBlockState soilState, boolean hasMetaData){
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
/**
|
||||
* @since Forestry 5.8
|
||||
*/
|
||||
public interface IFarmInstance {
|
||||
public interface IFarmProperties {
|
||||
|
||||
default void registerSoil(ItemStack resource, IBlockState soilState){
|
||||
registerSoil(resource, soilState, false);
|
||||
@@ -19,7 +19,7 @@ public interface IFarmRegistry {
|
||||
* @param logic corresponding instance of logic
|
||||
*
|
||||
* @deprecated Since Forestry 5.8. Use {@link #registerLogic(String, BiFunction, String...)} or
|
||||
* {@link #registerLogic(IFarmInstance)}.
|
||||
* {@link #registerLogic(IFarmProperties)}.
|
||||
*/
|
||||
@Deprecated
|
||||
void registerLogic(String identifier, IFarmLogic logic);
|
||||
@@ -28,7 +28,7 @@ public interface IFarmRegistry {
|
||||
* Registers farming logic in registry
|
||||
* @since Forestry 5.8
|
||||
*/
|
||||
IFarmInstance registerLogic(IFarmInstance farmInstance);
|
||||
IFarmProperties registerLogic(IFarmProperties farmInstance);
|
||||
|
||||
/**
|
||||
* Registers farming logic in registry under given identifier
|
||||
@@ -38,7 +38,7 @@ public interface IFarmRegistry {
|
||||
* @param farmablesIdentifiers Identifiers: farmArboreal farmCrops farmGourd farmInfernal farmPoales farmSucculentes farmShroom
|
||||
* @since Forestry 5.8
|
||||
*/
|
||||
IFarmInstance registerLogic(String identifier, BiFunction<IFarmInstance, Boolean, IFarmLogic> logicFactory, String... farmablesIdentifiers);
|
||||
IFarmProperties registerLogic(String identifier, BiFunction<IFarmProperties, Boolean, IFarmLogic> logicFactory, String... farmablesIdentifiers);
|
||||
|
||||
/**
|
||||
* Can be used to add IFarmables to some of the vanilla farm logics.
|
||||
@@ -54,7 +54,7 @@ public interface IFarmRegistry {
|
||||
*
|
||||
* @return Null if the farming plugin is not active.
|
||||
*
|
||||
* @deprecated Since Forestry 5.8. Use {@link #createCropLogic(IFarmInstance, boolean, ISimpleFarmLogic)} instead.
|
||||
* @deprecated Since Forestry 5.8. Use {@link #createCropLogic(IFarmProperties, boolean, ISimpleFarmLogic)} instead.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
@@ -74,13 +74,13 @@ public interface IFarmRegistry {
|
||||
int getFertilizeValue(ItemStack itemStack);
|
||||
|
||||
/**
|
||||
* Returns a fake {@link IFarmInstance} that returns the given logic at {@link IFarmInstance#getLogic(boolean)}.
|
||||
* Returns a fake {@link IFarmProperties} that returns the given logic at {@link IFarmProperties#getLogic(boolean)}.
|
||||
*
|
||||
* @since Forestry 5.8
|
||||
* @deprecated Only for backwards comparability.
|
||||
*/
|
||||
@Deprecated
|
||||
IFarmInstance createFakeInstance(IFarmLogic logic);
|
||||
IFarmProperties createFakeInstance(IFarmLogic logic);
|
||||
|
||||
/**
|
||||
* Can be used to create a simple version of a farm logic, like the vanilla vegetable or wheat farm logic.
|
||||
@@ -88,7 +88,7 @@ public interface IFarmRegistry {
|
||||
* @return Null if the farming plugin is not active.
|
||||
*/
|
||||
@Nullable
|
||||
IFarmLogic createCropLogic(IFarmInstance instance, boolean isManual, ISimpleFarmLogic simpleFarmLogic);
|
||||
IFarmLogic createCropLogic(IFarmProperties instance, boolean isManual, ISimpleFarmLogic simpleFarmLogic);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -98,6 +98,6 @@ public interface IFarmRegistry {
|
||||
* @since Forestry 5.8
|
||||
*/
|
||||
@Nullable
|
||||
IFarmInstance getFarm(String identifier);
|
||||
IFarmProperties getFarm(String identifier);
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user