mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Add a hook for the default color and use it for arrow fletchlings and bowstrings
This commit is contained in:
1 parent
7c3e21be8d
commit
f78d8af170
3 files changed
+32
-2
No files matched your search
@@ -9,6 +9,8 @@ import net.minecraft.item.*;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.BowstringMaterial;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
public class Shortbow extends BowBase
|
||||
@@ -37,6 +39,17 @@ 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;
|
||||
|
||||
return super.getDefaultColor(renderPass, materialID);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getEffectSuffix ()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user