mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Batch 3 of the API review: extension point, resources by kind
- PackWorld, InvocationContext and PackSettings get extension(type), an Optional empty by default: the one door a host's own modules use to reach its facades. The runners forward the inputs' extensions; the world a module sees (ModuleWorld, built by the host) forwards the world's. PackWorld.withLog is gone. - A chunk stage writes registered mantle layers inside its own chunk and reads the rest (ChunkMantle); ReadOnlyMantle and its host() are gone. - PackResources.find(kind, id), require(kind, id), ids(kind) and the host kinds BIOMES, REGIONS, OBJECTS replace ResourceKey and ResourceKind.key. Services and LinkedBiomes name pack resources by ResourceId. @Ref(PACK_*) and @ResourceRef fit ResourceId fields. - BlockAccess extends BlockView. - Absent values in ItemDrop, EntitySpec and AmbientEffects.Effect are Optionals; StructureFit.Start.key() returns a StartKey. - Mantle.caverns() becomes isCarved(x, y, z). - OptionsMetadata and DeclaredFieldOrder move to com.volmit.host. - README, DESIGN and CONTRACTS updated; ExtensionsTest added.
This commit is contained in:
1 parent
7143908d4b
commit
3a307b5b8e
54 files changed
+821
-398
No files matched your search
@@ -5,7 +5,7 @@ import com.volmit.item.ItemRegistry;
|
||||
import com.volmit.noise.NoiseFactory;
|
||||
import com.volmit.resource.PackResources;
|
||||
import com.volmit.resource.ResourceId;
|
||||
import com.volmit.resource.ResourceKey;
|
||||
import com.volmit.resource.ResourceKind;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
@@ -40,12 +40,12 @@ public final class EmptyResources implements PackResources {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Optional<T> find(ResourceKey<T> key) {
|
||||
public <T> Optional<T> find(ResourceKind<T> kind, ResourceId id) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResourceId> ids(Class<?> type) {
|
||||
public List<ResourceId> ids(ResourceKind<?> kind) {
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user