mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix NPE when hovering over ender dragon
This commit is contained in:
parent
1840172c8d
commit
2953ea9513
1 changed files with 5 additions and 1 deletions
|
@ -66,6 +66,10 @@ public class InteractiveTagManager {
|
||||||
ItemMapping mapping = session.getPlayerInventory().getItemInHand().getMapping(session);
|
ItemMapping mapping = session.getPlayerInventory().getItemInHand().getMapping(session);
|
||||||
String javaIdentifierStripped = mapping.getJavaIdentifier().replace("minecraft:", "");
|
String javaIdentifierStripped = mapping.getJavaIdentifier().replace("minecraft:", "");
|
||||||
EntityType entityType = interactEntity.getDefinition().entityType();
|
EntityType entityType = interactEntity.getDefinition().entityType();
|
||||||
|
if (entityType == null) {
|
||||||
|
// Likely a technical entity; we don't need to worry about this
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
InteractiveTag interactiveTag = InteractiveTag.NONE;
|
InteractiveTag interactiveTag = InteractiveTag.NONE;
|
||||||
|
|
||||||
|
@ -90,7 +94,7 @@ public class InteractiveTagManager {
|
||||||
// This animal can be fed
|
// This animal can be fed
|
||||||
interactiveTag = InteractiveTag.FEED;
|
interactiveTag = InteractiveTag.FEED;
|
||||||
} else {
|
} else {
|
||||||
switch (interactEntity.getDefinition().entityType()) {
|
switch (entityType) {
|
||||||
case BOAT:
|
case BOAT:
|
||||||
if (interactEntity.getPassengers().size() < 2) {
|
if (interactEntity.getPassengers().size() < 2) {
|
||||||
interactiveTag = InteractiveTag.BOARD_BOAT;
|
interactiveTag = InteractiveTag.BOARD_BOAT;
|
||||||
|
|
Loading…
Reference in a new issue