Merge branch 'master' into 1.16

This commit is contained in:
gnembon committed 2020-07-14 00:05:35 -03:00
commit 39a85976fd
7 files changed
+28 -19

No files matched your search

@@ -18,7 +18,7 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
@Shadow private int netherPortalCooldown;
private boolean permanentVehicle;
private final EntityEventsGroup events = new EntityEventsGroup();
private final EntityEventsGroup events = new EntityEventsGroup((Entity) (Object)this);
@Override
public EntityEventsGroup getEventContainer()
@@ -65,14 +65,14 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
@Inject(method = "tick", at = @At("HEAD"))
private void onTickCall(CallbackInfo ci)
{
events.onEvent(EntityEventsGroup.EntityEventType.ON_TICK, (Entity) (Object) this);
events.onEvent(EntityEventsGroup.EntityEventType.ON_TICK);
}
@Inject(method = "remove", at = @At("HEAD"))
private void onRemove(CallbackInfo ci)
{
if (!removed) events.onEvent(EntityEventsGroup.EntityEventType.ON_REMOVED, (Entity) (Object) this);
if (!removed) events.onEvent(EntityEventsGroup.EntityEventType.ON_REMOVED);
}