From f9dac262321789479e8aeaa997b3798ad5a2b9fa Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Sat, 7 Oct 2023 21:09:09 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20y-59=E4=BB=A5=E4=B8=8B=E3=81=AE=E3=83=8F?= =?UTF-8?q?=E3=83=BC=E3=83=95=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF=E3=82=92?= =?UTF-8?q?=E7=A0=B4=E5=A3=8A=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD=E3=81=AE?= =?UTF-8?q?=E5=BA=A7=E6=A8=99=E6=8C=87=E5=AE=9A=E3=81=8C=E9=96=93=E9=81=95?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=81=A7=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../listener/PlayerBlockBreakListener.scala | 6 +++--- .../minestack/bukkit/BukkitMineStackObjectList.scala | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/listener/PlayerBlockBreakListener.scala b/src/main/scala/com/github/unchama/seichiassist/listener/PlayerBlockBreakListener.scala index 7194f3c37f..d24b1a2efc 100644 --- a/src/main/scala/com/github/unchama/seichiassist/listener/PlayerBlockBreakListener.scala +++ b/src/main/scala/com/github/unchama/seichiassist/listener/PlayerBlockBreakListener.scala @@ -337,7 +337,7 @@ class PlayerBlockBreakListener( } /** - * y-58ハーフブロック破壊抑制 + * y-59ハーフブロック破壊抑制 * * @param event * BlockBreakEvent @@ -356,10 +356,10 @@ class PlayerBlockBreakListener( world.dropItemNaturally(location, new ItemStack(block.getType)) case _ => } - if (block.getY > -58) return + if (block.getY > -59) return if (block.getBlockData.asInstanceOf[Slab].getType != Slab.Type.BOTTOM) return if (!world.isSeichi) return event.setCancelled(true) - player.sendMessage(s"${RED}Y-58以下に敷かれたハーフブロックは破壊不可能です。") + player.sendMessage(s"${RED}Y-59以下に敷かれたハーフブロックは破壊不可能です。") } } diff --git a/src/main/scala/com/github/unchama/seichiassist/subsystems/minestack/bukkit/BukkitMineStackObjectList.scala b/src/main/scala/com/github/unchama/seichiassist/subsystems/minestack/bukkit/BukkitMineStackObjectList.scala index 6f4e5e0338..791e5daa87 100644 --- a/src/main/scala/com/github/unchama/seichiassist/subsystems/minestack/bukkit/BukkitMineStackObjectList.scala +++ b/src/main/scala/com/github/unchama/seichiassist/subsystems/minestack/bukkit/BukkitMineStackObjectList.scala @@ -16,6 +16,8 @@ import com.github.unchama.seichiassist.subsystems.minestack.domain.minestackobje import org.bukkit.Material import org.bukkit.entity.Player import org.bukkit.inventory.ItemStack +import org.bukkit.inventory.meta.PotionMeta +import org.bukkit.potion.{PotionData, PotionType} class BukkitMineStackObjectList[F[_]: Sync]( implicit gachaPrizeAPI: GachaPrizeAPI[F, ItemStack, Player], @@ -81,6 +83,8 @@ class BukkitMineStackObjectList[F[_]: Sync]( MineStackObjectByMaterial(ORES, "iron_nugget", "鉄塊", Material.IRON_NUGGET), ) + import scala.util.chaining._ + // モンスター+動物ドロップ private val minestacklistdrop: List[MineStackObjectGroup[ItemStack]] = leftElems( MineStackObjectByMaterial(MOB_DROP, "ender_pearl", "エンダーパール", Material.ENDER_PEARL), @@ -91,8 +95,12 @@ class BukkitMineStackObjectList[F[_]: Sync]( MineStackObjectByMaterial(MOB_DROP, "bone", "骨", Material.BONE), MineStackObjectByMaterial(MOB_DROP, "sulphur", "火薬", Material.GUNPOWDER), MineStackObjectByMaterial(MOB_DROP, "arrow", "矢", Material.ARROW), - MineStackObjectByMaterial(MOB_DROP, "tipped_arrow", "鈍化の矢", Material.TIPPED_ARROW), MineStackObjectByMaterial(MOB_DROP, "spider_eye", "蜘蛛の目", Material.SPIDER_EYE), + MineStackObjectByItemStack(MOB_DROP, "tipped_arrow", Some("鈍化の矢"), hasNameLore = false, new ItemStack(Material.TIPPED_ARROW).tap { itemStack => + val meta = itemStack.getItemMeta.asInstanceOf[PotionMeta] + meta.setBasePotionData(new PotionData(PotionType.SLOWNESS)) + itemStack.setItemMeta(meta) + }), MineStackObjectByMaterial(MOB_DROP, "string", "糸", Material.STRING), MineStackObjectByMaterial(MOB_DROP, "name_tag", "名札", Material.NAME_TAG), MineStackObjectByMaterial(MOB_DROP, "lead", "リード", Material.LEAD),