Skip to content

Commit adbd23b

Browse files
committed
Allow bigger reactors, fixed incorrect error message for too big structures
1 parent 0a500d3 commit adbd23b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/igentuman/nc/handler/config/FissionConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public FissionReactorConfig(ForgeConfigSpec.Builder builder) {
8484

8585
MAX_SIZE = builder
8686
.comment("Reactor max size.")
87-
.defineInRange("max_size", 16, 5, 32);
87+
.defineInRange("max_size", 26, 5, 32);
8888

8989
EXPLOSION_RADIUS = builder
9090
.comment("Explosion size if reactor overheats. 4 - TNT size. Set to 0 to disable explosion.")

src/main/java/igentuman/nc/multiblock/AbstractMultiblock.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ public boolean isValidForInner(BlockPos pos)
229229

230230
public int resolveHeight()
231231
{
232-
for (int i = 1; i < maxHeight(); i++) {
232+
for (int i = 1; i <= maxHeight()+1; i++) {
233233
if (!isValidForOuter(initialPos().above(i))) {
234234
topCasing = i - 1;
235235
height = i;
236236
break;
237237
}
238238
}
239-
for (int i = 1; i < maxHeight(); i++) {
239+
for (int i = 1; i <= maxHeight()+1; i++) {
240240
if (!isValidForOuter(initialPos().below(i))) {
241241
bottomCasing = i - 1;
242242
height += i - 1;
@@ -249,14 +249,14 @@ public int resolveHeight()
249249

250250
public int resolveWidth()
251251
{
252-
for(int i = 1; i<maxWidth(); i++) {
252+
for(int i = 1; i <= maxWidth()+1; i++) {
253253
if (!isValidForOuter(getLeftPos(i).above(topCasing))) {
254254
leftCasing = i-1;
255255
width = i;
256256
break;
257257
}
258258
}
259-
for(int i = 1; i<maxWidth(); i++) {
259+
for(int i = 1; i <= maxWidth()+1; i++) {
260260
if (!isValidForOuter(getRightPos(i).above(topCasing))) {
261261
rightCasing = i-1;
262262
width += i-1;
@@ -268,7 +268,7 @@ public int resolveWidth()
268268

269269
public int resolveDepth()
270270
{
271-
for(int i = 1; i<maxDepth(); i++) {
271+
for(int i = 1; i <= maxDepth()+1; i++) {
272272
if (!isValidForOuter(getForwardPos(i).above(topCasing))) {
273273
depth = i;
274274
break;

0 commit comments

Comments
 (0)