Creation of 1.16.3 branch

Initial publishing of the 1.16.3 branch of the mod. A lot of systems are missing (such as Rituals and Living Armour), but enough is present for a decent Alpha release.
This commit is contained in:
WayofTime 2020-10-24 08:59:04 -04:00
parent 0e02b983f1
commit d617911d7a
1662 changed files with 18791 additions and 85075 deletions

View file

@ -1,26 +1,30 @@
package WayofTime.bloodmagic.iface;
import WayofTime.bloodmagic.util.Constants;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
package wayoftime.bloodmagic.iface;
import javax.annotation.Nonnull;
public interface IActivatable {
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import wayoftime.bloodmagic.util.Constants;
default boolean getActivated(ItemStack stack) {
return !stack.isEmpty() && stack.hasTagCompound() && stack.getTagCompound().getBoolean(Constants.NBT.ACTIVATED);
}
public interface IActivatable
{
@Nonnull
default ItemStack setActivatedState(ItemStack stack, boolean activated) {
if (!stack.isEmpty()) {
if (!stack.hasTagCompound())
stack.setTagCompound(new CompoundNBT());
default boolean getActivated(ItemStack stack)
{
return !stack.isEmpty() && stack.hasTag() && stack.getTag().getBoolean(Constants.NBT.ACTIVATED);
}
stack.getTagCompound().setBoolean(Constants.NBT.ACTIVATED, activated);
}
@Nonnull
default ItemStack setActivatedState(ItemStack stack, boolean activated)
{
if (!stack.isEmpty())
{
if (!stack.hasTag())
stack.setTag(new CompoundNBT());
return stack;
}
}
stack.getTag().putBoolean(Constants.NBT.ACTIVATED, activated);
}
return stack;
}
}