File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/main/scala/de/lolhens/minecraft/fluidphysics/config Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,9 @@ object FluidPhysicsConfig extends Config[FluidPhysicsConfig] {
25
25
26
26
override protected def codec : Codec [FluidPhysicsConfig ] = makeCodec
27
27
28
- private def registryGet [A ](registry : Registry [A ], id : Identifier ): A = {
29
- require(registry.containsId(id), " Registry does not contain identifier: " + id)
30
- registry.get(id)
31
- }
28
+ private def registryGet [A ](registry : Registry [A ], id : Identifier ): A =
29
+ registry.getOrEmpty(id)
30
+ .orElseThrow(() => new IllegalArgumentException (" Registry does not contain identifier: " + id))
32
31
33
32
case class SpringConfig (block : Identifier = FluidPhysicsMod .SPRING_BLOCK_ID ,
34
33
updateBlocksInWorld : Boolean = false ,
You can’t perform that action at this time.
0 commit comments