-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: have stricter method visibility again by placing test in th…
…e same package
- Loading branch information
1 parent
6e43ee1
commit f144bcf
Showing
6 changed files
with
113 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...finedmods/refinedstorage2/platform/common/constructordestructor/ConstructorTestPlots.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.refinedmods.refinedstorage2.platform.common.constructordestructor; | ||
|
||
import com.refinedmods.refinedstorage2.platform.common.storage.FluidStorageType; | ||
import com.refinedmods.refinedstorage2.platform.common.storage.ItemStorageType; | ||
|
||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.core.Direction; | ||
import net.minecraft.gametest.framework.GameTestHelper; | ||
import net.minecraft.gametest.framework.GameTestSequence; | ||
import org.apache.commons.lang3.function.TriConsumer; | ||
|
||
import static com.refinedmods.refinedstorage2.platform.forge.GameTestUtil.RSBLOCKS; | ||
import static com.refinedmods.refinedstorage2.platform.forge.GameTestUtil.requireBlockEntity; | ||
import static net.minecraft.core.BlockPos.ZERO; | ||
|
||
final class ConstructorTestPlots { | ||
private ConstructorTestPlots() { | ||
} | ||
|
||
static void preparePlot(final GameTestHelper helper, | ||
final Direction direction, | ||
final TriConsumer<ConstructorBlockEntity, BlockPos, GameTestSequence> consumer) { | ||
helper.setBlock(ZERO.above(), RSBLOCKS.getCreativeController().getDefault()); | ||
helper.setBlock(ZERO.above().above(), RSBLOCKS.getItemStorageBlock(ItemStorageType.Variant.ONE_K)); | ||
helper.setBlock( | ||
ZERO.above().above().north(), | ||
RSBLOCKS.getFluidStorageBlock(FluidStorageType.Variant.SIXTY_FOUR_B) | ||
); | ||
final BlockPos constructorPos = ZERO.above().above().above(); | ||
helper.setBlock(constructorPos, RSBLOCKS.getConstructor().getDefault().rotated(direction)); | ||
consumer.accept( | ||
requireBlockEntity(helper, constructorPos, ConstructorBlockEntity.class), | ||
constructorPos, | ||
helper.startSequence() | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters