-
Notifications
You must be signed in to change notification settings - Fork 324
Full refactor of MetaMachine to merge MetaMachine and MetaMachineBlockEntity class and rework the machine inheritance tree #4304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.20.1-v8.0.0
Are you sure you want to change the base?
Conversation
8244e82 to
9626f7a
Compare
b428190 to
6524987
Compare
src/main/java/com/gregtechceu/gtceu/api/blockentity/PipeBlockEntity.java
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/capability/GTCapabilityHelper.java
Outdated
Show resolved
Hide resolved
| } | ||
| } | ||
| } | ||
| // if (is(tool, GTToolType.HARD_HAMMER)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the status on this code?
| import net.minecraft.world.level.block.state.BlockState; | ||
| import net.minecraftforge.common.extensions.IForgeBlockEntity; | ||
|
|
||
| public interface IGregtechBlockEntity extends ISyncManaged, ITickSubscription, IForgeBlockEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably a better name for this.
| public interface ICoverable extends ITickSubscription, ISyncManaged { | ||
|
|
||
| Level getLevel(); | ||
| IGregtechBlockEntity getHolder(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably a better name for this.
src/main/java/com/gregtechceu/gtceu/common/machine/electric/WorldAcceleratorMachine.java
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/AssemblyLineMachine.java
Outdated
Show resolved
Hide resolved
...ain/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/MultiblockTankMachine.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/DiodePartMachine.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/syncsystem/ManagedSyncBlockEntity.java
Outdated
Show resolved
Hide resolved
Co-authored-by: TechLord22 <37029404+TechLord22@users.noreply.github.com>
…m/GregTechCEu/GregTech-Modern into gus/refactor-machine-construction
| return list; | ||
| } | ||
|
|
||
| public static @NotNull <T> LazyOptional<T> getCapability(MetaMachine machine, @NotNull Capability<T> cap, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be made private? Also, this should be made non-static and the machine param removed.
src/main/java/com/gregtechceu/gtceu/api/machine/trait/MachineTrait.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/machine/trait/MachineTrait.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/machine/MetaMachine.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/machine/trait/MachineTrait.java
Outdated
Show resolved
Hide resolved
| protected void checkAutoOutput() { | ||
| if (getOffsetTimer() % ticksPerCycle == 0) { | ||
| if (isAutoOutputItems() && getOutputFacingItems() != null) { | ||
| if (isAutoOutputItems()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removing the null check safe?
173fab8 to
940864e
Compare
What
Fully refactors MetaMachine to remove the seperation between the machine class and the block entity which holds the machine. All references to MMBE have been updated to use MetaMachine directly.
Also contains a number of general refactors to the machine inheritance tree and machine constructors.
TODO: Write a ton of migration docs
Potential Compatibility Issues
there will be at least one compatibility issue, maybe even two