Fixed Blood Light particles being purple. Added ability for the Divination Sigil to look at information of the incense altar
This commit is contained in:
parent
690cf6c4f3
commit
820418558e
5 changed files with 31 additions and 16 deletions
|
@ -8,6 +8,7 @@ import java.util.Map.Entry;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -27,6 +28,7 @@ public class TileIncenseAltar extends TileInventory implements ITickable
|
|||
public Map<EnumTranquilityType, Double> tranquilityMap = new HashMap<EnumTranquilityType, Double>();
|
||||
|
||||
public double incenseAddition = 0; //Self-sacrifice is multiplied by 1 plus this value.
|
||||
public double tranquility = 0;
|
||||
public int roadDistance = 0; //Number of road blocks laid down
|
||||
|
||||
public TileIncenseAltar()
|
||||
|
@ -55,6 +57,22 @@ public class TileIncenseAltar extends TileInventory implements ITickable
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tag)
|
||||
{
|
||||
super.readFromNBT(tag);
|
||||
tranquility = tag.getDouble("tranquility");
|
||||
incenseAddition = tag.getDouble("incenseAddition");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tag)
|
||||
{
|
||||
super.writeToNBT(tag);
|
||||
tag.setDouble("tranquility", tranquility);
|
||||
tag.setDouble("incenseAddition", incenseAddition);
|
||||
}
|
||||
|
||||
public void recheckConstruction()
|
||||
{
|
||||
//TODO: Check the physical construction of the incense altar to determine the maximum length.
|
||||
|
@ -151,10 +169,8 @@ public class TileIncenseAltar extends TileInventory implements ITickable
|
|||
appliedTranquility += Math.sqrt(entry.getValue());
|
||||
}
|
||||
|
||||
// System.out.println("Tranquility: " + appliedTranquility);
|
||||
|
||||
double bonus = IncenseAltarHandler.getIncenseBonusFromComponents(worldObj, pos, appliedTranquility, roadDistance);
|
||||
// System.out.println("Incense bonus: " + bonus);
|
||||
incenseAddition = bonus;
|
||||
this.tranquility = appliedTranquility;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue