From ecee922f04064b231741830e4430d86f93d371cb Mon Sep 17 00:00:00 2001 From: Lucky3028 Date: Mon, 30 Jan 2023 22:34:45 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=82=B0=E3=83=AD=E3=82=A6=E3=82=B9?= =?UTF-8?q?=E3=83=88=E3=83=BC=E3=83=B3=E3=83=80=E3=82=B9=E3=83=88=E3=82=92?= =?UTF-8?q?=E3=82=B9=E3=82=AD=E3=83=AB=E4=BD=BF=E7=94=A8=E6=99=82=E3=81=AB?= =?UTF-8?q?=E3=83=89=E3=83=AD=E3=83=83=E3=83=97=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../github/unchama/seichiassist/util/BreakUtil.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala index 6381e2332b..b5004b52e8 100644 --- a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala +++ b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala @@ -231,6 +231,12 @@ object BreakUtil { new ItemStack(Material.REDSTONE, withBonus) case Material.QUARTZ_ORE => new ItemStack(Material.QUARTZ, bonus) + // グロウストーンは幸運エンチャントがついていると高確率でより多くのダストをドロップする + // しかし、最大でも4個までしかドロップしない + case Material.GLOWSTONE => + val withBonus = bonus * (rand * 3 + 2).toInt + val amount = if (withBonus > 4) 4 else withBonus + new ItemStack(Material.GLOWSTONE_DUST, amount) case _ => // unreachable new ItemStack(blockMaterial, bonus) @@ -254,6 +260,12 @@ object BreakUtil { Some(BlockBreakResult.ItemDrop(new ItemStack(Material.REDSTONE, (rand + 4).toInt))) case Material.QUARTZ_ORE => Some(BlockBreakResult.ItemDrop(new ItemStack(Material.QUARTZ))) + // グロウストーンは、2から4個のグロウストーンダストをドロップする + case Material.GLOWSTONE => + Some( + BlockBreakResult + .ItemDrop(new ItemStack(Material.GLOWSTONE_DUST, (rand * 3 + 2).toInt)) + ) case Material.STONE => Some { BlockBreakResult.ItemDrop {