Skip to content

Commit

Permalink
Avoid extra list allocation in TableModel#getQuads
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Jan 18, 2025
1 parent 3f33987 commit 0b5b6ec
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import net.neoforged.neoforge.common.data.ExistingFileHelper;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -57,7 +56,7 @@ public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction
if (state != null && state.hasProperty(TableBlock.TYPE)) {
type = state.getValue(TableBlock.TYPE);
}
return new ArrayList<>(baseMap.get(type).getQuads(state, side, rand, extraData, renderType));
return baseMap.get(type).getQuads(state, side, rand, extraData, renderType);
}

@Override
Expand Down

0 comments on commit 0b5b6ec

Please sign in to comment.