Search in sources :

Example 1 with HeadMaterialStats

use of slimeknights.tconstruct.library.materials.HeadMaterialStats in project SilentGems by SilentChaos512.

the class TConstructGemsCompat method register.

private static void register(EnumGem gem, EnumMaterialTier tier) {
    TConstructMaterialGem mat = new TConstructMaterialGem(gem, tier);
    TinkerRegistry.integrate(mat, tier == EnumMaterialTier.SUPER ? gem.getItemSuperOreName() : gem.getItemOreName());
    int durability = gem.getDurability(tier);
    float miningSpeed = gem.getMiningSpeed(tier);
    float meleeDamage = gem.getMeleeDamage(tier);
    float meleeSpeed = gem.getMeleeSpeed(tier);
    int harvestLevel = gem.getHarvestLevel(tier);
    float drawDelay = Math.max(38.4f - 1.4f * meleeSpeed * miningSpeed, 10);
    TinkerRegistry.addMaterialStats(mat, new HeadMaterialStats(durability, miningSpeed, meleeDamage, harvestLevel));
    TinkerRegistry.addMaterialStats(mat, new HandleMaterialStats(0.875f, durability / 8));
    TinkerRegistry.addMaterialStats(mat, new ExtraMaterialStats(durability / 8));
    TinkerRegistry.addMaterialStats(mat, new BowMaterialStats(20f / drawDelay, 1f, 0.4f * meleeDamage - 1));
    // TinkerRegistry.addMaterialStats(mat, new BowStringMaterialStats(1f));
    TinkerRegistry.addMaterialStats(mat, new ArrowShaftMaterialStats(1.0f, 0));
// TinkerRegistry.addMaterialStats(mat, new FletchingMaterialStats(1f, 1f));
// TinkerRegistry.addMaterialStats(mat, new ProjectileMaterialStats());
}
Also used : BowMaterialStats(slimeknights.tconstruct.library.materials.BowMaterialStats) HandleMaterialStats(slimeknights.tconstruct.library.materials.HandleMaterialStats) HeadMaterialStats(slimeknights.tconstruct.library.materials.HeadMaterialStats) ExtraMaterialStats(slimeknights.tconstruct.library.materials.ExtraMaterialStats) ArrowShaftMaterialStats(slimeknights.tconstruct.library.materials.ArrowShaftMaterialStats)

Example 2 with HeadMaterialStats

use of slimeknights.tconstruct.library.materials.HeadMaterialStats in project BaseMetals by MinecraftModDevelopmentMods.

the class TinkersConstructRegistry method addMaterialStats.

/**
 */
public void addMaterialStats() {
    final String curMod = Loader.instance().activeModContainer().getModId();
    for (final Entry<String, TCMaterial> entry : registry.get(curMod).entrySet()) {
        // be double sure!
        entry.getValue().settle();
        final HeadMaterialStats headStats = entry.getValue().getHeadStats();
        final HandleMaterialStats handleStats = entry.getValue().getHandleStats();
        final ExtraMaterialStats extraStats = entry.getValue().getExtraStats();
        final BowMaterialStats bowStats = entry.getValue().getBowStats();
        final ArrowShaftMaterialStats arrowStats = entry.getValue().getArrowStats();
        final FletchingMaterialStats fletchingStats = entry.getValue().getFletchingStats();
        if (TinkerRegistry.getMaterial(entry.getKey()) == entry.getValue().getMaterial()) {
            // the material was properly registered
            final Material work = entry.getValue().getMaterial();
            TinkerRegistry.addMaterialStats(work, headStats, handleStats, extraStats);
            TinkerRegistry.addMaterialStats(work, bowStats);
            TinkerRegistry.addMaterialStats(work, arrowStats);
            TinkerRegistry.addMaterialStats(work, fletchingStats);
        }
    }
}
Also used : BowMaterialStats(slimeknights.tconstruct.library.materials.BowMaterialStats) FletchingMaterialStats(slimeknights.tconstruct.library.materials.FletchingMaterialStats) HandleMaterialStats(slimeknights.tconstruct.library.materials.HandleMaterialStats) HeadMaterialStats(slimeknights.tconstruct.library.materials.HeadMaterialStats) ExtraMaterialStats(slimeknights.tconstruct.library.materials.ExtraMaterialStats) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) Material(slimeknights.tconstruct.library.materials.Material) ArrowShaftMaterialStats(slimeknights.tconstruct.library.materials.ArrowShaftMaterialStats)

Example 3 with HeadMaterialStats

use of slimeknights.tconstruct.library.materials.HeadMaterialStats in project DefiledLands by Lykrast.

the class CompatTinkersConstruct method preInit.

@Override
public void preInit() {
    ModBlocks.registerBlock(new BlockBaseFluid(MOLTEN_UMBRIUM, net.minecraft.block.material.Material.LAVA), "molten_umbrium", null);
    TinkerRegistry.addMaterialStats(UMBRIUM, new HeadMaterialStats(246, 5.0F, 4.0F, HarvestLevels.DIAMOND), new HandleMaterialStats(1.0F, 72), new ExtraMaterialStats(60), new BowMaterialStats(0.5F, 1.5F, 7.0F));
    TinkerRegistry.integrate(UMBRIUM, MOLTEN_UMBRIUM, "Umbrium").toolforge().preInit();
}
Also used : BowMaterialStats(slimeknights.tconstruct.library.materials.BowMaterialStats) HandleMaterialStats(slimeknights.tconstruct.library.materials.HandleMaterialStats) BlockBaseFluid(lykrast.defiledlands.common.block.BlockBaseFluid) HeadMaterialStats(slimeknights.tconstruct.library.materials.HeadMaterialStats) ExtraMaterialStats(slimeknights.tconstruct.library.materials.ExtraMaterialStats)

Aggregations

BowMaterialStats (slimeknights.tconstruct.library.materials.BowMaterialStats)3 ExtraMaterialStats (slimeknights.tconstruct.library.materials.ExtraMaterialStats)3 HandleMaterialStats (slimeknights.tconstruct.library.materials.HandleMaterialStats)3 HeadMaterialStats (slimeknights.tconstruct.library.materials.HeadMaterialStats)3 ArrowShaftMaterialStats (slimeknights.tconstruct.library.materials.ArrowShaftMaterialStats)2 MMDMaterial (com.mcmoddev.lib.material.MMDMaterial)1 BlockBaseFluid (lykrast.defiledlands.common.block.BlockBaseFluid)1 FletchingMaterialStats (slimeknights.tconstruct.library.materials.FletchingMaterialStats)1 Material (slimeknights.tconstruct.library.materials.Material)1