mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-27 15:23:06 +00:00
Spring Cleaning (#127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
1544c1bf0d
commit
3b2b31f733
413 files changed
+9272
-17658
No files matched your search
@@ -12,20 +12,19 @@ public interface ISigil extends IBindable {
|
||||
* Toggles the state of the sigil. Returns true if the sigil is active after the toggle or false if it is inactive
|
||||
* after the toggle.
|
||||
*/
|
||||
default boolean toggleSigil(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
IBindable.setActive(par1ItemStack, !IBindable.isActive(par1ItemStack));
|
||||
default boolean toggleSigil(ItemStack item, World world, EntityPlayer player) {
|
||||
IBindable.setActive(item, !IBindable.isActive(item));
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode
|
||||
&& !EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, this.drainCost())) {
|
||||
IBindable.setActive(par1ItemStack, false);
|
||||
if (!player.capabilities.isCreativeMode && !EnergyItems.syphonBatteries(item, player, this.drainCost())) {
|
||||
IBindable.setActive(item, false);
|
||||
}
|
||||
|
||||
if (IBindable.isActive(par1ItemStack)) {
|
||||
par1ItemStack.setItemDamage(1);
|
||||
this.setDrainTick(par1ItemStack, par2World);
|
||||
if (IBindable.isActive(item)) {
|
||||
item.setItemDamage(1);
|
||||
this.setDrainTick(item, world);
|
||||
return true;
|
||||
} else {
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
item.setItemDamage(item.getMaxDamage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user