added 'portal_cooldown' and 'portal_timer' to entity API (query and modify)

This commit is contained in:
gnembon committed 2020-05-20 02:09:57 -03:00
1 parent 66c222a77a
commit ab86fc9292
5 files changed
+65

No files matched your search

@@ -14,6 +14,7 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
{
@Shadow public boolean removed;
@Shadow protected int netherPortalTime;
private boolean permanentVehicle;
private final EntityEventsGroup events = new EntityEventsGroup();
@@ -36,6 +37,18 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
permanentVehicle = permanent;
}
@Override
public int getPortalTimer()
{
return netherPortalTime;
}
@Override
public void setPortalTimer(int amount)
{
netherPortalTime = amount;
}
@Inject(method = "tick", at = @At("HEAD"))
private void onTickCall(CallbackInfo ci)
{