Set TNT source in blast mining (#4580)

* Set TNT source in blast mining

* Compatibility with older versions

Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com>

Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com>
This commit is contained in:
Griffin Kubesa 2021-08-10 16:13:25 -05:00 committed by GitHub
parent 8805a25d85
commit dfa16c70a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,9 @@ public class MiningManager extends SkillManager {
tnt.setMetadata(mcMMO.tntMetadataKey, mmoPlayer.getPlayerMetadata());
tnt.setFuseTicks(0);
if (mcMMO.getCompatibilityManager().getMinecraftGameVersion().isAtLeast(1, 16, 4)) {
tnt.setSource(player);
}
targetBlock.setType(Material.AIR);
mmoPlayer.setAbilityDATS(SuperAbilityType.BLAST_MINING, System.currentTimeMillis());