Fix shaders not loading from mod domains Closes #3921

This commit is contained in:
LexManos committed 2017-06-01 15:47:49 -07:00
1 parent d867bd299f
commit c544f06880
4 files changed
+38

No files matched your search

@@ -0,0 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/shader/ShaderGroup.java
+++ ../src-work/minecraft/net/minecraft/client/shader/ShaderGroup.java
@@ -179,7 +179,8 @@
if (framebuffer2 == null)
{
- ResourceLocation resourcelocation = new ResourceLocation("textures/effect/" + s3 + ".png");
+ String[] rl = ResourceLocation.func_177516_a(s3);
+ ResourceLocation resourcelocation = new ResourceLocation(rl[0], "textures/effect/" + rl[1] + ".png");
IResource iresource = null;
try
@@ -0,0 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/shader/ShaderLoader.java
+++ ../src-work/minecraft/net/minecraft/client/shader/ShaderLoader.java
@@ -61,7 +61,8 @@
if (shaderloader == null)
{
- ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_148057_2_ + p_148057_1_.func_148063_b());
+ String[] rl = ResourceLocation.func_177516_a(p_148057_2_);
+ ResourceLocation resourcelocation = new ResourceLocation(rl[0], "shaders/program/" + rl[1] + p_148057_1_.func_148063_b());
IResource iresource = p_148057_0_.func_110536_a(resourcelocation);
try
@@ -0,0 +1,12 @@
--- ../src-base/minecraft/net/minecraft/client/shader/ShaderManager.java
+++ ../src-work/minecraft/net/minecraft/client/shader/ShaderManager.java
@@ -54,7 +54,8 @@
public ShaderManager(IResourceManager p_i45087_1_, String p_i45087_2_) throws JsonException, IOException
{
JsonParser jsonparser = new JsonParser();
- ResourceLocation resourcelocation = new ResourceLocation("shaders/program/" + p_i45087_2_ + ".json");
+ String[] rl = ResourceLocation.func_177516_a(p_i45087_2_);
+ ResourceLocation resourcelocation = new ResourceLocation(rl[0], "shaders/program/" + rl[1] + ".json");
this.field_148007_m = p_i45087_2_;
IResource iresource = null;
+2
View File
@@ -315,3 +315,5 @@ public net.minecraft.command.EntitySelector func_190826_c(Ljava/lang/String;)Lja
protected net.minecraft.world.Teleporter field_85192_a # world
protected net.minecraft.world.Teleporter field_77187_a # random
protected net.minecraft.world.Teleporter field_85191_c # destinationCoordinateCache
public net.minecraft.util.ResourceLocation func_177516_a(Ljava/lang/String;)[Ljava/lang/String; # splitObjectName