Quarry!#108
Conversation
…tance to lower x boundary
…me bugs with chunkloading, more mining logic progress
…overflow from chunk loading
…markers, implement usage of ender markers for quarry
…rkflow, fixing some bugs
|
I just noticed I misspelled my first commit - rip |
…rade sub-blocks, make upgrades & more configurable, fix vanilla fluid harvests & initial side validation
…providing messages via localization
…ot-paths, fix overflowing item size in nbt, apply spotless
…, add etl in chat and waila with progress bars, fix skipping first block
…e rarer cases for Quarry
| } 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); |
There was a problem hiding this comment.
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")]; |
There was a problem hiding this comment.
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")]; |
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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"); |
| // 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 } |
|
|
||
| // Or do we have a more complex rectilinear polygon as defined by many points | ||
| } else { | ||
| // DEBUG: Clear work area of debug blocks |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Don't forget to remove
Currently I have left on my todos:
finish rough model of quarry(will be done by artist, idea is there)