Run formatter
This commit is contained in:
parent
61c44a831b
commit
08258fd6ef
606 changed files with 13464 additions and 22975 deletions
|
@ -1,9 +1,14 @@
|
|||
package WayofTime.bloodmagic.item.sigil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||
import WayofTime.bloodmagic.api.iface.IAltarReader;
|
||||
import WayofTime.bloodmagic.api.iface.ISigil;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||
import WayofTime.bloodmagic.tile.TileInversionPillar;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -14,25 +19,17 @@ import net.minecraft.util.math.RayTraceResult;
|
|||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.bloodmagic.api.altar.IBloodAltar;
|
||||
import WayofTime.bloodmagic.api.iface.IAltarReader;
|
||||
import WayofTime.bloodmagic.api.util.helper.NetworkHelper;
|
||||
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
|
||||
import WayofTime.bloodmagic.tile.TileIncenseAltar;
|
||||
import WayofTime.bloodmagic.tile.TileInversionPillar;
|
||||
import WayofTime.bloodmagic.util.ChatUtil;
|
||||
import WayofTime.bloodmagic.util.helper.NumeralHelper;
|
||||
|
||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
||||
{
|
||||
public ItemSigilDivination()
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSigilDivination extends ItemSigilBase implements IAltarReader {
|
||||
public ItemSigilDivination() {
|
||||
super("divination");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand)
|
||||
{
|
||||
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
|
||||
// if (world instanceof WorldServer)
|
||||
// {
|
||||
// System.out.println("Testing...");
|
||||
|
@ -54,42 +51,35 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
|||
if (PlayerHelper.isFakePlayer(player))
|
||||
return ActionResult.newResult(EnumActionResult.FAIL, stack);
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
if (!world.isRemote) {
|
||||
super.onItemRightClick(world, player, hand);
|
||||
|
||||
RayTraceResult position = rayTrace(world, player, false);
|
||||
|
||||
if (position == null)
|
||||
{
|
||||
if (position == null) {
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
List<ITextComponent> toSend = new ArrayList<ITextComponent>();
|
||||
if (!getOwnerName(stack).equals(PlayerHelper.getUsernameFromPlayer(player)))
|
||||
toSend.add(new TextComponentTranslation(tooltipBase + "otherNetwork", getOwnerName(stack)));
|
||||
toSend.add(new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence));
|
||||
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
||||
} else
|
||||
{
|
||||
if (position.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
} else {
|
||||
if (position.typeOfHit == RayTraceResult.Type.BLOCK) {
|
||||
TileEntity tile = world.getTileEntity(position.getBlockPos());
|
||||
|
||||
if (tile != null && tile instanceof IBloodAltar)
|
||||
{
|
||||
if (tile != null && tile instanceof IBloodAltar) {
|
||||
IBloodAltar altar = (IBloodAltar) tile;
|
||||
int tier = altar.getTier().ordinal() + 1;
|
||||
int currentEssence = altar.getCurrentBlood();
|
||||
int capacity = altar.getCapacity();
|
||||
altar.checkTier();
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentAltarTier", NumeralHelper.toRoman(tier)), new TextComponentTranslation(tooltipBase + "currentEssence", currentEssence), new TextComponentTranslation(tooltipBase + "currentAltarCapacity", capacity));
|
||||
} else if (tile != null && tile instanceof TileIncenseAltar)
|
||||
{
|
||||
} else if (tile != null && tile instanceof TileIncenseAltar) {
|
||||
TileIncenseAltar altar = (TileIncenseAltar) tile;
|
||||
altar.recheckConstruction();
|
||||
double tranquility = altar.tranquility;
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentTranquility", (int) ((100D * (int) (100 * tranquility)) / 100d)), new TextComponentTranslation(tooltipBase + "currentBonus", (int) (100 * altar.incenseAddition)));
|
||||
} else if (tile != null && tile instanceof TileInversionPillar)
|
||||
{
|
||||
} else if (tile != null && tile instanceof TileInversionPillar) {
|
||||
TileInversionPillar pillar = (TileInversionPillar) tile;
|
||||
double inversion = pillar.getCurrentInversion();
|
||||
ChatUtil.sendNoSpam(player, new TextComponentTranslation(tooltipBase + "currentInversion", ((int) (10 * inversion)) / 10d));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue