Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some tracking workarounds for modern versions #1360

Closed
wants to merge 1 commit into from

Conversation

cswhite2000
Copy link
Member

Some workarounds for non implemented tracking in modern versions.

Needs testing

@Pablete1234 Pablete1234 added the needs testing This PR requires further testing label Aug 4, 2024
@Pablete1234
Copy link
Member

Pablete1234 commented Nov 24, 2024

Did a bit of testing on this with mame,

What works:

  • Shooting tnt with a flame bow gives credit
  • Dispensing an arrow gives kill credit
  • Creeper egg on the monument gives credit
  • Placing TNT minecart gives credit

What doesn't work:

  • Dispensing tnt does not give credit
  • Dispensing a mob egg (zombie) still attacks you, so it's not tracking
  • Dispensing a creeper egg does not give credit
  • Dispensing a tnt minecart does not give credit

Finally, this causes a NPE due to the dispense event using null as an item for projectile dispensing:

Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.clone()" because "this.item" is null
	at org.bukkit.event.block.BlockDispenseEvent.getItem(BlockDispenseEvent.java:37) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
	at PGM.jar/tc.oc.pgm.listeners.BlockTransformListener.onDispenserDispense(BlockTransformListener.java:531) ~[PGM.jar:?]

@Pablete1234 Pablete1234 marked this pull request as ready for review November 30, 2024 07:26
@Pablete1234 Pablete1234 self-requested a review as a code owner November 30, 2024 07:26
@Pablete1234 Pablete1234 deleted the modern-tracking branch November 30, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing This PR requires further testing
Development

Successfully merging this pull request may close these issues.

2 participants