Merge branch 'gamma-delta:main' into one-file

This commit is contained in:
Jeuv 2022-02-05 18:20:08 +01:00 committed by GitHub
commit 287673096c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ apply plugin: 'maven-publish'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
version = '0.5.0-dev.4'
version = '0.5.0-dev.5'
group = 'at.petra-k.hexcasting' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'hexcasting'

View file

@ -77,13 +77,13 @@ public record FrozenColorizer(Item item, UUID owner) {
}
private static int morphBetweenColors(int[] colors, Vec3 gradientDir, float time, Vec3 position) {
float fIdx = ((time + (float) gradientDir.dot(position)) % 1f) * colors.length;
float fIdx = Mth.positiveModulo(time + (float) gradientDir.dot(position), 1f) * colors.length;
int baseIdx = Mth.floor(fIdx);
float tRaw = fIdx - baseIdx;
// float t = -(float) (Math.cbrt(Mth.cos(tRaw * Mth.PI)) / 2) + 0.5f;
float t = tRaw;
int start = colors[baseIdx];
int start = colors[baseIdx % colors.length];
int end = colors[(baseIdx + 1) % colors.length];
var r1 = FastColor.ARGB32.red(start);