Skip to content

Commit 0c531ae

Browse files
committed
add multipart support and fix uvs
1 parent e957602 commit 0c531ae

File tree

9 files changed

+341
-106
lines changed

9 files changed

+341
-106
lines changed

frontend/src/ts/math/mat2.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,26 @@ export default class mat2 {
160160
return new mat2(cosa, -sina, sina, cosa);
161161
}
162162

163+
public static rotationZ180() {
164+
return mat2.fromColumnMajor(-1, 0, 0, -1);
165+
}
166+
167+
public static rotationZ90CW() {
168+
return mat2.fromColumnMajor(0, -1, 1, 0);
169+
}
170+
171+
public static rotationZ270CW() {
172+
return mat2.fromColumnMajor(0, 1, -1, 0);
173+
}
174+
175+
public static rotationZ90CCW() {
176+
return mat2.rotationZ270CW();
177+
}
178+
179+
public static rotationZ270CCW() {
180+
return mat2.rotationZ90CW();
181+
}
182+
163183
/**
164184
* Appends a rotation operation around the z-axis by a given angle.
165185
* @param a the angle to rotate in radians.

frontend/src/ts/minecraft/AbstractSection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class SingleBlockStateSection implements Section {
2828
this.paletteEntry = paletteEntry;
2929
const blockState = this.minecraftWorld.ressourcePack.getBlockStateByURL(this.paletteEntry.Name);
3030
if (blockState) {
31-
const blockStateModels = blockState.getVariantByProperties(paletteEntry.Properties);
31+
const blockStateModels = blockState.getBlockStateModelByProperties(paletteEntry.Properties);
3232
if (blockStateModels)
3333
if (Array.isArray(blockStateModels))
3434
this.blockStateModel = blockStateModels[0];

0 commit comments

Comments
 (0)