Common Shaders #14
No files matched your search
@@ -1,4 +0,0 @@
|
|||||||
package net.irisshaders.iris.shadows;
|
|
||||||
|
|
||||||
public class ShadowCompositeRenderer extends CommonShadowCompositeRenderer {
|
|
||||||
}
|
|
||||||
@@ -17,6 +17,6 @@ public interface MixinDumpable extends MCDumpable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
default void dumpContents(MCResourceLocation resourceLocation, Path path) throws IOException {
|
default void dumpContents(MCResourceLocation resourceLocation, Path path) throws IOException {
|
||||||
this.dumpContents((ResourceLocation) resourceLocation, path);
|
this.dumpContents((ResourceLocation) (Object)resourceLocation, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ public class PBRAtlasTexture extends AbstractTexture implements PBRDumpable {
|
|||||||
public PBRAtlasTexture(TextureAtlas atlasTexture, PBRType type) {
|
public PBRAtlasTexture(TextureAtlas atlasTexture, PBRType type) {
|
||||||
this.atlasTexture = atlasTexture;
|
this.atlasTexture = atlasTexture;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
id = (MCResourceLocation)ResourceLocationUtil.make(atlasTexture.location().getNamespace(), atlasTexture.location().getPath().replace(".png", "") + type.getSuffix() + ".png");
|
id = (MCResourceLocation)(Object)ResourceLocationUtil.make(atlasTexture.location().getNamespace(), atlasTexture.location().getPath().replace(".png", "") + type.getSuffix() + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void syncAnimation(SpriteContents.Ticker source, SpriteContents.Ticker target) {
|
public static void syncAnimation(SpriteContents.Ticker source, SpriteContents.Ticker target) {
|
||||||
|
|||||||
+3
-3
@@ -90,7 +90,7 @@ public class AtlasPBRLoader implements PBRTextureLoader<TextureAtlas> {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
protected PBRTextureAtlasSprite createPBRSprite(TextureAtlasSprite sprite, MCResourceManager resourceManager, TextureAtlas atlas, int atlasWidth, int atlasHeight, int mipLevel, PBRType pbrType) {
|
protected PBRTextureAtlasSprite createPBRSprite(TextureAtlasSprite sprite, MCResourceManager resourceManager, TextureAtlas atlas, int atlasWidth, int atlasHeight, int mipLevel, PBRType pbrType) {
|
||||||
MCResourceLocation spriteName = (MCResourceLocation)sprite.contents().name();
|
MCResourceLocation spriteName = (MCResourceLocation)(Object)sprite.contents().name();
|
||||||
MCResourceLocation pbrImageLocation = getPBRImageLocation(spriteName, pbrType);
|
MCResourceLocation pbrImageLocation = getPBRImageLocation(spriteName, pbrType);
|
||||||
|
|
||||||
Optional<MCResource> optionalResource = resourceManager.getResource(pbrImageLocation);
|
Optional<MCResource> optionalResource = resourceManager.getResource(pbrImageLocation);
|
||||||
@@ -175,9 +175,9 @@ public class AtlasPBRLoader implements PBRTextureLoader<TextureAtlas> {
|
|||||||
String path = pbrType.appendSuffix(spriteName.getPath());
|
String path = pbrType.appendSuffix(spriteName.getPath());
|
||||||
// Temporary fix for CIT Resewn. CIT Resewn has sprites that are not in the textures/ folder, so a custom check must be used here to avoid that assumption.
|
// Temporary fix for CIT Resewn. CIT Resewn has sprites that are not in the textures/ folder, so a custom check must be used here to avoid that assumption.
|
||||||
if (path.startsWith("optifine/cit/")) {
|
if (path.startsWith("optifine/cit/")) {
|
||||||
return (MCResourceLocation) ResourceLocationUtil.make(spriteName.getNamespace(), path + ".png");
|
return (MCResourceLocation)(Object) ResourceLocationUtil.make(spriteName.getNamespace(), path + ".png");
|
||||||
}
|
}
|
||||||
return (MCResourceLocation) ResourceLocationUtil.make(spriteName.getNamespace(), "textures/" + path + ".png");
|
return (MCResourceLocation)(Object) ResourceLocationUtil.make(spriteName.getNamespace(), "textures/" + path + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static class PBRSpriteContents extends SpriteContents implements CustomMipmapGenerator.Provider {
|
protected static class PBRSpriteContents extends SpriteContents implements CustomMipmapGenerator.Provider {
|
||||||
|
|||||||
+10
-4
@@ -42,7 +42,13 @@ import net.minecraft.world.level.GameType;
|
|||||||
import net.minecraft.world.level.LightLayer;
|
import net.minecraft.world.level.LightLayer;
|
||||||
import net.minecraft.world.level.material.FogType;
|
import net.minecraft.world.level.material.FogType;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.embeddedt.embeddium.compat.mc.*;
|
import org.embeddedt.embeddium.compat.mc.MCAbstractTexture;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MCDynamicTexture;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MCNativeImage;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MCResourceLocation;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MCResourceManager;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MCTextureManager;
|
||||||
|
import org.embeddedt.embeddium.compat.mc.MinecraftVersionShimService;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import org.embeddedt.embeddium.impl.loader.common.EarlyLoaderServices;
|
import org.embeddedt.embeddium.impl.loader.common.EarlyLoaderServices;
|
||||||
import org.joml.*;
|
import org.joml.*;
|
||||||
@@ -602,7 +608,7 @@ public class MinecraftModernVersionShimImpl implements MinecraftVersionShimServi
|
|||||||
|
|
||||||
public MCResourceLocation makeResourceLocation(String namespace, String path) {
|
public MCResourceLocation makeResourceLocation(String namespace, String path) {
|
||||||
//? if >=1.21
|
//? if >=1.21
|
||||||
/*return (IResourceLocation)(Object) ResourceLocation.fromNamespaceAndPath(namespace, path);*/
|
/*return (MCResourceLocation)(Object) ResourceLocation.fromNamespaceAndPath(namespace, path);*/
|
||||||
//? if <1.21
|
//? if <1.21
|
||||||
return (MCResourceLocation)(Object) new ResourceLocation(namespace, path);
|
return (MCResourceLocation)(Object) new ResourceLocation(namespace, path);
|
||||||
}
|
}
|
||||||
@@ -610,9 +616,9 @@ public class MinecraftModernVersionShimImpl implements MinecraftVersionShimServi
|
|||||||
public MCResourceLocation makeResourceLocation(String str) {
|
public MCResourceLocation makeResourceLocation(String str) {
|
||||||
//? if >=1.21 {
|
//? if >=1.21 {
|
||||||
/*if(str.contains(":")) {
|
/*if(str.contains(":")) {
|
||||||
return (IResourceLocation)(Object) ResourceLocation.parse(str);
|
return (MCResourceLocation)(Object) ResourceLocation.parse(str);
|
||||||
} else {
|
} else {
|
||||||
return (IResourceLocation)(Object) ResourceLocation.withDefaultNamespace(str);
|
return (MCResourceLocation)(Object) ResourceLocation.withDefaultNamespace(str);
|
||||||
}
|
}
|
||||||
*///?} else
|
*///?} else
|
||||||
return (MCResourceLocation)(Object)new ResourceLocation(str);
|
return (MCResourceLocation)(Object)new ResourceLocation(str);
|
||||||
|
|||||||
Reference in new issue
Block a user