Skip to content

Commit

Permalink
Refactor identifiers & fixes (#7)
Browse files Browse the repository at this point in the history
* Refactor identifiers & fixes

* Fix build error
  • Loading branch information
Kazzuk authored Aug 13, 2021
1 parent 26a8245 commit 1c27a06
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 106 deletions.
46 changes: 22 additions & 24 deletions src/main/java/org/cloudburstmc/api/potion/EffectTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,33 @@

@UtilityClass
public class EffectTypes {

public final static EffectType SWIFTNESS = new EffectType(Identifiers.SPEED, Vector3i.from(124, 175, 198));
public final static EffectType SLOWNESS = new EffectType(Identifiers.SLOWNESS, Vector3i.from(90, 108, 129), true);
public final static EffectType ABSORPTION = new EffectType(Identifiers.ABSORPTION, Vector3i.from(37, 82, 165));
public final static EffectType BAD_OMEN = new EffectType(Identifiers.BAD_OMEN, Vector3i.from(11, 97, 56));
public final static EffectType BLINDNESS = new EffectType(Identifiers.BLINDNESS, Vector3i.from(31, 31, 35), true);
public final static EffectType CONDUIT_POWER = new EffectType(Identifiers.CONDUIT_POWER, Vector3i.from(29, 194, 209));
public final static EffectType FATAL_POISON = new EffectType(Identifiers.FATAL_POISON, Vector3i.from(78, 147, 49), true);
public final static EffectType FIRE_RESISTANCE = new EffectType(Identifiers.FIRE_RESISTANCE, Vector3i.from(228, 154, 58));
public final static EffectType HASTE = new EffectType(Identifiers.HASTE, Vector3i.from(217, 192, 67));
public final static EffectType MINING_FATIGUE = new EffectType(Identifiers.MINING_FATIGUE, Vector3i.from(74, 66, 23), true);
public final static EffectType STRENGTH = new EffectType(Identifiers.STRENGTH, Vector3i.from(147, 36, 35));
public final static EffectType HEALING = new EffectType(Identifiers.HEALING, Vector3i.from(248, 36, 35));
public final static EffectType HARMING = new EffectType(Identifiers.HARMING, Vector3i.from(67, 10, 9), true);
public final static EffectType HEALTH_BOOST = new EffectType(Identifiers.HEALTH_BOOST, Vector3i.from(248, 125, 35));
public final static EffectType HUNGER = new EffectType(Identifiers.HUNGER, Vector3i.from(88, 118, 83), true);
public final static EffectType INSTANT_DAMAGE = new EffectType(Identifiers.INSTANT_DAMAGE, Vector3i.from(67, 10, 9), true);
public final static EffectType INSTANT_HEALTH = new EffectType(Identifiers.INSTANT_HEALTH, Vector3i.from(248, 36, 35));
public final static EffectType INVISIBILITY = new EffectType(Identifiers.INVISIBILITY, Vector3i.from(127, 131, 146));
public final static EffectType JUMP_BOOST = new EffectType(Identifiers.JUMP_BOOST, Vector3i.from(34, 255, 76));
public final static EffectType LEVITATION = new EffectType(Identifiers.LEVITATION, Vector3i.from(206, 255, 255), true);
public final static EffectType MINING_FATIGUE = new EffectType(Identifiers.MINING_FATIGUE, Vector3i.from(74, 66, 23), true);
public final static EffectType NAUSEA = new EffectType(Identifiers.NAUSEA, Vector3i.from(85, 29, 74), true);
public final static EffectType NIGHT_VISION = new EffectType(Identifiers.NIGHT_VISION, Vector3i.from(31, 31, 161));
public final static EffectType POISON = new EffectType(Identifiers.POISON, Vector3i.from(78, 147, 49), true);
public final static EffectType REGENERATION = new EffectType(Identifiers.REGENERATION, Vector3i.from(205, 92, 171));
public final static EffectType DAMAGE_RESISTANCE = new EffectType(Identifiers.DAMAGE_RESISTANCE, Vector3i.from(153, 69, 58));
public final static EffectType FIRE_RESISTANCE = new EffectType(Identifiers.FIRE_RESISTANCE, Vector3i.from(228, 157, 58));
public final static EffectType RESISTANCE = new EffectType(Identifiers.RESISTANCE, Vector3i.from(153, 69, 58));
public final static EffectType SATURATION = new EffectType(Identifiers.SATURATION, Vector3i.from(248, 36, 33));
public final static EffectType SLOW_FALLING = new EffectType(Identifiers.SLOW_FALLING, Vector3i.from(247, 248, 224));
public final static EffectType SLOWNESS = new EffectType(Identifiers.SLOWNESS, Vector3i.from(90, 108, 129), true);
public final static EffectType SPEED = new EffectType(Identifiers.SPEED, Vector3i.from(124, 175, 198));
public final static EffectType STRENGTH = new EffectType(Identifiers.STRENGTH, Vector3i.from(147, 36, 35));
public final static EffectType VILLAGE_HERO = new EffectType(Identifiers.VILLAGE_HERO, Vector3i.from(0, 0, 0));
public final static EffectType WATER_BREATHING = new EffectType(Identifiers.WATER_BREATHING, Vector3i.from(46, 82, 153));
public final static EffectType INVISIBILITY = new EffectType(Identifiers.INVISIBILITY, Vector3i.from(127, 131, 146));
public final static EffectType BLINDNESS = new EffectType(Identifiers.BLINDNESS, Vector3i.from(191, 192, 192));
public final static EffectType NIGHT_VISION = new EffectType(Identifiers.NIGHT_VISION, Vector3i.from(0, 0, 139));
public final static EffectType HUNGER = new EffectType(Identifiers.HUNGER, Vector3i.from(46, 139, 87));
public final static EffectType WEAKNESS = new EffectType(Identifiers.WEAKNESS, Vector3i.from(72, 77, 72), true);
public final static EffectType POISON = new EffectType(Identifiers.POISON, Vector3i.from(78, 147, 49), true);
public final static EffectType WITHER = new EffectType(Identifiers.WITHER, Vector3i.from(53, 42, 39), true);
public final static EffectType HEALTH_BOOST = new EffectType(Identifiers.HEALTH_BOOST, Vector3i.from(248, 125, 35));
public final static EffectType ABSORPTION = new EffectType(Identifiers.ABSORPTION, Vector3i.from(36, 107, 251));
public final static EffectType SATURATION = new EffectType(Identifiers.SATURATION, Vector3i.from(255, 0, 255));
public final static EffectType LEVITATION = new EffectType(Identifiers.LEVITATION, Vector3i.from(206, 255, 255));
public final static EffectType FATAL_POISON = new EffectType(Identifiers.FATAL_POISON, Vector3i.from(78, 147, 49), true);
public final static EffectType CONDUIT_POWER = new EffectType(Identifiers.CONDUIT_POWER, Vector3i.from(29, 194, 209));
public final static EffectType SLOW_FALLING = new EffectType(Identifiers.SLOW_FALLING, Vector3i.from(206, 255, 255));
public final static EffectType BAD_OMEN = new EffectType(Identifiers.BAD_OMEN, Vector3i.from(11, 97, 56));
public final static EffectType HERO_OF_THE_VILLAGE = new EffectType(Identifiers.HERO_OF_THE_VILLAGE, Vector3i.from(0, 0, 0));

}
73 changes: 37 additions & 36 deletions src/main/java/org/cloudburstmc/api/potion/PotionTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,47 @@

@UtilityClass
public class PotionTypes {
public static final PotionType WATER = PotionType.builder().potionId(Identifiers.POTION_WATER).level(1).build();
public static final PotionType MUNDANE = PotionType.builder().potionId(Identifiers.POTION_MUNDANE).level(1).build();
public static final PotionType MUNDANE_II = PotionType.builder().potionId(Identifiers.POTION_MUNDANE_II).level(2).build();
public static final PotionType THICK = PotionType.builder().potionId(Identifiers.POTION_THICK).level(1).build();
public static final PotionType AWKWARD = PotionType.builder().potionId(Identifiers.POTION_AWKWARD).level(1).build();
public static final PotionType NIGHT_VISION = PotionType.builder().potionId(Identifiers.POTION_NIGHT_VISION).type(EffectTypes.NIGHT_VISION).level(1).duration(180).build();
public static final PotionType NIGHT_VISION_LONG = PotionType.builder().potionId(Identifiers.POTION_NIGHT_VISION_LONG).type(EffectTypes.NIGHT_VISION).level(1).duration(480).build();
public static final PotionType INVISIBLE = PotionType.builder().potionId(Identifiers.POTION_INVISIBLE).type(EffectTypes.INVISIBILITY).level(1).duration(180).build();
public static final PotionType INVISIBLE_LONG = PotionType.builder().potionId(Identifiers.POTION_INVISIBLE_LONG).type(EffectTypes.INVISIBILITY).level(1).duration(480).build();
public static final PotionType LEAPING = PotionType.builder().potionId(Identifiers.POTION_LEAPING).type(EffectTypes.JUMP_BOOST).level(1).duration(180).build();
public static final PotionType LEAPING_LONG = PotionType.builder().potionId(Identifiers.POTION_LEAPING_LONG).type(EffectTypes.JUMP_BOOST).level(1).duration(480).build();
public static final PotionType LEAPING_II = PotionType.builder().potionId(Identifiers.POTION_LEAPING_II).type(EffectTypes.JUMP_BOOST).level(2).duration(90).build();
public static final PotionType FIRE_RESISTANCE = PotionType.builder().potionId(Identifiers.POTION_FiRE_RESISTANCE).type(EffectTypes.FIRE_RESISTANCE).level(1).duration(180).build();
public static final PotionType FIRE_RESISTANCE_LONG = PotionType.builder().potionId(Identifiers.POTION_FIRE_RESISTANCE_LONG).type(EffectTypes.FIRE_RESISTANCE).duration(480).level(1).build();
public static final PotionType SPEED = PotionType.builder().potionId(Identifiers.POTION_SPEED).type(EffectTypes.SWIFTNESS).level(1).duration(180).build();
public static final PotionType SPEED_LONG = PotionType.builder().potionId(Identifiers.POTION_SPEED_LONG).type(EffectTypes.SWIFTNESS).level(1).duration(480).build();
public static final PotionType SPEED_II = PotionType.builder().potionId(Identifiers.POTION_SPEED_II).type(EffectTypes.SWIFTNESS).level(2).duration(480).build();
public static final PotionType SLOWNESS = PotionType.builder().potionId(Identifiers.POTION_SLOWNESS).type(EffectTypes.SLOWNESS).level(1).duration(90).build();
public static final PotionType SLOWNESS_LONG = PotionType.builder().potionId(Identifiers.POTION_SLOWNESS_LONG).type(EffectTypes.SLOWNESS).level(1).duration(240).build();
public static final PotionType WATER_BREATHING = PotionType.builder().potionId(Identifiers.POTION_WATER_BREATHING).type(EffectTypes.WATER_BREATHING).level(1).duration(180).build();
public static final PotionType WATER_BREATHING_LONG = PotionType.builder().potionId(Identifiers.POTION_WATER_BREATHING_LONG).type(EffectTypes.WATER_BREATHING).level(1).duration(480).build();
public static final PotionType INSTANT_HEALTH = PotionType.builder().potionId(Identifiers.POTION_INSTANT_HEALTH).type(EffectTypes.HEALING).level(1).instant(true).build();
public static final PotionType INSTANT_HEALTH_II = PotionType.builder().potionId(Identifiers.POTION_INSTANT_HEALTH_II).type(EffectTypes.HEALING).level(2).instant(true).build();
public static final PotionType HARMING = PotionType.builder().potionId(Identifiers.POTION_HARMING).type(EffectTypes.HARMING).level(1).instant(true).build();
public static final PotionType HARMING_II = PotionType.builder().potionId(Identifiers.POTION_HARMING_II).type(EffectTypes.HARMING).level(2).instant(true).build();
public static final PotionType HARMING = PotionType.builder().potionId(Identifiers.POTION_HARMING).type(EffectTypes.INSTANT_DAMAGE).level(1).instant(true).build();
public static final PotionType HEALING = PotionType.builder().potionId(Identifiers.POTION_HEALING).type(EffectTypes.INSTANT_HEALTH).level(1).instant(true).build();
public static final PotionType INVISIBILITY = PotionType.builder().potionId(Identifiers.POTION_INVISIBILITY).type(EffectTypes.INVISIBILITY).level(1).duration(180).build();
public static final PotionType LEAPING = PotionType.builder().potionId(Identifiers.POTION_LEAPING).type(EffectTypes.JUMP_BOOST).level(1).duration(180).build();
public static final PotionType LONG_FIRE_RESISTANCE = PotionType.builder().potionId(Identifiers.POTION_LONG_FIRE_RESISTANCE).type(EffectTypes.FIRE_RESISTANCE).duration(480).level(1).build();
public static final PotionType LONG_INVISIBILITY = PotionType.builder().potionId(Identifiers.POTION_LONG_INVISIBILITY).type(EffectTypes.INVISIBILITY).level(1).duration(480).build();
public static final PotionType LONG_LEAPING = PotionType.builder().potionId(Identifiers.POTION_LONG_LEAPING).type(EffectTypes.JUMP_BOOST).level(1).duration(480).build();
public static final PotionType LONG_MUNDANE = PotionType.builder().potionId(Identifiers.POTION_LONG_MUNDANE).level(1).build();
public static final PotionType LONG_NIGHT_VISION = PotionType.builder().potionId(Identifiers.POTION_LONG_NIGHT_VISION).type(EffectTypes.NIGHT_VISION).level(1).duration(480).build();
public static final PotionType LONG_POISON = PotionType.builder().potionId(Identifiers.POTION_LONG_POISON).type(EffectTypes.POISON).level(1).duration(120).build();
public static final PotionType LONG_REGENERATION = PotionType.builder().potionId(Identifiers.POTION_LONG_REGENERATION).type(EffectTypes.REGENERATION).level(1).duration(120).build();
public static final PotionType LONG_SLOW_FALLING = PotionType.builder().potionId(Identifiers.POTION_LONG_SLOW_FALLING).type(EffectTypes.SLOW_FALLING).level(1).duration(240).build();
public static final PotionType LONG_SLOWNESS = PotionType.builder().potionId(Identifiers.POTION_LONG_SLOWNESS).type(EffectTypes.SLOWNESS).level(1).duration(240).build();
public static final PotionType LONG_STRENGTH = PotionType.builder().potionId(Identifiers.POTION_LONG_STRENGTH).type(EffectTypes.STRENGTH).level(1).duration(480).build();
public static final PotionType LONG_SWIFTNESS = PotionType.builder().potionId(Identifiers.POTION_LONG_SWIFTNESS).type(EffectTypes.SPEED).level(1).duration(480).build();
public static final PotionType LONG_TURTLE_MASTER = PotionType.builder().potionId(Identifiers.POTION_LONG_TURTLE_MASTER).type(EffectTypes.RESISTANCE).level(1).duration(480).build(); // TODO: Multiple effects
public static final PotionType LONG_WATER_BREATHING = PotionType.builder().potionId(Identifiers.POTION_LONG_WATER_BREATHING).type(EffectTypes.WATER_BREATHING).level(1).duration(480).build();
public static final PotionType LONG_WEAKNESS = PotionType.builder().potionId(Identifiers.POTION_LONG_WEAKNESS).type(EffectTypes.WEAKNESS).level(1).duration(240).build();
public static final PotionType MUNDANE = PotionType.builder().potionId(Identifiers.POTION_MUNDANE).level(1).build();
public static final PotionType NIGHT_VISION = PotionType.builder().potionId(Identifiers.POTION_NIGHT_VISION).type(EffectTypes.NIGHT_VISION).level(1).duration(180).build();
public static final PotionType POISON = PotionType.builder().potionId(Identifiers.POTION_POISON).type(EffectTypes.POISON).level(1).duration(45).build();
public static final PotionType POISON_LONG = PotionType.builder().potionId(Identifiers.POTION_POISON_LONG).type(EffectTypes.POISON).level(1).duration(120).build();
public static final PotionType POISON_II = PotionType.builder().potionId(Identifiers.POTION_POISON_II).type(EffectTypes.POISON).level(2).duration(22).build();
public static final PotionType REGENERATION = PotionType.builder().potionId(Identifiers.POTION_REGENERATION).type(EffectTypes.REGENERATION).level(1).duration(45).build();
public static final PotionType REGENERATION_LONG = PotionType.builder().potionId(Identifiers.POTION_REGENERATION_LONG).type(EffectTypes.REGENERATION).level(1).duration(120).build();
public static final PotionType REGENERATION_II = PotionType.builder().potionId(Identifiers.POTION_REGENERATION_II).type(EffectTypes.REGENERATION).level(2).duration(22).build();
public static final PotionType SLOW_FALLING = PotionType.builder().potionId(Identifiers.POTION_SLOW_FALLING).type(EffectTypes.SLOW_FALLING).level(1).duration(90).build();
public static final PotionType SLOWNESS = PotionType.builder().potionId(Identifiers.POTION_SLOWNESS).type(EffectTypes.SLOWNESS).level(1).duration(90).build();
public static final PotionType STRENGTH = PotionType.builder().potionId(Identifiers.POTION_STRENGTH).type(EffectTypes.STRENGTH).level(1).duration(180).build();
public static final PotionType STRENGTH_LONG = PotionType.builder().potionId(Identifiers.POTION_STRENGTH_LONG).type(EffectTypes.STRENGTH).level(1).duration(480).build();
public static final PotionType STRENGTH_II = PotionType.builder().potionId(Identifiers.POTION_STRENGTH_II).type(EffectTypes.STRENGTH).level(2).duration(90).build();
public static final PotionType STRONG_HARMING = PotionType.builder().potionId(Identifiers.POTION_STRONG_HARMING).type(EffectTypes.INSTANT_DAMAGE).level(2).instant(true).build();
public static final PotionType STRONG_HEALING = PotionType.builder().potionId(Identifiers.POTION_STRONG_HEALING).type(EffectTypes.INSTANT_HEALTH).level(2).instant(true).build();
public static final PotionType STRONG_LEAPING = PotionType.builder().potionId(Identifiers.POTION_STRONG_LEAPING).type(EffectTypes.JUMP_BOOST).level(2).duration(90).build();
public static final PotionType STRONG_POISON = PotionType.builder().potionId(Identifiers.POTION_STRONG_POISON).type(EffectTypes.POISON).level(2).duration(22).build();
public static final PotionType STRONG_REGENERATION = PotionType.builder().potionId(Identifiers.POTION_STRONG_REGENERATION).type(EffectTypes.REGENERATION).level(2).duration(22).build();
public static final PotionType STRONG_SLOWNESS = PotionType.builder().potionId(Identifiers.POTION_STRONG_SLOWNESS).type(EffectTypes.SLOWNESS).level(2).duration(20).build();
public static final PotionType STRONG_STRENGTH = PotionType.builder().potionId(Identifiers.POTION_STRONG_STRENGTH).type(EffectTypes.STRENGTH).level(2).duration(90).build();
public static final PotionType STRONG_SWIFTNESS = PotionType.builder().potionId(Identifiers.POTION_STRONG_SWIFTNESS).type(EffectTypes.SPEED).level(2).duration(90).build();
public static final PotionType STRONG_TURTLE_MASTER = PotionType.builder().potionId(Identifiers.POTION_STRONG_TURTLE_MASTER).type(EffectTypes.RESISTANCE).level(2).duration(90).build(); // TODO: Multiple effects
public static final PotionType SWIFTNESS = PotionType.builder().potionId(Identifiers.POTION_SWIFTNESS).type(EffectTypes.SPEED).level(1).duration(180).build();
public static final PotionType THICK = PotionType.builder().potionId(Identifiers.POTION_THICK).level(1).build();
public static final PotionType TURTLE_MASTER = PotionType.builder().potionId(Identifiers.POTION_TURTLE_MASTER).type(EffectTypes.RESISTANCE).level(1).duration(120).build(); // TODO: Multiple effects
public static final PotionType WATER = PotionType.builder().potionId(Identifiers.POTION_WATER).level(1).build();
public static final PotionType WATER_BREATHING = PotionType.builder().potionId(Identifiers.POTION_WATER_BREATHING).type(EffectTypes.WATER_BREATHING).level(1).duration(180).build();
public static final PotionType WEAKNESS = PotionType.builder().potionId(Identifiers.POTION_WEAKNESS).type(EffectTypes.WEAKNESS).level(1).duration(90).build();
public static final PotionType WEAKNESS_LONG = PotionType.builder().potionId(Identifiers.POTION_WEAKNESS_LONG).type(EffectTypes.WEAKNESS).level(1).duration(240).build();
public static final PotionType DECAY = PotionType.builder().potionId(Identifiers.POTION_DECAY).type(EffectTypes.WITHER).level(2).duration(30).build();
public static final PotionType TURTLE_MASTER = PotionType.builder().potionId(Identifiers.POTION_TURTLE_MASTER).type(EffectTypes.DAMAGE_RESISTANCE).level(1).duration(120).build(); // todo multiple effects
public static final PotionType TURTLE_MASTER_LONG = PotionType.builder().potionId(Identifiers.POTION_TURTLE_MASTER_LONG).type(EffectTypes.DAMAGE_RESISTANCE).level(1).duration(480).build();
public static final PotionType TURTLE_MASTER_II = PotionType.builder().potionId(Identifiers.POTION_TURTLE_MASTER_II).type(EffectTypes.DAMAGE_RESISTANCE).level(2).duration(90).build();
public static final PotionType SLOW_FALLING = PotionType.builder().potionId(Identifiers.POTION_SLOW_FALLING).type(EffectTypes.SLOW_FALLING).level(1).duration(120).build();
public static final PotionType SLOW_FALLING_LONG = PotionType.builder().potionId(Identifiers.POTION_SLOW_FALLING_LONG).type(EffectTypes.SLOW_FALLING).level(1).duration(480).build();
public static final PotionType WITHER = PotionType.builder().potionId(Identifiers.POTION_WITHER).type(EffectTypes.WITHER).level(1).duration(40).build();
}
Loading

0 comments on commit 1c27a06

Please sign in to comment.