mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-25 14:44:28 +00:00
* Remove ARR assets * Refactor leaf mixins * Refactor asset loading Introduces a resource reload in POSTINIT, just before loading models * Move lectern model to template * Unlink test blocks and injected QuadProviders Now they can be enabled or disabled separately * Replace log renderer * Fix JSON model culling * Actually fix culling this time * Update NdQuadBuilder.java * Remove unused method * Support tris Hasn't been tested * Pull QuadBuilder into an API * Move Variant and Loader to API * Glass QP and minor FluidRenderer improvement * Rename Loader * Move injected QuadProviders to a field This way they don't get inherited * Prioritize 7.10 textures over modern * Use JSON models for vanilla logs * Add a rewind method This doesn't fix the problem, but it looks interesting, maybe it's closer? * Fix texture loading * Reenable rewinding * FRAPI AO builds Still useless tho * Super broken, but maybe salvageable? * Revert "Super broken, but maybe salvageable?" This reverts commit ef4352f0d82f93039547bacdd38bddca65193743. * Revert "FRAPI AO builds" This reverts commit 7a4fd800831f973ea25c6a3c2b088afcf224770f. * Cleanroom Mojang's rewinder * Not-really-working-rewinding * Mark JSON API as beta * Ew, star imports * Update gtnh gradle * Update dependencies.gradle * Update dependencies.gradle --------- Co-authored-by: Jason Mitchell <[email protected]>
35 lines
833 B
Java
35 lines
833 B
Java
package com.gtnewhorizons.angelica.api;
|
|
|
|
import com.google.common.annotations.Beta;
|
|
import lombok.Getter;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import org.joml.Matrix4f;
|
|
|
|
import static java.lang.Math.toRadians;
|
|
|
|
@Beta
|
|
public class Variant {
|
|
|
|
@Getter
|
|
private final ResourceLocation model;
|
|
private final float x;
|
|
private final float y;
|
|
private final boolean uvLock;
|
|
|
|
public Variant(ResourceLocation model, int x, int y, boolean uvLock) {
|
|
this.model = model;
|
|
this.x = (float) toRadians(x);
|
|
this.y = (float) toRadians(y);
|
|
this.uvLock = uvLock;
|
|
}
|
|
|
|
public Matrix4f getAffineMatrix() {
|
|
|
|
return new Matrix4f()
|
|
.translation(-.5f, -.5f, -.5f)
|
|
.rotateLocalY(x)
|
|
.rotateLocalX(y)
|
|
.translateLocal(.5f, .5f, .5f);
|
|
}
|
|
}
|