mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-27 15:33:12 +00:00
Update buildscript & spotlessApply
This commit is contained in:
1 parent
e4329e2b8f
commit
8683a345c3
818 files changed
+51123
-49403
No files matched your search
@@ -9,32 +9,32 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BinnieIcon extends BinnieResource {
|
||||
private int textureSheet;
|
||||
private IIcon icon;
|
||||
private int textureSheet;
|
||||
private IIcon icon;
|
||||
|
||||
public BinnieIcon(AbstractMod mod, ResourceType type, String path) {
|
||||
super(mod, type, path);
|
||||
icon = null;
|
||||
textureSheet = ((type != ResourceType.Block) ? 1 : 0);
|
||||
Binnie.Resource.registerIcon(this);
|
||||
}
|
||||
public BinnieIcon(AbstractMod mod, ResourceType type, String path) {
|
||||
super(mod, type, path);
|
||||
icon = null;
|
||||
textureSheet = ((type != ResourceType.Block) ? 1 : 0);
|
||||
Binnie.Resource.registerIcon(this);
|
||||
}
|
||||
|
||||
public IIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
public IIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IIconRegister register) {
|
||||
registerIcon(register);
|
||||
return icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IIconRegister register) {
|
||||
registerIcon(register);
|
||||
return icon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcon(IIconRegister register) {
|
||||
icon = BinnieCore.proxy.getIcon(register, mod, path);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcon(IIconRegister register) {
|
||||
icon = BinnieCore.proxy.getIcon(register, mod, path);
|
||||
}
|
||||
|
||||
public int getTextureSheet() {
|
||||
return textureSheet;
|
||||
}
|
||||
public int getTextureSheet() {
|
||||
return textureSheet;
|
||||
}
|
||||
}
|
||||
@@ -4,25 +4,25 @@ import binnie.core.AbstractMod;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class BinnieResource {
|
||||
String mod;
|
||||
private ResourceType type;
|
||||
String path;
|
||||
String mod;
|
||||
private ResourceType type;
|
||||
String path;
|
||||
|
||||
public BinnieResource(AbstractMod mod, ResourceType type, String path) {
|
||||
this(mod.getModID(), type, path);
|
||||
}
|
||||
public BinnieResource(AbstractMod mod, ResourceType type, String path) {
|
||||
this(mod.getModID(), type, path);
|
||||
}
|
||||
|
||||
public BinnieResource(String modid, ResourceType type, String path) {
|
||||
mod = modid;
|
||||
this.type = type;
|
||||
this.path = path;
|
||||
}
|
||||
public BinnieResource(String modid, ResourceType type, String path) {
|
||||
mod = modid;
|
||||
this.type = type;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public ResourceLocation getResourceLocation() {
|
||||
return new ResourceLocation(mod, "textures/" + type.toString() + "/" + path);
|
||||
}
|
||||
public ResourceLocation getResourceLocation() {
|
||||
return new ResourceLocation(mod, "textures/" + type.toString() + "/" + path);
|
||||
}
|
||||
|
||||
public String getShortPath() {
|
||||
return "textures/" + type.toString() + "/" + path;
|
||||
}
|
||||
public String getShortPath() {
|
||||
return "textures/" + type.toString() + "/" + path;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
package binnie.core.resource;
|
||||
|
||||
public interface IBinnieTexture {
|
||||
BinnieResource getTexture();
|
||||
BinnieResource getTexture();
|
||||
}
|
||||
@@ -3,44 +3,43 @@ package binnie.core.resource;
|
||||
import binnie.core.AbstractMod;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class ManagerResource {
|
||||
private List<BinnieIcon> icons;
|
||||
private List<BinnieIcon> icons;
|
||||
|
||||
public ManagerResource() {
|
||||
icons = new ArrayList<>();
|
||||
}
|
||||
public ManagerResource() {
|
||||
icons = new ArrayList<>();
|
||||
}
|
||||
|
||||
public BinnieResource getPNG(AbstractMod mod, ResourceType type, String path) {
|
||||
return getFile(mod, type, path + ".png");
|
||||
}
|
||||
public BinnieResource getPNG(AbstractMod mod, ResourceType type, String path) {
|
||||
return getFile(mod, type, path + ".png");
|
||||
}
|
||||
|
||||
public BinnieResource getFile(AbstractMod mod, ResourceType type, String path) {
|
||||
return new BinnieResource(mod, type, path);
|
||||
}
|
||||
public BinnieResource getFile(AbstractMod mod, ResourceType type, String path) {
|
||||
return new BinnieResource(mod, type, path);
|
||||
}
|
||||
|
||||
public void registerIcon(BinnieIcon binnieIcon) {
|
||||
icons.add(binnieIcon);
|
||||
}
|
||||
public void registerIcon(BinnieIcon binnieIcon) {
|
||||
icons.add(binnieIcon);
|
||||
}
|
||||
|
||||
public BinnieIcon getItemIcon(AbstractMod mod, String iconFile) {
|
||||
return new BinnieIcon(mod, ResourceType.Item, iconFile);
|
||||
}
|
||||
public BinnieIcon getItemIcon(AbstractMod mod, String iconFile) {
|
||||
return new BinnieIcon(mod, ResourceType.Item, iconFile);
|
||||
}
|
||||
|
||||
public BinnieIcon getBlockIcon(AbstractMod mod, String iconFile) {
|
||||
return new BinnieIcon(mod, ResourceType.Block, iconFile);
|
||||
}
|
||||
public BinnieIcon getBlockIcon(AbstractMod mod, String iconFile) {
|
||||
return new BinnieIcon(mod, ResourceType.Block, iconFile);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register, int type) {
|
||||
for (BinnieIcon icon : icons) {
|
||||
if (icon.getTextureSheet() == type) {
|
||||
icon.registerIcon(register);
|
||||
}
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register, int type) {
|
||||
for (BinnieIcon icon : icons) {
|
||||
if (icon.getTextureSheet() == type) {
|
||||
icon.registerIcon(register);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,21 @@
|
||||
package binnie.core.resource;
|
||||
|
||||
public enum ResourceType {
|
||||
Item("items"),
|
||||
Block("blocks"),
|
||||
Tile("tile"),
|
||||
GUI("gui"),
|
||||
FX("fx"),
|
||||
Entity("entities");
|
||||
Item("items"),
|
||||
Block("blocks"),
|
||||
Tile("tile"),
|
||||
GUI("gui"),
|
||||
FX("fx"),
|
||||
Entity("entities");
|
||||
|
||||
String name;
|
||||
String name;
|
||||
|
||||
ResourceType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
ResourceType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user