This commit is contained in:
gnembon committed 2020-11-06 00:06:53 -04:00
1 parent 79dc85274d
commit 2cdea92da7
55 files changed
+453 -287

No files matched your search

@@ -12,10 +12,13 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Entity.class)
public abstract class Entity_scarpetEventsMixin implements EntityInterface
{
@Shadow public boolean removed;
//@Shadow public boolean removed;
@Shadow protected int netherPortalTime;
@Shadow private int netherPortalCooldown;
@Shadow public abstract boolean isRemoved();
private boolean permanentVehicle;
private final EntityEventsGroup events = new EntityEventsGroup((Entity) (Object)this);
@@ -72,7 +75,7 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
@Inject(method = "remove", at = @At("HEAD"))
private void onRemove(CallbackInfo ci)
{
if (!removed) events.onEvent(EntityEventsGroup.Event.ON_REMOVED);
if (!isRemoved()) events.onEvent(EntityEventsGroup.Event.ON_REMOVED); // ! isRemoved()
}