More things!

This commit is contained in:
MysteriousAges committed 2013-05-23 21:07:49 -07:00
1 parent 6ae6a8afc0
commit bc596ee3a6
83 files changed

No files matched your search

@@ -0,0 +1,87 @@
package magicbees.bees;
import net.minecraft.nbt.NBTTagCompound;
import forestry.api.genetics.IEffectData;
public class EffectData implements IEffectData
{
private int[] intData;
private boolean[] boolData;
private float[] floatData;
public EffectData(int intCount, int boolCount, int floatCount)
{
this.intData = new int[intCount];
this.boolData = new boolean[boolCount];
this.floatData = new float[floatCount];
}
@Override
public void readFromNBT(NBTTagCompound nbttagcompound)
{ }
@Override
public void writeToNBT(NBTTagCompound nbttagcompound)
{ }
@Override
public void setInteger(int index, int val)
{
if (index >= 0 && index < this.intData.length)
{
this.intData[index] = val;
}
}
@Override
public void setFloat(int index, float val)
{
if (index >= 0 && index < this.floatData.length)
{
this.floatData[index] = val;
}
}
@Override
public void setBoolean(int index, boolean val)
{
if (index >= 0 && index < this.boolData.length)
{
this.boolData[index] = val;
}
}
@Override
public int getInteger(int index)
{
int val = 0;
if (index >= 0 && index < this.intData.length)
{
val = this.intData[index];
}
return val;
}
@Override
public float getFloat(int index)
{
float val = 0f;
if (index >= 0 && index < this.intData.length)
{
val = this.floatData[index];
}
return val;
}
@Override
public boolean getBoolean(int index)
{
boolean val = false;
if (index >= 0 && index < this.intData.length)
{
val = this.boolData[index];
}
return val;
}
}