From 3050a82b96760a00dc30b872ef06fd5e5a33596b Mon Sep 17 00:00:00 2001 From: altrisi Date: Thu, 19 Jan 2023 01:46:54 +0100 Subject: [PATCH] Replace one missed usage It was also using the copy-constructor, so this way it should also be more efficient --- src/main/java/carpet/script/CarpetEventServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/carpet/script/CarpetEventServer.java b/src/main/java/carpet/script/CarpetEventServer.java index 01ebfe99..3c84663d 100644 --- a/src/main/java/carpet/script/CarpetEventServer.java +++ b/src/main/java/carpet/script/CarpetEventServer.java @@ -1018,10 +1018,10 @@ public class CarpetEventServer EntityValue.of(attacker!= null?attacker.get():Event.getExplosionCausingEntity(e)), StringValue.of(type.name().toLowerCase(Locale.ROOT)), 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) - ).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) ); }