Skip to content
Permalink
Browse files

Add onEntityJoinWorld for handlers of Capability entities

  • Loading branch information...
TheTemportalist
TheTemportalist committed May 31, 2016
1 parent 887e8d5 commit e9adb1fb4fac3f2419c15216c21feb75d9ec98bc
@@ -1,9 +1,11 @@
package temportalist.origin.foundation.common.capability

import net.minecraft.entity.Entity
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.item.{Item, ItemStack}
import net.minecraft.nbt.{NBTBase, NBTTagCompound}
import net.minecraft.util.{EnumFacing, ResourceLocation}
import net.minecraft.world.World
import net.minecraftforge.common.capabilities.Capability.IStorage
import net.minecraftforge.common.capabilities.{Capability, CapabilityManager, ICapabilityProvider, ICapabilitySerializable}
import net.minecraftforge.common.util.INBTSerializable
@@ -134,6 +136,7 @@ object ExtendedHandler {

@SubscribeEvent
final def onEntityJoinWorld(event: EntityJoinWorldEvent): Unit = {
this.onEntityJoinWorld(event.getWorld, event.getEntity)
if (event.getWorld.isRemote) return
if (this.networkMod == null) return

@@ -147,6 +150,8 @@ object ExtendedHandler {

}

def onEntityJoinWorld(world: World, entity: Entity): Unit = {}

// ~~~~~~~~~~ Capability Attaching ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@SubscribeEvent

0 comments on commit e9adb1f

Please sign in to comment.
You can’t perform that action at this time.