Skip to content

Drill Tip + Texture + other additions#23

Merged
EpicVon2468 merged 8 commits into
Create-Civilization:1.21.1from
starpanda24825:1.21.1
Jul 4, 2026
Merged

Drill Tip + Texture + other additions#23
EpicVon2468 merged 8 commits into
Create-Civilization:1.21.1from
starpanda24825:1.21.1

Conversation

@starpanda24825

Copy link
Copy Markdown
Contributor
  • Added tiered drill tips (diamond, steel, iron, gold)
  • Each drill tip can only mine certain deposit types
  • added more textures inclusing two fluid textures
  • bottom to top deposit mining using drill pulley
Screenshot 2026-06-30 014302 Screenshot 2026-06-30 022316 Screenshot 2026-06-30 022334

@EpicVon2468 EpicVon2468 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spy with my little eye, something that beings with Time Of Check, Time Of Use.

filter: (BlockState) -> Boolean
): BlockPos {
val visited: MutableSet<BlockPos> = mutableSetOf(start)
private fun buildDepositQueue(startPos: BlockPos) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably try to manage resizing & reallocation of sets, lists and deques here, could get resource-expensive fast.

* on [maxAttempts] and the current extraction interval.
*/
fun onBreakTick() {
if (level?.isClientSide != false) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val level = this.level
if (level == null || level.isClientSide) return

@EpicVon2468 EpicVon2468 added the enhancement New feature or request label Jun 30, 2026
@starpanda24825

Copy link
Copy Markdown
Contributor Author
  • onBreakTick() now uses val level = this.level ?: return and then uses that same reference for all checks/uses, instead of repeatedly touching level? and returning mid-way from helper calls.
  • initializeCurrentDeposit() no longer does an early return after partially chaning internal state. It now either initializes cleanly or resets attempts cleanly via a small helper ( resetExtractionState() ), so callers don’t get inconsistent internal fields.
  • Added depositQueueSet to make the “tipPos in queue?” check O(1) instead of tipPos !in depositQueue ( O(n) ).
  • Reworked BFS queue build to reuse bfsVisited , bfsPositions adn bfsQueue and sort in-place ( sortWith ) to avoid extra allocations every rebuild. Making it more resource efficient.
  • getMovementSpeed() no longer uses level!! to avoid null erors
    Comiles well and everything still functions!!!

@EpicVon2468 EpicVon2468 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one note :D

@EpicVon2468 EpicVon2468 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With all said, LGTM

@EpicVon2468 EpicVon2468 merged commit 5b95293 into Create-Civilization:1.21.1 Jul 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants