Skip to content

Commit

Permalink
initial update 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
J3fftw1 committed Apr 23, 2024
1 parent 45601c8 commit ab7a0e3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<maven.compiler.target>16</maven.compiler.target>

<!-- Spigot properties -->
<spigot.version>1.20.4</spigot.version>
<spigot.version>1.20.5</spigot.version>
<spigot.javadocs>https://hub.spigotmc.org/javadocs/spigot/</spigot.javadocs>

<!-- Default settings for sonarcloud.io -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.potion.PotionType;

import io.github.bakedlibs.dough.inventory.InvUtils;
Expand Down Expand Up @@ -48,10 +50,9 @@ public class AutoBrewer extends AContainer implements NotHopperable {
potionRecipes.put(Material.TURTLE_HELMET, PotionType.TURTLE_MASTER);
potionRecipes.put(Material.PHANTOM_MEMBRANE, PotionType.SLOW_FALLING);

fermentations.put(PotionType.SPEED, PotionType.SLOWNESS);
fermentations.put(PotionType.JUMP, PotionType.SLOWNESS);
fermentations.put(PotionType.INSTANT_HEAL, PotionType.INSTANT_DAMAGE);
fermentations.put(PotionType.POISON, PotionType.INSTANT_DAMAGE);
fermentations.put(PotionType.LEAPING, PotionType.SLOWNESS);
fermentations.put(PotionType.HEALING, PotionType.HARMING);
fermentations.put(PotionType.POISON, PotionType.HARMING);
fermentations.put(PotionType.NIGHT_VISION, PotionType.INVISIBILITY);
}

