net.minecraftforge.common.capabilities.Capability.IStorage Java Examples

The following examples show how to use net.minecraftforge.common.capabilities.Capability.IStorage. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CapabilityUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static <T> IStorage<T> unsupportedStorage() {
	return unsupportedStorage((String) null);
}
 
Example #2
Source File: CapabilityUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static <T> IStorage<T> unsupportedStorage(String reason) {
	return unsupportedStorage(() -> reason);
}
 
Example #3
Source File: CapabilityUtil.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static <T> IStorage<T> unsupportedStorage(Supplier<String> reason) {
	return createStorage((capability, instance, side) -> {throw new UnsupportedOperationException(reason.get());},
		(capability, instance, side, nbt) -> {throw new UnsupportedOperationException(reason.get());});
}