mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-08-27 04:37:47 +00:00
Vwop
This commit is contained in:
@@ -135,6 +135,8 @@ public interface PlatformRegistries {
|
||||
*/
|
||||
List<String> potionEffectKeys();
|
||||
|
||||
List<String> lootTableKeys();
|
||||
|
||||
/**
|
||||
* Block key to its declared state properties, used to generate pack schema enums and numeric ranges.
|
||||
* Keyed by material-level block key. Never null.
|
||||
|
||||
@@ -51,6 +51,18 @@ public interface PlatformStructureHooks {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
default JigsawSourceMetadata jigsawSourceMetadata(String structureKey) {
|
||||
throw new UnsupportedOperationException("The active platform does not expose registered jigsaw metadata");
|
||||
}
|
||||
|
||||
default int templatePoolHorizontalSpan(String templatePoolKey) {
|
||||
throw new UnsupportedOperationException("The active platform does not expose registered template pool spans");
|
||||
}
|
||||
|
||||
default int jigsawStartPoolHorizontalSpan(String structureKey, String templatePoolKey) {
|
||||
return templatePoolHorizontalSpan(templatePoolKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Every registered structure-set key, the placement grouping that decides structure spacing. Never null.
|
||||
*/
|
||||
@@ -99,4 +111,23 @@ public interface PlatformStructureHooks {
|
||||
* Check before offering structure capture; adapters without the required host access return false.
|
||||
*/
|
||||
boolean supportsStructurePlacement();
|
||||
|
||||
record JigsawSourceMetadata(int maxDistanceHorizontal, int referenceExpansion,
|
||||
int maxStartElementHorizontalSpan) {
|
||||
public JigsawSourceMetadata(int maxDistanceHorizontal, int referenceExpansion) {
|
||||
this(maxDistanceHorizontal, referenceExpansion, 0);
|
||||
}
|
||||
|
||||
public JigsawSourceMetadata {
|
||||
if (maxDistanceHorizontal < 1 || maxDistanceHorizontal > 128) {
|
||||
throw new IllegalArgumentException("Jigsaw horizontal distance must be between 1 and 128");
|
||||
}
|
||||
if (referenceExpansion < 0) {
|
||||
throw new IllegalArgumentException("Jigsaw reference expansion must not be negative");
|
||||
}
|
||||
if (maxStartElementHorizontalSpan < 0) {
|
||||
throw new IllegalArgumentException("Jigsaw start element horizontal span must not be negative");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user