feat: Nether Fortress
Co-Authored-By: Richard Marshall <29306641+Purdze@users.noreply.github.com>
This commit is contained in:
1 parent
e125ca19be
commit
3f4cdd0695
37 files changed
+3181
-276
No files matched your search
@@ -1,7 +1,11 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use pumpkin_data::Block;
|
||||
use pumpkin_util::{math::position::BlockPos, random::RandomGenerator};
|
||||
use pumpkin_util::{
|
||||
BlockDirection,
|
||||
math::{block_box::BlockBox, position::BlockPos},
|
||||
random::RandomGenerator,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
@@ -12,7 +16,7 @@ use crate::{
|
||||
piece::StructurePieceType,
|
||||
shiftable_piece::ShiftableStructurePiece,
|
||||
structures::{
|
||||
StructureGenerator, StructureGeneratorContext, StructurePiece, StructurePieceBase,
|
||||
StructureGenerator, StructureGeneratorContext, StructurePieceBase,
|
||||
StructurePiecesCollector, StructurePosition,
|
||||
},
|
||||
},
|
||||
@@ -40,7 +44,7 @@ impl StructureGenerator for SwampHutGenerator {
|
||||
7,
|
||||
7,
|
||||
9,
|
||||
StructurePiece::get_random_horizontal_direction(&mut context.random).get_axis(),
|
||||
BlockDirection::get_random_horizontal_direction(&mut context.random).get_axis(),
|
||||
),
|
||||
}));
|
||||
|
||||
@@ -61,7 +65,13 @@ impl StructurePieceBase for SwampHutPiece {
|
||||
Box::new(self.clone())
|
||||
}
|
||||
|
||||
fn place(&mut self, chunk: &mut ProtoChunk, _random: &mut RandomGenerator, _seed: i64) {
|
||||
fn place(
|
||||
&mut self,
|
||||
chunk: &mut ProtoChunk,
|
||||
_random: &mut RandomGenerator,
|
||||
_seed: i64,
|
||||
chunk_box: &BlockBox,
|
||||
) {
|
||||
if !self
|
||||
.shiftable_structure_piece
|
||||
.adjust_to_average_height(chunk)
|
||||
@@ -69,7 +79,7 @@ impl StructurePieceBase for SwampHutPiece {
|
||||
return;
|
||||
}
|
||||
|
||||
let box_limit = self.shiftable_structure_piece.piece.bounding_box;
|
||||
let box_limit = *chunk_box;
|
||||
let p = &self.shiftable_structure_piece.piece;
|
||||
|
||||
let spruce_planks = Block::SPRUCE_PLANKS.default_state;
|
||||
|
||||
Reference in new issue
Block a user