More work

This commit is contained in:
Vincent Lee committed 2020-06-26 11:27:05 -05:00
1 parent 17ccb624f8
commit 2fc16d628d
72 files changed
+347 -297

No files matched your search

@@ -57,7 +57,6 @@ public class ItemBrewBase extends Item implements IBrewItem {
this.swigs = swigs;
this.drinkSpeed = drinkSpeed;
this.baseItem = baseItem;
addPropertyOverride(new ResourceLocation(LibMisc.MOD_ID, "swigs_taken"), (stack, world, entity) -> swigs - getSwigsLeft(stack));
}
@Override
@@ -211,6 +210,10 @@ public class ItemBrewBase extends Item implements IBrewItem {
return stack.hasTag() ? ItemNBTHelper.getString(stack, TAG_BREW_KEY, "none") : "none";
}
public int getSwigs() {
return swigs;
}
public int getSwigsLeft(ItemStack stack) {
return ItemNBTHelper.getInt(stack, TAG_SWIGS_LEFT, swigs);
}