private void registerExtraTraitModifiers(Material material, ToolCore tool, PartMaterialType partMaterialType) { partMaterialType.getPossibleParts().forEach(part -> registerExtraTraitModifiers(material, tool, partMaterialType, part)); }
@SideOnly(Side.CLIENT) public void updateIcon() { icon = null; if(restriction != null) { Iterator<IToolPart> iterator = restriction.getPossibleParts().iterator(); while(iterator.hasNext() && icon == null) { icon = iterator.next().getOutlineRenderStack(); } } } }
/** * Register a tool, making it known to tinkers' systems. * All toolparts used to craft the tool will be registered as well. */ public static void registerTool(ToolCore tool) { tools.add(tool); for(PartMaterialType pmt : tool.getRequiredComponents()) { for(IToolPart tp : pmt.getPossibleParts()) { registerToolPart(tp); } } }
private void registerCustomTextures(int i, ResourceLocation resourceLocation, ToolCore toolCore) { if(toolCore == null) { CustomTextureCreator.registerTexture(resourceLocation); } else { for(IToolPart part : toolCore.getRequiredComponents().get(i).getPossibleParts()) { CustomTextureCreator.registerTextureForPart(resourceLocation, part); } } }
private void registerStencil(Item pattern, ToolPart toolPart) { for(ToolCore toolCore : TinkerRegistry.getTools()) { for(PartMaterialType partMaterialType : toolCore.getRequiredComponents()) { if(partMaterialType.getPossibleParts().contains(toolPart)) { ItemStack stencil = new ItemStack(pattern); Pattern.setTagForPart(stencil, toolPart); TinkerRegistry.registerStencilTableCrafting(stencil); return; } } } }
Iterator<IToolPart> partIter = pmt.getPossibleParts().iterator(); if(!partIter.hasNext()) { continue;
for(IToolPart part : pmt.getPossibleParts()) { if(part instanceof Item) { sb.append(((Item) part).getItemStackDisplayName(new ItemStack((Item) part)));
Iterator<IToolPart> partIter = pmt.getPossibleParts().iterator(); if (!partIter.hasNext()) continue;