mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 14:34:33 +00:00
Fix many server crashes from client-side code
This commit is contained in:
1 parent
f660f213f6
commit
b8acba968e
49 files changed
+232
-147
No files matched your search
@@ -6,11 +6,17 @@ import binnie.core.resource.ResourceType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class ParsedTextureSheet implements IBinnieTexture {
|
||||
private String name;
|
||||
private String modid;
|
||||
private String path;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
public ParsedTextureSheet(final String name, final String modid, final String path) {
|
||||
this.name = name;
|
||||
this.modid = modid;
|
||||
@@ -20,6 +26,9 @@ class ParsedTextureSheet implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return new BinnieResource(this.modid, ResourceType.GUI, this.path);
|
||||
if (resource == null) {
|
||||
resource = new BinnieResource(this.modid, ResourceType.GUI, this.path);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user