Skip to content

Commit

Permalink
Fallen Trunk (#2321)
Browse files Browse the repository at this point in the history
* Register FallenTrunkStructure

* Generate FallenTrunkStructure; place sponge as a placeholder

* Spawn trunk

* Generate log trunk with moss patches, chests, a spawner, and holes

* Make hole's shape a sphere

* Add the small trunk

* Change hole generation algorithm

* Add eroded ends to small trunk; rework the generation of trunk

* Run datagen

* Stop placing spawner outside the chunk

* Fix connection of moss patches

* Fix bounding box of the FallenTrunkStructure

* Replace flowers during the generation of FallenTrunkPiece

* Add mounds(prototype); don't spawn fallen trunks in incorrect biomes; increase the minimal length of the trunk; fix bugs; Add a TerraformingPiece as a temporary solution for bug where mounds get cut by chunk borders

* Fix a bug, where eroded end wasn't generate properly; remove warnings

* Don't create hollow hill functions for every block for fallen trunk's mounds

* Make mounds depend on the radius of the trunk

* Reduce the height of mounds

* Rename variable d for better readability

* Remove magic number

* Fix a bug where a mound could be too close to the ends of its trunk.

* Generate several mounds

* Randomize side of the mounds correctly

* Increase amount of mounds for big trunks

* Comment debugging printHole

* Comment debugging blockEdges

* Refactor moundApex to a constant

* Remove blockEdges form FallenTrunkPiece

* Use random.nextBoolean() for trunk holes

* Reduce copy-paste

* Send blockPos in logger report

* Remove debug function placeBlockEdges

* Change fields from private to protected

* Make the hole a field in FallenTrunkPiece; remove magic number in Hole class

* Avoid generation of big mounds next to trunk holes

* Add support for different trunk rotations in mound generation

* Add zOffset

* Add orientation support correctly

* Call random.next() constant amount of times in placeLog()

* Fix a double rotation bug

* Randomize size of mounds

* Remove unused import

* Run datagen

* Remove debug line

* Use Objects.requireNonNull

* Update error message to direct users to github issues

* Avoid a double compute

* Remove System.out.println

* Add a new loot table for FallenTrunkStructure to exclude magic tree saplings

* Randomize chests positions in FallenTrunkPiece

* Use TWILIGHT_OAK_CHEST instead of vanilla one

* Create chests and a spawner in FallenTrunkPiece with 50% chance

* Remove double chest from FallenTrunkPiece

* Randomize monster in spawner; make SPAWNER_MONSTERS a protected static final field in FallenTrunkPiece

* Simplify possibleChestsOffsets generation

* Return 0 when we calculate mound contribution inside the trunk

* Run datagen

* Fix map-save bug for terraforming piece

* Run datagen

---------

Co-authored-by: drullkus <drullkus@gmail.com>
  • Loading branch information
Sleepy-Horse and Drullkus authored Jan 4, 2025
1 parent 137ccc2 commit 77d6350
Show file tree
Hide file tree
Showing 17 changed files with 1,058 additions and 14 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 77d6350

Please sign in to comment.