Miner Rework Repost#185
Miner Rework Repost#185TechLord22 merged 26 commits intoGregTechCEu:masterfrom Synthitic:portingMinersCEu
Conversation
|
With my commit - numerous improvements have been made.
|
bruberu
left a comment
There was a problem hiding this comment.
I think this particular PR is pretty good, and this is probably ready to go, for the most part. I don't entirely understand why the algorithm is implemented the way it is, but this should be fine. I especially like that the miner enumeration is removed.
bruberu
left a comment
There was a problem hiding this comment.
Soft hammering works fine on my end.
future merge conflict is with braggest's hammering pr. other fixes are for the large miner not being able to overclock to max, adjusting tps guard numbers, drilling fluid consumption while overclocked.
htmlcsjs
left a comment
There was a problem hiding this comment.
looks good, jei multiblock now works
| @Override | ||
| public <T> T getCapability(Capability<T> capability, EnumFacing side) { | ||
| if (capability == GregtechTileCapabilities.CAPABILITY_CONTROLLABLE) { | ||
| return GregtechTileCapabilities.CAPABILITY_CONTROLLABLE.cast(this); | ||
| } | ||
| return super.getCapability(capability, side); | ||
| } |
There was a problem hiding this comment.
This is not needed. There is a check for the controllable capability inside the super.getCapability() call
There was a problem hiding this comment.
The check in the super method is for CAPABILITY_MULTIBLOCK_CONTROLLER, which is different from CAPABILITY_CONTROLLABLE.
There was a problem hiding this comment.
Its in MetaTileEntity, so two classes up
| this.inputFluidInventory = new FluidTankList(false, getAbilities(MultiblockAbility.IMPORT_FLUIDS)); | ||
| this.outputInventory = new ItemHandlerList(getAbilities(MultiblockAbility.EXPORT_ITEMS)); |
There was a problem hiding this comment.
Are there notifiable versions of these that should be used? Maybe Trousers knows something
There was a problem hiding this comment.
I don't know of any notifiable ItemHandler or FluidTank List classes personally.
What:
This is identical to the previous PR but with Tech22's improvements since the previous PR went boom for whatever reason.
Some changes may not be detailed as they were in the comments of the previous PR. This PR also now points to master rather than the porting miner branch.
Attempts to mimic 5u miners except for mining pipes. Revamps scanning and breaking of blocks.
How solved:
Scan for blocks upon the machine receiving power, use lowest time complexity for sequential read and write that has dynamic size while sacrificing a bit of space complexity (linked list). Change scanning to scan for blocks instead of chunks then blocks. Blocks are broken under the miner per Y level and a pipe is rendered. A screwdriver can change what the radius is for the miner. The large miners have a chunk mode and silk touch mode toggle button in the machine UI. Chunk mode for the large miner means that instead of the origin being that of where the controller is, the origin is the center of the chunk the controller is in.
Overclocks for large miners are implemented like this.
Small miners no longer require drilling fluid.
Outcome:
Close to 5u miners. No longer have to waste resources on scanning for blocks.
Possible compatibility issue:
Maintenance will need to be integrated but there is a comment for implementing maintenance. Soft hammer pausing machine work also needs to be implemented. Toggle buttons in the large miner UI need textures. There are probably still a good amount of bugs to fix and optimizations to make. There are some debug values that show up in the machine UI that can be cleaned up at the end of the PR.