mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 03:49:22 +00:00
Various Mixin-related Fixes (#890)
* Update deps * Remove dead code * Add missing `@Override` annotations * Fix generics * Add `serialVersionUID`s * Address deprecation warnings * Use `@WrapWithCondition` v2 * Misc cleanup * Use AccessTransformers if possible * Fix mixin conflicts * Add `@Mutable` annotations * Fix injection targets * Update deps
This commit is contained in:
1 parent
611bbf02c8
commit
bb5526598e
158 files changed
+252
-619
No files matched your search
@@ -2,8 +2,6 @@ package net.coderbot.iris.texture.pbr;
|
||||
|
||||
import com.gtnewhorizons.angelica.compat.mojang.AutoClosableAbstractTexture;
|
||||
import com.gtnewhorizons.angelica.config.AngelicaConfig;
|
||||
import com.gtnewhorizons.angelica.mixins.interfaces.TextureAtlasSpriteAccessor;
|
||||
import com.gtnewhorizons.angelica.mixins.interfaces.TextureMapAccessor;
|
||||
import lombok.Getter;
|
||||
import net.coderbot.iris.Iris;
|
||||
import net.coderbot.iris.texture.util.TextureExporter;
|
||||
@@ -36,7 +34,7 @@ public class PBRAtlasTexture extends AutoClosableAbstractTexture {
|
||||
public PBRAtlasTexture(TextureMap textureMap, PBRType type) {
|
||||
this.texMap = textureMap;
|
||||
this.type = type;
|
||||
id = type.appendToFileLocation(((TextureMapAccessor)textureMap).getLocationBlocksTexture());
|
||||
id = type.appendToFileLocation(TextureMap.locationBlocksTexture);
|
||||
|
||||
}
|
||||
|
||||
@@ -112,11 +110,10 @@ public class PBRAtlasTexture extends AutoClosableAbstractTexture {
|
||||
|
||||
protected void uploadSprite(TextureAtlasSprite sprite) {
|
||||
|
||||
final TextureAtlasSpriteAccessor accessor = (TextureAtlasSpriteAccessor) sprite;
|
||||
if (accessor.getMetadata().getFrameCount() > 1) {
|
||||
final AnimationMetadataSection metadata = accessor.getMetadata();
|
||||
if (sprite.animationMetadata.getFrameCount() > 1) {
|
||||
final AnimationMetadataSection metadata = sprite.animationMetadata;
|
||||
final int frameCount = sprite.getFrameCount();
|
||||
for (int frame = accessor.getFrame(); frame >= 0; frame--) {
|
||||
for (int frame = sprite.frameCounter; frame >= 0; frame--) {
|
||||
final int frameIndex = metadata.getFrameIndex(frame);
|
||||
if (frameIndex >= 0 && frameIndex < frameCount) {
|
||||
TextureUtil.uploadTextureMipmap(sprite.getFrameTextureData(frameIndex), sprite.getIconWidth(), sprite.getIconHeight(), sprite.getOriginX(), sprite.getOriginY(), false, false);
|
||||
|
||||
Reference in new issue
Block a user