Added Pam's Harvestcraft support as well as a bit of stuff to help with ritual activation/deactivation.
This commit is contained in:
parent
5983ff4130
commit
dcecd05b85
11 changed files with 316 additions and 34 deletions
|
@ -12,7 +12,6 @@ public class HarvestRegistry
|
|||
|
||||
public static void registerHarvestHandler(IHarvestHandler handler)
|
||||
{
|
||||
System.out.println("Heeeeelllooooo");
|
||||
handlerList.add(handler);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package WayofTime.alchemicalWizardry.api.rituals;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
|
@ -9,6 +10,16 @@ import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
|||
public abstract class RitualEffect
|
||||
{
|
||||
public abstract void performEffect(IMasterRitualStone ritualStone);
|
||||
|
||||
public boolean startRitual(IMasterRitualStone ritualStone, EntityPlayer player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onRitualBroken(IMasterRitualStone ritualStone)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public abstract int getCostPerRefresh();
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.MRSRenderer;
|
||||
|
||||
|
@ -309,6 +310,32 @@ public class Rituals
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean startRitual(IMasterRitualStone ritualStone, String ritualID, EntityPlayer player)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
{
|
||||
return ritual.effect.startRitual(ritualStone, player);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void onRitualBroken(IMasterRitualStone ritualStone, String ritualID)
|
||||
{
|
||||
if(ritualMap.containsKey(ritualID))
|
||||
{
|
||||
Rituals ritual = ritualMap.get(ritualID);
|
||||
if(ritual != null && ritual.effect != null)
|
||||
{
|
||||
ritual.effect.onRitualBroken(ritualStone);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int getNumberOfRituals()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.api.soulNetwork;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -10,8 +11,25 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
public class SoulNetworkHandler
|
||||
{
|
||||
public static UUID getUUIDFromPlayer(EntityPlayer player)
|
||||
{
|
||||
return player.getPersistentID();
|
||||
}
|
||||
|
||||
public static EntityPlayer getPlayerFromUUID(UUID uuid)
|
||||
{
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
GameProfile gameProfile;
|
||||
gameProfile = server.func_152358_ax().func_152652_a(uuid);
|
||||
// LogHelper.info("player is " + gameProfile.getName() + " : " + gameProfile.getId());
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(ItemStack ist, int damageToBeDone)
|
||||
{
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue