mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 20:42:35 +00:00
Fix fruit pods
This commit is contained in:
1 parent
d5a45a39eb
commit
a192c1ce49
40 files changed
+408
-406
No files matched your search
@@ -6,6 +6,7 @@
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.api.genetics.IAlleleProperty;
|
||||
|
||||
@@ -17,7 +18,7 @@ public interface IAlleleFruit extends IAlleleProperty<IAlleleFruit> {
|
||||
@Nonnull
|
||||
IFruitProvider getProvider();
|
||||
|
||||
@Nonnull
|
||||
@Nullable
|
||||
String getModelName();
|
||||
|
||||
@Nonnull
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -29,20 +34,25 @@ public interface IFruitProvider {
|
||||
int getRipeningPeriod();
|
||||
|
||||
// / Products, Chance
|
||||
ItemStack[] getProducts();
|
||||
@Nonnull
|
||||
Map<ItemStack, Float> getProducts();
|
||||
|
||||
// / Specialty, Chance
|
||||
ItemStack[] getSpecialty();
|
||||
@Nonnull
|
||||
Map<ItemStack, Float> getSpecialty();
|
||||
|
||||
ItemStack[] getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime);
|
||||
@Nonnull
|
||||
List<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
|
||||
@Nullable
|
||||
String getModelName();
|
||||
|
||||
|
||||
@Nonnull
|
||||
String getModID();
|
||||
|
||||
/* TEXTURE OVERLAY */
|
||||
|
||||
@@ -7,6 +7,8 @@ package forestry.api.arboriculture;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
@@ -43,11 +45,16 @@ public interface ITree extends IIndividual, ITreeGenData {
|
||||
*/
|
||||
ITree[] getSaplings(World world, GameProfile playerProfile, BlockPos pos, float modifier);
|
||||
|
||||
ItemStack[] getProduceList();
|
||||
// Products, Chance
|
||||
@Nonnull
|
||||
Map<ItemStack, Float> getProducts();
|
||||
|
||||
ItemStack[] getSpecialtyList();
|
||||
// Specialties, Chance
|
||||
@Nonnull
|
||||
Map<ItemStack, Float> getSpecialties();
|
||||
|
||||
ItemStack[] produceStacks(World world, BlockPos pos, int ripeningTime);
|
||||
@Nonnull
|
||||
List<ItemStack> produceStacks(World world, BlockPos pos, int ripeningTime);
|
||||
|
||||
/**
|
||||
* @return Boolean indicating whether a sapling can stay planted at the given position.
|
||||
|
||||
@@ -79,7 +79,7 @@ public interface ITreeRoot extends ISpeciesRoot {
|
||||
@Override
|
||||
IChromosome[] templateAsChromosomes(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, short[] indices, BlockPos pos);
|
||||
boolean setFruitBlock(World world, IAlleleFruit allele, float sappiness, BlockPos pos);
|
||||
|
||||
/* GAME MODE */
|
||||
ArrayList<ITreekeepingMode> getTreekeepingModes();
|
||||
|
||||
@@ -41,7 +41,7 @@ public interface IFruitBearer {
|
||||
float getRipeness();
|
||||
|
||||
/**
|
||||
* Increases the ripeness of the fruit.
|
||||
* Increases the ripeness of the fruit. Adding 1.0f will fully ripen the fruit.
|
||||
*
|
||||
* @param add
|
||||
* Float to add to the ripeness. Will truncate to valid values.
|
||||
|
||||
@@ -5,14 +5,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.multiblock;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Base logic class for Multiblock-connected tile entities.
|
||||
@@ -71,11 +69,6 @@ public abstract class MultiblockTileEntityBase<T extends IMultiblockLogic> exten
|
||||
super.validate();
|
||||
multiblockLogic.validate(worldObj, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRefresh(World world, BlockPos pos, IBlockState oldState, IBlockState newSate) {
|
||||
return oldState.getBlock() != newSate.getBlock();
|
||||
}
|
||||
|
||||
/* Network Communication */
|
||||
|
||||
|
||||
Reference in new issue
Block a user