Silkspawners for Sponge


#1

Bonjour,
I’m looking for a mod/pluggin that would work with Forge/Sponge server that would do the same as the bukkit Silkspawners pluggin. In the end, I want to be able to silktouch any spawners and have it in my inventory. Any good suggestion because I have been looking around and found prety much nothing that would work on my Forge/Sponge Server 1.12.2

Regards


#2

This should have been put in “Plugin Requests” category. Also could you provide a link to the Bukkit plugin (just to make sure I can see the correct plugin you are refering to)


#3

Try out KtSkript and the following script.

onBlockBreak {
  if (causedByPlayer) {
    transactions
      .filter { it.original.state.type == BlockTypes.MOB_SPAWNER }
      .forEach { transaction ->
        val location = transaction.final.location.get()
        delayTicks(1) {
          val itemEntity = location.createEntity(EntityTypes.ITEM)
          val item = ItemStack.builder()
            .fromBlockSnapshot(transaction.original)
            .build().createSnapshot()
          itemEntity.tryOffer(Keys.REPRESENTED_ITEM, item)
          location.spawnEntity(itemEntity)
        }
      }
  }
}

It drops the spawner item when the block is broken. You might want to test how it behaves when breaking with slik touch though.