Search in sources :

Example 1 with LocalStorageAlphaPact

use of WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact in project BloodMagic by WayofTime.

the class EntityMinorDemonGrunt method onUpdate.

/**
 * Called to update the entity's position/logic.
 */
@Override
public void onUpdate() {
    if (!this.enthralled) {
        TileEntity tile = this.worldObj.getTileEntity(this.demonPortal.xCoord, this.demonPortal.yCoord, this.demonPortal.zCoord);
        if (tile instanceof TEDemonPortal) {
            ((TEDemonPortal) tile).enthrallDemon(this);
            this.enthralled = true;
        } else if (tile instanceof IMasterRitualStone) {
            IMasterRitualStone stone = (IMasterRitualStone) tile;
            LocalRitualStorage stor = stone.getLocalStorage();
            if (stor instanceof LocalStorageAlphaPact) {
                LocalStorageAlphaPact storage = (LocalStorageAlphaPact) stor;
                storage.thrallDemon(this);
            }
        }
    }
    super.onUpdate();
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) LocalRitualStorage(WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage) TEDemonPortal(WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal) IMasterRitualStone(WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone) LocalStorageAlphaPact(WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact)

Aggregations

IMasterRitualStone (WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone)1 LocalRitualStorage (WayofTime.alchemicalWizardry.api.rituals.LocalRitualStorage)1 TEDemonPortal (WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal)1 LocalStorageAlphaPact (WayofTime.alchemicalWizardry.common.rituals.LocalStorageAlphaPact)1 TileEntity (net.minecraft.tileentity.TileEntity)1