mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-24 05:21:16 +00:00
refactor createBlockState to use new error API
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.dfsek.terra.minestom;
|
||||
|
||||
import com.dfsek.tectonic.api.TypeRegistry;
|
||||
import com.dfsek.tectonic.api.exception.LoadException;
|
||||
import com.dfsek.tectonic.api.loader.type.TypeLoader;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.kyori.adventure.util.RGBLike;
|
||||
@@ -81,7 +82,7 @@ public final class TerraMinestomPlatform extends AbstractPlatform {
|
||||
.registerLoader(EntityType.class,
|
||||
(TypeLoader<EntityType>) (annotatedType, o, configLoader, depthTracker) -> new MinestomEntityType((String) o))
|
||||
.registerLoader(BlockState.class,
|
||||
(TypeLoader<BlockState>) (annotatedType, o, configLoader, depthTracker) -> worldHandle.createBlockState((String) o))
|
||||
(TypeLoader<BlockState>) (annotatedType, o, configLoader, depthTracker) -> worldHandle.createBlockState((String) o).collectThrow(left -> new LoadException("Invalid BlockState \"" + o + "\": " + left.message(), depthTracker)))
|
||||
.registerLoader(BiomeEffects.Particle.class, BiomeParticleConfigTemplate::new)
|
||||
.registerLoader(BiomeEffects.MoodSound.class, BiomeMoodSoundTemplate::new)
|
||||
.registerLoader(BiomeEffects.AdditionsSound.class, BiomeAdditionsSoundTemplate::new)
|
||||
|
||||
Reference in New Issue
Block a user