Added ritual range rendering

Currently WIP.
Added the ability for the selected Ritual Range to be rendered when holding the RItual Tinkerer.
Also fixed the saving issue for the ritual's Ranges.
This commit is contained in:
WayofTime 2020-11-10 12:51:20 -05:00
parent bac2af8857
commit 0e6c57076d
4 changed files with 203 additions and 20 deletions

View file

@ -31,8 +31,10 @@ import wayoftime.bloodmagic.ritual.AreaDescriptor;
import wayoftime.bloodmagic.ritual.EnumRitualReaderState;
import wayoftime.bloodmagic.ritual.IMasterRitualStone;
import wayoftime.bloodmagic.ritual.Ritual;
import wayoftime.bloodmagic.tile.TileMasterRitualStone;
import wayoftime.bloodmagic.util.ChatUtil;
import wayoftime.bloodmagic.util.Constants;
import wayoftime.bloodmagic.util.handler.event.ClientHandler;
import wayoftime.bloodmagic.util.helper.NBTHelper;
import wayoftime.bloodmagic.util.helper.TextHelper;
import wayoftime.bloodmagic.will.DemonWillHolder;
@ -148,6 +150,7 @@ public class ItemRitualReader extends Item
}
master.provideInformationOfRangeToPlayer(player, range);
break;
case SET_WILL_TYPES:
List<EnumDemonWillType> typeList = new ArrayList<>();
@ -232,6 +235,22 @@ public class ItemRitualReader extends Item
}
}
}
} else
{
EnumRitualReaderState state = this.getState(stack);
if (state == EnumRitualReaderState.SET_AREA)
{
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof TileMasterRitualStone)
{
System.out.println("Setting range holo... I think");
ClientHandler.setRitualRangeHolo((TileMasterRitualStone) tile, true);
}
}
}
return super.onItemUse(context);