mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
Fix bolt fletchling color
This commit is contained in:
1 parent
8fe42be9f2
commit
4f9f63ac93
1 file changed
+18
@@ -1,5 +1,9 @@
|
||||
package tconstruct.weaponry.ammo;
|
||||
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.CustomMaterial;
|
||||
import tconstruct.library.tools.FletchingMaterial;
|
||||
import tconstruct.library.tools.FletchlingLeafMaterial;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
import tconstruct.library.tools.DualMaterialToolPart;
|
||||
import tconstruct.library.weaponry.AmmoItem;
|
||||
@@ -89,4 +93,18 @@ public class BoltAmmo extends AmmoItem {
|
||||
list.add(tool);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDefaultColor(int renderPass, int materialID) {
|
||||
if(renderPass != 2)
|
||||
return super.getDefaultColor(renderPass, materialID);
|
||||
|
||||
CustomMaterial mat = TConstructRegistry.getCustomMaterial(materialID, FletchingMaterial.class);
|
||||
if(mat == null)
|
||||
TConstructRegistry.getCustomMaterial(materialID, FletchlingLeafMaterial.class);
|
||||
if(mat == null)
|
||||
return 0xffffff;
|
||||
|
||||
return mat.color;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user