mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 19:49:12 +00:00
Tweaked the Fake Controller submap manager to be a bit more friendly if other blocks use it.
This commit is contained in:
1 parent
09e38a4675
commit
29a5d6db68
2 files changed
+18
-16
No files matched your search
+15
-13
@@ -20,6 +20,13 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
|
||||
private TextureSubmap map;
|
||||
private CTM ctm = CTM.getInstance();
|
||||
private int meta;
|
||||
private String texturePath;
|
||||
|
||||
public SubmapManagerFakeController(int meta, String texture) {
|
||||
ctm.disableObscuredFaceCheck = true;
|
||||
this.meta = meta;
|
||||
texturePath = texture;
|
||||
}
|
||||
|
||||
public SubmapManagerFakeController(int meta) {
|
||||
ctm.disableObscuredFaceCheck = true;
|
||||
@@ -51,20 +58,15 @@ public class SubmapManagerFakeController extends SubmapManagerBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(String modName, Block block, IIconRegister register) {
|
||||
|
||||
switch(meta)
|
||||
if (texturePath != null)
|
||||
{
|
||||
default:
|
||||
Chisel.logger.info("SubmapManagerFakeController was called on block" + block.getUnlocalizedName()
|
||||
+ " but an entry was not provided in this class!");
|
||||
case 2:
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controller"), 2, 2);
|
||||
break;
|
||||
case 4:
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controllerPurple"), 2, 2);
|
||||
break;
|
||||
case 5:
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/uberWavy"), 2, 2);
|
||||
break;
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":" + texturePath), 2, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
Chisel.logger.info("SubmapManagerFakeController was called on block " + block.getUnlocalizedName()
|
||||
+ " without declaring texture, using a default texture instead.");
|
||||
map = new TextureSubmap(register.registerIcon(modName + ":futura/WIP/controller"), 2, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user