mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-25 14:24:42 +00:00
Some bugfixes and improvements
This commit is contained in:
1 parent
ff405853bf
commit
f975878a32
20 files changed
+68
-51
No files matched your search
@@ -4,8 +4,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.common.Baubles;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class EventHandlerEntity {
|
||||
@@ -17,7 +17,7 @@ public class EventHandlerEntity {
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer)event.entity;
|
||||
|
||||
InventoryBaubles baubles = Baubles.instance.playerHandler.getPlayerBaubles(player);
|
||||
InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player);
|
||||
for (int a=0;a<baubles.getSizeInventory();a++) {
|
||||
if (baubles.getStackInSlot(a)!=null && baubles.getStackInSlot(a).getItem() instanceof IBauble) {
|
||||
((IBauble)baubles.getStackInSlot(a).getItem()).onWornTick(baubles.getStackInSlot(a), player);
|
||||
@@ -30,9 +30,9 @@ public class EventHandlerEntity {
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerDeath(LivingDeathEvent event) {
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
if (event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote) {
|
||||
EntityPlayer player = (EntityPlayer)event.entity;
|
||||
Baubles.instance.playerHandler.getPlayerBaubles(player).dropItems(player);
|
||||
PlayerHandler.getPlayerBaubles(player).dropItems(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user