mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-12 16:27:37 +00:00
Fixed API dependency on non-API Botania classes.
This commit is contained in:
1 parent
2752f6f0df
commit
bbc778f6ce
2 files changed
+14
-7
No files matched your search
@@ -1,4 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "64", provides = "BotaniaAPI")
|
||||
@API(owner = "Botania", apiVersion = "65", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -30,8 +30,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
|
||||
/**
|
||||
* The basic class for a Generating Flower.
|
||||
@@ -194,15 +192,24 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
}
|
||||
|
||||
public void populateDropStackNBTs(List<ItemStack> drops) {
|
||||
if(isPassiveFlower() && ticksExisted > 0 && ConfigHandler.hardcorePassiveGeneration > 0)
|
||||
ItemNBTHelper.setInt(drops.get(0), TAG_PASSIVE_DECAY_TICKS, passiveDecayTicks);
|
||||
if(isPassiveFlower() && ticksExisted > 0 && BotaniaAPI.internalHandler.getPassiveFlowerDecay() > 0) {
|
||||
ItemStack drop = drops.get(0);
|
||||
if(drop != null) {
|
||||
if(!drop.hasTagCompound())
|
||||
drop.setTagCompound(new NBTTagCompound());
|
||||
NBTTagCompound cmp = drop.getTagCompound();
|
||||
cmp.setInteger(TAG_PASSIVE_DECAY_TICKS, passiveDecayTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, entity, stack);
|
||||
if(isPassiveFlower())
|
||||
passiveDecayTicks = ItemNBTHelper.getInt(stack, TAG_PASSIVE_DECAY_TICKS, 0);
|
||||
if(isPassiveFlower()) {
|
||||
NBTTagCompound cmp = stack.getTagCompound();
|
||||
passiveDecayTicks = cmp.getInteger(TAG_PASSIVE_DECAY_TICKS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user