mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-24 22:14:31 +00:00
Merge branch 'master' into weaponry
This commit is contained in:
commit
6adeb21d7c
7 files changed
+40
-8
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.BowstringMaterial;
|
||||
import tconstruct.library.tools.CustomMaterial;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
|
||||
@@ -45,8 +46,11 @@ public class Shortbow extends BowBase
|
||||
@Override
|
||||
protected int getDefaultColor(int renderPass, int materialID) {
|
||||
// bowstring uses custom material
|
||||
if(renderPass == 0)
|
||||
return TConstructRegistry.getCustomMaterial(materialID, BowstringMaterial.class).color;
|
||||
if(renderPass == 0) {
|
||||
CustomMaterial mat = TConstructRegistry.getCustomMaterial(materialID, BowstringMaterial.class);
|
||||
if(mat != null)
|
||||
return mat.color;
|
||||
}
|
||||
|
||||
return super.getDefaultColor(renderPass, materialID);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user