public static void registerColorHandlers() {
final IItemColor ammoColor = (stack, tintIndex) -> {
switch (tintIndex) {
case 1:
return getAmmoColor(stack);
default:
return Color.WHITE.getRGB();
}
};
final IItemColor plasticColor = (stack, tintIndex) -> {
int plasticColour = ItemPlastic.getColour(stack);
return plasticColour >= 0 ? plasticColour : 0xffffff;
};
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(ammoColor, Itemss.GUN_AMMO);
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(plasticColor, Itemss.PLASTIC);
}
ItemColorHandler.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录