Skip to content

Commit

Permalink
fix: 修复构建
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed Aug 7, 2024
1 parent ebbdf22 commit 672c505
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import io.github.sefiraat.networks.slimefun.network.NetworkQuantumStorage;
import io.github.sefiraat.networks.utils.StackUtils;
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedParticle;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow;
import org.bukkit.Location;
Expand Down Expand Up @@ -124,7 +125,7 @@ public void setOverburdened(boolean overburdened) {
for (int x = 0; x <= 1; x++) {
for (int y = 0; y <= 1; y++) {
for (int z = 0; z <= 1; z++) {
loc.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, loc.clone().add(x, y, z), 0);
loc.getWorld().spawnParticle(VersionedParticle.EXPLOSION, loc.clone().add(x, y, z), 0);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack;
import io.github.thebusybiscuit.slimefun4.libraries.dough.collections.Pair;
import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedEnchantment;
import lombok.experimental.UtilityClass;
import org.bukkit.ChatColor;
import org.bukkit.Material;
Expand Down Expand Up @@ -130,15 +131,15 @@ public class NetworksSlimefunItemStacks {

RADIOACTIVE_OPTIC_STAR = Theme.themedSlimefunItemStack(
"NTW_RADIOACTIVE_OPTIC_STAR",
getPreEnchantedItemStack(Material.NETHER_STAR, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.NETHER_STAR, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.CRAFTING,
"放射性光学之星",
"能够传输几乎无限信息的星"
);

SHRINKING_BASE = Theme.themedSlimefunItemStack(
"NTW_SHRINKING_BASE",
getPreEnchantedItemStack(Material.PISTON, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.PISTON, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.CRAFTING,
"缩小底座",
"可以让大型物体变小的装置"
Expand All @@ -154,7 +155,7 @@ public class NetworksSlimefunItemStacks {

ADVANCED_NANOBOTS = Theme.themedSlimefunItemStack(
"NTW_ADVANCED_NANOBOTS",
getPreEnchantedItemStack(Material.MELON_SEEDS, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.MELON_SEEDS, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.CRAFTING,
"高级纳米机器人",
"可以帮助你完成精密任务的微型机器人",
Expand All @@ -179,7 +180,7 @@ public class NetworksSlimefunItemStacks {

PRISTINE_AI_CORE = Theme.themedSlimefunItemStack(
"NTW_PRISTINE_AI_CORE",
getPreEnchantedItemStack(Material.TUBE_CORAL_BLOCK, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.TUBE_CORAL_BLOCK, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.CRAFTING,
"古代人工智能核心",
"据说是从上古遗迹中挖掘出来的",
Expand All @@ -188,7 +189,7 @@ public class NetworksSlimefunItemStacks {

INTERDIMENSIONAL_PRESENCE = Theme.themedSlimefunItemStack(
"NTW_INTERDIMENSIONAL_PRESENCE",
getPreEnchantedItemStack(Material.ARMOR_STAND, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.ARMOR_STAND, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.CRAFTING,
"跨跃维度的存在",
"这种完美级的人工智能",
Expand Down Expand Up @@ -675,7 +676,7 @@ public class NetworksSlimefunItemStacks {

NETWORK_REMOTE_ULTIMATE = Theme.themedSlimefunItemStack(
"NTW_REMOTE_ULTIMATE",
getPreEnchantedItemStack(Material.GLOW_ITEM_FRAME, true, new Pair<>(Enchantment.ARROW_DAMAGE, 1)),
getPreEnchantedItemStack(Material.GLOW_ITEM_FRAME, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.TOOL,
"终极网络远程访问器",
"远程打开绑定的网格",
Expand Down Expand Up @@ -743,7 +744,7 @@ public class NetworksSlimefunItemStacks {

NETWORK_RAKE_3 = Theme.themedSlimefunItemStack(
"NTW_RAKE_3",
getPreEnchantedItemStack(Material.WEEPING_VINES, true, new Pair<>(Enchantment.LUCK, 1)),
getPreEnchantedItemStack(Material.WEEPING_VINES, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.TOOL,
"网络扳手 (3)",
"右键点击一个网络节点",
Expand All @@ -754,7 +755,7 @@ public class NetworksSlimefunItemStacks {

NETWORK_DEBUG_STICK = Theme.themedSlimefunItemStack(
"NTW_DEBUG_STICK",
getPreEnchantedItemStack(Material.STICK, true, new Pair<>(Enchantment.LUCK, 1)),
getPreEnchantedItemStack(Material.STICK, true, new Pair<>(VersionedEnchantment.LUCK_OF_THE_SEA, 1)),
Theme.TOOL,
"网络调试棒",
"右键点击一个网络方块开启调试。"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedEnchantment;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedParticle;
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
Expand All @@ -29,7 +31,6 @@
import org.bukkit.Particle;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.inventory.ItemFlag;
Expand Down Expand Up @@ -321,7 +322,7 @@ public static ItemStack getDirectionalSlotPane(@Nonnull BlockFace blockFace, @No
);
final ItemMeta itemMeta = displayStack.getItemMeta();
if (active) {
itemMeta.addEnchant(Enchantment.LUCK, 1, true);
itemMeta.addEnchant(VersionedEnchantment.LUCK_OF_THE_SEA, 1, true);
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
}
itemMeta.setLore(List.of(
Expand All @@ -341,7 +342,7 @@ public static ItemStack getDirectionalSlotPane(@Nonnull BlockFace blockFace, @No
);
final ItemMeta itemMeta = displayStack.getItemMeta();
if (active) {
itemMeta.addEnchant(Enchantment.LUCK, 1, true);
itemMeta.addEnchant(VersionedEnchantment.LUCK_OF_THE_SEA, 1, true);
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
}
itemMeta.setLore(List.of(
Expand Down Expand Up @@ -372,6 +373,6 @@ protected void showParticle(@Nonnull Location location, @Nonnull BlockFace block
final Vector faceVector = blockFace.getDirection().clone().multiply(-1);
final Vector pushVector = faceVector.clone().multiply(2);
final Location displayLocation = location.clone().add(0.5, 0.5, 0.5).add(faceVector);
location.getWorld().spawnParticle(Particle.REDSTONE, displayLocation, 0, pushVector.getX(), pushVector.getY(), pushVector.getZ(), getDustOptions());
location.getWorld().spawnParticle(VersionedParticle.DUST, displayLocation, 0, pushVector.getX(), pushVector.getY(), pushVector.getZ(), getDustOptions());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import io.github.thebusybiscuit.slimefun4.implementation.Slimefun;
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;
import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction;
import io.github.thebusybiscuit.slimefun4.utils.compatibility.VersionedParticle;
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
Expand Down Expand Up @@ -108,7 +109,7 @@ private void tryKillItem(@Nonnull BlockMenu blockMenu) {
retrieved.setAmount(0);
Location location = blockMenu.getLocation().clone().add(0.5, 1.2, 0.5);
if (definition.getNode().getRoot().isDisplayParticles()) {
location.getWorld().spawnParticle(Particle.SMOKE_NORMAL, location, 0, 0, 0.05, 0);
location.getWorld().spawnParticle(VersionedParticle.SMOKE, location, 0, 0, 0.05, 0);
}
}
}
Expand Down

0 comments on commit 672c505

Please sign in to comment.