mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-30 09:44:24 +00:00
Ceiling vine curtains
- A vine under a sturdy ceiling keeps its authored side faces - Vines below it hold those faces through the vine above - The vine-above check reads the facing before the material key
This commit is contained in:
1 parent
c2eb8b5f42
commit
067fffe066
3 files changed
+40
-4
No files matched your search
@@ -775,6 +775,26 @@ public class DecoratorCoreTest {
|
||||
assertEquals(EnumSet.of(BlockFace.NORTH), faces(output.get(8, 3, 8)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void stackedVineCurtainHangsUnderAnOpenCeiling() {
|
||||
IrisDecorator decorator = mock(IrisDecorator.class);
|
||||
IrisData data = mock(IrisData.class);
|
||||
NativeBlockState vine = facingState(VINE, VINE_FACES, EnumSet.of(BlockFace.NORTH));
|
||||
when(decorator.getHeight(any(RNG.class), anyDouble(), anyDouble(), eq(data))).thenReturn(3);
|
||||
when(decorator.getTopThreshold()).thenReturn(1.0);
|
||||
when(decorator.pickBlockData(any(RNG.class), eq(data), anyDouble(), anyDouble())).thenReturn(vine);
|
||||
when(decorator.pickBlockDataTop(any(RNG.class), eq(data), anyDouble(), anyDouble())).thenReturn(vine);
|
||||
Hunk<NativeBlockState> output = Hunk.newArrayHunk(16, 8, 16);
|
||||
output.set(8, 6, 8, sturdyState());
|
||||
|
||||
DecoratorCore.placeStackDown(decorator, 8, 8, 8, 8, 5, 0, output, new RNG(1L), data, 3,
|
||||
new DecoratorCore.PlaceOpts(), null);
|
||||
|
||||
assertEquals(EnumSet.of(BlockFace.NORTH, BlockFace.UP), faces(output.get(8, 5, 8)));
|
||||
assertEquals(EnumSet.of(BlockFace.NORTH), faces(output.get(8, 4, 8)));
|
||||
assertEquals(EnumSet.of(BlockFace.NORTH), faces(output.get(8, 3, 8)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void unsupportedAuthoredSideFaceOnALoneVineIsDroppedAndReattached() {
|
||||
NativeBlockState vine = facingState(VINE, VINE_FACES, EnumSet.of(BlockFace.NORTH));
|
||||
|
||||
Reference in new issue
Block a user