3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 22:40:18 +01:00

Add some notes for the extended collision box impl

Signed-off-by: Joshua Castle <26531652+Kas-tle@users.noreply.github.com>
Dieser Commit ist enthalten in:
Joshua Castle 2023-03-07 22:26:12 -08:00
Ursprung 7c3ceadbb8
Commit 06db476f60
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: F674F38216C35D5D
2 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -134,6 +134,11 @@ public final class BlockRegistryPopulator {
NbtMap tag = customBlockStates.get(i);
CustomBlockState blockState = customExtBlockStates.get(i);
customBlockStateIds.put(blockState, blockStateOrderedMap.getOrDefault(tag, -1));
// At this point, we have the bedrock runtime ID for our extended collision block, as well as its custom block state
// So then I think what we would prefer for the registry of the collision boxes is having the collision box be the key
// That registry will be used here to check if the given CustomBlockState is an extended collision block
// Then right here we can populate our final registry which maps the java runtime ID to the bedrock runtime ID of our collision block
// So therefore our initial extended collision registry should map to a set of java runtime IDs
}
remappedVanillaIds = new int[vanillaBlockStates.size()];

Datei anzeigen

@ -106,6 +106,7 @@ public class CustomBlockRegistryPopulator {
BoxComponent extendedCollisionBox = customBlockState.block().components().extendedCollisionBox();
if (extendedCollisionBox != null) {
extendedCollisionBoxes.put(id, extendedCollisionBox);
// Here and in the API, we will also need to add a method to build proper custom block data based on the extended collision box and add to customBlocks
}
});
});