mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-28 15:35:59 +00:00
remove out commentec code
run SA
This commit is contained in:
795 files changed
+33663
-37253
No files matched your search
@@ -4,68 +4,63 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class AlchemyPotionHelper
|
||||
{
|
||||
public class AlchemyPotionHelper {
|
||||
private int potionID;
|
||||
private int tickDuration;
|
||||
private int concentration;
|
||||
private int durationFactor;
|
||||
|
||||
public AlchemyPotionHelper(int potionID, int tickDuration, int concentration, int durationFactor)
|
||||
{
|
||||
public AlchemyPotionHelper(int potionID, int tickDuration, int concentration, int durationFactor) {
|
||||
this.potionID = potionID;
|
||||
this.tickDuration = tickDuration;
|
||||
this.concentration = concentration;
|
||||
this.durationFactor = durationFactor;
|
||||
}
|
||||
|
||||
public void setConcentration(int concentration)
|
||||
{
|
||||
public void setConcentration(int concentration) {
|
||||
this.concentration = concentration;
|
||||
}
|
||||
|
||||
public void setDurationFactor(int durationFactor)
|
||||
{
|
||||
public void setDurationFactor(int durationFactor) {
|
||||
this.durationFactor = durationFactor;
|
||||
}
|
||||
|
||||
public int getPotionID()
|
||||
{
|
||||
public int getPotionID() {
|
||||
return this.potionID;
|
||||
}
|
||||
|
||||
public int getTickDuration()
|
||||
{
|
||||
public int getTickDuration() {
|
||||
return this.tickDuration;
|
||||
}
|
||||
|
||||
public int getConcentration()
|
||||
{
|
||||
public int getConcentration() {
|
||||
return this.concentration;
|
||||
}
|
||||
|
||||
public int getdurationFactor()
|
||||
{
|
||||
public int getdurationFactor() {
|
||||
return this.durationFactor;
|
||||
}
|
||||
|
||||
public PotionEffect getPotionEffect()
|
||||
{
|
||||
if (potionID == Potion.heal.id || potionID == Potion.harm.id)
|
||||
{
|
||||
public PotionEffect getPotionEffect() {
|
||||
if (potionID == Potion.heal.id || potionID == Potion.harm.id) {
|
||||
return (new PotionEffect(potionID, 1, concentration));
|
||||
}
|
||||
|
||||
return (new PotionEffect(potionID, (int) (tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)), concentration));
|
||||
return (new PotionEffect(
|
||||
potionID,
|
||||
(int) (tickDuration * Math.pow(0.5f, concentration) * Math.pow(8.0f / 3.0f, durationFactor)),
|
||||
concentration));
|
||||
}
|
||||
|
||||
public static AlchemyPotionHelper readEffectFromNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
return new AlchemyPotionHelper(tagCompound.getInteger("potionID"), tagCompound.getInteger("tickDuration"), tagCompound.getInteger("concentration"), tagCompound.getInteger("durationFactor"));
|
||||
public static AlchemyPotionHelper readEffectFromNBT(NBTTagCompound tagCompound) {
|
||||
return new AlchemyPotionHelper(
|
||||
tagCompound.getInteger("potionID"),
|
||||
tagCompound.getInteger("tickDuration"),
|
||||
tagCompound.getInteger("concentration"),
|
||||
tagCompound.getInteger("durationFactor"));
|
||||
}
|
||||
|
||||
public static NBTTagCompound setEffectToNBT(AlchemyPotionHelper aph)
|
||||
{
|
||||
public static NBTTagCompound setEffectToNBT(AlchemyPotionHelper aph) {
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
tagCompound.setInteger("potionID", aph.getPotionID());
|
||||
tagCompound.setInteger("tickDuration", aph.getTickDuration());
|
||||
|
||||
Reference in new issue
Block a user