Don't fire EntityToggleSitEvent on deserialization & reorder some api patches (#8495)

This commit is contained in:
Owen1212055
2022-10-22 22:55:28 -04:00
parent fc19cbd800
commit c1aac9ca35
2 changed files with 30 additions and 14 deletions

View File

@@ -26,26 +26,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ private static final HandlerList HANDLER_LIST = new HandlerList();
+
+ private boolean cancelled;
+ private final Entity entity;
+ private final boolean isSitting;
+
+ public EntityToggleSitEvent(@NotNull Entity entity, boolean isSitting) {
+ super(entity);
+ this.entity = entity;
+ this.isSitting = isSitting;
+ }
+
+ /**
+ * The entity involved.
+ *
+ * @return The entity.
+ */
+ @NotNull
+ public Entity getEntity() {
+ return this.entity;
+ }
+
+ /**
+ * Gets the new sitting state that the entity will change to.
+ *
+ * @return If it's going to sit or not.