SoulTicket internal implementation (#1372)
* Fix the Blood Tank BB * Add modid to command localizations to prevent conflicts * Fixed the items not being drawn on the right Y-level for the Sigil of Holding HUD Corrected localizations of other lang files * SoulTicket internal implementation * do what TehNut says * implement hashCode() * Fix toggleable sigils draining on r-click when it shouldn't Also moved the ItemSigil and ItemSigilToggleable to the sigil package (why wasn't it there???)
This commit is contained in:
parent
093cfb13ef
commit
b441e7fc1e
56 changed files with 210 additions and 147 deletions
|
@ -98,7 +98,7 @@ public class NetworkHelper {
|
|||
* @param user - User of the item.
|
||||
* @param toSyphon - Amount of LP to syphon
|
||||
* @return - Whether the action should be performed.
|
||||
* @deprecated Use {@link #getSoulNetwork(EntityPlayer)} and {@link SoulNetwork#syphonAndDamage(EntityPlayer, SoulTicket)}
|
||||
* @deprecated Use {@link #getSoulNetwork(EntityPlayer)} and {@link SoulNetwork#syphonAndDamage$(EntityPlayer, SoulTicket)}
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean syphonAndDamage(SoulNetwork soulNetwork, EntityPlayer user, int toSyphon) {
|
||||
|
@ -116,10 +116,10 @@ public class NetworkHelper {
|
|||
* Syphons a player from within a container.
|
||||
*
|
||||
* @param stack - ItemStack in the Container.
|
||||
* @param toSyphon - Amount of LP to syphon
|
||||
* @param ticket - SoulTicket to syphon
|
||||
* @return - If the syphon was successful.
|
||||
*/
|
||||
public static boolean syphonFromContainer(ItemStack stack, int toSyphon)
|
||||
public static boolean syphonFromContainer(ItemStack stack, SoulTicket ticket)
|
||||
{
|
||||
if (!(stack.getItem() instanceof IBindable))
|
||||
return false;
|
||||
|
@ -129,9 +129,9 @@ public class NetworkHelper {
|
|||
return false;
|
||||
|
||||
SoulNetwork network = getSoulNetwork(binding);
|
||||
SoulNetworkEvent.Syphon.Item event = new SoulNetworkEvent.Syphon.Item(network, new SoulTicket(toSyphon), stack);
|
||||
SoulNetworkEvent.Syphon.Item event = new SoulNetworkEvent.Syphon.Item(network, ticket, stack);
|
||||
|
||||
return !MinecraftForge.EVENT_BUS.post(event) && network.syphon(event.getTicket(), true) >= toSyphon;
|
||||
return !MinecraftForge.EVENT_BUS.post(event) && network.syphon(event.getTicket(),true) >= ticket.getAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue