mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 04:42:17 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d56b1c2fc | ||
|
|
6e60f671b5 |
No files matched your search
@@ -21,20 +21,23 @@ public class TextureInfoCache {
|
||||
}
|
||||
|
||||
public TextureInfo getInfo(int id) {
|
||||
if(id < 0) return null;
|
||||
return cache.computeIfAbsent(id, TextureInfo::new);
|
||||
}
|
||||
|
||||
public void onTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, @Nullable IntBuffer pixels) {
|
||||
if (level == 0) {
|
||||
if (target == GL11.GL_TEXTURE_2D && level == 0) {
|
||||
final TextureInfo info = getInfo(GLStateManager.getBoundTexture());
|
||||
if(info == null) return;
|
||||
info.internalFormat = internalformat;
|
||||
info.width = width;
|
||||
info.height = height;
|
||||
}
|
||||
}
|
||||
public void onTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset) {
|
||||
if (level == 0) {
|
||||
if (target == GL11.GL_TEXTURE_2D && level == 0) {
|
||||
final TextureInfo info = getInfo(GLStateManager.getBoundTexture());
|
||||
if(info == null) return;
|
||||
info.internalFormat = internalformat;
|
||||
info.width = width;
|
||||
info.height = height;
|
||||
@@ -42,7 +45,7 @@ public class TextureInfoCache {
|
||||
}
|
||||
|
||||
public void onDeleteTexture(int id) {
|
||||
cache.remove(id);
|
||||
if(id >= 0) cache.remove(id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,6 +28,7 @@ public enum Mixins {
|
||||
,"angelica.MixinEntityRenderer"
|
||||
,"angelica.MixinMinecraft"
|
||||
,"angelica.optimizations.MixinRendererLivingEntity"
|
||||
,"angelica.MixinFMLClientHandler"
|
||||
)
|
||||
),
|
||||
ANGELICA_VBO(
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.gtnewhorizons.angelica.mixins.early.angelica;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
|
||||
@Mixin(value = FMLClientHandler.class, remap = false)
|
||||
public class MixinFMLClientHandler {
|
||||
/**
|
||||
* @author mitchej123
|
||||
* @reason Remove more traces of Optifine
|
||||
*/
|
||||
@Overwrite
|
||||
public void detectOptifine() {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* @author mitchej123
|
||||
* @reason Remove more traces of Optifine
|
||||
*/
|
||||
@Overwrite
|
||||
public boolean hasOptifine() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user