Skip to content

Commit

Permalink
changes to MuTEIcon for more fluidity
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueWeabo committed Dec 24, 2024
1 parent 86cd03a commit 1293585
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/main/java/com/gtnewhorizons/mutecore/api/render/MuTEIcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@

public class MuTEIcon implements IIcon {

private String iconPath;
private IIcon icon;
protected ResourceLocation iconResource;
protected IIcon icon;

public MuTEIcon(String modid, String path) {
this(new ResourceLocation(modid, path).toString());
iconResource = new ResourceLocation(modid, path);
TextureRegistry.registerBlockIcon(this);
}

public MuTEIcon(String path) {
iconPath = path;
TextureRegistry.registerBlockIcon(this);
public IIcon getInternalIcon() {
return icon;
}

public ResourceLocation getIconLocation() {
return iconResource;
}

public void register(IIconRegister reg) {
icon = reg.registerIcon(iconPath);
icon = reg.registerIcon(iconResource.toString());
}

@Override
Expand Down

0 comments on commit 1293585

Please sign in to comment.