use of slimeknights.tconstruct.tools.stats.HandleMaterialStats 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.HandleMaterialStats 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.HandleMaterialStats 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.HandleMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildAttackSpeed_testHandleAttackDamage_average.
@Test
void buildAttackSpeed_testHandleAttackDamage_average() {
HeadMaterialStats head = new HeadMaterialStats(0, 0, Tiers.WOOD, 4);
HandleMaterialStats stats1 = new HandleMaterialStats(0, 0, 0, 1.3f);
HandleMaterialStats stats2 = new HandleMaterialStats(0, 0, 0, 1.7f);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionDataBuilder.builder().stat(ToolStats.ATTACK_DAMAGE, 2).build(), ImmutableList.of(head), ImmutableList.of(stats1, stats2), Collections.emptyList());
assertThat(builder.buildAttackDamage()).isEqualTo(9);
}
use of slimeknights.tconstruct.tools.stats.HandleMaterialStats in project TinkersConstruct by SlimeKnights.
the class StatsBuilderTest method buildAttackSpeed_testHandleAttackSpeed_average.
@Test
void buildAttackSpeed_testHandleAttackSpeed_average() {
HandleMaterialStats stats1 = new HandleMaterialStats(0, 0, 1.3f, 0);
HandleMaterialStats stats2 = new HandleMaterialStats(0, 0, 1.7f, 0);
MeleeHarvestToolStatsBuilder builder = new MeleeHarvestToolStatsBuilder(ToolDefinitionData.EMPTY, Collections.emptyList(), ImmutableList.of(stats1, stats2), Collections.emptyList());
assertThat(builder.buildAttackSpeed()).isEqualTo(1.5f);
}
Aggregations