mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +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
@@ -8,7 +8,10 @@ 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.crafting.ToolBuilder;
|
||||
import tconstruct.library.tools.BowstringMaterial;
|
||||
import tconstruct.library.tools.FletchingMaterial;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.tools.TinkerTools;
|
||||
|
||||
@@ -41,6 +44,15 @@ public class Arrow extends ToolCore
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDefaultColor(int renderPass, int materialID) {
|
||||
// fletchling uses custom material
|
||||
if(renderPass == 2)
|
||||
return TConstructRegistry.getCustomMaterial(materialID, FletchingMaterial.class).color;
|
||||
|
||||
return super.getDefaultColor(renderPass, materialID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEffectSuffix ()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user