mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-21 12:32:30 +00:00
Updated Baubles API.
This commit is contained in:
1 parent
0f012b13bf
commit
76103c8bea
5 files changed
+25
-19
No files matched your search
@@ -3,7 +3,7 @@ package fox.spiteful.forbidden;
|
||||
import java.util.*;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
@@ -367,8 +367,8 @@ public class FMEventHandler {
|
||||
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
}
|
||||
ItemStack ring = PlayerHandler.getPlayerBaubles(event.entityPlayer).getStackInSlot(1);
|
||||
ItemStack ring2 = PlayerHandler.getPlayerBaubles(event.entityPlayer).getStackInSlot(2);
|
||||
ItemStack ring = BaublesApi.getBaubles(event.entityPlayer).getStackInSlot(1);
|
||||
ItemStack ring2 = BaublesApi.getBaubles(event.entityPlayer).getStackInSlot(2);
|
||||
if((ring != null && ring.getItem() == ForbiddenItems.ringFood) || (ring2 != null && ring2.getItem() == ForbiddenItems.ringFood)){
|
||||
event.entityPlayer.getFoodStats().addStats(2, 2.0F);
|
||||
}
|
||||
@@ -434,7 +434,7 @@ public class FMEventHandler {
|
||||
public void onFeelPain(LivingHurtEvent event){
|
||||
if(!Config.noLust && event.ammount > 0 && event.entityLiving instanceof EntityPlayer){
|
||||
EntityPlayer player = (EntityPlayer)event.entityLiving;
|
||||
ItemStack amulet = PlayerHandler.getPlayerBaubles(player).getStackInSlot(0);
|
||||
ItemStack amulet = BaublesApi.getBaubles(player).getStackInSlot(0);
|
||||
if(amulet != null && amulet.getItem() == ForbiddenItems.subCollar){
|
||||
int doses = 3 * (int)event.ammount;
|
||||
if(event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package fox.spiteful.forbidden.items.baubles;
|
||||
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import baubles.api.BaublesApi;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
@@ -99,7 +99,7 @@ public class ItemSubCollar extends ItemAmuletVis {
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer sub = (EntityPlayer)entity;
|
||||
IInventory baubles = PlayerHandler.getPlayerBaubles(sub);
|
||||
IInventory baubles = BaublesApi.getBaubles(sub);
|
||||
if(baubles.getStackInSlot(0) == null) {
|
||||
if(!itemstack.hasTagCompound()){
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
||||
Reference in new issue
Block a user