Fixed API calls.
This commit is contained in:
parent
9b7b419ec8
commit
12765e865b
4 changed files with 16 additions and 14 deletions
|
@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.api.guide;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
|
||||
|
@ -18,13 +17,13 @@ public class PageRitualMultiBlock extends PageMultiBlock
|
|||
private static ItemStack dawnStone;
|
||||
static
|
||||
{
|
||||
blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK);
|
||||
waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER);
|
||||
fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE);
|
||||
earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH);
|
||||
airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR);
|
||||
duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK);
|
||||
dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN);
|
||||
// blankStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.BLANK);
|
||||
// waterStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.WATER);
|
||||
// fireStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.FIRE);
|
||||
// earthStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.EARTH);
|
||||
// airStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.AIR);
|
||||
// duskStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DUSK);
|
||||
// dawnStone = new ItemStack(ModBlocks.ritualStone, 1, RitualComponent.DAWN);
|
||||
}
|
||||
|
||||
private PageRitualMultiBlock(ItemStack[][][] structure)
|
||||
|
@ -67,7 +66,7 @@ public class PageRitualMultiBlock extends PageMultiBlock
|
|||
tempStructure[comp.getY() - minY][comp.getX() - minX][comp.getZ() - minZ] = getStackForRitualStone(comp.getStoneType());
|
||||
}
|
||||
|
||||
tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone);
|
||||
// tempStructure[-minY][-minX][-minZ] = new ItemStack(ModBlocks.blockMasterStone);
|
||||
|
||||
return new PageRitualMultiBlock(tempStructure);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.api.sacrifice;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.spell.APISpellHelper;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
|
||||
|
@ -12,6 +12,7 @@ public class PlayerSacrificeHandler
|
|||
{
|
||||
public static float scalingOfSacrifice = 0.001f;
|
||||
public static int soulFrayDuration = 400;
|
||||
public static Potion soulFrayId;
|
||||
public static float getPlayerIncense(EntityPlayer player)
|
||||
{
|
||||
return APISpellHelper.getCurrentIncense(player);
|
||||
|
@ -40,7 +41,7 @@ public class PlayerSacrificeHandler
|
|||
|
||||
public static boolean sacrificePlayerHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
|
||||
if(player.isPotionActive(soulFrayId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -60,7 +61,7 @@ public class PlayerSacrificeHandler
|
|||
{
|
||||
player.setHealth(maxHealth/10.0f);
|
||||
setPlayerIncense(player, 0);
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, soulFrayDuration));
|
||||
player.addPotionEffect(new PotionEffect(soulFrayId.id, soulFrayDuration));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue