File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
src/main/java/cn/mccraft/pangu/core Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ configurations {
6363}
6464
6565dependencies {
66- embed (' com.github.trychen:ByteDataStream:2bbcdbd6c5 ' ) {
66+ embed (' com.github.trychen:ByteDataStream:1.2-SNAPSHOT ' ) {
6767 exclude group : ' org.ow2.asm'
6868 exclude group : ' com.github.Mouse0w0'
6969 }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
44
55# Mod Properties
66mod_id = Pangu
7- mod_version = 1.5.0
7+ mod_version = 1.5.1
88mod_group = cn.mccraft.pangu
99mod_core_plugin = cn.mccraft.pangu.core.asm.PanguPlugin
1010
Original file line number Diff line number Diff line change 1818@ Mod (
1919 modid = PanguCore .ID ,
2020 name = "Pangu Core" ,
21- version = "1.5.0 " ,
21+ version = "1.5.1 " ,
2222 useMetadata = true ,
2323 acceptedMinecraftVersions = "[1.12.2,1.13)"
2424)
Original file line number Diff line number Diff line change 22
33import net .minecraft .util .ResourceLocation ;
44
5+ import java .net .MalformedURLException ;
6+
57public interface TextureProvider {
68 ResourceLocation getTexture ();
9+
10+ static TextureProvider of (String path , ResourceLocation missing ) {
11+ if (path .startsWith ("http://" ) || path .startsWith ("https://" )) {
12+ try {
13+ return new RemoteImage (path , missing );
14+ } catch (MalformedURLException e ) {
15+ }
16+ } else if (path .startsWith ("local:" )) {
17+ return new BuiltinImage (new ResourceLocation (path ));
18+ }
19+
20+ return null ;
21+ }
722}
You can’t perform that action at this time.
0 commit comments