I'm trying to call the following method:
but I always get 1.0, despite it being bedrock/wood/etc.
I also tried using spigot nms, but I also only ever get 1.0:
Anybody else have this issue?
I'm using Maven, here's my pom.xml:
Code:
float destroySpeed = block.getDestroySpeed(player.getActiveItem())
but I always get 1.0, despite it being bedrock/wood/etc.
I also tried using spigot nms, but I also only ever get 1.0:
Code:
Block nmsBlock = CraftMagicNumbers.getBlock(block.getType());
ItemStack item = CraftItemStack.asNMSCopy(player.getActiveItem());
float destroySpeed = item.a(nmsBlock.n());
Anybody else have this issue?
I'm using Maven, here's my pom.xml:
Code:
<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<!-- <repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository> -->
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency> -->
</dependencies>
- Version Output
-
This server is running Paper version git-Paper-290 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: f186318)
You are running the latest version
Previous version: git-Paper-280 (MC: 1.20.2)
Last edited: