mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Revive CapabilityProvider on entity revive. Madders should NOT need this, as caps are copied via NBT.
This commit is contained in:
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.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user