Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class HullMachine extends TieredPartMachine implements IMonitorComponent
public HullMachine(BlockEntityCreationInfo info, int tier) {
super(info, tier);
if (GTCEu.Mods.isAE2Loaded()) {
this.gridNodeHost = attachTrait(new GridNodeHostTrait(this));
this.gridNodeHost = GridNodeHostTransformer.attachToMachine(this);
} else {
this.gridNodeHost = null;
}
Expand Down Expand Up @@ -82,6 +82,10 @@ public void setFrontFacing(Direction facing) {

private static class GridNodeHostTransformer implements ValueTransformer<Object> {

private static Object attachToMachine(HullMachine machine) {
return machine.attachTrait(new GridNodeHostTrait(machine));
}

@Override
public Tag serializeNBT(Object value, TransformerContext<Object> context) {
if (GTCEu.Mods.isAE2Loaded() &&
Expand Down
Loading