added ability set unmountable entities
This commit is contained in:
1 parent
229a82da90
commit
ee4a073a57
4 files changed
+37
No files matched your search
@@ -14,6 +14,8 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
|
||||
{
|
||||
@Shadow public boolean removed;
|
||||
|
||||
private boolean permanentVehicle;
|
||||
|
||||
private final EntityEventsGroup events = new EntityEventsGroup();
|
||||
|
||||
@Override
|
||||
@@ -22,6 +24,18 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
|
||||
return events;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPermanentVehicle()
|
||||
{
|
||||
return permanentVehicle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPermanentVehicle(boolean permanent)
|
||||
{
|
||||
permanentVehicle = permanent;
|
||||
}
|
||||
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
private void onTickCall(CallbackInfo ci)
|
||||
{
|
||||
@@ -34,4 +48,6 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
|
||||
{
|
||||
if (!removed) events.onEvent(EntityEventsGroup.EntityEventType.ON_REMOVED, (Entity) (Object) this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user