update to tcon 1.5.1RC1 commits

This commit is contained in:
Progwml6 committed 2013-11-25 18:57:54 -05:00
1 parent 6a898f97d7
commit f2da066da2
42 files changed
+1262 -1045

No files matched your search

@@ -0,0 +1,27 @@
package tconstruct.plugins.minefactoryreloaded.drinkable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import powercrystals.minefactoryreloaded.api.ILiquidDrinkHandler;
public class Drinkables implements ILiquidDrinkHandler
{
@Override
public void onDrink (EntityPlayer player)
{
//boost health when drink
if (player != null)
{
PotionEffect potion = player.getActivePotionEffect(Potion.field_76434_w);
int duration = 0;
if (potion != null)
duration = potion.duration;
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0));
}
}
}
@@ -2,6 +2,7 @@ package tconstruct.plugins.minefactoryreloaded;
import powercrystals.minefactoryreloaded.api.FactoryRegistry;
import tconstruct.common.TContent;
import tconstruct.plugins.minefactoryreloaded.drinkable.Drinkables;
import tconstruct.plugins.minefactoryreloaded.harvestables.GrindableHorse;
import tconstruct.plugins.minefactoryreloaded.harvestables.HarvestableOreBerry;
@@ -12,5 +13,6 @@ public class mfrRegistering
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerry.blockID, TContent.oreBerries.itemID, 0));
FactoryRegistry.registerHarvestable(new HarvestableOreBerry(TContent.oreBerrySecond.blockID, TContent.oreBerries.itemID, 4));
FactoryRegistry.registerGrindable(new GrindableHorse());
FactoryRegistry.registerLiquidDrinkHandler(TContent.bloodFluid.getName(), new Drinkables());
}
}