Revive CapabilityProvider on entity revive. Madders should NOT need this, as caps are copied via NBT.

This commit is contained in:
LexManos committed 2019-03-19 21:21:37 -07:00
1 parent f5375783c6
commit 18400e8457
3 files changed
+11 -4

No files matched your search

@@ -106,6 +106,11 @@ public abstract class CapabilityProvider<B extends CapabilityProvider<B>> implem
disp.invalidate();
}
protected void reviveCaps()
{
this.valid = true; //Stupid players don't copy the entity when transporting across worlds.
}
@Override
@Nonnull
public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable EnumFacing side)
@@ -82,9 +82,8 @@ public class AttachCapabilitiesEvent<T> extends GenericEvent<T>
return view;
}
/**
* Adds a callback that is fired when the attacked object is invalidated.
* Adds a callback that is fired when the attached object is invalidated.
* Such as a Entity/TileEntity being removed from world.
* All attached providers should invalidate all of their held capability instances.
*/