fix typos

This commit is contained in:
Alexander Medvedev committed 2025-08-17 22:17:06 +02:00
1 parent 53cef4b050
commit a65b30db02
2 files changed
+5 -5

No files matched your search

+3 -3
View File
@@ -15,7 +15,7 @@ use pumpkin_util::{
use crate::generation::noise::perlin::DoublePerlinNoiseSampler; use crate::generation::noise::perlin::DoublePerlinNoiseSampler;
use crate::generation::structure::placement::StructurePlacementCalculator; use crate::generation::structure::placement::StructurePlacementCalculator;
use crate::generation::structure::structures::StructurePosition; use crate::generation::structure::structures::StructurePosition;
use crate::generation::structure::{STRUCTURE_SETS, STRUCTURS, Structure, StructureType}; use crate::generation::structure::{STRUCTURE_SETS, STRUCTURES, Structure, StructureType};
use crate::{ use crate::{
BlockStateId, BlockStateId,
biome::{BiomeSupplier, MultiNoiseBiomeSupplier, end::TheEndBiomeSupplier, hash_seed}, biome::{BiomeSupplier, MultiNoiseBiomeSupplier, end::TheEndBiomeSupplier, hash_seed},
@@ -765,7 +765,7 @@ impl<'a> ProtoChunk<'a> {
seed: self.random_config.seed as i64, seed: self.random_config.seed as i64,
}; };
// for structure in &set.structures { // for structure in &set.structures {
// let start = self.structure_starts.get(STRUCTURS.get(name).unwrap()); // let start = self.structure_starts.get(STRUCTURES.get(name).unwrap());
// } // }
if !set.placement.should_generate(calculator, self.chunk_pos) { if !set.placement.should_generate(calculator, self.chunk_pos) {
continue; // ?? continue; // ??
@@ -779,7 +779,7 @@ impl<'a> ProtoChunk<'a> {
&& !position.generator.pieces_positions.is_empty() && !position.generator.pieces_positions.is_empty()
{ {
self.structure_starts.insert( self.structure_starts.insert(
STRUCTURS.get(name).unwrap().clone(), STRUCTURES.get(name).unwrap().clone(),
(position, set.structures[0].structure.clone()), (position, set.structures[0].structure.clone()),
); );
} }
@@ -47,7 +47,7 @@ impl StructureType {
StructureType::BuriedTreasure(generator) => generator.get_structure_position(chunk), StructureType::BuriedTreasure(generator) => generator.get_structure_position(chunk),
StructureType::NetherFortress(generator) => generator.get_structure_position(chunk), StructureType::NetherFortress(generator) => generator.get_structure_position(chunk),
}; };
if let Some(structure) = STRUCTURS.get(name) { if let Some(structure) = STRUCTURES.get(name) {
let current_biome = chunk.get_biome(&position.position.0); let current_biome = chunk.get_biome(&position.position.0);
if Biome::get_tag_values(&structure.biomes) if Biome::get_tag_values(&structure.biomes)
.unwrap() .unwrap()
@@ -74,7 +74,7 @@ pub struct Structure {
biomes: String, biomes: String,
} }
pub static STRUCTURS: LazyLock<HashMap<String, Structure>> = pub static STRUCTURES: LazyLock<HashMap<String, Structure>> =
LazyLock::new(|| read_data_from_file!("../../../assets/structure.json")); LazyLock::new(|| read_data_from_file!("../../../assets/structure.json"));
pub static STRUCTURE_SETS: LazyLock<HashMap<String, StructureSet>> = pub static STRUCTURE_SETS: LazyLock<HashMap<String, StructureSet>> =