This commit is contained in:
walrus 2025-01-20 17:39:40 -05:00
parent b09a06ec66
commit dad63f04d6

View File

@ -19,7 +19,6 @@ public class FactionItemRepair extends AbstractNode {
Date date = new Date(); Date date = new Date();
int repairTier = -1; int repairTier = -1;
int tempValue = 0; int tempValue = 0;
FactionManager utilFactionManager = new FactionManager();
@Override @Override
public String GetNodeTitle() { public String GetNodeTitle() {
@ -45,7 +44,7 @@ public class FactionItemRepair extends AbstractNode {
public void RepairInventory(ServerPlayerEntity player) { public void RepairInventory(ServerPlayerEntity player) {
//probably will end up using this List<DefaultedList<ItemStack>> combinedInventory; from PlayerInventory //probably will end up using this List<DefaultedList<ItemStack>> combinedInventory; from PlayerInventory
//PlayerInventory playerInv = player.getInventory();// main is all your inventory you can see exluding your off hand and armor i think //PlayerInventory playerInv = player.getInventory();// main is all your inventory you can see exluding your off hand and armor i think
switch (utilFactionManager.GetFactionPower(player)) {//should be the faction power switch (FactionManager.GetInstance().GetFactionTier(FactionManager.GetInstance().GetFactionOfPlayer(player.getUuidAsString()))) {//should be the faction power
case 0: case 0:
repairTier = -1; repairTier = -1;
break; break;
@ -96,7 +95,7 @@ public class FactionItemRepair extends AbstractNode {
@Override @Override
public void RegisterCallbacks() { public void RegisterCallbacks() {
PlayerInBaseCallback.EVENT.register((player, world, power) -> { PlayerInBaseCallback.EVENT.register((player, world, power, tier) -> {
/* DO STUFF - REMEMBER: This function is called EVERY tick a player is inside the base! That's EVERY tick*/ /* DO STUFF - REMEMBER: This function is called EVERY tick a player is inside the base! That's EVERY tick*/
if (resetTimer) { if (resetTimer) {