Skip to content

Commit

Permalink
added tree hardness multiplier to server config
Browse files Browse the repository at this point in the history
  • Loading branch information
supermassimo committed Nov 26, 2024
1 parent 13e71db commit a18e9a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ public void neighborChanged(BlockState state, Level level, BlockPos pos, Block b
}

protected void dropBlock(Level level, BlockState state, BlockPos pos) {
level.addFreshEntity(new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, getSpecies().getSeedStack(1)));
level.removeBlock(pos, false);
if (level instanceof ServerLevel serverLevel){
getDrops(state, new LootParams.Builder(serverLevel)).forEach((drop) -> popResource(level, pos, drop));
level.removeBlock(pos, false);
}
}

@Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public class DTConfigs {
MAX_TREE_HARDNESS = SERVER_BUILDER.comment("Maximum harvesting hardness that can be calculated. Regardless of tree thickness.").
defineInRange("maxTreeHardness", 20f, 1f, 200f);
TREE_HARDNESS_MULTIPLIER = SERVER_BUILDER.comment("A multiplier of tree hardness. Higher values make trees slower to chop, lower values makes them faster to chop.").
defineInRange("maxTreeHardness", 1, 0.05f, 20f);
defineInRange("treeHardnessMultiplier", 1, (1/128f), 32f);
TREE_GROWTH_FOLDING = SERVER_BUILDER.comment("Do X growth cycles at once while ignoring (X-1)/X attempts. Higher numbers can improve client side performance but too high can make trees grow wierd.").
defineInRange("growthFolding", 2, 1, 8);
DROP_STICKS = SERVER_BUILDER.comment("If enabled then sticks will be dropped for partial logs").
Expand Down

0 comments on commit a18e9a7

Please sign in to comment.