Skip to content

Quarry!#108

Open
MalTeeez wants to merge 42 commits into
masterfrom
ender-quarry
Open

Quarry!#108
MalTeeez wants to merge 42 commits into
masterfrom
ender-quarry

Conversation

@MalTeeez

@MalTeeez MalTeeez commented Dec 19, 2025

Copy link
Copy Markdown
Member

Currently I have left on my todos:

  • check if sided configs work on direct load and fix if not
  • waila logic
    • state
    • eta / etl
  • particles / animation of some kind
  • finish rough model of quarry (will be done by artist, idea is there)
  • send notice to owner when done
  • drop items on break - keep fluids?
  • drain energy on harvest based on block hardness
  • allow setting a lower bound with a marker right below the quarry
  • use Add Generic Item I/O Capabilities GTNHLib#167 for item insertion
  • reset quarry to starting pos on redstone signal, give out comparator signal
  • localize everything
  • tooltips
  • collect items dropped from TEs instead of just dropping them?

@MalTeeez

Copy link
Copy Markdown
Member Author

I just noticed I misspelled my first commit - rip

@MalTeeez MalTeeez changed the title Ender Quarry Quarry! Jun 7, 2026
@MalTeeez MalTeeez marked this pull request as ready for review June 25, 2026 04:18
@MalTeeez MalTeeez requested a review from FourIsTheNumber June 25, 2026 04:18
@FourIsTheNumber FourIsTheNumber mentioned this pull request Jun 25, 2026
23 tasks
} else if ((block == Blocks.lava || block == Blocks.flowing_lava) && meta == 0) {
fluid = new FluidStack(FluidRegistry.LAVA, 1000);
} else if (block instanceof IFluidBlock fluidBlock) {
fluid = fluidBlock.drain(worldObj, dx, dy, dz, false);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Because you've already replaced the block, this won't work with modded fluids (tested with BC oil). When they check logic in drain() they will check the coordinates provided (to determine meta value, usually) and that block has already been removed, so it will fail

@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
state = QuarryWorkState.values()[nbt.getInteger("state")];

@FourIsTheNumber FourIsTheNumber Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we serialize by the string name of the enum instead? Enum ordinals are always fragile.

// Can't use getRegistryForDimension yet since worldobj is null
registeredMarkers.computeIfAbsent(dim, k -> new ConcurrentHashMap<>())
.put(new BlockPos(xCoord, yCoord, zCoord), this);
this.operationMode = MarkerOperationMode.values()[compound.getInteger("mode")];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As above, I prefer serializing by name. For these in particular it seems plausible someone might add an additional boundary mode

int lowX = tag.getInteger("lowX");
int lowZ = tag.getInteger("lowZ");
int highX = tag.getInteger("highX");
int highZ = tag.getInteger("highY");

@FourIsTheNumber FourIsTheNumber Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unclear what's going on here, but either the variable name (hizhZ) or the NBT tag (highY) is misleading

public BlockVoidQuarry() {
super(Material.iron);
setBlockName("void_quarry");
setBlockTextureName("utilitiesinexcess:void_quarry");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Set hardness

Comment thread dependencies.gradle
// For debugging chunkloading (/chunkloaders)
//runtimeOnlyNonPublishable('curse.maven:chicken-chunks-229316:2233250')
// Testing performance with void quarry inserts
runtimeOnlyNonPublishable("com.github.GTNewHorizons:EnderCore:0.5.0:dev") { transitive = false }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean up deps


// Or do we have a more complex rectilinear polygon as defined by many points
} else {
// DEBUG: Clear work area of debug blocks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe remove this debug comment, up to you if you want to keep it

new Vector4i(1, intersectsWithBottomBoundary ? 1 : 0, 1, 1)));
}

// DEBUG: Draw sub areas on floor

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Another debug comment

int stepsPerTick = (int) (BASE_STEPS_PER_TICK * (isCreativeBoosted ? 8 : 1)
* upgradeManager.getValue(VoidQuarryUpgradeManager.TieredVoidQuarryUpgrade.SPEED, 1.0));
while (blocksVisitedThisTick < stepsPerTick && stepPos()) {
// TODO: Remove after this has been tested by others

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't forget to remove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants