mirror of
https://github.com/YouHaveTrouble/Stand-in.git
synced 2026-05-11 22:16:55 +00:00
add a message about something blocking spawning new entity
This commit is contained in:
@@ -116,8 +116,10 @@ public abstract class EntityHandler<E extends Entity> {
|
|||||||
}
|
}
|
||||||
if (foundConverter == null) return;
|
if (foundConverter == null) return;
|
||||||
Entity converted = foundConverter.spawn(existing);
|
Entity converted = foundConverter.spawn(existing);
|
||||||
if (converted == null) return;
|
if (converted == null || !converted.isInWorld()) {
|
||||||
if (!converted.isInWorld()) return;
|
callbackPlayer.sendMessage(Component.text("Failed to convert entity to the new type. Is something blocking spawning new entities?").color(NamedTextColor.RED));
|
||||||
|
return;
|
||||||
|
}
|
||||||
existing.remove();
|
existing.remove();
|
||||||
}, ClickCallback.Options.builder().lifetime(Duration.ofHours(1)).uses(1).build())
|
}, ClickCallback.Options.builder().lifetime(Duration.ofHours(1)).uses(1).build())
|
||||||
).build();
|
).build();
|
||||||
|
|||||||
Reference in New Issue
Block a user