Skip to content

Commit d6e1687

Browse files
committed
Use "hatch_flags" to store hatch flags instead of "flags"
1 parent 2cbe7f4 commit d6e1687

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

src/client/java/aztech/modern_industrialization/gui/structure/StructureMultiblockMemberEditScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public boolean charTyped(char codePoint, int modifiers) {
217217
}
218218
};
219219
flagsBox.setMaxLength(Short.MAX_VALUE);
220-
flagsBox.setValue(member.getInputFlags());
220+
flagsBox.setValue(member.getInputHatchFlags());
221221
flagsBox.setResponder(text -> this.updateFlags());
222222
this.addRenderableWidget(flagsBox);
223223

src/main/java/aztech/modern_industrialization/blocks/structure/member/StructureMultiblockMemberBlockEntity.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ public class StructureMultiblockMemberBlockEntity extends FastBlockEntity implem
5151
private String inputPreview;
5252
private String inputMembers;
5353
private String inputCasing;
54-
private String inputFlags;
54+
private String inputHatchFlags;
5555

5656
private BlockState preview;
5757
private List<StructureMemberTest> members;
5858
private MachineCasing casing;
59-
private HatchFlags flags = HatchFlags.NO_HATCH;
59+
private HatchFlags hatchFlags = HatchFlags.NO_HATCH;
6060

6161
public StructureMultiblockMemberBlockEntity(BlockPos pos, BlockState state) {
6262
super(MIRegistries.STRUCTURE_MULTIBLOCK_MEMBER_BE.get(), pos, state);
@@ -122,13 +122,13 @@ public void setInputCasing(String inputCasing) {
122122
}
123123

124124
@Nullable
125-
public String getInputFlags() {
126-
return inputFlags;
125+
public String getInputHatchFlags() {
126+
return inputHatchFlags;
127127
}
128128

129-
public void setInputFlags(String inputFlags) {
130-
this.inputFlags = inputFlags;
131-
flags = StructureMultiblockInputFormatters.hatchFlags(inputFlags);
129+
public void setInputHatchFlags(String inputHatchFlags) {
130+
this.inputHatchFlags = inputHatchFlags;
131+
hatchFlags = StructureMultiblockInputFormatters.hatchFlags(inputHatchFlags);
132132
}
133133

134134
@Nullable
@@ -137,14 +137,14 @@ public MachineCasing getCasing() {
137137
}
138138

139139
@Nullable
140-
public HatchFlags getFlags() {
141-
return flags;
140+
public HatchFlags getHatchFlags() {
141+
return hatchFlags;
142142
}
143143

144144
@Override
145145
public StructureMember getMemberOverride() {
146146
return switch (getMode()) {
147-
case HATCH -> StructureMember.hatch(() -> preview, members, casing, flags);
147+
case HATCH -> StructureMember.hatch(() -> preview, members, casing, hatchFlags);
148148
case SIMPLE -> StructureMember.simple(() -> preview, members);
149149
case VARIABLE -> StructureMember.variable(inputName);
150150
};
@@ -156,7 +156,7 @@ public boolean isConfigurationValid() {
156156
return inputName != null && !inputName.isEmpty();
157157
} else if (preview != null && members != null && !members.isEmpty()) {
158158
if (mode == StructureMemberMode.HATCH) {
159-
return casing != null && flags != null && !inputFlags.isEmpty();
159+
return casing != null && hatchFlags != null && !inputHatchFlags.isEmpty();
160160
}
161161
return true;
162162
}
@@ -191,8 +191,8 @@ protected void saveAdditional(CompoundTag tag, HolderLookup.Provider registries)
191191
if (inputCasing != null) {
192192
tag.putString("casing", inputCasing);
193193
}
194-
if (inputFlags != null) {
195-
tag.putString("flags", inputFlags);
194+
if (inputHatchFlags != null) {
195+
tag.putString("hatch_flags", inputHatchFlags);
196196
}
197197
}
198198

@@ -204,7 +204,7 @@ protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries)
204204
this.setInputPreview(tag.getString("preview"));
205205
this.setInputMembers(tag.getString("members"));
206206
this.setInputCasing(tag.getString("casing"));
207-
this.setInputFlags(tag.getString("flags"));
207+
this.setInputHatchFlags(tag.getString("hatch_flags"));
208208
this.updateBlockState();
209209
}
210210

src/main/java/aztech/modern_industrialization/machines/multiblocks/structure/member/HatchStructureMember.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public Optional<Pair<BlockState, FastBlockEntity>> asStructureBlock(BlockPos pos
117117
be.setInputPreview(StructureMultiblockInputFormatters.preview(getPreviewState()));
118118
be.setInputMembers(StructureMultiblockInputFormatters.members(tests));
119119
be.setInputCasing(StructureMultiblockInputFormatters.casing(casing));
120-
be.setInputFlags(StructureMultiblockInputFormatters.hatchFlags(hatchFlags));
120+
be.setInputHatchFlags(StructureMultiblockInputFormatters.hatchFlags(hatchFlags));
121121
return Optional.of(Pair.of(state, be));
122122
}
123123

src/main/java/aztech/modern_industrialization/network/structure/StructureUpdateMemberPacket.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void handle(Context ctx) {
7676
member.setInputPreview(inputPreview);
7777
member.setInputMembers(inputMembers);
7878
member.setInputCasing(inputCasing);
79-
member.setInputFlags(inputFlags);
79+
member.setInputHatchFlags(inputFlags);
8080

8181
member.sync();
8282
member.setChanged();

0 commit comments

Comments
 (0)