Skip to content

Commit

Permalink
Subtract 1 from potion effect for intuitiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
CJCrafter committed Jul 7, 2022
1 parent 439678e commit 0034140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/me/cjcrafter/armormechanics/BonusEffect.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public BonusEffect serialize(SerializeData data) throws SerializerException {
if (potionEffectType == null)
throw new SerializerOptionsException(this, "Potion Effect", Arrays.stream(PotionEffectType.values()).map(Object::toString).collect(Collectors.toList()), split[0], data.of().getLocation());

int amplifier = Integer.parseInt(split[1]);
int amplifier = Integer.parseInt(split[1]) - 1;
boolean ambient = split.length > 2 ? Boolean.parseBoolean(split[2]) : false;
boolean particles = split.length > 3 ? Boolean.parseBoolean(split[3]) : false;
boolean icon = split.length > 4 ? Boolean.parseBoolean(split[4]) : false;
Expand Down

0 comments on commit 0034140

Please # to comment.