Expand Down Expand Up @@ -104,15 +105,15 @@ public AutoBrewer(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipe

@ParametersAreNonnullByDefault
private @Nullable ItemStack brew(Material input, Material potionType, PotionMeta potion) {
PotionData data = potion.getBasePotionData();
PotionType data = potion.getBasePotionType();

PotionType type = data.getType();
if (type == PotionType.WATER) {
if (input == Material.FERMENTED_SPIDER_EYE) {
potion.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false));
potion.setBasePotionType(PotionType.WEAKNESS);
return new ItemStack(potionType);
} else if (input == Material.NETHER_WART) {
potion.setBasePotionData(new PotionData(PotionType.AWKWARD, false, false));
potion.setBasePotionType(PotionType.AWKWARD);
return new ItemStack(potionType);
} else if (potionType == Material.POTION && input == Material.GUNPOWDER) {
return new ItemStack(Material.SPLASH_POTION);
Expand All @@ -123,10 +124,10 @@ public AutoBrewer(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipe
PotionType fermented = fermentations.get(type);

if (fermented != null) {
potion.setBasePotionData(new PotionData(fermented, data.isExtended(), data.isUpgraded()));
potion.setBasePotionType(fermented);
return new ItemStack(potionType);
}
} else if (input == Material.REDSTONE && type.isExtendable() && !data.isUpgraded()) {
} else if (input == Material.REDSTONE && type.isExtendable() && !data) {
// Fixes #3390 - Potions can only be either extended or upgraded. Not both.
potion.setBasePotionData(new PotionData(type, true, false));
return new ItemStack(potionType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionData;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.potion.PotionType;
Expand Down Expand Up @@ -378,7 +377,7 @@ public static void setup(@Nonnull Slimefun plugin) {

new LongFallBoots(itemGroups.magicalArmor, SlimefunItems.SLIME_BOOTS, RecipeType.ARMOR_FORGE,
new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.IRON_INGOT), null, new ItemStack(Material.IRON_INGOT)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP_BOOST, 300, 5)},
SoundEffect.SLIME_BOOTS_FALL_SOUND)
.register(plugin);

Expand Down Expand Up @@ -839,7 +838,7 @@ public static void setup(@Nonnull Slimefun plugin) {

ItemStack weaknessPotion = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) weaknessPotion.getItemMeta();
meta.setBasePotionData(new PotionData(PotionType.WEAKNESS, false, false));
meta.setBasePotionType(PotionType.WEAKNESS);
weaknessPotion.setItemMeta(meta);

new MagicalZombiePills(itemGroups.magicalGadgets, SlimefunItems.MAGICAL_ZOMBIE_PILLS, RecipeType.MAGIC_WORKBENCH,
Expand Down Expand Up @@ -907,7 +906,7 @@ public static void setup(@Nonnull Slimefun plugin) {

new Talisman(SlimefunItems.TALISMAN_WARRIOR,
new ItemStack[] {SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.COMMON_TALISMAN, SlimefunItems.REINFORCED_ALLOY_INGOT, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3},
true, true, "warrior", new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 3600, 2))
true, true, "warrior", new PotionEffect(PotionEffectType.STRENGTH, 3600, 2))
.register(plugin);

new Talisman(SlimefunItems.TALISMAN_KNIGHT,
Expand All @@ -917,7 +916,7 @@ public static void setup(@Nonnull Slimefun plugin) {

new Talisman(SlimefunItems.TALISMAN_CAVEMAN,
new ItemStack[] { SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3, new ItemStack(Material.GOLDEN_PICKAXE), SlimefunItems.TALISMAN_MINER, SlimefunItems.EARTH_RUNE, SlimefunItems.MAGIC_LUMP_3, null, SlimefunItems.MAGIC_LUMP_3},
false, false, "caveman", 50, new PotionEffect(PotionEffectType.FAST_DIGGING, 800, 2))
false, false, "caveman", 50, new PotionEffect(PotionEffectType.HASTE, 800, 2))
.register(plugin);

new Talisman(SlimefunItems.TALISMAN_WISE,
Expand Down Expand Up @@ -1085,7 +1084,7 @@ public static void setup(@Nonnull Slimefun plugin) {

new LongFallBoots(itemGroups.magicalArmor, SlimefunItems.SLIME_BOOTS_STEEL, RecipeType.ARMOR_FORGE,
new ItemStack[] {null, null, null, new ItemStack(Material.SLIME_BALL), null, new ItemStack(Material.SLIME_BALL), new ItemStack(Material.SLIME_BALL), SlimefunItems.STEEL_PLATE, new ItemStack(Material.SLIME_BALL)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 5)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP_BOOST, 300, 5)},
SoundEffect.SLIME_BOOTS_FALL_SOUND)
.register(plugin);

Expand Down Expand Up @@ -2646,7 +2645,7 @@ public int getCapacity() {

new LongFallBoots(itemGroups.magicalArmor, SlimefunItems.BEE_BOOTS, RecipeType.ARMOR_FORGE,
new ItemStack[] {null, null, null, SlimefunItems.GOLD_8K, null, SlimefunItems.GOLD_8K, new ItemStack(Material.HONEY_BLOCK), null, new ItemStack(Material.HONEY_BLOCK)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP, 300, 2)},
new PotionEffect[] {new PotionEffect(PotionEffectType.JUMP_BOOST, 300, 2)},
SoundEffect.BEE_BOOTS_FALL_SOUND)
.register(plugin);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
import io.github.thebusybiscuit.slimefun4.core.attributes.ProtectionType;
import io.github.thebusybiscuit.slimefun4.core.attributes.Radioactive;
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems;
import io.github.thebusybiscuit.slimefun4.implementation.items.armor.SlimefunArmorPiece;
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.SolarHelmet;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper;

/**
Expand Down Expand Up @@ -55,10 +53,10 @@ public ArmorTask(boolean radioactiveFire) {
Set<PotionEffect> effects = new HashSet<>();
effects.add(new PotionEffect(PotionEffectType.WITHER, 400, 2));
effects.add(new PotionEffect(PotionEffectType.BLINDNESS, 400, 3));
effects.add(new PotionEffect(PotionEffectType.CONFUSION, 400, 3));
effects.add(new PotionEffect(PotionEffectType.NAUSEA, 400, 3));
effects.add(new PotionEffect(PotionEffectType.WEAKNESS, 400, 2));
effects.add(new PotionEffect(PotionEffectType.SLOW, 400, 1));
effects.add(new PotionEffect(PotionEffectType.SLOW_DIGGING, 400, 1));
effects.add(new PotionEffect(PotionEffectType.SLOWNESS, 400, 1));
effects.add(new PotionEffect(PotionEffectType.MINING_FATIGUE, 400, 1));
radiationEffects = Collections.unmodifiableSet(effects);
}

Expand Down

0 comments on commit ab7a0e3

Please sign in to comment.