Added holograms to TileMasterRitualStone and TileAltar (#810)

* Added holograms to TileMasterRitualStone and TileAltar
-Right click with either Ritual Diviner or (name pending) Sanguine Sanctum to show up the hologram
-Ritual hologram disappears once ritual is activated
-Altar hologram disappears once altar reaches specified tier
-Fixed the Sigil of Holding configs
-Someone still needs to add in a recipe for the Sigil of Holding
-Disabled the Sanguine Sanctum right-click effect for now
-Kept the hologram from holding the Ritual Diviner in hand
-Someone needs to fix the lighting for the ritual hologram!

* Getters and formatting changes

* Re-implement commented out feature

* Moved the rendering completely to client-side

Have the Sanguine Book work again

Make it actually work

Tidy things up

* Cycles through tier when right clicked

* Re put onItemUse

* Add IAltarReader to ItemSigilHolding
This commit is contained in:
Arcaratus 2016-06-21 21:20:49 -04:00 committed by Nick Ignoffo
parent ebe428a89b
commit 6a2c30834e
10 changed files with 340 additions and 50 deletions

View file

@ -2,6 +2,7 @@ package WayofTime.bloodmagic.altar;
import java.util.List;
import lombok.Getter;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -82,6 +83,9 @@ public class BloodAltar implements IFluidHandler
private AltarRecipe recipe;
private ItemStack result;
@Getter
private EnumAltarTier currentTierDisplayed = EnumAltarTier.ONE;
public BloodAltar(TileAltar tileAltar)
{
this.tileAltar = tileAltar;
@ -287,6 +291,7 @@ public class BloodAltar implements IFluidHandler
chargingFrequency = tagCompound.getInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY);
totalCharge = tagCompound.getInteger(Constants.NBT.ALTAR_TOTAL_CHARGE);
maxCharge = tagCompound.getInteger(Constants.NBT.ALTAR_MAX_CHARGE);
currentTierDisplayed = Enums.getIfPresent(EnumAltarTier.class, tagCompound.getString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED)).or(EnumAltarTier.ONE);
}
public void writeToNBT(NBTTagCompound tagCompound)
@ -330,6 +335,7 @@ public class BloodAltar implements IFluidHandler
tagCompound.setInteger(Constants.NBT.ALTAR_CHARGE_FREQUENCY, chargingFrequency);
tagCompound.setInteger(Constants.NBT.ALTAR_TOTAL_CHARGE, totalCharge);
tagCompound.setInteger(Constants.NBT.ALTAR_MAX_CHARGE, maxCharge);
tagCompound.setString(Constants.NBT.ALTAR_CURRENT_TIER_DISPLAYED, currentTierDisplayed.name());
}
public void startCycle()
@ -549,6 +555,9 @@ public class BloodAltar implements IFluidHandler
upgrade = BloodAltar.getUpgrades(tileAltar.getWorld(), tileAltar.getPos(), tier);
if (tier.equals(currentTierDisplayed))
currentTierDisplayed = EnumAltarTier.ONE;
if (tier.equals(EnumAltarTier.ONE))
{
upgrade = null;
@ -717,6 +726,15 @@ public class BloodAltar implements IFluidHandler
return bufferCapacity;
}
public boolean setCurrentTierDisplayed(EnumAltarTier altarTier)
{
if (currentTierDisplayed == altarTier)
return false;
else
currentTierDisplayed = altarTier;
return true;
}
public void addToDemonBloodDuration(int dur)
{
this.demonBloodDuration += dur;