mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Implement unit test for hasGravity(). Adds BUKKIT-3832
This commit is contained in:
parent
696543cf3f
commit
ddec7117ee
1 changed files with 10 additions and 0 deletions
|
@ -10,6 +10,7 @@ import net.minecraft.server.BlockFire;
|
|||
import net.minecraft.server.Item;
|
||||
import net.minecraft.server.ItemFood;
|
||||
import net.minecraft.server.ItemRecord;
|
||||
import net.minecraft.server.BlockSand;
|
||||
|
||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
@ -127,4 +128,13 @@ public class PerMaterialTest extends AbstractTestingBase {
|
|||
assertFalse(material.isOccluding());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void hasGravity() {
|
||||
if (material.isBlock()) {
|
||||
assertThat(material.hasGravity(), is(Block.byId[material.getId()] instanceof BlockSand));
|
||||
} else {
|
||||
assertFalse(material.hasGravity());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue