use of slimeknights.tconstruct.tools.stats.HeadMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildDurability_ensureAverage_head.
@Test
void buildDurability_ensureAverage_head() {
HeadMaterialStats stats1 = new HeadMaterialStats(100, 0, Tiers.WOOD, 0);
HeadMaterialStats stats2 = new HeadMaterialStats(50, 0, Tiers.WOOD, 0);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionDataBuilder.builder().stat(ToolStats.DURABILITY, 100).build(), ImmutableList.of(stats1, stats2), Collections.emptyList(), Collections.emptyList());
assertThat(builder.buildDurability()).isEqualTo(175);
}
use of slimeknights.tconstruct.tools.stats.HeadMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildDurability_testHandleDurability.
@Test
void buildDurability_testHandleDurability() {
HeadMaterialStats statsHead = new HeadMaterialStats(200, 0, Tiers.WOOD, 0);
HandleMaterialStats statsHandle = new HandleMaterialStats(0.5f, 0, 0, 0);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionData.EMPTY, ImmutableList.of(statsHead), ImmutableList.of(statsHandle), Collections.emptyList());
assertThat(builder.buildDurability()).isEqualTo(100);
}
use of slimeknights.tconstruct.tools.stats.HeadMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildMiningSpeed_testHandleMiningSpeed.
@Test
void buildMiningSpeed_testHandleMiningSpeed() {
HeadMaterialStats statsHead = new HeadMaterialStats(0, 2.0f, Tiers.WOOD, 0);
HandleMaterialStats statsHandle = new HandleMaterialStats(0, 0.5f, 0, 0);
ExtraMaterialStats statsExtra = ExtraMaterialStats.DEFAULT;
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionData.EMPTY, ImmutableList.of(statsHead), ImmutableList.of(statsHandle), ImmutableList.of(statsExtra));
assertThat(builder.buildMiningSpeed()).isEqualTo(1.0f);
}
use of slimeknights.tconstruct.tools.stats.HeadMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildDurability_testHandleDurability_average.
@Test
void buildDurability_testHandleDurability_average() {
HeadMaterialStats statsHead = new HeadMaterialStats(200, 0, Tiers.WOOD, 0);
HandleMaterialStats statsHandle1 = new HandleMaterialStats(0.3f, 0, 0, 0);
HandleMaterialStats statsHandle2 = new HandleMaterialStats(0.7f, 0, 0, 0);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionData.EMPTY, ImmutableList.of(statsHead), ImmutableList.of(statsHandle1, statsHandle2), Collections.emptyList());
assertThat(builder.buildDurability()).isEqualTo(100);
}
use of slimeknights.tconstruct.tools.stats.HeadMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildAttack_ensureAverage.
@Test
void buildAttack_ensureAverage() {
HeadMaterialStats stats1 = new HeadMaterialStats(1, 0, Tiers.WOOD, 5);
HeadMaterialStats stats2 = new HeadMaterialStats(1, 0, Tiers.WOOD, 10);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionDataBuilder.builder().stat(ToolStats.ATTACK_DAMAGE, 10).build(), ImmutableList.of(stats1, stats2), Collections.emptyList(), Collections.emptyList());
assertThat(builder.buildAttackDamage()).isEqualTo(17.5f);
}
Aggregations