Search in sources :

Example 11 with WizardryWorld

use of com.teamwizardry.wizardry.api.capability.world.WizardryWorld in project Wizardry by TeamWizardry.

the class WizardryNemezManager method getOrCreateNemezDrive.

public static NemezTracker getOrCreateNemezDrive(World world, UUID uuid) {
    WizardryWorld worldCap = WizardryWorldCapability.get(world);
    HashMap<UUID, NemezTracker> nemezDrives = worldCap.getEntityNemezDrives();
    if (nemezDrives.containsKey(uuid))
        return nemezDrives.get(uuid);
    return worldCap.addNemezDrive(uuid, new NemezTracker());
}
Also used : WizardryWorld(com.teamwizardry.wizardry.api.capability.world.WizardryWorld) NemezTracker(com.teamwizardry.wizardry.common.core.nemez.NemezTracker) UUID(java.util.UUID)

Aggregations

WizardryWorld (com.teamwizardry.wizardry.api.capability.world.WizardryWorld)11 NemezTracker (com.teamwizardry.wizardry.common.core.nemez.NemezTracker)6 UUID (java.util.UUID)3 Nullable (javax.annotation.Nullable)3 SpellObjectManager (com.teamwizardry.wizardry.api.SpellObjectManager)2 BlockPos (net.minecraft.util.math.BlockPos)2 World (net.minecraft.world.World)2 ILingeringModule (com.teamwizardry.wizardry.api.spell.ILingeringModule)1 EntityBackupZombie (com.teamwizardry.wizardry.common.entity.EntityBackupZombie)1 Entity (net.minecraft.entity.Entity)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 EnumFacing (net.minecraft.util.EnumFacing)1 Vec3d (net.minecraft.util.math.Vec3d)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1