Cleanup Log, loading from nbt, remove Version check

This commit is contained in:
mezz committed 2016-02-25 19:18:50 -08:00
1 parent 14c42afd29
commit 7b0259a343
89 files changed
+450 -930

No files matched your search

@@ -44,14 +44,9 @@ public enum EnumBeeChromosome implements IChromosomeType {
*/
TEMPERATURE_TOLERANCE(IAlleleTolerance.class),
/**
* Slightly incorrectly named. If true, a naturally diurnal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
* If true, a naturally diurnal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
*/
NOCTURNAL(IAlleleBoolean.class),
/**
* Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST.
*/
@Deprecated
HUMIDITY(IAllele.class),
NEVER_SLEEPS(IAlleleBoolean.class),
/**
* Humidity difference to its native supported one the bee can tolerate.
*/
@@ -7,14 +7,15 @@ package forestry.api.apiculture;
import net.minecraft.entity.player.EntityPlayerMP;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
/**
* Stores beekeeping logic for bee housings.
* Get one with BeeManager.beeRoot.createBeekeepingLogic(IBeeHousing housing)
* Save and load it to NBT using the INBTTagable methods.
* Save and load it to NBT using the INbtWritable methods.
*/
public interface IBeekeepingLogic extends INBTTagable {
public interface IBeekeepingLogic extends INbtWritable, INbtReadable {
/* SERVER */
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.arboriculture;
import javax.annotation.Nonnull;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
@@ -29,6 +30,7 @@ public interface ITree extends IIndividual, ITreeGenData {
IEffectData[] doFX(IEffectData[] storedData, World world, BlockPos pos);
@Nonnull
@Override
ITreeGenome getGenome();
@@ -5,11 +5,12 @@
******************************************************************************/
package forestry.api.circuits;
import javax.annotation.Nonnull;
import java.util.List;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
public interface ICircuitBoard extends INBTTagable {
public interface ICircuitBoard extends INbtWritable {
int getPrimaryColor();
@@ -24,13 +25,14 @@ public interface ICircuitBoard extends INBTTagable {
void onRemoval(Object tile);
void onTick(Object tile);
@Nonnull
ICircuit[] getCircuits();
/**
* Specifies where a circuit can be used.
* @since Forestry 4.0
*/
@Nonnull
ICircuitSocketType getSocketType();
}
@@ -5,21 +5,26 @@
******************************************************************************/
package forestry.api.circuits;
import javax.annotation.Nonnull;
public interface ICircuitLayout {
/** unique ID for this circuit layout */
@Nonnull
String getUID();
/** localized name for this circuit layout */
@Nonnull
String getName();
/** localized string for how this circuit layout is used */
@Nonnull
String getUsage();
/**
* Specifies where a circuit layout is used.
* @since Forestry 4.0
*/
@Nonnull
ICircuitSocketType getSocketType();
}
@@ -0,0 +1,7 @@
package forestry.api.core;
import net.minecraft.nbt.NBTTagCompound;
public interface INbtReadable {
void readFromNBT(NBTTagCompound nbt);
}
@@ -7,8 +7,6 @@ package forestry.api.core;
import net.minecraft.nbt.NBTTagCompound;
public interface INBTTagable {
void readFromNBT(NBTTagCompound nbttagcompound);
void writeToNBT(NBTTagCompound nbttagcompound);
public interface INbtWritable {
void writeToNBT(NBTTagCompound nbt);
}
@@ -5,6 +5,7 @@
******************************************************************************/
package forestry.api.farming;
import javax.annotation.Nullable;
import java.util.Collection;
import net.minecraft.item.ItemStack;
@@ -16,6 +17,7 @@ public interface ICrop {
*
* @return Products harvested.
*/
@Nullable
Collection<ItemStack> harvest();
}
@@ -5,14 +5,14 @@
******************************************************************************/
package forestry.api.genetics;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
/**
* Implementations other than Forestry's default one are not supported!
*
* @author SirSengir
*/
public interface IChromosome extends INBTTagable {
public interface IChromosome extends INbtWritable {
IAllele getPrimaryAllele();
@@ -5,14 +5,15 @@
******************************************************************************/
package forestry.api.genetics;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtReadable;
import forestry.api.core.INbtWritable;
/**
* Container to hold some temporary data for bee, tree and butterfly effects.
*
* @author SirSengir
*/
public interface IEffectData extends INBTTagable {
public interface IEffectData extends INbtWritable, INbtReadable {
void setInteger(int index, int val);
void setFloat(int index, float val);
@@ -5,14 +5,14 @@
******************************************************************************/
package forestry.api.genetics;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
/**
* Holds the {@link IChromosome}s which comprise the traits of a given individual.
*
* Only the default implementation is supported.
*/
public interface IGenome extends INBTTagable {
public interface IGenome extends INbtWritable {
IAlleleSpecies getPrimary();
@@ -8,14 +8,14 @@ package forestry.api.genetics;
import javax.annotation.Nonnull;
import java.util.List;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
/**
* An actual individual with genetic information.
*
* Only the default implementation is supported.
*/
public interface IIndividual extends INBTTagable {
public interface IIndividual extends INbtWritable {
String getIdent();
@@ -8,7 +8,6 @@ package forestry.api.lepidopterology;
import java.util.Locale;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IAlleleArea;
import forestry.api.genetics.IAlleleBoolean;
import forestry.api.genetics.IAlleleFloat;
import forestry.api.genetics.IAlleleFlowers;
@@ -69,11 +68,7 @@ public enum EnumButterflyChromosome implements IChromosomeType {
/**
* Extra effect to surroundings. (?)
*/
EFFECT(IAlleleButterflyEffect.class),
/**
* Not used yet
*/
TERRITORY(IAlleleArea.class),;
EFFECT(IAlleleButterflyEffect.class);
Class<? extends IAllele> clss;
@@ -5,6 +5,8 @@
******************************************************************************/
package forestry.api.lepidopterology;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -12,6 +14,7 @@ import forestry.api.genetics.IIndividualLiving;
public interface IButterfly extends IIndividualLiving {
@Nonnull
@Override
IButterflyGenome getGenome();
+2 -2
View File
@@ -10,9 +10,9 @@ import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
public interface ILetter extends IInventory, INBTTagable {
public interface ILetter extends IInventory, INbtWritable {
ItemStack[] getPostage();
@@ -7,9 +7,9 @@ package forestry.api.mail;
import com.mojang.authlib.GameProfile;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
public interface IMailAddress extends INBTTagable {
public interface IMailAddress extends INbtWritable {
EnumAddressee getType();
@@ -8,7 +8,7 @@ package forestry.api.multiblock;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import forestry.api.core.INBTTagable;
import forestry.api.core.INbtWritable;
/**
* Multiblock Logic implements the basic logic for IMultiblockComponent tile entities.
@@ -17,7 +17,7 @@ import forestry.api.core.INBTTagable;
* IMultiblockComponent tile entities must wire up the methods in the "Updating and Synchronization" section.
* As a starting point, you can use MultiblockTileEntityBase.
*/
public interface IMultiblockLogic extends INBTTagable {
public interface IMultiblockLogic extends INbtWritable {
/**
* @return True if this block is connected to a multiblock controller. False otherwise.
@@ -62,7 +62,6 @@ public interface IMultiblockLogic extends INBTTagable {
* Read the logic's data from file.
* Use this in Tile.readFromNBT()
*/
@Override
void readFromNBT(NBTTagCompound nbttagcompound);
/**