When abilities are modified via command, save the change to disk
This commit is contained in:
parent
f58f5462c0
commit
998bd5fe3e
4 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.command;
|
||||
|
||||
import com.pahimar.ee3.api.AbilityRegistryProxy;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.command.CommandBase;
|
||||
|
@ -77,6 +78,7 @@ public class CommandSetItemLearnable extends CommandBase
|
|||
}
|
||||
|
||||
AbilityRegistryProxy.setAsLearnable(itemStack);
|
||||
AbilityRegistry.getInstance().saveAbilityRegistryToFile();
|
||||
func_152373_a(commandSender, this, Messages.Commands.SET_ITEM_LEARNABLE_SUCCESS, new Object[]{commandSender.getCommandSenderName(), itemStack.func_151000_E()});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.command;
|
||||
|
||||
import com.pahimar.ee3.api.AbilityRegistryProxy;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.command.CommandBase;
|
||||
|
@ -77,6 +78,7 @@ public class CommandSetItemNotLearnable extends CommandBase
|
|||
}
|
||||
|
||||
AbilityRegistryProxy.setAsNotLearnable(itemStack);
|
||||
AbilityRegistry.getInstance().saveAbilityRegistryToFile();
|
||||
func_152373_a(commandSender, this, Messages.Commands.SET_ITEM_NOT_LEARNABLE_SUCCESS, new Object[]{commandSender.getCommandSenderName(), itemStack.func_151000_E()});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.command;
|
||||
|
||||
import com.pahimar.ee3.api.AbilityRegistryProxy;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.command.CommandBase;
|
||||
|
@ -77,6 +78,7 @@ public class CommandSetItemNotRecoverable extends CommandBase
|
|||
}
|
||||
|
||||
AbilityRegistryProxy.setAsRecoverable(itemStack);
|
||||
AbilityRegistry.getInstance().saveAbilityRegistryToFile();
|
||||
func_152373_a(commandSender, this, Messages.Commands.SET_ITEM_NOT_RECOVERABLE_SUCCESS, new Object[]{commandSender.getCommandSenderName(), itemStack.func_151000_E()});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.pahimar.ee3.command;
|
||||
|
||||
import com.pahimar.ee3.api.AbilityRegistryProxy;
|
||||
import com.pahimar.ee3.knowledge.AbilityRegistry;
|
||||
import com.pahimar.ee3.reference.Messages;
|
||||
import com.pahimar.ee3.reference.Names;
|
||||
import net.minecraft.command.CommandBase;
|
||||
|
@ -77,6 +78,7 @@ public class CommandSetItemRecoverable extends CommandBase
|
|||
}
|
||||
|
||||
AbilityRegistryProxy.setAsRecoverable(itemStack);
|
||||
AbilityRegistry.getInstance().saveAbilityRegistryToFile();
|
||||
func_152373_a(commandSender, this, Messages.Commands.SET_ITEM_RECOVERABLE_SUCCESS, new Object[]{commandSender.getCommandSenderName(), itemStack.func_151000_E()});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue