Search in sources :

Example 1 with ByteBufferAsset

use of org.terasology.engine.rendering.gltf.ByteBufferAsset in project Terasology by MovingBlocks.

the class TerasologyEngine method initAssets.

private void initAssets() {
    // cast lambdas explicitly to avoid inconsistent compiler behavior wrt. type inference
    assetTypeManager.createAssetType(Prefab.class, PojoPrefab::new, "prefabs");
    assetTypeManager.createAssetType(BlockShape.class, BlockShapeImpl::new, "shapes");
    assetTypeManager.createAssetType(BlockSounds.class, BlockSounds::new, "blockSounds");
    assetTypeManager.createAssetType(BlockTile.class, BlockTile::new, "blockTiles");
    AssetType<BlockFamilyDefinition, BlockFamilyDefinitionData> blockFamilyDefinitionAssetType = assetTypeManager.createAssetType(BlockFamilyDefinition.class, BlockFamilyDefinition::new, "blocks");
    assetTypeManager.getAssetFileDataProducer(blockFamilyDefinitionAssetType).addAssetFormat(new BlockFamilyDefinitionFormat(assetTypeManager.getAssetManager()));
    assetTypeManager.createAssetType(UISkinAsset.class, UISkinAsset::new, "skins");
    assetTypeManager.createAssetType(BehaviorTree.class, BehaviorTree::new, "behaviors");
    assetTypeManager.createAssetType(UIElement.class, UIElement::new, "ui");
    assetTypeManager.createAssetType(ByteBufferAsset.class, ByteBufferAsset::new, "mesh");
    for (EngineSubsystem subsystem : allSubsystems) {
        subsystem.registerCoreAssetTypes(assetTypeManager);
    }
}
Also used : PojoPrefab(org.terasology.engine.entitySystem.prefab.internal.PojoPrefab) BlockShapeImpl(org.terasology.engine.world.block.shapes.BlockShapeImpl) UIElement(org.terasology.nui.asset.UIElement) UISkinAsset(org.terasology.nui.skin.UISkinAsset) BlockFamilyDefinitionFormat(org.terasology.engine.world.block.loader.BlockFamilyDefinitionFormat) BlockTile(org.terasology.engine.world.block.tiles.BlockTile) BehaviorTree(org.terasology.engine.logic.behavior.asset.BehaviorTree) ByteBufferAsset(org.terasology.engine.rendering.gltf.ByteBufferAsset) BlockSounds(org.terasology.engine.world.block.sounds.BlockSounds) BlockFamilyDefinitionData(org.terasology.engine.world.block.loader.BlockFamilyDefinitionData) EngineSubsystem(org.terasology.engine.core.subsystem.EngineSubsystem) BlockFamilyDefinition(org.terasology.engine.world.block.loader.BlockFamilyDefinition)

Aggregations

EngineSubsystem (org.terasology.engine.core.subsystem.EngineSubsystem)1 PojoPrefab (org.terasology.engine.entitySystem.prefab.internal.PojoPrefab)1 BehaviorTree (org.terasology.engine.logic.behavior.asset.BehaviorTree)1 ByteBufferAsset (org.terasology.engine.rendering.gltf.ByteBufferAsset)1 BlockFamilyDefinition (org.terasology.engine.world.block.loader.BlockFamilyDefinition)1 BlockFamilyDefinitionData (org.terasology.engine.world.block.loader.BlockFamilyDefinitionData)1 BlockFamilyDefinitionFormat (org.terasology.engine.world.block.loader.BlockFamilyDefinitionFormat)1 BlockShapeImpl (org.terasology.engine.world.block.shapes.BlockShapeImpl)1 BlockSounds (org.terasology.engine.world.block.sounds.BlockSounds)1 BlockTile (org.terasology.engine.world.block.tiles.BlockTile)1 UIElement (org.terasology.nui.asset.UIElement)1 UISkinAsset (org.terasology.nui.skin.UISkinAsset)1