Replace one missed usage
It was also using the copy-constructor, so this way it should also be more efficient
This commit is contained in:
1 file changed
+3
-3
@@ -1018,10 +1018,10 @@ public class CarpetEventServer
|
|||||||
EntityValue.of(attacker!= null?attacker.get():Event.getExplosionCausingEntity(e)),
|
EntityValue.of(attacker!= null?attacker.get():Event.getExplosionCausingEntity(e)),
|
||||||
StringValue.of(type.name().toLowerCase(Locale.ROOT)),
|
StringValue.of(type.name().toLowerCase(Locale.ROOT)),
|
||||||
BooleanValue.of(createFire),
|
BooleanValue.of(createFire),
|
||||||
new ListValue(affectedBlocks.stream().filter(b -> !world.isEmptyBlock(b)). map( // da heck they send air blocks
|
ListValue.wrap(affectedBlocks.stream().filter(b -> !world.isEmptyBlock(b)). map( // da heck they send air blocks
|
||||||
b -> new BlockValue(world.getBlockState(b),world,b)
|
b -> new BlockValue(world.getBlockState(b),world,b)
|
||||||
).collect(Collectors.toList())),
|
)),
|
||||||
new ListValue(affectedEntities.stream().map(EntityValue::of).collect(Collectors.toList()))
|
ListValue.wrap(affectedEntities.stream().map(EntityValue::of))
|
||||||
), () -> CarpetServer.minecraft_server.createCommandSourceStack().withLevel(world)
|
), () -> CarpetServer.minecraft_server.createCommandSourceStack().withLevel(world)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user