Skip to content

Commit

Permalink
Use an ImmutableList here
Browse files Browse the repository at this point in the history
  • Loading branch information
me4502 committed Feb 17, 2024
1 parent 0bb9067 commit a41f560
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package com.sk89q.worldedit.world.block;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Lists;
Expand Down Expand Up @@ -93,7 +94,7 @@ static Map<Map<Property<?>, Object>, BlockState> generateStateMap(BlockType bloc
// Create a list of lists of values, with a copy of the underlying lists
List<List<Object>> separatedValues = Lists.newArrayListWithCapacity(properties.size());
for (Property<?> prop : properties) {
separatedValues.add(Lists.newArrayList(prop.getValues()));
separatedValues.add(ImmutableList.copyOf(prop.getValues()));
}

List<List<Object>> valueLists = Lists.cartesianProduct(separatedValues);
Expand Down

0 comments on commit a41f560

Please sign in to comment.