Slimefun

Slimefun

3M Downloads

Hercules Pickaxe duplication on 1.17 ores

variananora opened this issue · 6 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

When breaking new 1.17 ores that can be converted to Slimefun dust using Hercules Pickaxe it will drop their dust and raw ore version at the same time.

List of working ores:

  • Copper Ore
  • Deepslate Copper Ore
  • Deepslate Iron Ore
  • Deepslate Gold Ore

I believe this is cause by

if (Slimefun.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
switch (mat) {
case DEEPSLATE_IRON_ORE:
drops.add(new CustomItemStack(SlimefunItems.IRON_DUST, 2));
break;
case DEEPSLATE_GOLD_ORE:
drops.add(new CustomItemStack(SlimefunItems.GOLD_DUST, 2));
break;
case COPPER_ORE:
case DEEPSLATE_COPPER_ORE:
drops.add(new CustomItemStack(SlimefunItems.COPPER_DUST, 2));
break;
default:
break;
}

When adding those item it doesn't break until it's over and will add their natural drop in

for (ItemStack drop : e.getBlock().getDrops(tool)) {
drops.add(new CustomItemStack(drop, drop.getAmount() * 2));
}

Side note: Not sure why those are * 2 tho. Destroying other ores with Hercules Pickaxe can give you twice their drop, also works with fortune enchantment. (Should I create other bug report on this? or is this intended behaviour?)

📑 Reproduction Steps

  1. Get Hercules Pickaxe
  2. Mine blocks listed above
  3. They will drop dust and raw ore at the same time.

💡 Expected Behavior

The raw ore should not be dropped.

📷 Screenshots / Videos

https://youtu.be/tweHnXMhICY

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Paper

🎮 Minecraft Version

1.18.x

⭐ Slimefun version

This Server uses the following setup of Slimefun:
Paper git-Paper-181 (MC: 1.18.1)
Slimefun DEV - 999 (git e02eedd9)
Metrics-Module #28
Java 17

Installed Addons: (2)
  CMILib v1.1.1.0
  CMI v9.1.0.6

🧭 Other plugins

No response

commented

I wonder if this is confirmed bug, might test it later and try a fix if it is a bug

commented

are the double drops even intentional, I think the fallback should not do double drops. Also at the same time the switch cases for 1.17 blocks continue to go to the second switch where it can double the drop on every block mine

commented

Yeah would also agree its unnecessary to have it ingame anymore, but can be deprecated for now

commented

Hmm, yeah somehow this slipped through our code review in #3253
Obviously any break; in the first switch/case can still trigger the default: block in the second switch/case.
It would be best to have a boolean hasDoubledDrops here to fix this.

Pull requests are welcome, as I am still very busy with my thesis for university.

But again... why exactly does this pickaxe exist in the first place?

commented

given the number of ways to turn vanilla iron, gold and copper ores into slimefun dust, it does seem unnecessary. Considering you have to be somewhat into building your slimefun system to have the materials to craft this hammer, you probably are getting into some automation at this point. if that's the case, then the hammer probably never is needed. I would agree with Biscuit that this seems unnecessary to keep in the game.

commented

The Hercules pickaxe has been deprecated for 3 months now and will now be removed.
We can consider this "resolved" then.