mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
API fixes.
This commit is contained in:
1 parent
b8591a977f
commit
c07884fb67
5 files changed
+16
-4
No files matched your search
@@ -127,4 +127,9 @@ public class DummyMethodHandler implements IInternalMethodHandler {
|
||||
public boolean shouldForceCheck() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPassiveFlowerDecay() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,8 @@ public interface IInternalMethodHandler {
|
||||
public IIcon getSubTileIconForName(String name);
|
||||
|
||||
public boolean shouldForceCheck();
|
||||
|
||||
public int getPassiveFlowerDecay();
|
||||
|
||||
public IInventory getBaublesInventory(EntityPlayer player);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@API(owner = "Botania", apiVersion = "17", provides = "BotaniaAPI")
|
||||
@API(owner = "Botania", apiVersion = "18", provides = "BotaniaAPI")
|
||||
package vazkii.botania.api;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
@@ -25,8 +25,6 @@ import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
|
||||
/**
|
||||
* The basic class for a Generating Flower.
|
||||
@@ -79,7 +77,9 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
++ticksExisted;
|
||||
if(isPassiveFlower() && ConfigHandler.hardcorePassiveGeneration > 0 && ticksExisted > ConfigHandler.hardcorePassiveGeneration) {
|
||||
int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay();
|
||||
|
||||
if(isPassiveFlower() && muhBalance > 0 && ticksExisted > muhBalance) {
|
||||
supertile.getWorldObj().playAuxSFX(2001, supertile.xCoord, supertile.yCoord, supertile.zCoord, Block.getIdFromBlock(supertile.getBlockType()));
|
||||
supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
}
|
||||
|
||||
@@ -138,5 +138,10 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
public boolean shouldForceCheck() {
|
||||
return ConfigHandler.flowerForceCheck;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPassiveFlowerDecay() {
|
||||
return ConfigHandler.hardcorePassiveGeneration;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user