-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4976960
commit 913987a
Showing
9 changed files
with
156 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/pl/asie/foamfix/client/FoamyDefaultResourcePackLight.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package pl.asie.foamfix.client; | ||
|
||
import net.minecraft.client.resources.DefaultResourcePack; | ||
import net.minecraft.client.resources.ResourceIndex; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* More compatibility-friendly version of FoamyDefaultResourcePack, used | ||
* for example by OptiFine. | ||
*/ | ||
public class FoamyDefaultResourcePackLight extends DefaultResourcePack { | ||
private final Set<ResourceLocation> foundResources = new HashSet<>(); | ||
|
||
public FoamyDefaultResourcePackLight(ResourceIndex resourceIndexIn) { | ||
super(resourceIndexIn); | ||
} | ||
|
||
@Override | ||
public boolean resourceExists(ResourceLocation loc) { | ||
if (foundResources.contains(loc)) return true; | ||
|
||
if (super.resourceExists(loc)) { | ||
foundResources.add(loc); | ||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/main/java/pl/asie/foamfix/coremod/TransformerFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package pl.asie.foamfix.coremod; | ||
|
||
public interface TransformerFunction { | ||
byte[] transform(byte[] data, String transformedName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters