We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ce2113 commit 40554efCopy full SHA for 40554ef
1 file changed
api/src/main/java/com/viaversion/viaversion/api/minecraft/chunks/DataPalette.java
@@ -138,7 +138,13 @@ default void replaceIds(IntUnaryOperator mapper) {
138
* @param oldId old id
139
* @param newId new id
140
*/
141
- void replaceId(int oldId, int newId);
+ default void replaceId(int oldId, int newId) {
142
+ for (int i = 0; i < this.size(); i++) {
143
+ if (this.idByIndex(i) == oldId) {
144
+ this.setIdByIndex(i, newId);
145
+ }
146
147
148
149
/**
150
* Returns the size of the palette.
0 commit comments